![](/img/trans.png)
[英]Python passing over/ignoring `create_bucket` and `upload_blob` functions in Google Cloud Storage with 404 Error when running code
[英]Google Cloud Storage API: How do you call `create_bucket()` with storage class and location options?
我想創建一個與此等效的存儲桶
gsutil mb -c regional -l us-east1 gs://my-bucket
:
我該如何使用python API?
bucket = client.create_bucket('my-bucket')
assert isinstance(bucket, Bucket)
# <Bucket: my-bucket>
請參閱: https : //googlecloudplatform.github.io/google-cloud-python/latest/storage/client.html
無法通過python API設置區域或存儲類。 我建議為此創建功能請求 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.