ElixirBceSdk.Bos.Bucket (elixir_bce_sdk v0.2.1)

Bucket related operations

Link to this section Summary

Functions

Check whether there is a bucket with specific name.

Create bucket with specific name.

Delete bucket with specific name.

Delete Bucket Cors

Delete Bucket Lifecycle

Delete Bucket Logging.

Get a bucket info by specific name.

Get Access Control Level of bucket.

Get Bucket Cors.

Get Bucket Lifecycle

Get the region which the bucket located in. returns region of the bucket(bj/gz/sz).

Get Bucket Logging.

Get Bucket Storageclass.

List buckets of user. returns all buckets owned by the user.

Get Object Information of bucket.

Set Access Control Level of bucket by body.

Set Access Control Level of bucket by headers.

Link to this section Functions

Link to this function

bucket_exist?(bucket_name)

Specs

bucket_exist?(String.t()) :: boolean()

Check whether there is a bucket with specific name.

Link to this function

create_bucket(bucket_name)

Specs

create_bucket(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Create bucket with specific name.

Link to this function

delete_bucket(bucket_name)

Specs

delete_bucket(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Delete bucket with specific name.

Link to this function

delete_bucket_cors(bucket_name)

Specs

delete_bucket_cors(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Delete Bucket Cors

Link to this function

delete_bucket_lifecycle(bucket_name)

Specs

delete_bucket_lifecycle(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Delete Bucket Lifecycle

Link to this function

delete_bucket_logging(bucket_name)

Specs

delete_bucket_logging(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Delete Bucket Logging.

Link to this function

get_bucket(bucket_name)

Specs

Get a bucket info by specific name.

Link to this function

get_bucket_acl(bucket_name)

Specs

get_bucket_acl(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get Access Control Level of bucket.

Link to this function

get_bucket_cors(bucket_name)

Specs

get_bucket_cors(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get Bucket Cors.

Link to this function

get_bucket_lifecycle(bucket_name)

Specs

get_bucket_lifecycle(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get Bucket Lifecycle

Link to this function

get_bucket_location(bucket_name)

Specs

get_bucket_location(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get the region which the bucket located in. returns region of the bucket(bj/gz/sz).

Link to this function

get_bucket_logging(bucket_name)

Specs

get_bucket_logging(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get Bucket Logging.

Link to this function

get_bucket_storageclass(bucket_name)

Specs

get_bucket_storageclass(String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get Bucket Storageclass.

Specs

list_buckets() ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

List buckets of user. returns all buckets owned by the user.

Link to this function

list_objects(bucket_name, options \\ %{})

Specs

list_objects(String.t(), map()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get Object Information of bucket.

Link to this function

put_bucket_cors(bucket_name, cors_configuration)

Specs

put_bucket_cors(String.t(), map()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Put Bucket Cors

Link to this function

put_bucket_lifecycle(bucket_name, rules)

Specs

put_bucket_lifecycle(String.t(), map()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Put Bucket Lifecycle

Link to this function

put_bucket_logging(source_bucket, target_bucket, target_prefix \\ "")

Specs

put_bucket_logging(String.t(), String.t(), String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Put Bucket Logging.

Link to this function

put_bucket_storageclass(bucket_name, storage_class)

Specs

put_bucket_storageclass(String.t(), String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Put Bucket Storageclass

Link to this function

set_bucket_acl(bucket_name, acl)

Specs

set_bucket_acl(String.t(), map()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Set Access Control Level of bucket by body.

Link to this function

set_bucket_canned_acl(bucket_name, canned_acl)

Specs

set_bucket_canned_acl(String.t(), String.t()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Set Access Control Level of bucket by headers.