Spaces method and path for this operation:
post /s/{space_id}/api/fleet/iac_provisioner/callbacks/{callbackId}
Refer to Spaces for more information.
Called by the CloudFormation stack launched from Kibana to report the IAM role ARN and stack ARN it created. The request is not authenticated: present the one-time token issued when the callback was created in the x-elastic-callback-token header. The token is not an Elasticsearch credential and admits nothing but this report. role_arn and stack_arn must be in the same AWS account. While the record is pending, a repeat report with the same values succeeds and different values return 409; an expired or cancelled record returns 410.
Path parameters
-
ID of the callback record, as issued to the stack.
Minimum length is
1, maximum length is128.
POST
/api/fleet/iac_provisioner/callbacks/{callbackId}
curl \
--request POST 'https://localhost:5601/api/fleet/iac_provisioner/callbacks/{callbackId}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{
"role_arn": "arn:aws:iam::123456789012:role/ElasticWorkloadIdentity-abc123",
"stack_arn": "arn:aws:cloudformation:us-east-1:123456789012:stack/elastic-identity/11111111-2222-3333-4444-555555555555"
}'
Request example
The report the launched CloudFormation stack sends once its IAM role exists
{
"role_arn": "arn:aws:iam::123456789012:role/ElasticWorkloadIdentity-abc123",
"stack_arn": "arn:aws:cloudformation:us-east-1:123456789012:stack/elastic-identity/11111111-2222-3333-4444-555555555555"
}
Response examples (200)
The report was applied and the federated identity exists
{
"status": "received"
}
Response examples (400)
The role and the stack are in different AWS accounts
{
"error": "Bad Request",
"message": "role_arn and stack_arn must be in the same AWS account",
"statusCode": 400
}
Response examples (404)
No record has this ID, or the token is not the one issued for it
{
"error": "Not Found",
"message": "Callback not found",
"statusCode": 404
}
Response examples (409)
A report with different values was already received
{
"error": "Conflict",
"message": "Callback already received with different values",
"statusCode": 409
}
Response examples (410)
The record expired or was cancelled before the report arrived
{
"error": "Gone",
"message": "Callback is no longer accepting values",
"statusCode": 410
}