Datadog に属する IP プレフィックスのリストを取得します。
GET https://ip-ranges.datadoghq.eu/https://ip-ranges.ddog-gov.com/https://ip-ranges.datadoghq.com/https://ip-ranges.us3.datadoghq.com/
Datadog の IP 範囲についての情報を取得します。
OK
IP ranges.
フィールド
種類
説明
agents
object
Available prefix information for the Agent endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
api
object
Available prefix information for the API endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
apm
object
Available prefix information for the APM endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
logs
object
Available prefix information for the Logs endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
modified
string
Date when last updated, in the form YYYY-MM-DD-hh-mm-ss
.
process
object
Available prefix information for the Process endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
synthetics
object
Available prefix information for the Synthetics endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv4_by_location
object
List of IPv4 prefixes by location.
<any-key>
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
prefixes_ipv6_by_location
object
List of IPv6 prefixes by location.
<any-key>
[string]
List of IPv6 prefixes.
version
int64
Version of the IP list.
webhooks
object
Available prefix information for the Webhook endpoints.
prefixes_ipv4
[string]
List of IPv4 prefixes.
prefixes_ipv6
[string]
List of IPv6 prefixes.
{
"agents": {
"prefixes_ipv4": [],
"prefixes_ipv6": []
},
"api": {
"prefixes_ipv4": [],
"prefixes_ipv6": []
},
"apm": {
"prefixes_ipv4": [],
"prefixes_ipv6": []
},
"logs": {
"prefixes_ipv4": [],
"prefixes_ipv6": []
},
"modified": "2019-10-31-20-00-00",
"process": {
"prefixes_ipv4": [],
"prefixes_ipv6": []
},
"synthetics": {
"prefixes_ipv4": [],
"prefixes_ipv4_by_location": {
"<any-key>": []
},
"prefixes_ipv6": [],
"prefixes_ipv6_by_location": {
"<any-key>": []
}
},
"version": 11,
"webhooks": {
"prefixes_ipv4": [],
"prefixes_ipv6": []
}
}
# Curl command
curl -X GET "https://ip-ranges.datadoghq.eu"https://ip-ranges.ddog-gov.com"https://ip-ranges.datadoghq.com"https://ip-ranges.us3.datadoghq.com/" \
-H "Content-Type: application/json"
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)
func main() {
ctx := context.Background()
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.IPRangesApi.GetIPRanges(ctx).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPRangesApi.GetIPRanges``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetIPRanges`: IPRanges
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from IPRangesApi.GetIPRanges:\n%s\n", responseContent)
}
First install the library and its dependencies and then save the example to main.go
and run following commands:
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>"
go run "main.go"
// Import classes:
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.IpRangesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
IpRangesApi apiInstance = new IpRangesApi(defaultClient);
try {
IPRanges result = apiInstance.getIPRanges();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IpRangesApi#getIPRanges");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
First install the library and its dependencies and then save the example to Example.java
and run following commands:
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>"
java "Example.java"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import ip_ranges_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()
# Enter a context with an instance of the API client
with ApiClient() as api_client:
# Create an instance of the API class
api_instance = ip_ranges_api.IPRangesApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# List IP Ranges
api_response = api_instance.get_ip_ranges()
pprint(api_response)
except ApiException as e:
print("Exception when calling IPRangesApi->get_ip_ranges: %s\n" % e)
First install the library and its dependencies and then save the example to example.py
and run following commands:
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>"
python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V1::IPRangesAPI.new
begin
# List IP Ranges
result = api_instance.get_ip_ranges
p result
rescue DatadogAPIClient::V1::APIError => e
puts "Error when calling IPRangesAPI->get_ip_ranges: #{e}"
end
First install the library and its dependencies and then save the example to example.rb
and run following commands:
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>"
rb "example.rb"