Aliyun.Oss.Bucket.Tags (aliyun_oss v1.0.0)
Bucket Tags 相关操作
Link to this section Summary
Functions
DeleteBucketTags接口用于删除存储空间(Bucket)标签。
GetBucketTags用于获取存储空间(Bucket)的标签信息。
PutBucketTags接口用来给某个存储空间(Bucket)添加或修改标签。
Link to this section Types
Link to this type
error()
Specs
Link to this section Functions
Link to this function
delete(bucket)
Specs
DeleteBucketTags接口用于删除存储空间(Bucket)标签。
Examples
iex> Aliyun.Oss.Bucket.Tags.delete("some-bucket")
{:ok,
%Aliyun.Oss.Client.Response{
data: "",
headers: [
{"Server", "AliyunOSS"},
{"Date", "Fri, 11 Jan 2019 05:19:45 GMT"},
...
]
}}
iex> Aliyun.Oss.Bucket.Tags.delete("unknown-bucket")
{:error,
%Aliyun.Oss.Client.Error{
parsed_details: %{
"BucketName" => "unknown-bucket",
"Code" => "NoSuchBucket",
"HostId" => "unknown-bucket.oss-cn-shenzhen.aliyuncs.com",
"Message" => "The specified bucket does not exist.",
"RequestId" => "5C38283EC84D1C4471F2F48A"
},
body: "<?xml version="1.0" encoding="UTF-8"?>...</xml>",
status_code: 404
}}
Link to this function
get(bucket)
Specs
GetBucketTags用于获取存储空间(Bucket)的标签信息。
Examples
iex> Aliyun.Oss.Bucket.Tagging.get("some-bucket")
{:ok, %Aliyun.Oss.Client.Response{
data: %{"Tagging" => %{"TagSet" => [%{"Key" => "key", "Value" => "value"}]}},
headers: [
{"Server", "AliyunOSS"},
{"Date", "Fri, 01 Mar 2019 06:26:07 GMT"},
...
]
}
}
Link to this function
put(bucket, tags)
Specs
put(String.t(), [{String.t(), String.t()}, ...]) :: {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}
PutBucketTags接口用来给某个存储空间(Bucket)添加或修改标签。
Examples
iex> Aliyun.Oss.Bucket.Tags.put("some-bucket", [{"key1", "value1"}, {:key2, "value2}])
{:ok, %Aliyun.Oss.Client.Response{
data: "",
headers: [
{"Server", "AliyunOSS"},
{"Date", "Wed, 05 Dec 2018 02:34:57 GMT"},
...
]
}
}