# `LibOss.Api.Tagging`
[🔗](https://github.com/tt67wq/lib-oss/blob/main/lib/lib_oss/api/tagging.ex#L1)

OSS对象标签管理相关API

提供对象标签的设置、获取和删除功能。

# `__using__`
*macro* 

创建宏，用于在客户端模块中导入所有标签管理函数

# `delete_object_tagging`

```elixir
@spec delete_object_tagging(
  module(),
  LibOss.Typespecs.bucket(),
  LibOss.Typespecs.object()
) ::
  :ok | {:error, LibOss.Exception.t()}
```

删除Object当前版本的标签信息。

Doc: https://help.aliyun.com/document_detail/114879.html

## Examples

    iex> delete_object_tagging(bucket, "/test/test.txt")
    :ok

# `get_object_tagging`

```elixir
@spec get_object_tagging(
  module(),
  LibOss.Typespecs.bucket(),
  LibOss.Typespecs.object()
) ::
  {:ok, LibOss.Typespecs.dict()} | {:error, LibOss.Exception.t()}
```

调用GetObjectTagging接口获取对象（Object）的标签（Tagging）信息。

Doc: https://help.aliyun.com/document_detail/114878.html

## Examples

    iex> get_object_tagging(bucket, "/test/test.txt")
    {:ok,
     [
       %{"Key" => "key1", "Value" => "value1"},
       %{"Key" => "key2", "Value" => "value2"}
     ]}

# `put_object_tagging`

```elixir
@spec put_object_tagging(
  module(),
  LibOss.Typespecs.bucket(),
  LibOss.Typespecs.object(),
  LibOss.Typespecs.tags()
) :: :ok | {:error, LibOss.Exception.t()}
```

调用PutObjectTagging接口设置或更新对象（Object）的标签（Tagging）信息。

Doc: https://help.aliyun.com/document_detail/114855.html

## Examples

    iex> put_object_tagging(bucket, "/test/test.txt", %{"key1" => "value1", "key2" => "value2"})
    :ok

---

*Consult [api-reference.md](api-reference.md) for complete listing*
