Aliyun.Oss.Object.Tagging (aliyun_oss v3.1.2)

Object operations - Tagging.

Summary

Functions

DeleteObjectTagging - deletes the tags of an object.

GetObjectTagging - gets the tags of an object.

PutObjectTagging - adds tags to an object or updates the tags added to the object.

Types

error()

@type error() ::
  %Aliyun.Oss.Client.Error{
    body: String.t(),
    parsed_details: map(),
    status_code: integer()
  }
  | atom()

Functions

delete(config, bucket, object)

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

DeleteObjectTagging - deletes the tags of an object.

Examples

iex> Aliyun.Oss.Object.Tagging.delete("some-bucket", "some-object")
{:ok, %Aliyun.Oss.Client.Response{
    data: "",
    headers: %{
      "connection" => ["keep-alive"],
      ...
    }
  }
}

get(config, bucket, object)

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

GetObjectTagging - gets the tags of an object.

Examples

iex> Aliyun.Oss.Object.Tagging.get(config, "some-bucket", "some-object")
{:ok, %Aliyun.Oss.Client.Response{
    data: %{"Tagging" => %{"TagSet" => [%{"Key" => "key", "Value" => "value"}]}},
    headers: %{
      "connection" => ["keep-alive"],
      "content-type" => ["application/xml"],
      "date" => ["Fri, 11 Jul 2025 07:12:14 GMT"],
      "server" => ["AliyunOSS"],
      "x-oss-request-id" => ["6870B94E9***************"],
      "x-oss-server-time" => ["66"],
      "x-oss-version-id" => ["null"]
    }
  }
}

put(config, bucket, object, tags)

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

PutObjectTagging - adds tags to an object or updates the tags added to the object.

Examples

iex> Aliyun.Oss.Object.Tagging.put(config, "some-bucket", "some-object", [{"key1", "value1"}, {:key2, "value2}])
{:ok, %Aliyun.Oss.Client.Response{
    data: "",
    headers: %{
      "connection" => ["keep-alive"],
      ...
    }
  }
}