Aliyun.Oss.Bucket.ACL.put

You're seeing just the function put, go back to Aliyun.Oss.Bucket.ACL module for more information.
Link to this function

put(bucket, acl)

Specs

put(String.t(), String.t()) ::
  {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}

PutBucketACL接口用于修改Bucket访问权限

Examples

iex> Aliyun.Oss.Bucket.Acl.put("some-bucket", "public-read")
{:ok,
%Aliyun.Oss.Client.Response{
  data: "",
  headers: [
    {"Server", "AliyunOSS"},
    {"Date", "Fri, 11 Jan 2019 04:43:42 GMT"},
    {"Content-Length", "0"},
    {"Connection", "keep-alive"},
    {"x-oss-request-id", "5C0000000000000000000000"},
    {"Location", "/some-bucket"},
    {"x-oss-server-time", "333"}
  ]
}}
iex> Aliyun.Oss.Bucket.Acl.put("some-bucket", "invalid-permission")
{:error,
%Aliyun.Oss.Client.Error{
  parsed_details: %{
    "ArgumentName" => "x-oss-acl",
    "ArgumentValue" => "invalid-read",
    "Code" => "InvalidArgument",
    "HostId" => "some-bucket.oss-cn-shenzhen.aliyuncs.com",
    "Message" => "no such bucket access control exists",
    "RequestId" => "5C3000000000000000000000"
  },
  body: "<?xml version="1.0" encoding="UTF-8"?>...</xml>",
  status_code: 400
}}