DLM / Client / get_lifecycle_policies

get_lifecycle_policies#

DLM.Client.get_lifecycle_policies(**kwargs)#

Gets summary information about all or the specified data lifecycle policies.

To get complete information about a policy, use GetLifecyclePolicy.

See also: AWS API Documentation

Request Syntax

response = client.get_lifecycle_policies(
    PolicyIds=[
        'string',
    ],
    State='ENABLED'|'DISABLED'|'ERROR',
    ResourceTypes=[
        'VOLUME'|'INSTANCE',
    ],
    TargetTags=[
        'string',
    ],
    TagsToAdd=[
        'string',
    ],
    DefaultPolicyType='VOLUME'|'INSTANCE'|'ALL'
)
Parameters:
  • PolicyIds (list) –

    The identifiers of the data lifecycle policies.

    • (string) –

  • State (string) – The activation state.

  • ResourceTypes (list) –

    The resource type.

    • (string) –

  • TargetTags (list) –

    The target tag for a policy.

    Tags are strings in the format key=value.

    • (string) –

  • TagsToAdd (list) –

    The tags to add to objects created by the policy.

    Tags are strings in the format key=value.

    These user-defined tags are added in addition to the Amazon Web Services-added lifecycle tags.

    • (string) –

  • DefaultPolicyType (string) –

    [Default policies only] Specifies the type of default policy to get. Specify one of the following:

    • VOLUME - To get only the default policy for EBS snapshots

    • INSTANCE - To get only the default policy for EBS-backed AMIs

    • ALL - To get all default policies

Return type:

dict

Returns:

Response Syntax

{
    'Policies': [
        {
            'PolicyId': 'string',
            'Description': 'string',
            'State': 'ENABLED'|'DISABLED'|'ERROR',
            'Tags': {
                'string': 'string'
            },
            'PolicyType': 'EBS_SNAPSHOT_MANAGEMENT'|'IMAGE_MANAGEMENT'|'EVENT_BASED_POLICY',
            'DefaultPolicy': True|False
        },
    ]
}

Response Structure

  • (dict) –

    • Policies (list) –

      Summary information about the lifecycle policies.

      • (dict) –

        Summary information about a lifecycle policy.

        • PolicyId (string) –

          The identifier of the lifecycle policy.

        • Description (string) –

          The description of the lifecycle policy.

        • State (string) –

          The activation state of the lifecycle policy.

        • Tags (dict) –

          The tags.

          • (string) –

            • (string) –

        • PolicyType (string) –

          The type of policy. EBS_SNAPSHOT_MANAGEMENT indicates that the policy manages the lifecycle of Amazon EBS snapshots. IMAGE_MANAGEMENT indicates that the policy manages the lifecycle of EBS-backed AMIs. EVENT_BASED_POLICY indicates that the policy automates cross-account snapshot copies for snapshots that are shared with your account.

        • DefaultPolicy (boolean) –

          [Default policies only] The type of default policy. Values include:

          • VOLUME - Default policy for EBS snapshots

          • INSTANCE - Default policy for EBS-backed AMIs

Exceptions