SSM / Client / get_parameter_history

get_parameter_history#

SSM.Client.get_parameter_history(**kwargs)#

Retrieves the history of all changes to a parameter.

Warning

If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, GetParameterHistory retrieves whatever the original key alias was referencing.

See also: AWS API Documentation

Request Syntax

response = client.get_parameter_history(
    Name='string',
    WithDecryption=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The name or Amazon Resource Name (ARN) of the parameter for which you want to review history. For parameters shared with you from another account, you must use the full ARN.

  • WithDecryption (boolean) – Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

  • MaxResults (integer) – The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

  • NextToken (string) – The token for the next set of items to return. (You received this token from a previous call.)

Return type:

dict

Returns:

Response Syntax

{
    'Parameters': [
        {
            'Name': 'string',
            'Type': 'String'|'StringList'|'SecureString',
            'KeyId': 'string',
            'LastModifiedDate': datetime(2015, 1, 1),
            'LastModifiedUser': 'string',
            'Description': 'string',
            'Value': 'string',
            'AllowedPattern': 'string',
            'Version': 123,
            'Labels': [
                'string',
            ],
            'Tier': 'Standard'|'Advanced'|'Intelligent-Tiering',
            'Policies': [
                {
                    'PolicyText': 'string',
                    'PolicyType': 'string',
                    'PolicyStatus': 'string'
                },
            ],
            'DataType': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Parameters (list) –

      A list of parameters returned by the request.

      • (dict) –

        Information about parameter usage.

        • Name (string) –

          The name of the parameter.

        • Type (string) –

          The type of parameter used.

        • KeyId (string) –

          The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to SecureString parameters only

        • LastModifiedDate (datetime) –

          Date the parameter was last changed or updated.

        • LastModifiedUser (string) –

          Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.

        • Description (string) –

          Information about the parameter.

        • Value (string) –

          The parameter value.

        • AllowedPattern (string) –

          Parameter names can include the following letters and symbols.

          a-zA-Z0-9_.-

        • Version (integer) –

          The parameter version.

        • Labels (list) –

          Labels assigned to the parameter version.

          • (string) –

        • Tier (string) –

          The parameter tier.

        • Policies (list) –

          Information about the policies assigned to a parameter.

          Assigning parameter policies in the Amazon Web Services Systems Manager User Guide.

          • (dict) –

            One or more policies assigned to a parameter.

            • PolicyText (string) –

              The JSON text of the policy.

            • PolicyType (string) –

              The type of policy. Parameter Store, a capability of Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.

            • PolicyStatus (string) –

              The status of the policy. Policies report the following statuses: Pending (the policy hasn’t been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn’t applied), or InProgress (the policy is being applied now).

        • DataType (string) –

          The data type of the parameter, such as text or aws:ec2:image. The default is text.

    • NextToken (string) –

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

Exceptions