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



9311
9312
9313
// File 'service/s3/api.go', line 9311

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

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

SetACL sets the ACL field’s value.



9332
9333
9334
9335
// File 'service/s3/api.go', line 9332

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.



9338
9339
9340
9341
// File 'service/s3/api.go', line 9338

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.



9351
9352
9353
9354
// File 'service/s3/api.go', line 9351

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.



9357
9358
9359
9360
// File 'service/s3/api.go', line 9357

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.



9363
9364
9365
9366
// File 'service/s3/api.go', line 9363

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.



9369
9370
9371
9372
// File 'service/s3/api.go', line 9369

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.



9375
9376
9377
9378
// File 'service/s3/api.go', line 9375

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.



9381
9382
9383
9384
// File 'service/s3/api.go', line 9381

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.



9399
9400
9401
9402
// File 'service/s3/api.go', line 9399

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.



9387
9388
9389
9390
// File 'service/s3/api.go', line 9387

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.



9393
9394
9395
9396
// File 'service/s3/api.go', line 9393

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.



9405
9406
9407
9408
// File 'service/s3/api.go', line 9405

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



9302
9303
9304
// File 'service/s3/api.go', line 9302

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.



9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
// File 'service/s3/api.go', line 9316

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 }