Aliyun.Oss.Object.ACL (aliyun_oss v2.0.0)
Object operations - ACL.
Link to this section Summary
Functions
GetObjectACL - gets the access control list (ACL) of an object.
PutObjectACL - modifies the access control list (ACL) of an object.
Link to this section Types
Link to this type
error()
Link to this section Functions
Link to this function
get(config, bucket, object)
@spec get(Aliyun.Oss.Config.t(), String.t(), String.t()) :: {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}
GetObjectACL - gets the access control list (ACL) of an object.
examples
Examples
iex> Aliyun.Oss.Object.ACL.get(config, "some-bucket", "some-object")
{:ok, %Aliyun.Oss.Client.Response{
data: %{
"AccessControlPolicy" => %{
"AccessControlList" => %{"Grant" => "default"},
"Owner" => %{
"DisplayName" => "1111111111111111",
"ID" => "1111111111111111"
}
}
},
headers: [
{"Date", "Wed, 05 Dec 2018 02:34:57 GMT"}
]
}
}
Link to this function
put(config, bucket, object, acl)
@spec put(Aliyun.Oss.Config.t(), String.t(), String.t(), String.t()) :: {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}
PutObjectACL - modifies the access control list (ACL) of an object.
examples
Examples
iex> Aliyun.Oss.Object.ACL.put(config, "some-bucket", "some-object", "private")
{:ok, %Aliyun.Oss.Client.Response{
data: "",
headers: [
{"Server", "AliyunOSS"},
{"Date", "Wed, 05 Dec 2018 02:34:57 GMT"},
...
]
}
}