Struct: s3.GetObjectInput

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 bucket name 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 using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

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"`

Key of the object to get.

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' GET request for the part specified. Useful for downloading just a part of an object.

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

Downloads the specified range bytes of an object. For more information about the HTTP Range header, see www.rfc-editor.org/rfc/rfc9110.html#name-range (www.rfc-editor.org/rfc/rfc9110.html#name-range).

Amazon S3 doesn't support retrieving multiple ranges of data per GET request.

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.

ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`

Sets the Cache-Control header of the response.

ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`

Sets the Content-Disposition header of the response

ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`

Sets the Content-Encoding header of the response.

ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`

Sets the Content-Language header of the response.

ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`

Sets the Content-Type header of the response.

ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`

Sets the Expires header of the response.

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

Specifies the algorithm to use to when decrypting 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 used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. 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 GetObjectInput'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:"GetObjectRequest" type:"structure"`

Method Details

func (s GetObjectInput) 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”.



13162
13163
13164
// File 'service/s3/api.go', line 13162

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

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

SetBucket sets the Bucket field's value.



13189
13190
13191
13192
// File 'service/s3/api.go', line 13189

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



13202
13203
13204
13205
// File 'service/s3/api.go', line 13202

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

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

SetIfMatch sets the IfMatch field's value.



13208
13209
13210
13211
// File 'service/s3/api.go', line 13208

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

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

SetIfModifiedSince sets the IfModifiedSince field's value.



13214
13215
13216
13217
// File 'service/s3/api.go', line 13214

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

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

SetIfNoneMatch sets the IfNoneMatch field's value.



13220
13221
13222
13223
// File 'service/s3/api.go', line 13220

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

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

SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.



13226
13227
13228
13229
// File 'service/s3/api.go', line 13226

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

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

SetKey sets the Key field's value.



13232
13233
13234
13235
// File 'service/s3/api.go', line 13232

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

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

SetPartNumber sets the PartNumber field's value.



13238
13239
13240
13241
// File 'service/s3/api.go', line 13238

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

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

SetRange sets the Range field's value.



13244
13245
13246
13247
// File 'service/s3/api.go', line 13244

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

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

SetRequestPayer sets the RequestPayer field's value.



13250
13251
13252
13253
// File 'service/s3/api.go', line 13250

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

func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput

SetResponseCacheControl sets the ResponseCacheControl field's value.



13256
13257
13258
13259
// File 'service/s3/api.go', line 13256

func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput { s.ResponseCacheControl = &v return s }

func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput

SetResponseContentDisposition sets the ResponseContentDisposition field's value.



13262
13263
13264
13265
// File 'service/s3/api.go', line 13262

func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput { s.ResponseContentDisposition = &v return s }

func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput

SetResponseContentEncoding sets the ResponseContentEncoding field's value.



13268
13269
13270
13271
// File 'service/s3/api.go', line 13268

func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput { s.ResponseContentEncoding = &v return s }

func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput

SetResponseContentLanguage sets the ResponseContentLanguage field's value.



13274
13275
13276
13277
// File 'service/s3/api.go', line 13274

func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput { s.ResponseContentLanguage = &v return s }

func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput

SetResponseContentType sets the ResponseContentType field's value.



13280
13281
13282
13283
// File 'service/s3/api.go', line 13280

func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput { s.ResponseContentType = &v return s }

func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput

SetResponseExpires sets the ResponseExpires field's value.



13286
13287
13288
13289
// File 'service/s3/api.go', line 13286

func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput { s.ResponseExpires = &v return s }

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

SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.



13292
13293
13294
13295
// File 'service/s3/api.go', line 13292

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

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

SetSSECustomerKey sets the SSECustomerKey field's value.



13298
13299
13300
13301
// File 'service/s3/api.go', line 13298

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

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

SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.



13311
13312
13313
13314
// File 'service/s3/api.go', line 13311

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

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

SetVersionId sets the VersionId field's value.



13317
13318
13319
13320
// File 'service/s3/api.go', line 13317

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

func (s GetObjectInput) 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”.



13153
13154
13155
// File 'service/s3/api.go', line 13153

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

func (s *GetObjectInput) Validate() error

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



13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
// File 'service/s3/api.go', line 13167

func (s *GetObjectInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} 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 }