imagebuilder / Client / list_lifecycle_execution_resources

list_lifecycle_execution_resources#

imagebuilder.Client.list_lifecycle_execution_resources(**kwargs)#

List resources that the runtime instance of the image lifecycle identified for lifecycle actions.

See also: AWS API Documentation

Request Syntax

response = client.list_lifecycle_execution_resources(
    lifecycleExecutionId='string',
    parentResourceId='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • lifecycleExecutionId (string) –

    [REQUIRED]

    Use the unique identifier for a runtime instance of the lifecycle policy to get runtime details.

  • parentResourceId (string) –

    You can leave this empty to get a list of Image Builder resources that were identified for lifecycle actions.

    To get a list of associated resources that are impacted for an individual resource (the parent), specify its Amazon Resource Name (ARN). Associated resources are produced from your image and distributed when you run a build, such as AMIs or container images stored in ECR repositories.

  • maxResults (integer) – The maximum items to return in a request.

  • nextToken (string) – A token to specify where to start paginating. This is the nextToken from a previously truncated response.

Return type:

dict

Returns:

Response Syntax

{
    'lifecycleExecutionId': 'string',
    'lifecycleExecutionState': {
        'status': 'IN_PROGRESS'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'PENDING',
        'reason': 'string'
    },
    'resources': [
        {
            'accountId': 'string',
            'resourceId': 'string',
            'state': {
                'status': 'FAILED'|'IN_PROGRESS'|'SKIPPED'|'SUCCESS',
                'reason': 'string'
            },
            'action': {
                'name': 'AVAILABLE'|'DELETE'|'DEPRECATE'|'DISABLE',
                'reason': 'string'
            },
            'region': 'string',
            'snapshots': [
                {
                    'snapshotId': 'string',
                    'state': {
                        'status': 'FAILED'|'IN_PROGRESS'|'SKIPPED'|'SUCCESS',
                        'reason': 'string'
                    }
                },
            ],
            'imageUris': [
                'string',
            ],
            'startTime': datetime(2015, 1, 1),
            'endTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • lifecycleExecutionId (string) –

      Runtime details for the specified runtime instance of the lifecycle policy.

    • lifecycleExecutionState (dict) –

      The current state of the lifecycle runtime instance.

      • status (string) –

        The runtime status of the lifecycle execution.

      • reason (string) –

        The reason for the current status.

    • resources (list) –

      A list of resources that were identified for lifecycle actions.

      • (dict) –

        Contains details for a resource that the runtime instance of the lifecycle policy identified for action.

        • accountId (string) –

          The account that owns the impacted resource.

        • resourceId (string) –

          Identifies the impacted resource. The resource ID depends on the type of resource, as follows.

          • Image Builder image resources: Amazon Resource Name (ARN)

          • Distributed AMIs: AMI ID

          • Container images distributed to an ECR repository: image URI or SHA Digest

        • state (dict) –

          The runtime state for the lifecycle execution.

          • status (string) –

            The runtime status of the lifecycle action taken for the impacted resource.

          • reason (string) –

            Messaging that clarifies the reason for the assigned status.

        • action (dict) –

          The action to take for the identified resource.

          • name (string) –

            The name of the resource that was identified for a lifecycle policy action.

          • reason (string) –

            The reason why the lifecycle policy action is taken.

        • region (string) –

          The Amazon Web Services Region where the lifecycle execution resource is stored.

        • snapshots (list) –

          A list of associated resource snapshots for the impacted resource if it’s an AMI.

          • (dict) –

            Contains the state of an impacted snapshot resource that the runtime instance of the lifecycle policy identified for action.

            • snapshotId (string) –

              Identifies the impacted snapshot resource.

            • state (dict) –

              The runtime status of the lifecycle action taken for the snapshot.

              • status (string) –

                The runtime status of the lifecycle action taken for the impacted resource.

              • reason (string) –

                Messaging that clarifies the reason for the assigned status.

        • imageUris (list) –

          For an impacted container image, this identifies a list of URIs for associated container images distributed to ECR repositories.

          • (string) –

        • startTime (datetime) –

          The starting timestamp from the lifecycle action that was applied to the resource.

        • endTime (datetime) –

          The ending timestamp from the lifecycle action that was applied to the resource.

    • nextToken (string) –

      The next token used for paginated responses. When this field isn’t empty, there are additional elements that the service hasn’t included in this request. Use this token with the next request to retrieve additional objects.

Exceptions