IoT.Client.
get_policy
(**kwargs)¶Gets information about the specified policy with the policy document of the default version.
Requires permission to access the GetPolicy action.
See also: AWS API Documentation
Request Syntax
response = client.get_policy(
policyName='string'
)
[REQUIRED]
The name of the policy.
{
'policyName': 'string',
'policyArn': 'string',
'policyDocument': 'string',
'defaultVersionId': 'string',
'creationDate': datetime(2015, 1, 1),
'lastModifiedDate': datetime(2015, 1, 1),
'generationId': 'string'
}
Response Structure
The output from the GetPolicy operation.
The policy name.
The policy ARN.
The JSON document that describes the policy.
The default policy version ID.
The date the policy was created.
The date the policy was last modified.
The generation ID of the policy.
Exceptions
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.UnauthorizedException
IoT.Client.exceptions.ServiceUnavailableException
IoT.Client.exceptions.InternalFailureException