Struct: s3.CreateBucketInput

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.

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

The name of the bucket to create.

Bucket is a required field

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

The configuration information for the bucket.

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.

IBMSSEKPCustomerRootKeyCrn *string `location:"header" locationName:"ibm-sse-kp-customer-root-key-crn" type:"string"`

The root key used by Key Protect to encrypt this bucket. This value must be the full CRN of the root key.

IBMSSEKPEncryptionAlgorithm *string `location:"header" locationName:"ibm-sse-kp-encryption-algorithm" type:"string"`

The algorithm and key size to use with the encryption key stored by using Key Protect. This value must be set to the string “AES256”.

IBMServiceInstanceId *string `location:"header" locationName:"ibm-service-instance-id" type:"string"`

Sets the IBM Service Instance Id in the request.

Only Valid for IBM IAM Authentication

ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

_ struct{} `locationName:"CreateBucketRequest" type:"structure" payload:"CreateBucketConfiguration"`

Method Details

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



9160
9161
9162
// File 'service/s3/api.go', line 9160

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

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

SetACL sets the ACL field's value.



9181
9182
9183
9184
// File 'service/s3/api.go', line 9181

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

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

SetBucket sets the Bucket field's value.



9187
9188
9189
9190
// File 'service/s3/api.go', line 9187

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

func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput

SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.



9200
9201
9202
9203
// File 'service/s3/api.go', line 9200

func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput { s.CreateBucketConfiguration = v return s }

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

SetGrantFullControl sets the GrantFullControl field's value.



9206
9207
9208
9209
// File 'service/s3/api.go', line 9206

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

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

SetGrantRead sets the GrantRead field's value.



9212
9213
9214
9215
// File 'service/s3/api.go', line 9212

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

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

SetGrantReadACP sets the GrantReadACP field's value.



9218
9219
9220
9221
// File 'service/s3/api.go', line 9218

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

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

SetGrantWrite sets the GrantWrite field's value.



9224
9225
9226
9227
// File 'service/s3/api.go', line 9224

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

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

SetGrantWriteACP sets the GrantWriteACP field's value.



9230
9231
9232
9233
// File 'service/s3/api.go', line 9230

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

func (s *CreateBucketInput) SetIBMServiceInstanceId(v string) *CreateBucketInput

SetIBMServiceInstanceId sets the IBMServiceInstanceId field's value.



9248
9249
9250
9251
// File 'service/s3/api.go', line 9248

func (s *CreateBucketInput) SetIBMServiceInstanceId(v string) *CreateBucketInput { s.IBMServiceInstanceId = &v return s }

func (s *CreateBucketInput) SetIBMSSEKPCustomerRootKeyCrn(v string) *CreateBucketInput

SetIBMSSEKPCustomerRootKeyCrn sets the IBMSSEKPCustomerRootKeyCrn field's value.



9236
9237
9238
9239
// File 'service/s3/api.go', line 9236

func (s *CreateBucketInput) SetIBMSSEKPCustomerRootKeyCrn(v string) *CreateBucketInput { s.IBMSSEKPCustomerRootKeyCrn = &v return s }

func (s *CreateBucketInput) SetIBMSSEKPEncryptionAlgorithm(v string) *CreateBucketInput

SetIBMSSEKPEncryptionAlgorithm sets the IBMSSEKPEncryptionAlgorithm field's value.



9242
9243
9244
9245
// File 'service/s3/api.go', line 9242

func (s *CreateBucketInput) SetIBMSSEKPEncryptionAlgorithm(v string) *CreateBucketInput { s.IBMSSEKPEncryptionAlgorithm = &v return s }

func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput

SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.



9254
9255
9256
9257
// File 'service/s3/api.go', line 9254

func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput { s.ObjectLockEnabledForBucket = &v return s }

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



9151
9152
9153
// File 'service/s3/api.go', line 9151

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

func (s *CreateBucketInput) Validate() error

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



9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
// File 'service/s3/api.go', line 9165

func (s *CreateBucketInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"} if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } if s.Bucket != nil && len(*s.Bucket) < 1 { invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil }