imagebuilder / Client / list_lifecycle_policies

list_lifecycle_policies#

imagebuilder.Client.list_lifecycle_policies(**kwargs)#

Get a list of lifecycle policies in your Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

response = client.list_lifecycle_policies(
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters:
  • filters (list) –

    Streamline results based on one of the following values: Name, Status.

    • (dict) –

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) –

        The name of the filter. Filter names are case-sensitive.

      • values (list) –

        The filter values. Filter values are case-sensitive.

        • (string) –

  • 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

{
    'lifecyclePolicySummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'status': 'DISABLED'|'ENABLED',
            'executionRole': 'string',
            'resourceType': 'AMI_IMAGE'|'CONTAINER_IMAGE',
            'dateCreated': datetime(2015, 1, 1),
            'dateUpdated': datetime(2015, 1, 1),
            'dateLastRun': datetime(2015, 1, 1),
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • lifecyclePolicySummaryList (list) –

      A list of lifecycle policies in your Amazon Web Services account that meet the criteria specified in the request.

      • (dict) –

        Contains a summary of lifecycle policy resources.

        • arn (string) –

          The Amazon Resource Name (ARN) of the lifecycle policy summary resource.

        • name (string) –

          The name of the lifecycle policy.

        • description (string) –

          Optional description for the lifecycle policy.

        • status (string) –

          The lifecycle policy resource status.

        • executionRole (string) –

          The name of the IAM role that Image Builder uses to run the lifecycle policy.

        • resourceType (string) –

          The type of resources the lifecycle policy targets.

        • dateCreated (datetime) –

          The timestamp when Image Builder created the lifecycle policy resource.

        • dateUpdated (datetime) –

          The timestamp when Image Builder updated the lifecycle policy resource.

        • dateLastRun (datetime) –

          The timestamp for the last time Image Builder ran the lifecycle policy.

        • tags (dict) –

          To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. Each tag consists of a key and an optional value, both of which you define.

          • (string) –

            • (string) –

    • 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

  • imagebuilder.Client.exceptions.ServiceException

  • imagebuilder.Client.exceptions.ClientException

  • imagebuilder.Client.exceptions.ServiceUnavailableException

  • imagebuilder.Client.exceptions.InvalidRequestException

  • imagebuilder.Client.exceptions.InvalidPaginationTokenException

  • imagebuilder.Client.exceptions.ForbiddenException

  • imagebuilder.Client.exceptions.CallRateLimitExceededException