Create a Blueprint Instance (Deploy New)
Create a new blueprint deployment instance. This will start the deployment process for the provided blueprint document and change set. It will return a blueprint instance resource containing an ID that can be used to stream deployment 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
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 creating a new blueprint instance.
The ID of the change set to use to deploy the blueprint instance. When creating a new blueprint instance (deploying), a change set is used instead of the deployment process re-computing the changes that need to be applied.
The source blueprint document is still required in addition to a change set to finish of resolving substitutions that can only be resolved at deploy time and for deployment orchestration. The source blueprint document is not used to compute changes at the deployment stage.
The file source scheme to determine where the blueprint document is located.
This can be one of the following:
file
: The blueprint document is located on the local file system of the Deploy Engine server.s3
: The blueprint document is located in an S3 bucket.gcs
: The blueprint document is located in a GCS bucket.azureblob
: The blueprint document is located in an Azure Blob Storage container.https
: The blueprint document is located via a public HTTPS URL.
For remote source authentication, the Deploy Engine server will need to be configured
with the appropriate credentials to access the remote source.
Authentication is not supported for https
sources.
"file"
"file" | "s3" | "gcs" | "azureblob" | "https"
The directory where the blueprint document is located.
For file
sources, this must be an absolute path to the directory on the local file system of the Deploy Engine server.
An example for a file
source would be /path/to/blueprint-directory
.
For s3
, gcs
and azureblob
sources, this must be the path to the virtual directory where the first path segment
is the bucket/container name and the rest of the path is the path to the virtual directory.
An example for a remote object storage source would be bucket-name/path/to/blueprint-directory
.
For https
sources, this must be the path to the blueprint document,
a host must be supplied in the blueprintLocationMetadata
field.
An example for a https
source would be /path/to/blueprint-directory
with a
blueprintLocationMetadata.host
field set to example.com
.
The name of the blueprint file to be used during deployment. The source file is needed in addition to a change set ID as it is required as a part of the deployment process for resolving substitutions that can only be resolved at deploy time and is required for deployment orchestration.
"project.blueprint.yml"
Additional metadata about the location of the blueprint document. For example, this can be used to specify the region of the bucket or container where the blueprint document is located in a cloud object storage service. This only supports scalar values.
Empty Object
If true, the creation of the blueprint instance will be treated as a rollback operation for a previously destroyed 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" \ -H "Bluelink-Signature-V1: string" \ -H "Content-Type: application/json" \ -d '{ "changeSetId": "a471bbb8-1267-4e65-873b-fa86bca71fcf", "directory": "/path/to/blueprint-directory", "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": "Input validation failed",
"errors": [
{
"location": "body",
"message": "Value must be one of the following: [aws, azure]",
"type": "oneof"
}
],
"validationDiagnostics": [
{
"message": "Incorrect blueprint version",
"level": 1,
"range": {
"start": {
"line": 1,
"column": 1,
"endPosition": {
"line": 1,
"column": 1
}
},
"end": {
"line": 1,
"column": 1,
"endPosition": {
"line": 1,
"column": 1
}
},
"columnAccuracy": 1
}
}
]
}
{
"message": "An unexpected error occurred"
}