Skip to main content

lifecycle_executions

Creates, updates, deletes, gets or lists a lifecycle_executions resource.

Overview​

Namelifecycle_executions
TypeResource
Idaws.imagebuilder.lifecycle_executions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
end_timestring (date-time)The timestamp when the lifecycle runtime instance completed.
lifecycle_execution_idstringIdentifies the lifecycle policy runtime instance. (pattern: <code>^lce-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$</code>)
lifecycle_policy_arnstringThe Amazon Resource Name (ARN) of the lifecycle policy that ran. (pattern: <code>^arn:aws(?:-[a-z]+)*:imagebuilder:[a-z]{2,}(?:-[a-z]+)+-[0-9]+:(?:[0-9]{12}|aws):lifecycle-policy/[a-z0-9-_]+$</code>)
resources_impacted_summaryobjectContains information about associated resources that are identified for action by the runtime instance of the lifecycle policy.
start_timestring (date-time)The timestamp when the lifecycle runtime instance started.
stateobjectRuntime state that reports if the policy action ran successfully, failed, or was skipped.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_lifecycle_executionselectlifecycleExecutionId, regionGet the runtime information that was logged for a specific runtime instance of the lifecycle policy.
list_lifecycle_executionsselectregionGet the lifecycle runtime history for the specified resource.
cancel_lifecycle_executionexecregion, lifecycleExecutionId, clientTokenCancel a specific image lifecycle policy runtime instance.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
lifecycleExecutionIdstringUse the unique identifier for a runtime instance of the lifecycle policy to get runtime details.
regionstringAWS region (default: us-east-1)

SELECT examples​

Get the runtime information that was logged for a specific runtime instance of the lifecycle policy.

SELECT
end_time,
lifecycle_execution_id,
lifecycle_policy_arn,
resources_impacted_summary,
start_time,
state
FROM aws.imagebuilder.lifecycle_executions
WHERE lifecycleExecutionId = '{{ lifecycleExecutionId }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods​

Cancel a specific image lifecycle policy runtime instance.

EXEC aws.imagebuilder.lifecycle_executions.cancel_lifecycle_execution
@region='{{ region }}' --required
@@json=
'{
"lifecycleExecutionId": "{{ lifecycleExecutionId }}",
"clientToken": "{{ clientToken }}"
}'
;