Skip to main content

ResourceInfo

resourceIdstringrequired

The ID of a resource when in the context of a blueprint instance when deploying or staging changes. In some cases, this may be empty, especially for staging changes for new blueprint instances or when the resource has not yet been created.

Example: 60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55
resourceNamestringrequired

The name of the resource in the blueprint spec. This field in the ResourceInfo object is is useful for new resources that do not have any current resource state.

Example: my-new-resource
instanceIdstringrequired

The ID of the blueprint instance that the current resource belongs to. This could be empty if the resource is being staged for an initial deployment or is a new resource that does not yet exist.

Example: a97cf86f-2a5e-4614-984e-da480a0daa7a
currentResourceState objectnullable

The current state of the resource for which changes are being staged. This is included in ResourceInfo to avoid resource plugins and other consumers of resource change definitions needing to interact directly with the underlying state persistence to get the current state of the resource.

idstringrequired

A globally unique identifier for the resource.

Example: 60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55
namestringrequired

The logical name of the resource in the blueprint.

Example: my-existing-resource
typestringrequired

The type of the resource.

Example: aws/lambda/function
templateNamestringnullable

The name of the resource template in the source blueprint that the resource is derived from. This will be empty, null or not set if the resource is not derived from a template.

Example: my-template
instanceIdstringrequired

The ID of the blueprint instance that the resource belongs to.

Example: a97cf86f-2a5e-4614-984e-da480a0daa7a
statusintegerrequired

The high level status of the resource.

The following high level status codes are supported:

  • Unknown (0) - The status used when we can't determine an accurate status for a resource.
  • Creating (1) - The status used when an initial resource deployment is currently in progress.
  • Created (2) - The status used when a resource has been deployed successfully for the first time.
  • Create Failed (3) - The status used when the first creation of a resource has failed.
  • Destroying (4) - The status used when a resource is in the process of being destroyed.
  • Destroyed (5) - The status used when a resource has been destroyed.
  • Destroy Failed (6) - The status used when the destruction of a resource fails.
  • Updating (7) - The status used when a resource is being updated.
  • Updated (8) - The status used when a resource has been updated successfully.
  • Update Failed (9) - The status used when the update of a resource fails.
  • Rolling Back (10) - The status used when another change in the same blueprint has failed and the latest change involving the current resource is being rolled back.
  • Rollback Failed (11) - The status used when another change in the same blueprint has failed and the latest change involving the current resource could not be rolled back.
  • Rollback Complete (12) - The status used when another change in the same blueprint has failed and the latest change involving the current resource has been rolled back.

Possible values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

Example: 2
preciseStatusintegerrequired

The precise status of the resource.

The following precise status codes are supported:

  • Unknown (0) - The precise status used when we can't determine an accurate status for a resource.
  • Creating (1) - The precise status used when an initial resource deployment is currently in progress.
  • Config Compelte (2) - The precise status used when a resource has been configured successfully.
  • Created (3) - The precise status used when a resource has been deployed successfully and is considered stable.
  • Create Failed (4) - The precise status used when the first creation of a resource has failed.
  • Create Rolling Back (5) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully created is being rolled back.
  • Create Rollback Failed (6) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully created could not be rolled back.
  • Create Rollback Complete (7) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully created has been rolled back.
  • Destroying (8) - The precise status used when a resource is in the process of being destroyed.
  • Destroyed (9) - The precise status used when a resource has been destroyed.
  • Destroy Failed (10) - The precise status used when the destruction of a resource fails.
  • Destroy Rolling Back (11) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully destroyed is being rolled back.
  • Destroy Rollback Failed (12) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully destroyed could not be rolled back.
  • Destroy Rollback Config Complete (13) - The precise status used when another change in the same blueprint has failed and the current resource that was succesfully removed has been rolled back (recreated) but is not yet in a stable state.
  • Destroy Rollback Complete (14) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully removed has been rolled back (recreated) and is in a stable state.
  • Updating (15) - The precise status used when a resource is being updated.
  • Update Config Complete (16) - The precise status used when a resource being updated has been configured successfully.
  • Updated (17) - The precise status used when a resource has been updated successfully and is considered stable.
  • Update Failed (18) - The precise status used when the update of a resource fails.
  • Update Rolling Back (19) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully updated is being rolled back.
  • Update Rollback Failed (20) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully updated could not be rolled back.
  • Update Rollback Config Complete (21) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully updated has been rolled back but is not yet in a stable state.
  • Update Rollback Complete (22) - The precise status used when another change in the same blueprint has failed and the current resource that was successfully updated has been rolled back and is in a stable state.

Possible values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]

Example: 3
lastStatusUpdateTimestampintegernullable

The unix timestamp when the resource deployment status was last updated.

Example: 1678901234
lastDeployedTimestampintegerrequired

The unix timestamp when the resource was last deployed.

Example: 1678901234
lastDeployAttemptTimestampintegerrequired

The unix timestamp for when the last attempt was made to deploy the resource.

Example: 1678901234
specData objectrequired

The resolved resource spec for the currently deployed version of the resource along with computed fields derived from the deployed resource in the upstream provider.

property name*any

The resolved resource spec for the currently deployed version of the resource along with computed fields derived from the deployed resource in the upstream provider.

Example: {"functionName":"my-lambda-function","handler":"index.handler","runtime":"nodejs20.x","arn":"arn:aws:lambda:us-east-1:123456789012:function:my-lambda-function"}
descriptionstringnullable

A description of the resource.

Example: A lambda function for processing events
metadata object

The metadata for the resource that is derived from a source blueprint that includes additional information that allows for extensions built on top of the blueprint framework along with the storage of labels, annotations and a human-friendly display name for the resource.

displayNamestringnullable

A human-friendly display name for the resource.

Example: My Lambda Function
annotations object

Annotations for the resource.

labels object

Labels for the resource.

property name*string

The label value.

Example: processing
customobject

Custom metadata for the resource.

dependsOnResourcesstring[]

The names of resources that this resource depends on in the blueprint.

dependsOnChildrenstring[]

The names of child blueprints that this resource depends on in the blueprint.

failureReasonsstring[]required

The reasons why the resource deployment has failed, if applicable.

driftedbooleannullable

If true, the resource has drifted from the current state stored in the Deploy Engine. This is used to indicate that the resource has been modified in the upstream provider outside of the Deploy Engine.

Example: false
lastDriftDetectedTimestampintegernullable

The unix timestamp when the resource was last detected to be drifted.

Example: 1678901234
durations objectnullable

Duration information for the latest deployment of the resource.

configCompleteDurationnumbernullable

The duration in milliseconds for the resource to be configured. This will only be set if the resource has reached the config complete status.

Example: 10000
totalDurationnumbernullable

The duration in milliseconds for the resource change to reach the final status.

Example: 20000
attemptDurationsnumber[]

The durations in milliseconds for each attempt to deploy the resource.

resourceWithResolvedSubs object

A version of the resource defined in the blueprint document for which all ${..} substitutions have been resolved.

typestringrequired

The type of the resource.

Example: aws/lambda/function
descriptionstringnullable

A description of the resource.

Example: A lambda function for processing events
metadata objectnullable

The metadata for a resource in which all ${..} substitutions have been resolved.

displayNamestringnullable

A human-friendly display name for the resource.

Example: My Lambda Function
annotations object

Annotations for the resource.

labels object

Labels for the resource.

property name*string

The label value.

Example: processing
customobject

Custom metadata for the resource.

condition object

A condition for the resource that is derived from a source blueprint that determines whether or not the resource should be deployed.

oneOf
boolean

A resolved boolean value for a condition usually sourced from evaluating a ${..} substitution.

linkSelector object

A link selector for the resource that is derived from a source blueprint that determines which resources the current resource should be linked to.

byLabel objectrequired

A link selector that selects resources by label. This is used to determine which resources the current resource should be linked to.

property name*string

The label value.

Example: processing
spec objectrequired

The specification for the resource that is derived from the source blueprint.

ResourceInfo
{
"resourceId": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"resourceName": "my-new-resource",
"instanceId": "a97cf86f-2a5e-4614-984e-da480a0daa7a",
"currentResourceState": {
"id": "60d7c6c5-3984-42b9-a3c1-ae8a47a9bf55",
"name": "my-existing-resource",
"type": "aws/lambda/function",
"templateName": "my-template",
"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": {},
"custom": {}
},
"dependsOnResources": [
"my-other-resource"
],
"dependsOnChildren": [
"my-other-child-blueprint"
],
"failureReasons": [
"The resource could not be created because the IAM role does not exist."
],
"drifted": false,
"lastDriftDetectedTimestamp": 1678901234,
"durations": {
"configCompleteDuration": 10000,
"totalDuration": 20000,
"attemptDurations": [
20000
]
}
},
"resourceWithResolvedSubs": {
"type": "aws/lambda/function",
"description": "A lambda function for processing events",
"metadata": {
"displayName": "My Lambda Function",
"annotations": {},
"labels": {},
"custom": {}
},
"condition": true,
"linkSelector": {
"byLabel": {}
},
"spec": {
"functionName": "my-lambda-function",
"handler": "index.handler",
"runtime": "nodejs20.x"
}
}
}