Clean up Auth region tags. by jmdobry · Pull Request #1417 · GoogleCloudPlatform/python-docs-samples · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions auth/api-client/snippets.py
6 changes: 6 additions & 0 deletions auth/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import argparse


# [START auth_cloud_implicit]
def implicit():
from google.cloud import storage

Expand All @@ -28,8 +29,10 @@ def implicit():
# Make an authenticated API request
buckets = list(storage_client.list_buckets())
print(buckets)
# [END auth_cloud_implicit]


# [START auth_cloud_explicit]
def explicit():
from google.cloud import storage

Expand All @@ -41,8 +44,10 @@ def explicit():
# Make an authenticated API request
buckets = list(storage_client.list_buckets())
print(buckets)
# [END auth_cloud_explicit]


# [START auth_cloud_explicit_compute_engine]
def explicit_compute_engine(project):
from google.auth import compute_engine
from google.cloud import storage
Expand All @@ -57,6 +62,7 @@ def explicit_compute_engine(project):
# Make an authenticated API request
buckets = list(storage_client.list_buckets())
print(buckets)
# [END auth_cloud_explicit_compute_engine]


if __name__ == '__main__':
Expand Down
4 changes: 4 additions & 0 deletions auth/http-client/snippets.py