이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

IP Allowlist

The IP allowlist API is used to manage the IP addresses that can access the Datadog API and web UI. It does not block access to intake APIs or public dashboards.

This is an enterprise-only feature. Request access by contacting Datadog support, or see the IP Allowlist page for more information.

GET https://api.ap1.datadoghq.com/api/v2/ip_allowlisthttps://api.datadoghq.eu/api/v2/ip_allowlisthttps://api.ddog-gov.com/api/v2/ip_allowlisthttps://api.datadoghq.com/api/v2/ip_allowlisthttps://api.us3.datadoghq.com/api/v2/ip_allowlisthttps://api.us5.datadoghq.com/api/v2/ip_allowlist

개요

Returns the IP allowlist and its enabled or disabled state. This endpoint requires the org_management permission.

OAuth apps require the org_management authorization scope to access this endpoint.

응답

OK

Response containing information about the IP allowlist.

Expand All

항목

유형

설명

data

object

IP allowlist data.

attributes

object

Attributes of the IP allowlist.

enabled

boolean

Whether the IP allowlist logic is enabled or not.

entries

[object]

Array of entries in the IP allowlist.

data [required]

object

Data of the IP allowlist entry object.

attributes

object

Attributes of the IP allowlist entry.

cidr_block

string

The CIDR block describing the IP range of the entry.

created_at

date-time

Creation time of the entry.

modified_at

date-time

Time of last entry modification.

note

string

A note describing the IP allowlist entry.

id

string

The unique identifier of the IP allowlist entry.

type [required]

enum

IP allowlist Entry type. Allowed enum values: ip_allowlist_entry

default: ip_allowlist_entry

id

string

The unique identifier of the org.

type [required]

enum

IP allowlist type. Allowed enum values: ip_allowlist

default: ip_allowlist

{
  "data": {
    "attributes": {
      "enabled": false,
      "entries": [
        {
          "data": {
            "attributes": {
              "cidr_block": "string",
              "created_at": "2019-09-19T10:00:00.000Z",
              "modified_at": "2019-09-19T10:00:00.000Z",
              "note": "string"
            },
            "id": "string",
            "type": "ip_allowlist_entry"
          }
        }
      ]
    },
    "id": "string",
    "type": "ip_allowlist"
  }
}

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

// Get IP Allowlist returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IpAllowlistApi;
import com.datadog.api.client.v2.model.IPAllowlistResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    IpAllowlistApi apiInstance = new IpAllowlistApi(defaultClient);

    try {
      IPAllowlistResponse result = apiInstance.getIPAllowlist();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling IpAllowlistApi#getIPAllowlist");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

PATCH https://api.ap1.datadoghq.com/api/v2/ip_allowlisthttps://api.datadoghq.eu/api/v2/ip_allowlisthttps://api.ddog-gov.com/api/v2/ip_allowlisthttps://api.datadoghq.com/api/v2/ip_allowlisthttps://api.us3.datadoghq.com/api/v2/ip_allowlisthttps://api.us5.datadoghq.com/api/v2/ip_allowlist

개요

Edit the entries in the IP allowlist, and enable or disable it. This endpoint requires the org_management permission.

OAuth apps require the org_management authorization scope to access this endpoint.

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

IP allowlist data.

attributes

object

Attributes of the IP allowlist.

enabled

boolean

Whether the IP allowlist logic is enabled or not.

entries

[object]

Array of entries in the IP allowlist.

data [required]

object

Data of the IP allowlist entry object.

attributes

object

Attributes of the IP allowlist entry.

cidr_block

string

The CIDR block describing the IP range of the entry.

created_at

date-time

Creation time of the entry.

modified_at

date-time

Time of last entry modification.

note

string

A note describing the IP allowlist entry.

id

string

The unique identifier of the IP allowlist entry.

type [required]

enum

IP allowlist Entry type. Allowed enum values: ip_allowlist_entry

default: ip_allowlist_entry

id

string

The unique identifier of the org.

type [required]

enum

IP allowlist type. Allowed enum values: ip_allowlist

default: ip_allowlist

{
  "data": {
    "attributes": {
      "entries": [
        {
          "data": {
            "attributes": {
              "note": "Example-IP-Allowlist",
              "cidr_block": "127.0.0.1"
            },
            "type": "ip_allowlist_entry"
          }
        }
      ],
      "enabled": false
    },
    "type": "ip_allowlist"
  }
}

응답

OK

Response containing information about the IP allowlist.

Expand All

항목

유형

설명

data

object

IP allowlist data.

attributes

object

Attributes of the IP allowlist.

enabled

boolean

Whether the IP allowlist logic is enabled or not.

entries

[object]

Array of entries in the IP allowlist.

data [required]

object

Data of the IP allowlist entry object.

attributes

object

Attributes of the IP allowlist entry.

cidr_block

string

The CIDR block describing the IP range of the entry.

created_at

date-time

Creation time of the entry.

modified_at

date-time

Time of last entry modification.

note

string

A note describing the IP allowlist entry.

id

string

The unique identifier of the IP allowlist entry.

type [required]

enum

IP allowlist Entry type. Allowed enum values: ip_allowlist_entry

default: ip_allowlist_entry

id

string

The unique identifier of the org.

type [required]

enum

IP allowlist type. Allowed enum values: ip_allowlist

default: ip_allowlist

{
  "data": {
    "attributes": {
      "enabled": false,
      "entries": [
        {
          "data": {
            "attributes": {
              "cidr_block": "string",
              "created_at": "2019-09-19T10:00:00.000Z",
              "modified_at": "2019-09-19T10:00:00.000Z",
              "note": "string"
            },
            "id": "string",
            "type": "ip_allowlist_entry"
          }
        }
      ]
    },
    "id": "string",
    "type": "ip_allowlist"
  }
}

Bad Request

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

// Update IP Allowlist returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IpAllowlistApi;
import com.datadog.api.client.v2.model.IPAllowlistAttributes;
import com.datadog.api.client.v2.model.IPAllowlistData;
import com.datadog.api.client.v2.model.IPAllowlistEntry;
import com.datadog.api.client.v2.model.IPAllowlistEntryAttributes;
import com.datadog.api.client.v2.model.IPAllowlistEntryData;
import com.datadog.api.client.v2.model.IPAllowlistEntryType;
import com.datadog.api.client.v2.model.IPAllowlistResponse;
import com.datadog.api.client.v2.model.IPAllowlistType;
import com.datadog.api.client.v2.model.IPAllowlistUpdateRequest;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    IpAllowlistApi apiInstance = new IpAllowlistApi(defaultClient);

    IPAllowlistUpdateRequest body =
        new IPAllowlistUpdateRequest()
            .data(
                new IPAllowlistData()
                    .attributes(
                        new IPAllowlistAttributes()
                            .entries(
                                Collections.singletonList(
                                    new IPAllowlistEntry()
                                        .data(
                                            new IPAllowlistEntryData()
                                                .attributes(
                                                    new IPAllowlistEntryAttributes()
                                                        .note("Example-IP-Allowlist")
                                                        .cidrBlock("127.0.0.1"))
                                                .type(IPAllowlistEntryType.IP_ALLOWLIST_ENTRY))))
                            .enabled(false))
                    .type(IPAllowlistType.IP_ALLOWLIST));

    try {
      IPAllowlistResponse result = apiInstance.updateIPAllowlist(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling IpAllowlistApi#updateIPAllowlist");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

PREVIEWING: emmett.butler/dd-trace-api