IoT / Client / get_policy_version

get_policy_version#

IoT.Client.get_policy_version(**kwargs)#

Gets information about the specified policy version.

Requires permission to access the GetPolicyVersion action.

See also: AWS API Documentation

Request Syntax

response = client.get_policy_version(
    policyName='string',
    policyVersionId='string'
)
Parameters:
  • policyName (string) –

    [REQUIRED]

    The name of the policy.

  • policyVersionId (string) –

    [REQUIRED]

    The policy version ID.

Return type:

dict

Returns:

Response Syntax

{
    'policyArn': 'string',
    'policyName': 'string',
    'policyDocument': 'string',
    'policyVersionId': 'string',
    'isDefaultVersion': True|False,
    'creationDate': datetime(2015, 1, 1),
    'lastModifiedDate': datetime(2015, 1, 1),
    'generationId': 'string'
}

Response Structure

  • (dict) –

    The output from the GetPolicyVersion operation.

    • policyArn (string) –

      The policy ARN.

    • policyName (string) –

      The policy name.

    • policyDocument (string) –

      The JSON document that describes the policy.

    • policyVersionId (string) –

      The policy version ID.

    • isDefaultVersion (boolean) –

      Specifies whether the policy version is the default.

    • creationDate (datetime) –

      The date the policy was created.

    • lastModifiedDate (datetime) –

      The date the policy was last modified.

    • generationId (string) –

      The generation ID of the policy version.

Exceptions