diff --git a/datadog/dogshell/__init__.py b/datadog/dogshell/__init__.py index e035b0ec8..8d2fd0563 100644 --- a/datadog/dogshell/__init__.py +++ b/datadog/dogshell/__init__.py @@ -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() diff --git a/datadog/dogshell/common.py b/datadog/dogshell/common.py index 2e51736d1..74908de1b 100644 --- a/datadog/dogshell/common.py +++ b/datadog/dogshell/common.py @@ -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 diff --git a/datadog/dogshell/wrap.py b/datadog/dogshell/wrap.py index 43912a781..2787bdea0 100644 --- a/datadog/dogshell/wrap.py +++ b/datadog/dogshell/wrap.py @@ -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", @@ -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"