For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/fr/api/latest/agentless-scanning/create-gcp-scan-options.md. A documentation index is available at /llms.txt.
Language
Datadog site
ATTENTIONCe produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. (US1-FED).
ATTENTIONCe produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. (US2-FED).

Créer des options d'analyse GCP

POSThttps://api.datadoghq.com/api/v2/agentless_scanning/accounts/gcphttps://api.us3.datadoghq.com/api/v2/agentless_scanning/accounts/gcphttps://api.us5.datadoghq.com/api/v2/agentless_scanning/accounts/gcphttps://api.datadoghq.eu/api/v2/agentless_scanning/accounts/gcphttps://api.ap1.datadoghq.com/api/v2/agentless_scanning/accounts/gcphttps://api.ap2.datadoghq.com/api/v2/agentless_scanning/accounts/gcphttps://api.uk1.datadoghq.com/api/v2/agentless_scanning/accounts/gcphttps://api.ddog-gov.com/api/v2/agentless_scanning/accounts/gcphttps://api.us2.ddog-gov.com/api/v2/agentless_scanning/accounts/gcp

Présentation

Activer les options d'analyse sans agent pour un projet GCP.

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

Requête

Body Data (required)

Définition des nouvelles options d'analyse.

Champ
Type
Description
data
object

Objet de réponse contenant les options d'analyse GCP pour un seul projet.

Réponse

Agentless scan options enabled successfully.

Response object containing GCP scan options for a single project.

Champ
Type
Description
data
object

Single GCP scan options entry.

Exemple de code

Create GCP scan options returns "Agentless scan options enabled successfully." response
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF
# 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/agentless_scanning/accounts/gcp" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "id": "new-project",
    "type": "gcp_scan_options",
    "attributes": {
      "cloud_function": true,
      "vuln_host_os": true,
      "vuln_containers_os": true
    }
  }
}
EOF