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



19803
19804
19805
// File 'service/s3/api.go', line 19803

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

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

SetAccessControlPolicy sets the AccessControlPolicy field's value.



19841
19842
19843
19844
// File 'service/s3/api.go', line 19841

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.



19835
19836
19837
19838
// File 'service/s3/api.go', line 19835

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.



19847
19848
19849
19850
// File 'service/s3/api.go', line 19847

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.



19860
19861
19862
19863
// File 'service/s3/api.go', line 19860

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.



19866
19867
19868
19869
// File 'service/s3/api.go', line 19866

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.



19872
19873
19874
19875
// File 'service/s3/api.go', line 19872

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.



19878
19879
19880
19881
// File 'service/s3/api.go', line 19878

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.



19884
19885
19886
19887
// File 'service/s3/api.go', line 19884

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.



19890
19891
19892
19893
// File 'service/s3/api.go', line 19890

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.



19896
19897
19898
19899
// File 'service/s3/api.go', line 19896

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.



19902
19903
19904
19905
// File 'service/s3/api.go', line 19902

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.



19908
19909
19910
19911
// File 'service/s3/api.go', line 19908

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



19794
19795
19796
// File 'service/s3/api.go', line 19794

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.



19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
// File 'service/s3/api.go', line 19808

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 }