GetService (Listbucket)
A GET request for a service address can return all bucket owned by the requester, where "/" represents the root directory.
Request Sample:
get/http/1.1
Host:storage.aliyun.com
date:wed, 12:00:00 GMT authorization:oss
15b4d3461f1776 24206a:xqe0dimblrepdf3yb+fiexample=
Return Sample:
<?xml version= "1.0" encoding= "UTF-8"/?> <listallmybucketsresult xmlns=
"http://doc.storage.aliyun.com" /2011-03-01 ">
<Owner>
<ID>bcaf1ffd86f461ca5fb16fd081034f</ID>
<displayname >webfile</DisplayName>
</Owner>
<Buckets>
<Bucket>
<Name> quotes</name>
<CreationDate>2011-02-03T16:45:09.000Z</CreationDate>
</bucket >
<Bucket>
<Name>samples</Name>
<creationdate>2011-02-03t16 :41:58.000z</creationdate>
</Bucket>
</Buckets>
</listallmybucketsresult >
Returns 403 Forbidden if there is no user authentication information in the request (that is, anonymous access).
Return Sample:
<?xml version= "1.0"?>
<Error>
<Code>
accessdenied
</Code>
< Message>
Anonymous Access is forbidden to this operation
</Message>
<RequestId>
cbf1a411d747a648
</RequestId>
<HostId>
storage.aliyun.com
</HostId>
</Error>
If user authentication fails, see the message that validation failed in access control.