Updated on 2023-12-13 GMT+08:00

OBS.Bucket

Element Description

The OBS.Bucket element is used to deploy bucket resources for HUAWEI CLOUD Object Storage Service (OBS). OBS provides a lot of secure, reliable, and low-cost data storage capabilities. Buckets are containers used to store objects.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

location

No

Region where the OBS bucket is located

Type: string

Value Description: Supports cn-north-1, cn-east-2, cn-south-1, or other values.

Suggestion: You are not advised to set the value. The system automatically allocates the value to the current region.

name

No

OBS bucket name

Type: string

Value Description: Supports customization, for example, my-bucket.

Value Constraint: The value is globally unique. This value contains 3 to 63 characters and meets the following requirement: ^[a-z] ([-a-z0-9]*[a-z0-9]) ?$.

Suggestion: Customize the value.

acl

Yes

ACL policy of the OBS bucket

Type: string

Value Description: Supports private, public-read, and public-read-write.

Default: private

Value Constraint: The value can be private, public-read, or public-read-write.

Suggestion: Set the value based on specifications and requirements.

Table 2 Description of pre-defined permission control policies in OBS

Pre-defined Access Control Policy

Description

private

Indicates that the owner of a bucket or object has the FULL_CONTROL permission for the bucket or object. Other users have no permission to access the bucket or object.

public-read

Indicates that the owner of a bucket or object has the FULL_CONTROL permission for the bucket or object. Other users including anonymous users have the READ permission.

public-read-write

Indicates that the owner of a bucket or object has the FULL_CONTROL permission for the bucket or object. Other users including anonymous users have the READ and WRITE permissions.

authenticated-read

Indicates that the owner of a bucket or object has the FULL_CONTROL permission for the bucket or object. Other OBS users have the READ permission.

bucket-owner-read

Indicates that the owner of an object has the FULL_CONTROL permission for the object and the owner of the bucket where the object resides has the READ-ONLY permission.

bucketowner-full-control

Indicates that the owner of an object has the FULL_CONTROL permission for the object and the owner of the bucket where the object resides has FULL_CONTROL permission for the object.

Relationships Between Elements

None.

Return Value

Property

Type

Description

refName

string

Bucket name

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0  

inputs:
  bucket-name:
    default: my-first-bucket
  bucket-acl:
    default: public-read
  bucket-location:
    default: southchina

node_templates:
  my-bucket:
    type: HuaweiCloud.OBS.Bucket
    properties:
      name: {get_input: bucket-name}
      acl: {get_input: bucket-acl}
      location: {get_input: bucket-location}