Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ap02 site #11

Merged
merged 1 commit into from
Jul 20, 2020
Merged
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
7 changes: 5 additions & 2 deletions tdworkflow/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ def __init__(
) -> None:
"""Treasure Workflow REST API client

:param site: Site for Treasure Workflow. {"us", "eu01", "jp"} default: "us"
:param site: Site for Treasure Workflow.
{"us", "eu01", "jp", "ap02"} default: "us"
`site` or `endpoint` must be set.
:type site: Optional[str], optional
:param endpoint: Treasure Data Workflow endpoint
Expand All @@ -816,9 +817,11 @@ def __init__(
self.endpoint = "api-workflow.treasuredata.co.jp"
elif site == "eu01":
self.endpoint = "api-workflow.eu01.treasuredata.com"
elif site == "ap02":
self.endpoint = "api-workflow.ap02.treasuredata.com"
else:
raise ValueError(
f"Unknown site: {site}. Use 'us', 'jp', or 'eu01' "
f"Unknown site: {site}. Use 'us', 'jp', 'eu01', or 'ap02' "
"or you need to set endpoint"
)

Expand Down