Skip to content

Commit

Permalink
doc(automl): add example for creating a TablesClient for EU in docstr…
Browse files Browse the repository at this point in the history
  • Loading branch information
helinwang committed Jan 8, 2020
1 parent b387134 commit be8e6d4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion automl/google/cloud/automl_v1beta1/tables/tables_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
):
"""Constructor.
Example:
Example for US region:
>>> from google.cloud import automl_v1beta1
>>>
>>> from google.oauth2 import service_account
Expand All @@ -60,6 +60,17 @@ def __init__(
... project='my-project', region='us-central1')
...
Example for EU region:
>>> from google.cloud import automl_v1beta1
>>>
>>> from google.oauth2 import service_account
>>>
>>> client_options = {'api_endpoint': 'eu-automl.googleapis.com:443'}
>>> client = automl_v1beta1.TablesClient(
... credentials=service_account.Credentials.from_service_account_file('~/.gcp/account.json'),
... project='my-project', region='eu', client_options=client_options)
...
Args:
project (Optional[str]): The project ID of the GCP project all
future calls will default to. Most methods take `project` as an
Expand Down

0 comments on commit be8e6d4

Please sign in to comment.