:doc:`VPCLattice <../../vpc-lattice>` / Client / get_auth_policy

***************
get_auth_policy
***************



.. py:method:: VPCLattice.Client.get_auth_policy(**kwargs)

  

  Retrieves information about the auth policy for the specified service or service network.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/vpc-lattice-2022-11-30/GetAuthPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_auth_policy(
        resourceIdentifier='string'
    )
    
  :type resourceIdentifier: string
  :param resourceIdentifier: **[REQUIRED]** 

    The ID or ARN of the service network or service.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'policy': 'string',
          'state': 'Active'|'Inactive',
          'createdAt': datetime(2015, 1, 1),
          'lastUpdatedAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **policy** *(string) --* 

        The auth policy.

        
      

      - **state** *(string) --* 

        The state of the auth policy. The auth policy is only active when the auth type is set to ``AWS_IAM``. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the auth type is ``NONE``, then any auth policy that you provide remains inactive. For more information, see `Create a service network <https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html#create-service-network>`__ in the *Amazon VPC Lattice User Guide*.

        
      

      - **createdAt** *(datetime) --* 

        The date and time that the auth policy was created, in ISO-8601 format.

        
      

      - **lastUpdatedAt** *(datetime) --* 

        The date and time that the auth policy was last updated, in ISO-8601 format.

        
  
  **Exceptions**
  
  *   :py:class:`VPCLattice.Client.exceptions.ValidationException`

  
  *   :py:class:`VPCLattice.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`VPCLattice.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`VPCLattice.Client.exceptions.InternalServerException`

  