簡體   English   中英

Google Cloud Storage API:如何使用存儲類別和位置選項調用`create_bucket()`?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM