Help Center> Object Storage Service> SDK Reference> Go> Data Types> Request Parameter of Creating a Bucket

Request Parameter of Creating a Bucket

Type Definition

type CreateBucketInput struct

Parameter Description

Field

Type

Optional or Mandatory

Description

Bucket

string

Mandatory

Bucket name

Location

string

Mandatory unless the region where the OBS service resides is not the default region.

Bucket location

This parameter is not required if the endpoint belongs to the default North China 1 region (cn-north-1). This parameter is a must if the endpoint belongs to any other regions. Click here to query currently valid regions. For details about OBS regions and endpoints, see Regions and Endpoints. An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. To obtain the regions and endpoints, contact the enterprise administrator.

ACL

AclType

Optional

ACL that can be pre-defined during the bucket creation

StorageClass

StorageClassType

Optional

Bucket storage class that can be pre-defined during the bucket creation

GrantReadId

string

Optional

Grants the READ permission to an account. It allows you to list objects, multipart upload tasks, and object versions in a bucket, as well as to obtain bucket metadata.

GrantWriteId

string

Optional

Grants the WRITE permission to an account. It allows you to create, delete, or overwrite all objects in a bucket, and to initialize, upload, copy, and merge parts, as well as to cancel multipart upload tasks.

GrantReadAcpId

string

Optional

Grants the READ_ACP permission to an account. It allows you to read the bucket ACL information.

GrantWriteAcpId

string

Optional

Grants the WRITE_ACP permission to an account. It allows you to modify the bucket ACL information.

GrantFullControlId

string

Optional

Grants the FULL_CONTROL permission to an account.

GrantReadDeliveredId

string

Optional

Grants the READ permission to an account. By default, the READ permission applies to all objects in the bucket.

GrantFullControlDeliveredId

string

Optional

Grants the FULL_CONTROL permission to an account. By default, the FULL_CONTROL permission applies to all objects in the bucket.

Epid

string

Optional

Enterprise project ID that can be specified during bucket creation. Users who have enabled the enterprise project function can obtain the enterprise project ID from the enterprise project service. The value is in UUID format. The default value is 0 or does not carry this header. Users who have not enabled the enterprise project function do not need to carry this header.

AvailableZone

string

Optional

AZ type that can be specified during bucket creation. 3-AZ is an option.

IsFSFileInterface

bool

Optional

Indicates to create a bucket that supports POSIX or to create an object bucket.