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

Add AP1 Datacenter #779

Merged
merged 2 commits into from
Jul 7, 2023
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
15 changes: 13 additions & 2 deletions datadog/dogshell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,20 @@ def main():
parser.add_argument(
"--api_host",
help="Datadog site to send data, us (datadoghq.com), eu (datadoghq.eu), us3 (us3.datadoghq.com), \
or us5 (us5.datadoghq.com), default: us",
us5 (us5.datadoghq.com), or ap1 (ap1.datadoghq.com). default: us",
dest="api_host",
choices=["datadoghq.com", "us", "datadoghq.eu", "eu", "us3.datadoghq.com", "us3", "us5.datadoghq.com", "us5"],
choices=[
"datadoghq.com",
"us",
"datadoghq.eu",
"eu",
"us3.datadoghq.com",
"us3",
"us5.datadoghq.com",
"us5",
"ap1.datadoghq.com",
"ap1"
],
)

config = DogshellConfig()
Expand Down
2 changes: 2 additions & 0 deletions datadog/dogshell/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def load(self, config_file, api_key, app_key, api_host):
self["api_host"] = "https://us3.datadoghq.com"
elif api_host in ("us5.datadoghq.com", "us5"):
self["api_host"] = "https://us5.datadoghq.com"
elif api_host in ("ap1.datadoghq.com", "ap1"):
self["api_host"] = "https://ap1.datadoghq.com"

if api_key is not None and app_key is not None:
self["api_key"] = api_key
Expand Down
17 changes: 15 additions & 2 deletions datadog/dogshell/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,20 @@ def parse_options(raw_args=None):
action="store",
type="choice",
default="datadoghq.com",
choices=["datadoghq.com", "us", "datadoghq.eu", "eu", "us3.datadoghq.com", "us3", "us5.datadoghq.com", "us5"],
choices=[
"datadoghq.com",
"us",
"datadoghq.eu",
"eu",
"us3.datadoghq.com",
"us3",
"us5.datadoghq.com",
"us5",
"ap1.datadoghq.com",
"ap1"
],
help="The site to send data. Accepts us (datadoghq.com), eu (datadoghq.eu), \
us3 (us3.datadoghq.com), or us5 (us5.datadoghq.com), default: us",
us3 (us3.datadoghq.com), us5 (us5.datadoghq.com), or ap1 (ap1.datadoghq.com). default: us",
)
parser.add_option(
"-m",
Expand Down Expand Up @@ -425,6 +436,8 @@ def main():
api_host = "https://api.us3.datadoghq.com"
elif options.site in ("us5.datadoghq.com", "us5"):
api_host = "https://api.us5.datadoghq.com"
elif options.site in ("ap1.datadoghq.com", "ap1"):
api_host = "https://api.ap1.datadoghq.com"
else:
api_host = "https://api.datadoghq.com"

Expand Down