我正在编写示例代码以在 Google Cloud Storage 中创建存储桶。我正在关注链接中编写的这个 XML API -
PUT / HTTP/1.1
Host: helloworld.storage.googleapis.com
Accept-Encoding: identity
Date: Fri, 01 Apr 2011 21:52:39 GMT
Content-Length: 92
x-goog-api-version: 2
x-goog-project-id: 123456789123
Authorization: Bearer 1/zVNpoQNsOSxZKqOZgckhpQ
<xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration>
<LocationConstraint>EU</LocationConstraint>
</CreateBucketConfiguration>
谷歌存储位置 -
EU - European Union
US - United States
US-EAST1 - Eastern United States
US-EAST2 - Eastern United States
US-EAST3 - Eastern United States
US-CENTRAL1 - Central United States
US-CENTRAL2 - Central United States
US-WEST1 - Western United States
如果我在<LocationConstraint>
标签中提供 US 和 EU,我可以创建 Bucket。但是,如果我给出这两个以外的任何其他内容,比如说 - US-CENTRAL2<LocationConstraint>
标记为 -
<xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration>
<LocationConstraint>US-CENTRAL2</LocationConstraint>
</CreateBucketConfiguration>
然后在创建存储桶时,此代码会引发错误 -
Encountered too many Internal Server errors (6), aborting request. PUT '/mybucket/' on Host 'commondatastorage.googleapis.com' @ 'Fri, 16 Aug 2013 09:08:21 GMT' -- ResponseCode: 500, ResponseStatus: Internal Server Error
我如何在除美国和欧盟位置之外的其余六个部分创建存储桶?API有变化吗??
谢谢您的帮助,
尼拉姆夏尔马