# `Aliyun.Oss.Bucket.Tags`

Bucket operations - Tags.

# `delete`

```elixir
@spec delete(Aliyun.Oss.Config.t(), String.t()) ::
  {:error, Exception.t()} | {:ok, Aliyun.Oss.Client.Response.t()}
```

DeleteBucketTags - deletes tags configured for a bucket.

## Examples

    iex> Aliyun.Oss.Bucket.Tags.delete(config, "some-bucket")
    {:ok,
    %Aliyun.Oss.Client.Response{
      data: "",
      headers: %{
        "connection" => ["keep-alive"],
        "content-length" => ["0"],
        "date" => ["Wed, 09 Jul 2025 05:47:50 GMT"],
        "server" => ["AliyunOSS"],
        "x-oss-request-id" => ["686E0285B630************"],
        "x-oss-server-time" => ["374"]
      }
    }}
    iex> Aliyun.Oss.Bucket.Tags.delete(config, "unknown-bucket")
    {:error,
    %Aliyun.Oss.Client.Error{
      status: 404,
      code: "NoSuchBucket",
      message: "The specified bucket does not exist.",
      details: %{
        "BucketName" => "unknown-bucket",
        "Code" => "NoSuchBucket",
        "EC" => "0015-00000101",
        "HostId" => "unknown-bucket.oss-cn-shenzhen.aliyuncs.com",
        "Message" => "The specified bucket does not exist.",
        "RecommendDoc" => "https://api.aliyun.com/troubleshoot?q=0015-00000101",
        "RequestId" => "5C38283EC84D1C4471F2F48A"
      }
    }}

# `get`

```elixir
@spec get(Aliyun.Oss.Config.t(), String.t()) ::
  {:error, Exception.t()} | {:ok, Aliyun.Oss.Client.Response.t()}
```

GetBucketTags - gets the tags configured for a bucket.

## Examples

    iex> Aliyun.Oss.Bucket.Tagging.get(config, "some-bucket")
    {:ok, %Aliyun.Oss.Client.Response{
        data: %{"Tagging" => %{"TagSet" => [%{"Key" => "key", "Value" => "value"}]}},
        headers: %{
          "connection" => ["keep-alive"],
          ...
        }
      }
    }

# `put`

```elixir
@spec put(Aliyun.Oss.Config.t(), String.t(), [{String.t(), String.t()}, ...]) ::
  {:error, Exception.t()} | {:ok, Aliyun.Oss.Client.Response.t()}
```

PutBucketTags - adds tags to a bucket or modifies the tags of a bucket.

## Examples

    iex> Aliyun.Oss.Bucket.Tags.put(config, "some-bucket", [{"key1", "value1"}, {:key2, "value2}])
    {:ok, %Aliyun.Oss.Client.Response{
        data: "",
        headers: %{
          "connection" => ["keep-alive"],
          "content-length" => ["0"],
          "date" => ["Wed, 09 Jul 2025 05:46:16 GMT"],
          "server" => ["AliyunOSS"],
          "x-oss-request-id" => ["686E0227B63*************"],
          "x-oss-server-time" => ["393"]
        }
      }
    }

---

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