Destroy a Blueprint Instance
Destroys a blueprint deployment instance.
This is a POST
request as destroying a blueprint instance requires additional information
beyond the ID of the instance to destroy and DELETE
requests do not support request bodies.
This will start the destroy process for the provided change set. It will return the current state of the blueprint instance, the same ID provided should be used to stream destroy events as they occur.
OAuth2/OIDC auth using JWT Bearer tokens. The token issuer will be configured independently for each Deploy Engine instance.
In: header
Path Parameters
The ID or unique name of the blueprint instance to destroy.
Header Parameters
The Bluelink Signature v1 authentication mechanism can be used to authenticate requests to the Deploy Engine. See the Bluelink Signature v1 documentation for more information on how to use this authentication mechanism. This is not required if the request is authenticated using an OAuth2/OIDC-issued JWT or an API key.
Payload for destroying an existing blueprint instance.
The ID of the change set to use to destroy the blueprint instance. When destroy a blueprint instance, a change set is used instead of the destroy process re-computing the changes that need to be applied.
If true, destroying the blueprint instance will be treated as a rollback for the initial deployment of the blueprint instance. This will usually be set to true when rolling back a recent first time deployment that needs to be rolled back due to a failure in a parent blueprint instance.
false
Configuration used for carrying out actions for blueprints. This consists of environment configuration (context-wide), provider and transformer plugin specific configuration along with blueprint variables.
Response Body
curl -X POST "https://{host}/{basePath}/v1/deployments/instances/16ef8989-af00-4a4a-8164-72493ceb1aa0/destroy" \ -H "Bluelink-Signature-V1: string" \ -H "Content-Type: application/json" \ -d '{ "changeSetId": "a471bbb8-1267-4e65-873b-fa86bca71fcf", "rollback": false }'
{
"id": "a97cf86f-2a5e-4614-984e-da480a0daa7a",
"name": "my-blueprint-instance",
"status": 2,
"lastStatusUpdateTimestamp": 1678901234,
"lastDeployedTimestamp": 1678901234,
"lastDeployAttemptTimestamp": 1678901234,
"resourceIds": {
"my-resource": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55"
},
"resources": {
"60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55": {
"id": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"name": "my-resource",
"type": "aws/lambda/function",
"instanceId": "a97cf86f-2a5e-4614-984e-da480a0daa7a",
"status": 2,
"preciseStatus": 3,
"lastStatusUpdateTimestamp": 1678901234,
"lastDeployedTimestamp": 1678901234,
"lastDeployAttemptTimestamp": 1678901234,
"specData": {
"functionName": "my-lambda-function",
"handler": "index.handler",
"runtime": "nodejs20.x"
},
"metadata": {
"displayName": "My Lambda Function",
"annotations": {
"processing": true
},
"labels": {
"processing": true
},
"custom": {
"my-custom-metadata": "my-custom-metadata-value"
}
},
"dependsOnResources": [
"my-other-resource"
],
"dependsOnChildren": [
"my-other-child-blueprint"
],
"failureReasons": [
"The resource could not be created because the IAM role does not exist."
],
"drifted": true,
"lastDriftDetectedTimestamp": 1678901234,
"durations": {
"configCompleteDuration": 10000,
"totalDuration": 20000,
"attemptDurations": [
20000
]
}
}
},
"links": {
"vpc::subnet": {
"id": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"name": "vpc::subnet",
"instanceId": "a97cf86f-2a5e-4614-984e-da480a0daa7a",
"status": 2,
"preciseStatus": 3,
"lastStatusUpdateTimestamp": 1678901234,
"lastDeployAttemptTimestamp": 1678901234,
"intermediaryResourceStates": [],
"data": {
"subnetId": "subnet-1234567890abcdef0",
"vpcId": "vpc-1234567890abcdef0"
},
"failureReasons": [
"The link could not be created because the VPC does not exist."
]
}
},
"metadata": {},
"exports": {
"my-export": {
"value": "arn:aws:lambda:us-east-1:123456789012:function:my-lambda-function",
"type": "string",
"description": "The ARN of the lambda function",
"field": "resources[\"my-resource\"].spec.arn"
}
},
"childBlueprints": {},
"childDependencies": {},
"durations": {
"prepareDuration": 10000,
"totalDuration": 20000
}
}
{
"message": "Bad request"
}
{
"message": "Unauthorized"
}
{
"message": "An unexpected error occurred"
}