Aliyun.Oss.Bucket.get_bucket_info

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

get_bucket_info(bucket)

Specs

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

GetBucketInfo 接口用于查看bucket的相关信息。 可查看内容包含如下:

  • 创建时间
  • 外网访问Endpoint
  • 内网访问Endpoint
  • bucket的拥有者信息
  • bucket的ACL(AccessControlList)

Examples

iex> Aliyun.Oss.Bucket.get_bucket_info("some-bucket")
{:ok, %Aliyun.Oss.Client.Response{
  data: %{
    "BucketInfo" => %{
      "Bucket" => %{
        "AccessControlList" => %{"Grant" => "private"},
        "Comment" => nil,
        "CreationDate" => "2018-08-29T01:52:03.000Z",
        "DataRedundancyType" => "LRS",
        "ExtranetEndpoint" => "oss-cn-shenzhen.aliyuncs.com",
        "IntranetEndpoint" => "oss-cn-shenzhen-internal.aliyuncs.com",
        "Location" => "oss-cn-shenzhen",
        "Name" => "some-bucket",
        "Owner" => %{
          "DisplayName" => "11111111",
          "ID" => "11111111"
        },
        "StorageClass" => "IA"
      }
    }
  },
  headers: [
    {"Date", "Wed, 05 Dec 2018 02:34:57 GMT"}
  ]
}