:doc:`IoT <../../iot>` / Client / get_policy_version

******************
get_policy_version
******************



.. py:method:: IoT.Client.get_policy_version(**kwargs)

  

  Gets information about the specified policy version.

   

  Requires permission to access the `GetPolicyVersion <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/GetPolicyVersion>`_  


  **Request Syntax**
  ::

    response = client.get_policy_version(
        policyName='string',
        policyVersionId='string'
    )
    
  :type policyName: string
  :param policyName: **[REQUIRED]** 

    The name of the policy.

    

  
  :type policyVersionId: string
  :param policyVersionId: **[REQUIRED]** 

    The policy version ID.

    

  
  
  :rtype: 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**
  
  *   :py:class:`IoT.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  