Struct: s3.PutBucketAclInput

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:"BucketCannedACL"`

The canned ACL to apply to the bucket.

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 to which to apply the ACL.

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.

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

Allows grantee to list the objects in the bucket.

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

Allows grantee to read the bucket ACL.

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.

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

Method Details

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



18862
18863
18864
// File 'service/s3/api.go', line 18862

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

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

SetAccessControlPolicy sets the AccessControlPolicy field's value.



18894
18895
18896
18897
// File 'service/s3/api.go', line 18894

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

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

SetACL sets the ACL field's value.



18888
18889
18890
18891
// File 'service/s3/api.go', line 18888

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

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

SetBucket sets the Bucket field's value.



18900
18901
18902
18903
// File 'service/s3/api.go', line 18900

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



18913
18914
18915
18916
// File 'service/s3/api.go', line 18913

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

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

SetGrantFullControl sets the GrantFullControl field's value.



18919
18920
18921
18922
// File 'service/s3/api.go', line 18919

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

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

SetGrantRead sets the GrantRead field's value.



18925
18926
18927
18928
// File 'service/s3/api.go', line 18925

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

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

SetGrantReadACP sets the GrantReadACP field's value.



18931
18932
18933
18934
// File 'service/s3/api.go', line 18931

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

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

SetGrantWrite sets the GrantWrite field's value.



18937
18938
18939
18940
// File 'service/s3/api.go', line 18937

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

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

SetGrantWriteACP sets the GrantWriteACP field's value.



18943
18944
18945
18946
// File 'service/s3/api.go', line 18943

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

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



18853
18854
18855
// File 'service/s3/api.go', line 18853

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

func (s *PutBucketAclInput) Validate() error

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



18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
// File 'service/s3/api.go', line 18867

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