Struct: s3.HeadObjectInput

import "../ibm-cos-sdk-go/service/s3"

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

The name of the bucket containing the object.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points (docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) in the Amazon S3 User Guide.

When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? (docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the Amazon S3 User Guide.

Bucket is a required field

ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`

Ignored by COS.

IfMatch *string `location:"header" locationName:"If-Match" type:"string"`

Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).

IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`

Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).

IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`

Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).

IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`

Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).

Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

The object key.

Key is a required field

PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`

Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.

Range *string `location:"header" locationName:"Range" type:"string"`

HeadObject returns only the metadata for an object. If the Range is satisfiable, only the ContentLength is affected in the response. If the Range is not satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets (docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) in the Amazon S3 User Guide.

SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`

Specifies the algorithm to use to when encrypting the object (for example, AES256).

SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.

SSECustomerKey is a sensitive parameter and its value will be replaced with “sensitive” in string returned by HeadObjectInput's String and GoString methods.

SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.

VersionId *string `location:"querystring" locationName:"versionId" type:"string"`

VersionId used to reference a specific version of the object.

_ struct{} `locationName:"HeadObjectRequest" type:"structure"`

Method Details

func (s HeadObjectInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



14797
14798
14799
// File 'service/s3/api.go', line 14797

func (s HeadObjectInput) GoString() string { return s.String() }

func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput

SetBucket sets the Bucket field's value.



14824
14825
14826
14827
// File 'service/s3/api.go', line 14824

func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput { s.Bucket = &v return s }

func (s *HeadObjectInput) SetExpectedBucketOwner(v string) *HeadObjectInput

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



14837
14838
14839
14840
// File 'service/s3/api.go', line 14837

func (s *HeadObjectInput) SetExpectedBucketOwner(v string) *HeadObjectInput { s.ExpectedBucketOwner = &v return s }

func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput

SetIfMatch sets the IfMatch field's value.



14843
14844
14845
14846
// File 'service/s3/api.go', line 14843

func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput { s.IfMatch = &v return s }

func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput

SetIfModifiedSince sets the IfModifiedSince field's value.



14849
14850
14851
14852
// File 'service/s3/api.go', line 14849

func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput { s.IfModifiedSince = &v return s }

func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput

SetIfNoneMatch sets the IfNoneMatch field's value.



14855
14856
14857
14858
// File 'service/s3/api.go', line 14855

func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput { s.IfNoneMatch = &v return s }

func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput

SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.



14861
14862
14863
14864
// File 'service/s3/api.go', line 14861

func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput { s.IfUnmodifiedSince = &v return s }

func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput

SetKey sets the Key field's value.



14867
14868
14869
14870
// File 'service/s3/api.go', line 14867

func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput { s.Key = &v return s }

func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput

SetPartNumber sets the PartNumber field's value.



14873
14874
14875
14876
// File 'service/s3/api.go', line 14873

func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput { s.PartNumber = &v return s }

func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput

SetRange sets the Range field's value.



14879
14880
14881
14882
// File 'service/s3/api.go', line 14879

func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput { s.Range = &v return s }

func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput

SetRequestPayer sets the RequestPayer field's value.



14885
14886
14887
14888
// File 'service/s3/api.go', line 14885

func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput { s.RequestPayer = &v return s }

func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.



14891
14892
14893
14894
// File 'service/s3/api.go', line 14891

func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput { s.SSECustomerAlgorithm = &v return s }

func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput

SetSSECustomerKey sets the SSECustomerKey field's value.



14897
14898
14899
14900
// File 'service/s3/api.go', line 14897

func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput { s.SSECustomerKey = &v return s }

func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.



14910
14911
14912
14913
// File 'service/s3/api.go', line 14910

func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput { s.SSECustomerKeyMD5 = &v return s }

func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput

SetVersionId sets the VersionId field's value.



14916
14917
14918
14919
// File 'service/s3/api.go', line 14916

func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput { s.VersionId = &v return s }

func (s HeadObjectInput) String() string

String returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



14788
14789
14790
// File 'service/s3/api.go', line 14788

func (s HeadObjectInput) String() string { return awsutil.Prettify(s) }

func (s *HeadObjectInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.



14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
// File 'service/s3/api.go', line 14802

func (s *HeadObjectInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"} if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } if s.Bucket != nil && len(*s.Bucket) < 1 { invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil }