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



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

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

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

SetBucket sets the Bucket field’s value.



13340
13341
13342
13343
// File 'service/s3/api.go', line 13340

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.



13353
13354
13355
13356
// File 'service/s3/api.go', line 13353

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.



13359
13360
13361
13362
// File 'service/s3/api.go', line 13359

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.



13365
13366
13367
13368
// File 'service/s3/api.go', line 13365

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.



13371
13372
13373
13374
// File 'service/s3/api.go', line 13371

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.



13377
13378
13379
13380
// File 'service/s3/api.go', line 13377

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.



13383
13384
13385
13386
// File 'service/s3/api.go', line 13383

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.



13389
13390
13391
13392
// File 'service/s3/api.go', line 13389

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.



13395
13396
13397
13398
// File 'service/s3/api.go', line 13395

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.



13401
13402
13403
13404
// File 'service/s3/api.go', line 13401

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.



13407
13408
13409
13410
// File 'service/s3/api.go', line 13407

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.



13413
13414
13415
13416
// File 'service/s3/api.go', line 13413

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.



13419
13420
13421
13422
// File 'service/s3/api.go', line 13419

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.



13425
13426
13427
13428
// File 'service/s3/api.go', line 13425

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.



13431
13432
13433
13434
// File 'service/s3/api.go', line 13431

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.



13437
13438
13439
13440
// File 'service/s3/api.go', line 13437

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.



13443
13444
13445
13446
// File 'service/s3/api.go', line 13443

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.



13449
13450
13451
13452
// File 'service/s3/api.go', line 13449

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.



13462
13463
13464
13465
// File 'service/s3/api.go', line 13462

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.



13468
13469
13470
13471
// File 'service/s3/api.go', line 13468

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



13304
13305
13306
// File 'service/s3/api.go', line 13304

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.



13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
// File 'service/s3/api.go', line 13318

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 }