Skip to main content
POST
/
v2
/
integrations
/
collectors
/
aws-cloudformation
Create an AWS CloudFormation template for automatic integration
curl --request POST \
  --url https://api.pelanor.io/v2/integrations/collectors/aws-cloudformation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "mode": "MANAGEMENT_ACCOUNT",
  "workspaceId": "<string>"
}'
{
  "contentType": "<string>",
  "data": "aSDinaTvuI8gbWludGxpZnk=",
  "extensions": [
    {
      "@type": "<string>"
    }
  ]
}
This endpoint allows you to create an automatic integration by generating CloudFormation templates that are executed on the client Billing (Management) and Subaccounts. Refer to the AWS Integration documentation for more information on how this type of integration works. Typical Workflow:
1

Generate Management CloudFormation Template

Call this endpoint with the appropriate parameter, to generate the management / billing account CloudFormation template with your Pelanor organization credentials.
2

Run Management CF

Run the generated template in us-east-1.
3

Generate Subaccount CF

Call this endpoint with the subaccount CloudFormation parameter, to get the StackSet file to run in order to collect subaccount-related information. Note the Include Subaccount Bucket option.
4

Run Subaccount CF

Run the generated template in us-east-1.
The AWS Integration will only appear in the Pelanor platform (and in the List Integrations API) once Pelanor receives data from your AWS integration. This can take up to 48 hours to propagate.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
mode
enum<string>
default:MANAGEMENT_ACCOUNT
Available options:
MANAGEMENT_ACCOUNT,
STACKSET_SUBACCOUNT,
STACKSET_SUBACCOUNT_NO_BUCKET
workspaceId
string

Response

A successful response.

The CloudFormation template as a string.

contentType
string

The HTTP Content-Type header value specifying the content type of the body.

data
string<byte>

The HTTP request/response body as raw binary.

extensions
object[]

Application specific response metadata. Must be set in the first response for streaming APIs.