Spaces method and path for this operation:
Refer to Spaces for more information.
Create a new Fleet cloud connector.
[Required authorization] Route required privileges: fleet-agent-policies-all OR integrations-all.
Body
-
The account type: single-account (single account/subscription) or organization-account (organization-wide).
Values are
single-accountororganization-account. -
The cloud provider type: aws, azure, or gcp.
Values are
aws,azure, orgcp. -
Identifier of the template source last used for this connector. Set to null to remove it.
Minimum length is
1, maximum length is255. -
Version of the template source last used for this connector. Set to null to remove it.
Minimum length is
1, maximum length is64. -
ARN of the last CloudFormation stack deployed for this connector (
arn:<partition>:cloudformation:<region>:<account>:stack/<name>/<id>).Minimum length is
1, maximum length is2048. -
Checksum of the CloudFormation template last saved on this connector. Set to null to remove it.
Minimum length is
1, maximum length is512. -
The name of the cloud connector.
Minimum length is
1, maximum length is255.
curl \
--request POST 'https://localhost:5601/api/fleet/cloud_connectors' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{
"accountType": "single-account",
"cloudProvider": "aws",
"iac_blueprint_id": "federated-identity",
"iac_blueprint_version": "1.0.0",
"iac_deployment_id": "arn:aws:cloudformation:us-east-1:123456789012:stack/elastic-aws-connector/abc",
"iac_key": "sha256:661cb7def1c7101f",
"name": "My AWS connector",
"vars": {}
}'
{
"accountType": "single-account",
"cloudProvider": "aws",
"iac_blueprint_id": "federated-identity",
"iac_blueprint_version": "1.0.0",
"iac_deployment_id": "arn:aws:cloudformation:us-east-1:123456789012:stack/elastic-aws-connector/abc",
"iac_key": "sha256:661cb7def1c7101f",
"name": "My AWS connector",
"vars": {}
}
{
"item": {
"accountType": "single-account",
"cloudProvider": "aws",
"created_at": "2024-01-15T10:00:00.000Z",
"iac_blueprint_id": "federated-identity",
"iac_blueprint_version": "1.0.0",
"iac_deployment_id": "arn:aws:cloudformation:us-east-1:123456789012:stack/elastic-aws-connector/abc",
"iac_key": "sha256:661cb7def1c7101f",
"iac_upgrade_checked_at": "2024-01-15T10:00:00.000Z",
"iac_upgrade_status": "up_to_date",
"id": "cloud-connector-id-2",
"name": "My AWS connector",
"packagePolicyCount": 0,
"updated_at": "2024-01-15T10:00:00.000Z",
"vars": {}
}
}
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}