google.cloud存储python api在指定位置创建存储区

Rom*_*man 3 python-3.x google-cloud-storage

我想EU在Google云端存储中的位置中创建一个存储桶。我该如何设置? 该文档没有提及任何内容。

from google.cloud import storage
client = storage.Client(project=project_id)
client.create_bucket(bucket_name)
Run Code Online (Sandbox Code Playgroud)

US默认情况下,在该位置创建一个存储桶。

Bra*_*ugh 6

bucket = Bucket(client, name='bucketname')
bucket.location = 'eu'
bucket.create()
Run Code Online (Sandbox Code Playgroud)