Struct: s3.PutPublicAccessBlockInput

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 name of the Amazon S3 bucket whose PublicAccessBlock configuration you want to set.

Bucket is a required field

ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`

Ignored by COS.

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

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see The Meaning of “Public” (docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) in the Amazon S3 User Guide.

PublicAccessBlockConfiguration is a required field

_ struct{} `locationName:"PutPublicAccessBlockRequest" type:"structure" payload:"PublicAccessBlockConfiguration"`

Method Details

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



20913
20914
20915
// File 'service/s3/api.go', line 20913

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

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

SetBucket sets the Bucket field's value.



20937
20938
20939
20940
// File 'service/s3/api.go', line 20937

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

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

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



20950
20951
20952
20953
// File 'service/s3/api.go', line 20950

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

func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput

SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.



20956
20957
20958
20959
// File 'service/s3/api.go', line 20956

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



20904
20905
20906
// File 'service/s3/api.go', line 20904

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

func (s *PutPublicAccessBlockInput) Validate() error

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



20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
// File 'service/s3/api.go', line 20918

func (s *PutPublicAccessBlockInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"} 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.PublicAccessBlockConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration")) } if invalidParams.Len() > 0 { return invalidParams } return nil }