[英]google.cloud storage python api create bucket in specified location
I would like to create a bucket in the EU
location in google cloud storage. 我想在谷歌云存储的
EU
位置创建一个存储桶。 How do I set that? 我该怎么设置? The docs don't mention anything.
文档没有提到任何内容。
from google.cloud import storage
client = storage.Client(project=project_id)
client.create_bucket(bucket_name)
Creates a bucket in the US
location by default. 默认情况下,在
US
位置创建一个存储桶。
bucket = Bucket(client, name='bucketname')
bucket.location = 'eu'
bucket.create()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.