IoT / Client / list_policy_versions

list_policy_versions#

IoT.Client.list_policy_versions(**kwargs)#

Lists the versions of the specified policy and identifies the default version.

Requires permission to access the ListPolicyVersions action.

See also: AWS API Documentation

Request Syntax

response = client.list_policy_versions(
    policyName='string'
)
Parameters:

policyName (string) –

[REQUIRED]

The policy name.

Return type:

dict

Returns:

Response Syntax

{
    'policyVersions': [
        {
            'versionId': 'string',
            'isDefaultVersion': True|False,
            'createDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) –

    The output from the ListPolicyVersions operation.

    • policyVersions (list) –

      The policy versions.

      • (dict) –

        Describes a policy version.

        • versionId (string) –

          The policy version ID.

        • isDefaultVersion (boolean) –

          Specifies whether the policy version is the default.

        • createDate (datetime) –

          The date and time the policy was created.

Exceptions