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

Cancel a batch migration

ADVERTENCIANote: This endpoint is in Preview and is subject to change. To request access, contact Datadog support or your Customer Success Manager.
POSThttps://api.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.us3.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.us5.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.datadoghq.eu/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.ap1.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.ap2.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.uk1.datadoghq.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.ddog-gov.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancelhttps://api.us2.ddog-gov.com/api/v2/security_monitoring/batch-migrations/{batch_id}/cancel

Descripción general

Cancel an in_progress batch migration. Resources that are pending or in_progress become canceled. Resources that are already completed or failed keep their status and output, so completed resources can still be published. Canceling a canceled batch migration succeeds, so the request can be safely retried. Returns 409 Conflict if the batch migration is draft or completed.

This endpoint requires the security_monitoring_rules_write permission.

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

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
batch_id [required]
string

The UUID of the batch migration.

Respuesta

Accepted

Ejemplo de código

Cancel a batch migration
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"

# 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/security_monitoring/batch-migrations/${batch_id}/cancel" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"