Reputation: 9441
I would like to create a bucket in the EU
location in google cloud storage. 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.
Upvotes: 3
Views: 1457
Reputation: 38369
bucket = Bucket(client, name='bucketname')
bucket.location = 'eu'
bucket.create()
Upvotes: 6