接口:ListBuckets

简要概述

列出该用户可访问的存储桶,官方文档

接口解析

请求语法

GET / HTTP/1.1
Host: {endpoint}

URL 参数

无。

请求结构

无。

响应语法

HTTP/1.1 200

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
   <Buckets>
      <Bucket>
         <CreationDate>timestamp</CreationDate>
         <Name>string</Name>
      </Bucket>
   </Buckets>
   <Owner>
      <DisplayName>string</DisplayName>
      <ID>string</ID>
   </Owner>
</ListAllMyBucketsResult>

请求示例

通过 rclone 进行测试

测试指令

./rclone \
	--dump bodies \
	--s3-force-path-style=false \
	lsd \
	minio:

请求响应

2023/06/21 14:46:45 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/06/21 14:46:45 DEBUG : HTTP REQUEST (req 0x14000134300)
2023/06/21 14:46:45 DEBUG : GET / HTTP/1.1
Host: minio.dev.173ops.com
User-Agent: rclone/v1.62.2
Authorization: XXXX
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20230621T064645Z
Accept-Encoding: gzip

2023/06/21 14:46:45 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2023/06/21 14:46:45 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2023/06/21 14:46:45 DEBUG : HTTP RESPONSE (req 0x14000134300)
2023/06/21 14:46:45 DEBUG : HTTP/1.1 200 OK
Content-Length: 462
Accept-Ranges: bytes
Connection: keep-alive
Content-Security-Policy: block-all-mixed-content
Content-Type: application/xml
Date: Wed, 21 Jun 2023 06:46:45 GMT
Server: nginx/1.16.1
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
Vary: Accept-Encoding
X-Amz-Id-2: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8
X-Amz-Request-Id: 176A99B34DCCDFA0
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult
    xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Owner>
        <ID>02d6176db174dc93cb1b899f7c6078f08654445fe8cf1b6ce98d8855f66bdbf4</ID>
        <DisplayName>minio</DisplayName>
    </Owner>
    <Buckets>
        <Bucket>
            <Name>is-a-big-tenant</Name>
            <CreationDate>2023-06-14T10:10:39.152Z</CreationDate>
        </Bucket>
        <Bucket>
            <Name>uptime</Name>
            <CreationDate>2023-06-20T10:25:49.245Z</CreationDate>
        </Bucket>
    </Buckets>
</ListAllMyBucketsResult>

2023/06/21 14:46:45 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<



最后修改 2023.07.06: refactor: update some (5fe4b38)