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”.



14948
14949
14950
// File 'service/s3/api.go', line 14948

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

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

SetBucket sets the Bucket field’s value.



14975
14976
14977
14978
// File 'service/s3/api.go', line 14975

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.



14988
14989
14990
14991
// File 'service/s3/api.go', line 14988

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.



14994
14995
14996
14997
// File 'service/s3/api.go', line 14994

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.



15000
15001
15002
15003
// File 'service/s3/api.go', line 15000

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.



15006
15007
15008
15009
// File 'service/s3/api.go', line 15006

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.



15012
15013
15014
15015
// File 'service/s3/api.go', line 15012

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.



15018
15019
15020
15021
// File 'service/s3/api.go', line 15018

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.



15024
15025
15026
15027
// File 'service/s3/api.go', line 15024

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.



15030
15031
15032
15033
// File 'service/s3/api.go', line 15030

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.



15036
15037
15038
15039
// File 'service/s3/api.go', line 15036

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.



15042
15043
15044
15045
// File 'service/s3/api.go', line 15042

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.



15048
15049
15050
15051
// File 'service/s3/api.go', line 15048

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.



15061
15062
15063
15064
// File 'service/s3/api.go', line 15061

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.



15067
15068
15069
15070
// File 'service/s3/api.go', line 15067

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”.



14939
14940
14941
// File 'service/s3/api.go', line 14939

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.



14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
// File 'service/s3/api.go', line 14953

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 }