Create a Change Set (Stage Changes)
Create a change set for a blueprint deployment. This will start a change staging process for the provided blueprint document and return an ID that can be used to retrieve the change set or stream change staging events.
If a valid instance ID or name is provided, a change set will be created by comparing the provided blueprint document with the current state of the existing blueprint instance.
Creating a change set should be carried out in preparation for deploying new blueprint instances or updating existing blueprint instances.
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 change set.
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 use to stage changes.
"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
The ID of an existing blueprint instance to stage changes for. If this is not provided and an instance name is not provided, a change set for a new blueprint instance deployment will be created.
This should be left empty if the instanceName
field is provided.
When both instanceId
and instanceName
are provided, the instanceId
field will be used.
The user-defined name of an existing blueprint instance to stage changes for. If this is not provided and an instance ID is not provided, a change set for a new blueprint instance deployment will be created.
This should be left empty if the instanceId
field is provided.
When both instanceId
and instanceName
are provided, the instanceId
field will be used.
If true, the change set will be created for a destroy operation.
This will only be used if the instanceId
or instanceName
fields are provided.
If this is not provided, the default value is false.
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/changes" \ -H "Bluelink-Signature-V1: string" \ -H "Content-Type: application/json" \ -d '{ "directory": "/path/to/blueprint-directory" }'
{
"id": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"instanceId": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"destroy": false,
"status": "STAGING_CHANGES",
"blueprintLocation": "file:///path/to/blueprint-directory/project.blueprint.yml",
"changes": {
"value": {
"newResources": {
"my-new-resource": {
"appliedResourceInfo": {
"resourceId": "",
"resourceName": "my-new-resource",
"instanceId": "",
"currentResourceState": {},
"resourceWithResolvedSubs": {}
},
"mustRecreate": false,
"modifiedFields": [],
"newFields": [],
"removedFields": [],
"unchangedFields": [],
"computedFields": [],
"fieldChangesKnownOnDeploy": false,
"conditionKnownOnDeploy": false,
"newOutboundLinks": [],
"outboundLinkChanges": [],
"removedOutboundLinks": []
}
},
"resourceChanges": {
"my-existing-resource": {
"appliedResourceInfo": {
"resourceId": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"resourceName": "my-existing-resource",
"instanceId": "a97cf86f-2a5e-4614-984e-da480a0daa7a",
"currentResourceState": {
"resourceId": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"name": "my-existing-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",
"arn": "arn:aws:lambda:us-east-1:123456789012:function:my-lambda-function"
},
"description": "A lambda function for processing events",
"metadata": {
"displayName": "My Lambda Function",
"annotations": {},
"labels": {
"system": "processing"
},
"custom": {
"owner": "bluelink",
"version": "1.0.0"
}
},
"dependsOnResources": [],
"dependsOnChildren": [],
"failureReasons": [],
"drifted": false,
"durations": {
"configCompleteDuration": 10000,
"totalDuration": 20000,
"attemptDurations": [
20000
]
}
},
"resourceWithResolvedSubs": {
"type": "aws/lambda/function",
"description": "A lambda function for processing events",
"metadata": {
"displayName": "My Lambda Function Updated",
"annotations": {},
"labels": {
"system": "processing2"
},
"custom": {
"owner": "bluelink",
"version": "1.0.0"
}
},
"spec": {
"functionName": "my-lambda-function",
"handler": "index.handlerUpdated",
"runtime": "nodejs20.x"
}
}
},
"mustRecreate": false,
"modifiedFields": [
"field1"
],
"newFields": [],
"removedFields": [],
"unchangedFields": [
"field2"
],
"computedFields": [
"field3"
],
"fieldChangesKnownOnDeploy": true,
"conditionKnownOnDeploy": false,
"newOutboundLinks": [],
"outboundLinkChanges": [],
"removedOutboundLinks": []
}
},
"removedResources": [
"my-old-resource"
],
"removedLinks": [
"my-old-link"
],
"newChildren": {
"my-new-child": {
"newResources": {
"my-new-resource": {
"appliedResourceInfo": {
"resourceId": "",
"resourceName": "my-new-resource",
"instanceId": "",
"currentResourceState": {},
"resourceWithResolvedSubs": {}
},
"mustRecreate": false,
"modifiedFields": [],
"newFields": [],
"removedFields": [],
"unchangedFields": [],
"computedFields": [],
"fieldChangesKnownOnDeploy": false,
"conditionKnownOnDeploy": false,
"newOutboundLinks": [],
"outboundLinkChanges": [],
"removedOutboundLinks": []
}
},
"newChildren": {},
"newExports": {
"my-new-export": {
"fieldPath": "my-new-export",
"prevValue": "",
"newValue": "my-new-export",
"mustRecreate": false
}
}
}
},
"childChanges": {},
"recreateChildren": [
"another-child-blueprint"
],
"removedChildren": [
"old-child-blueprint"
],
"newExports": {
"parent-new-export": {
"fieldPath": "parent-new-export",
"prevValue": "",
"newValue": "parent-new-export",
"mustRecreate": false
}
},
"exportChanges": {
"parent-existing-export": {
"fieldPath": "parent-existing-export",
"prevValue": "old-value",
"newValue": "new-value",
"mustRecreate": false
}
},
"unchangedExports": [
"parent-unchanged-export"
],
"removedExports": [
"parent-removed-export"
],
"metadataChanges": {
"newFields": [
{
"fieldPath": "metadata.new-field",
"prevValue": "",
"newValue": "new-value",
"mustRecreate": false
}
],
"modifiedFields": [
{
"fieldPath": "metadata.modified-field",
"prevValue": "old-value",
"newValue": "new-value",
"mustRecreate": false
}
],
"unchangedFields": [
"metadata.unchanged-field"
],
"removedFields": [
"metadata.removed-field"
]
},
"resolveOnDeploy": [
"resources[\"my-new-resource\"].spec.field1",
"resources[\"my-existing-resource\"].spec.field2"
]
}
},
"created": 1678901234
}
{
"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"
}