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

Deployment Gates

Manage Deployment Gates using this API to reduce the likelihood and impact of incidents caused by deployments. See the Deployment Gates documentation for more information.

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/deployment_gateshttps://api.ap2.datadoghq.com/api/v2/deployment_gateshttps://api.datadoghq.eu/api/v2/deployment_gateshttps://api.ddog-gov.com/api/v2/deployment_gateshttps://api.datadoghq.com/api/v2/deployment_gateshttps://api.us3.datadoghq.com/api/v2/deployment_gateshttps://api.us5.datadoghq.com/api/v2/deployment_gates

개요

Endpoint to create a deployment gate. This endpoint requires the deployment_gates_write permission.

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

Parameters for creating a deployment gate.

attributes [required]

object

Parameters for creating a deployment gate.

dry_run

boolean

Whether this gate is run in dry-run mode.

env [required]

string

The environment of the deployment gate.

identifier

string

The identifier of the deployment gate.

default: default

service [required]

string

The service of the deployment gate.

type [required]

enum

Deployment gate resource type. Allowed enum values: deployment_gate

{
  "data": {
    "attributes": {
      "dry_run": false,
      "env": "production",
      "identifier": "my-gate-1",
      "service": "my-service"
    },
    "type": "deployment_gate"
  }
}

응답

OK

Response for a deployment gate.

Expand All

항목

유형

설명

data

object

Data for a deployment gate.

attributes [required]

object

Basic information about a deployment gate.

created_at [required]

date-time

The timestamp when the deployment gate was created.

created_by [required]

object

Information about the user who created the deployment gate.

handle

string

The handle of the user who created the deployment rule.

id [required]

string

The ID of the user who created the deployment rule.

name

string

The name of the user who created the deployment rule.

dry_run [required]

boolean

Whether this gate is run in dry-run mode.

env [required]

string

The environment of the deployment gate.

identifier [required]

string

The identifier of the deployment gate.

service [required]

string

The service of the deployment gate.

updated_at

date-time

The timestamp when the deployment gate was last updated.

updated_by

object

Information about the user who updated the deployment gate.

handle

string

The handle of the user who updated the deployment rule.

id [required]

string

The ID of the user who updated the deployment rule.

name

string

The name of the user who updated the deployment rule.

id [required]

string

Unique identifier of the deployment gate.

type [required]

enum

Deployment gate resource type. Allowed enum values: deployment_gate

{
  "data": {
    "attributes": {
      "created_at": "2021-01-01T00:00:00Z",
      "created_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      },
      "dry_run": false,
      "env": "production",
      "identifier": "pre",
      "service": "my-service",
      "updated_at": "2021-01-01T00:00:00Z",
      "updated_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      }
    },
    "id": "1111-2222-3333-4444-555566667777",
    "type": "deployment_gate"
  }
}

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                          # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "dry_run": false, "env": "production", "identifier": "my-gate-1", "service": "my-service" }, "type": "deployment_gate" } } EOF

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/deployment_gates/{id}https://api.ap2.datadoghq.com/api/v2/deployment_gates/{id}https://api.datadoghq.eu/api/v2/deployment_gates/{id}https://api.ddog-gov.com/api/v2/deployment_gates/{id}https://api.datadoghq.com/api/v2/deployment_gates/{id}https://api.us3.datadoghq.com/api/v2/deployment_gates/{id}https://api.us5.datadoghq.com/api/v2/deployment_gates/{id}

개요

Endpoint to get a deployment gate. This endpoint requires the deployment_gates_read permission.

인수

경로 파라미터

이름

유형

설명

id [required]

string

The ID of the deployment gate.

응답

OK

Response for a deployment gate.

Expand All

항목

유형

설명

data

object

Data for a deployment gate.

attributes [required]

object

Basic information about a deployment gate.

created_at [required]

date-time

The timestamp when the deployment gate was created.

created_by [required]

object

Information about the user who created the deployment gate.

handle

string

The handle of the user who created the deployment rule.

id [required]

string

The ID of the user who created the deployment rule.

name

string

The name of the user who created the deployment rule.

dry_run [required]

boolean

Whether this gate is run in dry-run mode.

env [required]

string

The environment of the deployment gate.

identifier [required]

string

The identifier of the deployment gate.

service [required]

string

The service of the deployment gate.

updated_at

date-time

The timestamp when the deployment gate was last updated.

updated_by

object

Information about the user who updated the deployment gate.

handle

string

The handle of the user who updated the deployment rule.

id [required]

string

The ID of the user who updated the deployment rule.

name

string

The name of the user who updated the deployment rule.

id [required]

string

Unique identifier of the deployment gate.

type [required]

enum

Deployment gate resource type. Allowed enum values: deployment_gate

{
  "data": {
    "attributes": {
      "created_at": "2021-01-01T00:00:00Z",
      "created_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      },
      "dry_run": false,
      "env": "production",
      "identifier": "pre",
      "service": "my-service",
      "updated_at": "2021-01-01T00:00:00Z",
      "updated_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      }
    },
    "id": "1111-2222-3333-4444-555566667777",
    "type": "deployment_gate"
  }
}

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Deployment gate not found.

Deployment gate not found.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                  # Path parameters
export id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

PUT https://api.ap1.datadoghq.com/api/v2/deployment_gates/{id}https://api.ap2.datadoghq.com/api/v2/deployment_gates/{id}https://api.datadoghq.eu/api/v2/deployment_gates/{id}https://api.ddog-gov.com/api/v2/deployment_gates/{id}https://api.datadoghq.com/api/v2/deployment_gates/{id}https://api.us3.datadoghq.com/api/v2/deployment_gates/{id}https://api.us5.datadoghq.com/api/v2/deployment_gates/{id}

개요

Endpoint to update a deployment gate. This endpoint requires the deployment_gates_write permission.

인수

경로 파라미터

이름

유형

설명

id [required]

string

The ID of the deployment gate.

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

Parameters for updating a deployment gate.

attributes [required]

object

Attributes for updating a deployment gate.

dry_run [required]

boolean

Whether to run in dry-run mode.

id [required]

string

Unique identifier of the deployment gate.

type [required]

enum

Deployment gate resource type. Allowed enum values: deployment_gate

{
  "data": {
    "attributes": {
      "dry_run": false
    },
    "id": "12345678-1234-1234-1234-123456789012",
    "type": "deployment_gate"
  }
}

응답

OK

Response for a deployment gate.

Expand All

항목

유형

설명

data

object

Data for a deployment gate.

attributes [required]

object

Basic information about a deployment gate.

created_at [required]

date-time

The timestamp when the deployment gate was created.

created_by [required]

object

Information about the user who created the deployment gate.

handle

string

The handle of the user who created the deployment rule.

id [required]

string

The ID of the user who created the deployment rule.

name

string

The name of the user who created the deployment rule.

dry_run [required]

boolean

Whether this gate is run in dry-run mode.

env [required]

string

The environment of the deployment gate.

identifier [required]

string

The identifier of the deployment gate.

service [required]

string

The service of the deployment gate.

updated_at

date-time

The timestamp when the deployment gate was last updated.

updated_by

object

Information about the user who updated the deployment gate.

handle

string

The handle of the user who updated the deployment rule.

id [required]

string

The ID of the user who updated the deployment rule.

name

string

The name of the user who updated the deployment rule.

id [required]

string

Unique identifier of the deployment gate.

type [required]

enum

Deployment gate resource type. Allowed enum values: deployment_gate

{
  "data": {
    "attributes": {
      "created_at": "2021-01-01T00:00:00Z",
      "created_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      },
      "dry_run": false,
      "env": "production",
      "identifier": "pre",
      "service": "my-service",
      "updated_at": "2021-01-01T00:00:00Z",
      "updated_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      }
    },
    "id": "1111-2222-3333-4444-555566667777",
    "type": "deployment_gate"
  }
}

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Deployment gate not found.

Deployment gate not found.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                          # Path parameters
export id="CHANGE_ME"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "dry_run": false }, "id": "12345678-1234-1234-1234-123456789012", "type": "deployment_gate" } } EOF

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

DELETE https://api.ap1.datadoghq.com/api/v2/deployment_gates/{id}https://api.ap2.datadoghq.com/api/v2/deployment_gates/{id}https://api.datadoghq.eu/api/v2/deployment_gates/{id}https://api.ddog-gov.com/api/v2/deployment_gates/{id}https://api.datadoghq.com/api/v2/deployment_gates/{id}https://api.us3.datadoghq.com/api/v2/deployment_gates/{id}https://api.us5.datadoghq.com/api/v2/deployment_gates/{id}

개요

Endpoint to delete a deployment gate. Rules associated with the gate are also deleted. This endpoint requires the deployment_gates_write permission.

인수

경로 파라미터

이름

유형

설명

id [required]

string

The ID of the deployment gate.

응답

No Content

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Deployment gate not found.

Deployment gate not found.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                  # Path parameters
export id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/deployment_gates/{gate_id}/ruleshttps://api.ap2.datadoghq.com/api/v2/deployment_gates/{gate_id}/ruleshttps://api.datadoghq.eu/api/v2/deployment_gates/{gate_id}/ruleshttps://api.ddog-gov.com/api/v2/deployment_gates/{gate_id}/ruleshttps://api.datadoghq.com/api/v2/deployment_gates/{gate_id}/ruleshttps://api.us3.datadoghq.com/api/v2/deployment_gates/{gate_id}/ruleshttps://api.us5.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules

개요

Endpoint to create a deployment rule. A gate for the rule must already exist. This endpoint requires the deployment_gates_write permission.

인수

경로 파라미터

이름

유형

설명

gate_id [required]

string

The ID of the deployment gate.

요청

Body Data (required)

Expand All

항목

유형

설명

data

object

Parameters for creating a deployment rule.

attributes [required]

object

Parameters for creating a deployment rule.

dry_run

boolean

Whether this rule is run in dry-run mode.

name [required]

string

The name of the deployment rule.

options [required]

 <oneOf>

Options for deployment rule response representing either faulty deployment detection or monitor options.

Option 1

object

Faulty deployment detection options for deployment rules.

duration

int64

The duration for faulty deployment detection.

excluded_resources

[string]

Resources to exclude from faulty deployment detection.

Option 2

object

Monitor options for deployment rules.

duration

int64

Seconds the monitor needs to stay in OK status for the rule to pass.

query [required]

string

Monitors that match this query are evaluated.

type [required]

string

The type of the deployment rule (faulty_deployment_detection or monitor).

type [required]

enum

Deployment rule resource type. Allowed enum values: deployment_rule

{
  "data": {
    "attributes": {
      "dry_run": false,
      "name": "My deployment rule",
      "options": {
        "excluded_resources": []
      },
      "type": "faulty_deployment_detection"
    },
    "type": "deployment_rule"
  }
}

응답

OK

Response for a deployment rule.

Expand All

항목

유형

설명

data

object

Data for a deployment rule.

attributes [required]

object

Basic information about a deployment rule.

created_at [required]

date-time

The timestamp when the deployment rule was created.

created_by [required]

object

Information about the user who created the deployment rule.

handle

string

The handle of the user who created the deployment rule.

id [required]

string

The ID of the user who created the deployment rule.

name

string

The name of the user who created the deployment rule.

dry_run [required]

boolean

Whether this rule is run in dry-run mode.

gate_id [required]

string

The ID of the deployment gate.

name [required]

string

The name of the deployment rule.

options [required]

 <oneOf>

Options for deployment rule response representing either faulty deployment detection or monitor options.

Option 1

object

Faulty deployment detection options for deployment rules.

duration

int64

The duration for faulty deployment detection.

excluded_resources

[string]

Resources to exclude from faulty deployment detection.

Option 2

object

Monitor options for deployment rules.

duration

int64

Seconds the monitor needs to stay in OK status for the rule to pass.

query [required]

string

Monitors that match this query are evaluated.

type [required]

enum

The type of the deployment rule. Allowed enum values: faulty_deployment_detection,monitor

updated_at

date-time

The timestamp when the deployment rule was last updated.

updated_by

object

Information about the user who updated the deployment rule.

handle

string

The handle of the user who updated the deployment rule.

id [required]

string

The ID of the user who updated the deployment rule.

name

string

The name of the user who updated the deployment rule.

id [required]

string

Unique identifier of the deployment rule.

type [required]

enum

Deployment rule resource type. Allowed enum values: deployment_rule

{
  "data": {
    "attributes": {
      "created_at": "2021-01-01T00:00:00Z",
      "created_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      },
      "dry_run": false,
      "gate_id": "1111-2222-3333-4444-555566667777",
      "name": "My deployment rule",
      "options": {
        "duration": 3600,
        "excluded_resources": [
          "resource1",
          "resource2"
        ]
      },
      "type": "faulty_deployment_detection",
      "updated_at": "2019-09-19T10:00:00.000Z",
      "updated_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      }
    },
    "id": "1111-2222-3333-4444-555566667777",
    "type": "deployment_rule"
  }
}

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                          # Path parameters
export gate_id="CHANGE_ME"
# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${gate_id}/rules" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "dry_run": false, "name": "My deployment rule", "options": { "excluded_resources": [] }, "type": "faulty_deployment_detection" }, "type": "deployment_rule" } } EOF

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.ap2.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.datadoghq.eu/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.ddog-gov.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.us3.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.us5.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}

개요

Endpoint to get a deployment rule. This endpoint requires the deployment_gates_read permission.

인수

경로 파라미터

이름

유형

설명

gate_id [required]

string

The ID of the deployment gate.

id [required]

string

The ID of the deployment rule.

응답

OK

Response for a deployment rule.

Expand All

항목

유형

설명

data

object

Data for a deployment rule.

attributes [required]

object

Basic information about a deployment rule.

created_at [required]

date-time

The timestamp when the deployment rule was created.

created_by [required]

object

Information about the user who created the deployment rule.

handle

string

The handle of the user who created the deployment rule.

id [required]

string

The ID of the user who created the deployment rule.

name

string

The name of the user who created the deployment rule.

dry_run [required]

boolean

Whether this rule is run in dry-run mode.

gate_id [required]

string

The ID of the deployment gate.

name [required]

string

The name of the deployment rule.

options [required]

 <oneOf>

Options for deployment rule response representing either faulty deployment detection or monitor options.

Option 1

object

Faulty deployment detection options for deployment rules.

duration

int64

The duration for faulty deployment detection.

excluded_resources

[string]

Resources to exclude from faulty deployment detection.

Option 2

object

Monitor options for deployment rules.

duration

int64

Seconds the monitor needs to stay in OK status for the rule to pass.

query [required]

string

Monitors that match this query are evaluated.

type [required]

enum

The type of the deployment rule. Allowed enum values: faulty_deployment_detection,monitor

updated_at

date-time

The timestamp when the deployment rule was last updated.

updated_by

object

Information about the user who updated the deployment rule.

handle

string

The handle of the user who updated the deployment rule.

id [required]

string

The ID of the user who updated the deployment rule.

name

string

The name of the user who updated the deployment rule.

id [required]

string

Unique identifier of the deployment rule.

type [required]

enum

Deployment rule resource type. Allowed enum values: deployment_rule

{
  "data": {
    "attributes": {
      "created_at": "2021-01-01T00:00:00Z",
      "created_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      },
      "dry_run": false,
      "gate_id": "1111-2222-3333-4444-555566667777",
      "name": "My deployment rule",
      "options": {
        "duration": 3600,
        "excluded_resources": [
          "resource1",
          "resource2"
        ]
      },
      "type": "faulty_deployment_detection",
      "updated_at": "2019-09-19T10:00:00.000Z",
      "updated_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      }
    },
    "id": "1111-2222-3333-4444-555566667777",
    "type": "deployment_rule"
  }
}

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Deployment rule not found.

Deployment rule not found.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                  # Path parameters
export gate_id="CHANGE_ME"
export id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${gate_id}/rules/${id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

PUT https://api.ap1.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.ap2.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.datadoghq.eu/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.ddog-gov.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.us3.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.us5.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}

개요

Endpoint to update a deployment rule. This endpoint requires the deployment_gates_write permission.

인수

경로 파라미터

이름

유형

설명

gate_id [required]

string

The ID of the deployment gate.

id [required]

string

The ID of the deployment rule.

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

Parameters for updating a deployment rule.

attributes [required]

object

Parameters for updating a deployment rule.

dry_run [required]

boolean

Whether to run this rule in dry-run mode.

name [required]

string

The name of the deployment rule.

options [required]

 <oneOf>

Options for deployment rule response representing either faulty deployment detection or monitor options.

Option 1

object

Faulty deployment detection options for deployment rules.

duration

int64

The duration for faulty deployment detection.

excluded_resources

[string]

Resources to exclude from faulty deployment detection.

Option 2

object

Monitor options for deployment rules.

duration

int64

Seconds the monitor needs to stay in OK status for the rule to pass.

query [required]

string

Monitors that match this query are evaluated.

type [required]

enum

Deployment rule resource type. Allowed enum values: deployment_rule

{
  "data": {
    "attributes": {
      "dry_run": false,
      "name": "Updated deployment rule",
      "options": {
        "excluded_resources": []
      }
    },
    "type": "deployment_rule"
  }
}

응답

OK

Response for a deployment rule.

Expand All

항목

유형

설명

data

object

Data for a deployment rule.

attributes [required]

object

Basic information about a deployment rule.

created_at [required]

date-time

The timestamp when the deployment rule was created.

created_by [required]

object

Information about the user who created the deployment rule.

handle

string

The handle of the user who created the deployment rule.

id [required]

string

The ID of the user who created the deployment rule.

name

string

The name of the user who created the deployment rule.

dry_run [required]

boolean

Whether this rule is run in dry-run mode.

gate_id [required]

string

The ID of the deployment gate.

name [required]

string

The name of the deployment rule.

options [required]

 <oneOf>

Options for deployment rule response representing either faulty deployment detection or monitor options.

Option 1

object

Faulty deployment detection options for deployment rules.

duration

int64

The duration for faulty deployment detection.

excluded_resources

[string]

Resources to exclude from faulty deployment detection.

Option 2

object

Monitor options for deployment rules.

duration

int64

Seconds the monitor needs to stay in OK status for the rule to pass.

query [required]

string

Monitors that match this query are evaluated.

type [required]

enum

The type of the deployment rule. Allowed enum values: faulty_deployment_detection,monitor

updated_at

date-time

The timestamp when the deployment rule was last updated.

updated_by

object

Information about the user who updated the deployment rule.

handle

string

The handle of the user who updated the deployment rule.

id [required]

string

The ID of the user who updated the deployment rule.

name

string

The name of the user who updated the deployment rule.

id [required]

string

Unique identifier of the deployment rule.

type [required]

enum

Deployment rule resource type. Allowed enum values: deployment_rule

{
  "data": {
    "attributes": {
      "created_at": "2021-01-01T00:00:00Z",
      "created_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      },
      "dry_run": false,
      "gate_id": "1111-2222-3333-4444-555566667777",
      "name": "My deployment rule",
      "options": {
        "duration": 3600,
        "excluded_resources": [
          "resource1",
          "resource2"
        ]
      },
      "type": "faulty_deployment_detection",
      "updated_at": "2019-09-19T10:00:00.000Z",
      "updated_by": {
        "handle": "test-user",
        "id": "1111-2222-3333-4444-555566667777",
        "name": "Test User"
      }
    },
    "id": "1111-2222-3333-4444-555566667777",
    "type": "deployment_rule"
  }
}

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Deployment rule not found.

Deployment rule not found.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                          # Path parameters
export gate_id="CHANGE_ME"
export id="CHANGE_ME"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${gate_id}/rules/${id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "dry_run": false, "name": "Updated deployment rule", "options": { "excluded_resources": [] } }, "type": "deployment_rule" } } EOF

Note: This endpoint is in preview and may be subject to change. If you have any feedback, contact Datadog support.

DELETE https://api.ap1.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.ap2.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.datadoghq.eu/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.ddog-gov.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.us3.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}https://api.us5.datadoghq.com/api/v2/deployment_gates/{gate_id}/rules/{id}

개요

Endpoint to delete a deployment rule. This endpoint requires the deployment_gates_write permission.

인수

경로 파라미터

이름

유형

설명

gate_id [required]

string

The ID of the deployment gate.

id [required]

string

The ID of the deployment rule.

응답

No Content

Bad request.

Bad request.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

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"
  ]
}

Deployment gate not found.

Deployment gate not found.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Internal Server Error

Errors occurred.

Expand All

항목

유형

설명

errors

[object]

Structured errors.

detail

string

Error message.

status

string

Error code.

title

string

Error title.

{
  "errors": [
    {
      "detail": "Malformed payload",
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

코드 사례

                  # Path parameters
export gate_id="CHANGE_ME"
export id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deployment_gates/${gate_id}/rules/${id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"