Skip to content

Commit be8e6d4

Browse files
authored
doc(automl): add example for creating a TablesClient for EU in docstring (#9825)
Local render result: https://screenshot.googleplex.com/P8Yat8M4zdF
1 parent b387134 commit be8e6d4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

automl/google/cloud/automl_v1beta1/tables/tables_client.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(
5050
):
5151
"""Constructor.
5252
53-
Example:
53+
Example for US region:
5454
>>> from google.cloud import automl_v1beta1
5555
>>>
5656
>>> from google.oauth2 import service_account
@@ -60,6 +60,17 @@ def __init__(
6060
... project='my-project', region='us-central1')
6161
...
6262
63+
Example for EU region:
64+
>>> from google.cloud import automl_v1beta1
65+
>>>
66+
>>> from google.oauth2 import service_account
67+
>>>
68+
>>> client_options = {'api_endpoint': 'eu-automl.googleapis.com:443'}
69+
>>> client = automl_v1beta1.TablesClient(
70+
... credentials=service_account.Credentials.from_service_account_file('~/.gcp/account.json'),
71+
... project='my-project', region='eu', client_options=client_options)
72+
...
73+
6374
Args:
6475
project (Optional[str]): The project ID of the GCP project all
6576
future calls will default to. Most methods take `project` as an

0 commit comments

Comments
 (0)