8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22550a9 commit 4fb7649Copy full SHA for 4fb7649
storage/cloud-client/snippets.py
@@ -31,9 +31,11 @@
31
def create_bucket(bucket_name):
32
"""Creates a new bucket."""
33
storage_client = storage.Client()
34
- bucket = storage_client.create_bucket(bucket_name)
35
- print('Bucket {} created'.format(bucket.name))
36
-
+ bucket = storage_client.bucket(bucket_name)
+ bucket.location = 'ASIA'
+ bucket.storage_class = 'COLDLINE'
37
+ bucket.create()
38
+ print('Bucket {} created.'.format(bucket.name))
39
40
def delete_bucket(bucket_name):
41
"""Deletes a bucket. The bucket must be empty."""
0 commit comments