:doc:`WorkMail <../../workmail>` / Client / get_access_control_effect

*************************
get_access_control_effect
*************************



.. py:method:: WorkMail.Client.get_access_control_effect(**kwargs)

  

  Gets the effects of an organization's access control rules as they apply to a specified IPv4 address, access protocol action, and user ID or impersonation role ID. You must provide either the user ID or impersonation role ID. Impersonation role ID can only be used with Action EWS.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetAccessControlEffect>`_  


  **Request Syntax**
  ::

    response = client.get_access_control_effect(
        OrganizationId='string',
        IpAddress='string',
        Action='string',
        UserId='string',
        ImpersonationRoleId='string'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The identifier for the organization.

    

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

    The IPv4 address.

    

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

    The access protocol action. Valid values include ``ActiveSync``, ``AutoDiscover``, ``EWS``, ``IMAP``, ``SMTP``, ``WindowsOutlook``, and ``WebMail``.

    

  
  :type UserId: string
  :param UserId: 

    The user ID.

    

  
  :type ImpersonationRoleId: string
  :param ImpersonationRoleId: 

    The impersonation role ID.

    

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

    
    ::

      {
          'Effect': 'ALLOW'|'DENY',
          'MatchedRules': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Effect** *(string) --* 

        The rule effect.

        
      

      - **MatchedRules** *(list) --* 

        The rules that match the given parameters, resulting in an effect.

        
        

        - *(string) --* 
    
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.EntityNotFoundException`

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

  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  