Struct: s3.GetObjectLegalHoldInput

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 legal hold status 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 Legal Hold status 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 of the object whose Legal Hold status you want to retrieve.

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

Method Details

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



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

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

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

SetBucket sets the Bucket field's value.



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

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



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

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

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

SetKey sets the Key field's value.



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

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

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

SetRequestPayer sets the RequestPayer field's value.



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

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

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

SetVersionId sets the VersionId field's value.



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

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

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



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

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

func (s *GetObjectLegalHoldInput) Validate() error

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



13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
// File 'service/s3/api.go', line 13372

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