For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/fleet-automation/cancel-a-deployment.md. A documentation index is available at /llms.txt.
Language
Datadog site

배포 취소

POSThttps://api.datadoghq.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.us3.datadoghq.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.us5.datadoghq.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.datadoghq.eu/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.ap1.datadoghq.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.ap2.datadoghq.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.uk1.datadoghq.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.ddog-gov.com/api/v2/fleet/deployments/{deployment_id}/cancelhttps://api.us2.ddog-gov.com/api/v2/fleet/deployments/{deployment_id}/cancel

개요

활성 배포를 취소하고 보류 중인 모든 작업을 중지합니다. 배포를 취소하면 다음과 같습니다.

  • 아직 시작되지 않은 호스트의 모든 보류 중인 작업이 중지됩니다.
  • 호스트에서 현재 진행 중인 작업은 현재 상태에 따라 완료되거나 중단될 수 있습니다.
  • 호스트에 이미 적용된 구성 변경 사항이나 패키지 업그레이드는 롤백되지 않습니다.

취소 후 GET 엔드포인트를 사용하여 배포의 최종 상태를 조회하고 어떤 호스트가 취소 전에 성공적으로 업데이트되었는지 확인할 수 있습니다.

pending 또는 running 상태인 배포만 취소할 수 있습니다. 배포가 취소 가능한 상태가 아닌 경우 400을 반환합니다. 지정된 ID와 일치하는 배포가 없거나 해당 배포에 대한 액세스 권한이 없는 경우 404를 반환합니다.

This endpoint requires all of the following permissions:

  • agent_upgrade_write
  • fleet_policies_write

인수

경로 파라미터

이름
유형
설명
deployment_id [required]
string

The unique identifier of the deployment to cancel.

응답

OK

Response containing the result of a deployment cancellation request.

항목
유형
설명
data [required]
object

A deployment cancellation response.

코드 예시

배포 취소
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export deployment_id="k7Q-3mX-p9Z"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/fleet/deployments/${deployment_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"