Struct: s3.PutObjectTaggingInput

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

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

Name of the object key.

Key is a required field

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.

Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

Container for the TagSet and Tag elements

Tagging is a required field

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

The versionId of the object that the tag-set will be added to.

_ struct{} `locationName:"PutObjectTaggingRequest" type:"structure" payload:"Tagging"`

Method Details

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



20769
20770
20771
// File 'service/s3/api.go', line 20769

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

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

SetBucket sets the Bucket field's value.



20804
20805
20806
20807
// File 'service/s3/api.go', line 20804

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



20817
20818
20819
20820
// File 'service/s3/api.go', line 20817

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

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

SetKey sets the Key field's value.



20823
20824
20825
20826
// File 'service/s3/api.go', line 20823

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

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

SetRequestPayer sets the RequestPayer field's value.



20829
20830
20831
20832
// File 'service/s3/api.go', line 20829

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

func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput

SetTagging sets the Tagging field's value.



20835
20836
20837
20838
// File 'service/s3/api.go', line 20835

func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput { s.Tagging = v return s }

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

SetVersionId sets the VersionId field's value.



20841
20842
20843
20844
// File 'service/s3/api.go', line 20841

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

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



20760
20761
20762
// File 'service/s3/api.go', line 20760

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

func (s *PutObjectTaggingInput) Validate() error

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



20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
// File 'service/s3/api.go', line 20774

func (s *PutObjectTaggingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"} 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 s.Tagging == nil { invalidParams.Add(request.NewErrParamRequired("Tagging")) } if s.Tagging != nil { if err := s.Tagging.Validate(); err != nil { invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil }