Struct: s3.GetObjectRetentionInput

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 whose retention settings you want to retrieve.

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.

Bucket is a required field

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

Ignored by COS.

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

The key name for the object whose retention settings you want to retrieve.

Key is a required field

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

Ignored by COS.

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

The version ID for the object whose retention settings you want to retrieve.

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

Method Details

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



14001
14002
14003
// File 'service/s3/api.go', line 14001

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

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

SetBucket sets the Bucket field's value.



14028
14029
14030
14031
// File 'service/s3/api.go', line 14028

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



14041
14042
14043
14044
// File 'service/s3/api.go', line 14041

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

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

SetKey sets the Key field's value.



14047
14048
14049
14050
// File 'service/s3/api.go', line 14047

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

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

SetRequestPayer sets the RequestPayer field's value.



14053
14054
14055
14056
// File 'service/s3/api.go', line 14053

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

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

SetVersionId sets the VersionId field's value.



14059
14060
14061
14062
// File 'service/s3/api.go', line 14059

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

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



13992
13993
13994
// File 'service/s3/api.go', line 13992

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

func (s *GetObjectRetentionInput) Validate() error

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



14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
// File 'service/s3/api.go', line 14006

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