Struct: s3.PutObjectAclInput

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

ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`

The canned ACL to apply to the object. For more information, see Canned ACL (docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).

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

Contains the elements that set the ACL permissions for an object per grantee.

Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

The bucket name that contains the object to which you want to attach the ACL.

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.

GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`

Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.

This action is not supported by Amazon S3 on Outposts.

GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`

Allows grantee to list the objects in the bucket.

This action is not supported by Amazon S3 on Outposts.

GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`

Allows grantee to read the bucket ACL.

This action is not supported by Amazon S3 on Outposts.

GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`

Allows grantee to create, overwrite, and delete any object in the bucket.

GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`

Allows grantee to write the ACL for the applicable bucket.

This action is not supported by Amazon S3 on Outposts.

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

Key for which the PUT action was initiated.

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.

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.

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

VersionId used to reference a specific version of the object.

_ struct{} `locationName:"PutObjectAclRequest" type:"structure" payload:"AccessControlPolicy"`

Method Details

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



19566
19567
19568
// File 'service/s3/api.go', line 19566

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

func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput

SetAccessControlPolicy sets the AccessControlPolicy field's value.



19604
19605
19606
19607
// File 'service/s3/api.go', line 19604

func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput { s.AccessControlPolicy = v return s }

func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput

SetACL sets the ACL field's value.



19598
19599
19600
19601
// File 'service/s3/api.go', line 19598

func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput { s.ACL = &v return s }

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

SetBucket sets the Bucket field's value.



19610
19611
19612
19613
// File 'service/s3/api.go', line 19610

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



19623
19624
19625
19626
// File 'service/s3/api.go', line 19623

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

func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput

SetGrantFullControl sets the GrantFullControl field's value.



19629
19630
19631
19632
// File 'service/s3/api.go', line 19629

func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput { s.GrantFullControl = &v return s }

func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput

SetGrantRead sets the GrantRead field's value.



19635
19636
19637
19638
// File 'service/s3/api.go', line 19635

func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput { s.GrantRead = &v return s }

func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput

SetGrantReadACP sets the GrantReadACP field's value.



19641
19642
19643
19644
// File 'service/s3/api.go', line 19641

func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput { s.GrantReadACP = &v return s }

func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput

SetGrantWrite sets the GrantWrite field's value.



19647
19648
19649
19650
// File 'service/s3/api.go', line 19647

func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput { s.GrantWrite = &v return s }

func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput

SetGrantWriteACP sets the GrantWriteACP field's value.



19653
19654
19655
19656
// File 'service/s3/api.go', line 19653

func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput { s.GrantWriteACP = &v return s }

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

SetKey sets the Key field's value.



19659
19660
19661
19662
// File 'service/s3/api.go', line 19659

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

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

SetRequestPayer sets the RequestPayer field's value.



19665
19666
19667
19668
// File 'service/s3/api.go', line 19665

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

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

SetVersionId sets the VersionId field's value.



19671
19672
19673
19674
// File 'service/s3/api.go', line 19671

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

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



19557
19558
19559
// File 'service/s3/api.go', line 19557

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

func (s *PutObjectAclInput) Validate() error

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



19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
// File 'service/s3/api.go', line 19571

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