Aliyun.Oss.Bucket.list_buckets

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

list_buckets(query_params \\ %{})

Specs

list_buckets(map()) :: {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}

GetService (ListBuckets) 对于服务地址作Get请求可以返回请求者拥有的所有Bucket。

Examples

iex> Aliyun.Oss.Bucket.list_buckets(%{"max-keys" => 5})
{:ok, %Aliyun.Oss.Client.Response{
    data: %{
      "Buckets" => %{
        "Bucket" => [
          %{
            "CreationDate" => "2018-10-12T07:57:51.000Z",
            "ExtranetEndpoint" => "oss-cn-shenzhen.aliyuncs.com",
            "IntranetEndpoint" => "oss-cn-shenzhen-internal.aliyuncs.com",
            "Location" => "oss-cn-shenzhen",
            "Name" => "XXXXX",
            "StorageClass" => "Standard"
          },
          ...
        ]
      },
      "IsTruncated" => true,
      "Marker" => nil,
      "MaxKeys" => 5,
      "NextMarker" => "XXXXX",
      "Owner" => %{"DislayName" => "11111111", "ID" => "11111111"},
      "Prefix" => nil
    },
    headers: [
      {"Date", "Wed, 05 Dec 2018 02:34:57 GMT"},
      ...
    ]
  }
}

iex> Aliyun.Oss.Bucket.list_buckets(%{"max-keys" => 100000})
{:error,
  %Aliyun.Oss.Client.Error{
    status_code: 400,
    parsed_details: %{
      "ArgumentName" => "max-keys",
      "ArgumentValue" => "100000",
      "Code" => "InvalidArgument",
      "HostId" => "oss-cn-shenzhen.aliyuncs.com",
      "Message" => "Argument max-keys must be an integer between 1 and 1000.",
      "RequestId" => "5BFF8912332CCD8D560F65D9"
    },
    body: "<?xml version="1.0" encoding="UTF-8"?>...</xml>"
  }
}