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



20331
20332
20333
// File 'service/s3/api.go', line 20331

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

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

SetAccessControlPolicy sets the AccessControlPolicy field’s value.



20369
20370
20371
20372
// File 'service/s3/api.go', line 20369

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.



20363
20364
20365
20366
// File 'service/s3/api.go', line 20363

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.



20375
20376
20377
20378
// File 'service/s3/api.go', line 20375

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.



20388
20389
20390
20391
// File 'service/s3/api.go', line 20388

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.



20394
20395
20396
20397
// File 'service/s3/api.go', line 20394

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.



20400
20401
20402
20403
// File 'service/s3/api.go', line 20400

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.



20406
20407
20408
20409
// File 'service/s3/api.go', line 20406

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.



20412
20413
20414
20415
// File 'service/s3/api.go', line 20412

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.



20418
20419
20420
20421
// File 'service/s3/api.go', line 20418

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.



20424
20425
20426
20427
// File 'service/s3/api.go', line 20424

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.



20430
20431
20432
20433
// File 'service/s3/api.go', line 20430

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.



20436
20437
20438
20439
// File 'service/s3/api.go', line 20436

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



20322
20323
20324
// File 'service/s3/api.go', line 20322

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.



20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
// File 'service/s3/api.go', line 20336

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 }