Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit9018370

Browse files
joshuamoAaron Gabriel Neyer
and
Aaron Gabriel Neyer
authored
chore(python): Add example of using client_options for regional endpoints (#316)
* Add example of using client_options for regional endpoints* Add example of using client_options for regional endpoints* Add example of using client_options for regional endpoints* Add example of using client_options for regional endpointsCo-authored-by: Aaron Gabriel Neyer <aarongabriel@google.com>
1 parent9e78e95 commit9018370

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎samples/snippets/quickstart.py‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,19 @@ def quickstart():
2323
print the in-progress status and print the completed status."""
2424

2525
# Authorize the client with Google defaults
26-
# If you're using Private Pools, add a regional `api_endpoint` to `CloudBuildClient()`
27-
# For example, '<YOUR_POOL_REGION>-cloudbuild.googleapis.com'
2826
credentials,project_id=google.auth.default()
2927
client=cloudbuild_v1.services.cloud_build.CloudBuildClient()
3028

29+
# If you're using Private Pools or a non-global default pool, add a regional
30+
# `api_endpoint` to `CloudBuildClient()`
31+
# For example, '<YOUR_POOL_REGION>-cloudbuild.googleapis.com'
32+
#
33+
# from google.api_core import client_options
34+
# client_options = client_options.ClientOptions(
35+
# api_endpoint="us-central1-cloudbuild.googleapis.com"
36+
# )
37+
# client = cloudbuild_v1.services.cloud_build.CloudBuildClient(client_options=client_options)
38+
3139
build=cloudbuild_v1.Build()
3240

3341
# The following build steps will output "hello world"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp