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/update-a-batch-migration-resource.md. A documentation index is available at /llms.txt.
Language
Datadog site

Update a batch migration resource

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

Descripción general

Update a resource of a batch migration. At least one of name, description, inputType, or input must be provided. name and description can be updated at any time. inputType and input can only be updated while the resource is pending; otherwise, the request returns 409 Conflict. The translated output cannot be edited.

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.

resource_id [required]
string

The UUID of the batch migration resource.

Solicitud

Body Data (required)

Campo
Type
Descripción
data [required]
object

Data of the batch migration resource to update.

Respuesta

OK

Response containing a batch migration resource.

Campo
Type
Descripción
data [required]
object

A batch migration resource.

Ejemplo de código

Update a batch migration resource returns "OK" response
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF
# Path parameters
export batch_id="7cdb3a75-64fb-46ce-9445-41969e78fe8e"
export resource_id="c968cf83-56c2-4d54-a993-6c86dfb83527"

# 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 PATCH "https://api.${DD_SITE}/api/v2/security_monitoring/batch-migrations/${batch_id}/resources/${resource_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "type": "batchMigrationResource",
    "attributes": {
      "input": "index=wineventlog EventCode=4625 | stats count by user"
    }
  }
}
EOF