ElixirBceSdk.Bos.Object (elixir_bce_sdk v0.2.1)

Object related operations

Link to this section Summary

Functions

Put an appendable object to BOS or add content to an appendable object.

Create an appendable object and put content of string to the object or add content of string to an appendable object.

Get an authorization url with expire time

Put object and put content of file to the object.

Create object and put content of string to the object.

Set object acl by body.

Link to this section Functions

Link to this function

append_object(bucket_name, key, data, offset, content_md5, content_length, options \\ %{})

Specs

Put an appendable object to BOS or add content to an appendable object.

Link to this function

append_object_from_string(bucket_name, key, data, options \\ %{})

Specs

append_object_from_string(String.t(), String.t(), binary(), map()) ::
  ElixirBceSdk.Client.Response.t()

Create an appendable object and put content of string to the object or add content of string to an appendable object.

Link to this function

copy_object(source_bucket_name, source_key, target_bucket_name, target_key, options \\ %{})

Specs

Copy one object to another object.

Link to this function

delete_multiple_objects(bucket_name, key_list)

Specs

delete_multiple_objects(String.t(), list()) :: ElixirBceSdk.Client.Response.t()

Delete Multiple Objects.

Link to this function

delete_object(bucket_name, key)

Specs

Delete Object

Link to this function

delete_object_acl(bucket_name, key)

Specs

delete_object_acl(String.t(), String.t()) :: ElixirBceSdk.Client.Response.t()

Delete object acl.

Link to this function

generate_pre_signed_url(bucket_name, key, opts \\ %{})

Specs

generate_pre_signed_url(String.t(), String.t(), map()) :: String.t()

Get an authorization url with expire time

Link to this function

get_object(bucket_name, key, range \\ nil, save_path \\ nil, return_body \\ true)

Specs

get_object(String.t(), String.t(), any(), atom(), boolean()) ::
  {:error, ElixirBceSdk.Client.Response.t()}
  | {:ok, ElixirBceSdk.Client.Response.t()}

Get object of bucket.

Link to this function

get_object_acl(bucket_name, key)

Specs

Get object acl.

Link to this function

get_object_as_string(bucket_name, key, range \\ nil)

Specs

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

Get object as string

Link to this function

get_object_meta_data(bucket_name, key)

Specs

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

Get mete of object

Link to this function

get_object_to_file(bucket_name, key, save_path, range \\ nil)

Specs

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

Get object to file

Link to this function

put_object(bucket_name, key, data, content_md5, content_length, options)

Specs

Put object to BOS.

Link to this function

put_object_from_file(bucket_name, key, file_name, options \\ %{})

Specs

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

Put object and put content of file to the object.

Link to this function

put_object_from_string(bucket_name, key, data, options \\ %{})

Specs

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

Create object and put content of string to the object.

Link to this function

set_object_acl(bucket_name, key, acl)

Specs

set_object_acl(String.t(), String.t(), list()) ::
  ElixirBceSdk.Client.Response.t()

Set object acl by body.

Link to this function

set_object_canned_acl(bucket_name, key, canned_acl)

Specs

set_object_canned_acl(String.t(), String.t(), map()) ::
  ElixirBceSdk.Client.Response.t()

Set object acl by headers.