---
type: api
title: Create cloud onboarding deployment
description: Create a new Fleet cloud onboarding deployment.<br/><br/>[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-post-fleet-cloud-onboarding-deployments
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-post-fleet-cloud-onboarding-deployments
products:
  - Kibana
---

# Create cloud onboarding deployment

Availability: 9.5+

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/fleet/cloud_onboarding_deployments`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#basicauth)

## Description

Create a new Fleet cloud onboarding deployment.<br/><br/>[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all.

## Request Body

`application/json`

- `authMethod` (enum) — optional
  Authentication method for managed integrations.
  Values: `identity_federation`, `static_keys`
- `connectorId` (string · min: 1 · max: 255) — optional
  ID of the fleet-cloud-connector to associate with this deployment. Omit for static-keys deployments.
- `dataFormat` (enum) — optional
  Data format: ecs or otel.
  Values: `ecs`, `otel`
- `globalRegion` (string · max: 64) — optional
  Global AWS region from the Service Settings step.
- `mechanisms` ([] enum  · max: 10) — required
  Delivery mechanisms active in this deployment.
  Values: `managed_integration`, `ecf`, `agent_based`
- `provider` (enum) — required
  Cloud provider.
  Values: `aws`, `azure`, `gcp`
- `services` ([] string · min: 1 · max: 1000) — required
  Service IDs to be covered by this deployment.
- `serviceVars` (map string to string to object) — optional
  Per-service config keyed by instance ID.

## Responses

#### `200`

Successful response

`application/json`

- `item` (object)
  - `agentPolicyId` (string)
    Agent policy ID created for agent-based deployments. Present only when agent_based is in mechanisms.
  - `apiKeyId` (string)
    Elasticsearch API key ID for push mechanisms (ecf). Set by the backend; used for key rotation/revocation.
  - `attemptCount` (number · min: 1)
    Number of deployment attempts, including the current one.
  - `authMethod` (enum)
    Authentication method for managed integrations.
    Values: `identity_federation`, `static_keys`
  - `connectorId` (string)
    ID of the fleet-cloud-connector this deployment belongs to. Absent for static-keys deployments.
  - `dataFormat` (enum)
    Data format: ecs or otel.
    Values: `ecs`, `otel`
  - `deploymentId` (string)
    Opaque deployment identifier; for AWS, the CFN stack ARN.
  - `deploymentName` (string)
    Opaque deployment name; for AWS, the CFN stack name.
  - `ecfStacks` ([] object · max: 10)
    ECF CloudFormation stacks launched as part of this deployment. Written by the wizard after the user clicks Launch.
    - `family` (enum)
      ECF template family.
      Values: `unified`, `otel`, `crowdstrike`
    - `stackName` (string · min: 1 · max: 128)
      CloudFormation stack name (128-char AWS limit).
    - `templateVersion` (string · min: 1 · max: 32)
      ECF semantic version resolved at launch time, e.g. "1.10.0".
  - `globalRegion` (string)
    Global AWS region from the Service Settings step.
  - `id` (string)
  - `mechanisms` ([] enum  · max: 10)
    Values: `managed_integration`, `ecf`, `agent_based`
  - `packagePolicyIds` ([] string · max: 100)
    Package policy IDs created for managed_integration services.
  - `provider` (enum)
    Cloud provider.
    Values: `aws`, `azure`, `gcp`
  - `services` ([] string · max: 1000)
    Service IDs covered by this deployment.
  - `serviceVars` (map string to string to object)
    Per-service config keyed by instance ID. Each value is the ServiceVars object from the Service Settings step.
  - `status` (enum)
    Deployment status.
    Values: `pending`, `deploying`, `succeeded`, `failed`
  - `statusMessage` (string)
    Error context when status is failed.
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
POST /api/fleet/cloud_onboarding_deployments
{
  "connectorId": "cloud-connector-id-1",
  "mechanisms": [
    "agent_based"
  ],
  "provider": "aws",
  "services": [
    "cloudwatch_metrics"
  ],
  "serviceVars": {
    "cloudwatch_metrics": {
      "namespace": "AWS/EC2",
      "regions": [
        "us-east-1"
      ]
    }
  }
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/fleet/cloud_onboarding_deployments" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "connectorId": "cloud-connector-id-1",
  "mechanisms": [
    "agent_based"
  ],
  "provider": "aws",
  "services": [
    "cloudwatch_metrics"
  ],
  "serviceVars": {
    "cloudwatch_metrics": {
      "namespace": "AWS/EC2",
      "regions": [
        "us-east-1"
      ]
    }
  }
}'
```

## Response Examples

#### Post cloud onboarding deployment agent based

Agent-based deployment — agentPolicyId set after the agent policy is selected or created

```json
{
  "item": {
    "agentPolicyId": "agent-policy-id-1",
    "attemptCount": 1,
    "connectorId": "cloud-connector-id-1",
    "id": "onboarding-deployment-id-2",
    "mechanisms": [
      "agent_based"
    ],
    "provider": "aws",
    "services": [
      "cloudwatch_metrics"
    ],
    "serviceVars": {
      "cloudwatch_metrics": {
        "namespace": "AWS/EC2",
        "regions": [
          "us-east-1"
        ]
      }
    },
    "status": "pending"
  }
}
```

#### Post cloud onboarding deployment ecf

ECF deployment — apiKeyId set after the Elasticsearch API key is created for the ECF service

```json
{
  "item": {
    "apiKeyId": "es-api-key-id-1",
    "attemptCount": 1,
    "connectorId": "cloud-connector-id-1",
    "id": "onboarding-deployment-id-3",
    "mechanisms": [
      "ecf"
    ],
    "provider": "aws",
    "services": [
      "cloudfront_logs"
    ],
    "serviceVars": {
      "cloudfront_logs": {
        "regions": [
          "us-east-1"
        ],
        "s3_bucket_arn": "arn:aws:s3:::my-cloudfront-bucket"
      }
    },
    "status": "pending"
  }
}
```

#### Post cloud onboarding deployment

Managed integration deployment — packagePolicyIds set after deployment completes

```json
{
  "item": {
    "attemptCount": 1,
    "connectorId": "cloud-connector-id-1",
    "id": "onboarding-deployment-id-1",
    "mechanisms": [
      "managed_integration"
    ],
    "packagePolicyIds": [
      "package-policy-id-1"
    ],
    "provider": "aws",
    "services": [
      "cloudwatch_metrics",
      "cloudtrail"
    ],
    "serviceVars": {
      "cloudtrail": {
        "regions": [
          "us-east-1"
        ],
        "s3_bucket_arn": "arn:aws:s3:::my-cloudtrail-bucket"
      },
      "cloudwatch_metrics": {
        "namespace": "AWS/EC2",
        "regions": [
          "us-east-1",
          "eu-west-1"
        ]
      }
    },
    "status": "pending"
  }
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

