---
title: "Create GCP scan options"
method: POST
path: "/api/v2/agentless_scanning/accounts/gcp"
tags: ["Agentless Scanning"]
---

# Create GCP scan options

`POST /api/v2/agentless_scanning/accounts/gcp`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/agentless_scanning/accounts/gcp`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `org_management`

Activate Agentless scan options for a GCP project.

## Request body

- GcpScanOptions: Response object containing GCP scan options for a single project.
  - `data` GcpScanOptionsData: Single GCP scan options entry.
    - `attributes` GcpScanOptionsDataAttributes: Attributes for GCP scan options configuration.
      - `compliance_host` boolean: Indicates whether host compliance scanning is enabled.
      - `vuln_containers_os` boolean: Indicates if scanning for vulnerabilities in containers is enabled.
      - `vuln_host_os` boolean: Indicates if scanning for vulnerabilities in hosts is enabled.
    - `id` string, required: The GCP project ID.
    - `type` 'gcp_scan_options', required: GCP scan options resource type.

## Response `201`

Agentless scan options enabled successfully.

- GcpScanOptions: Response object containing GCP scan options for a single project.
  - `data` GcpScanOptionsData: Single GCP scan options entry.
    - `attributes` GcpScanOptionsDataAttributes: Attributes for GCP scan options configuration.
      - `compliance_host` boolean: Indicates whether host compliance scanning is enabled.
      - `vuln_containers_os` boolean: Indicates if scanning for vulnerabilities in containers is enabled.
      - `vuln_host_os` boolean: Indicates if scanning for vulnerabilities in hosts is enabled.
    - `id` string, required: The GCP project ID.
    - `type` 'gcp_scan_options', required: GCP scan options resource type.

## Other responses

- `400`: Bad Request
- `403`: Not Authorized
- `409`: Conflict
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
