POST /api/fleet/cloud_connectors

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/cloud_connectors

Refer to Spaces for more information.

Create a new Fleet cloud connector.

[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • accountType string

    The account type: single-account (single account/subscription) or organization-account (organization-wide).

    Values are single-account or organization-account.

  • cloudProvider string Required

    The cloud provider type: aws, azure, or gcp.

    Values are aws, azure, or gcp.

  • name string Required

    The name of the cloud connector.

    Minimum length is 1, maximum length is 255.

  • vars object Required

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • item object Required

      Additional properties are NOT allowed.

      Hide item attributes Show item attributes object
      • accountType string
      • cloudProvider string Required
      • created_at string Required
      • id string Required
      • name string Required
      • namespace string
      • packagePolicyCount number Required
      • updated_at string Required
      • vars object Required
      • verification_failed_at string
      • verification_started_at string
      • verification_status string
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
POST /api/fleet/cloud_connectors
curl \
 --request POST 'https://<KIBANA_URL>/api/fleet/cloud_connectors' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"accountType":"single-account","cloudProvider":"aws","name":"My AWS connector","vars":{}}'
Request example
Create a new AWS cloud connector
{
  "accountType": "single-account",
  "cloudProvider": "aws",
  "name": "My AWS connector",
  "vars": {}
}
Response examples (200)
The created Fleet cloud connector
{
  "item": {
    "accountType": "single-account",
    "cloudProvider": "aws",
    "created_at": "2024-01-15T10:00:00.000Z",
    "id": "cloud-connector-id-2",
    "name": "My AWS connector",
    "packagePolicyCount": 0,
    "updated_at": "2024-01-15T10:00:00.000Z",
    "vars": {}
  }
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}