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

*******************************
list_mobile_device_access_rules
*******************************



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

  

  Lists the mobile device access rules for the specified WorkMail organization.

  

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


  **Request Syntax**
  ::

    response = client.list_mobile_device_access_rules(
        OrganizationId='string'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The WorkMail organization for which to list the rules.

    

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

    
    ::

      {
          'Rules': [
              {
                  'MobileDeviceAccessRuleId': 'string',
                  'Name': 'string',
                  'Description': 'string',
                  'Effect': 'ALLOW'|'DENY',
                  'DeviceTypes': [
                      'string',
                  ],
                  'NotDeviceTypes': [
                      'string',
                  ],
                  'DeviceModels': [
                      'string',
                  ],
                  'NotDeviceModels': [
                      'string',
                  ],
                  'DeviceOperatingSystems': [
                      'string',
                  ],
                  'NotDeviceOperatingSystems': [
                      'string',
                  ],
                  'DeviceUserAgents': [
                      'string',
                  ],
                  'NotDeviceUserAgents': [
                      'string',
                  ],
                  'DateCreated': datetime(2015, 1, 1),
                  'DateModified': datetime(2015, 1, 1)
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Rules** *(list) --* 

        The list of mobile device access rules that exist under the specified WorkMail organization.

        
        

        - *(dict) --* 

          A rule that controls access to mobile devices for an WorkMail group.

          
          

          - **MobileDeviceAccessRuleId** *(string) --* 

            The ID assigned to a mobile access rule.

            
          

          - **Name** *(string) --* 

            The name of a mobile access rule.

            
          

          - **Description** *(string) --* 

            The description of a mobile access rule.

            
          

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

            The effect of the rule when it matches. Allowed values are ``ALLOW`` or ``DENY``.

            
          

          - **DeviceTypes** *(list) --* 

            Device types that a rule will match.

            
            

            - *(string) --* 
        
          

          - **NotDeviceTypes** *(list) --* 

            Device types that a rule **will not** match. All other device types will match.

            
            

            - *(string) --* 
        
          

          - **DeviceModels** *(list) --* 

            Device models that a rule will match.

            
            

            - *(string) --* 
        
          

          - **NotDeviceModels** *(list) --* 

            Device models that a rule **will not** match. All other device models will match.

            
            

            - *(string) --* 
        
          

          - **DeviceOperatingSystems** *(list) --* 

            Device operating systems that a rule will match.

            
            

            - *(string) --* 
        
          

          - **NotDeviceOperatingSystems** *(list) --* 

            Device operating systems that a rule **will not** match. All other device types will match.

            
            

            - *(string) --* 
        
          

          - **DeviceUserAgents** *(list) --* 

            Device user agents that a rule will match.

            
            

            - *(string) --* 
        
          

          - **NotDeviceUserAgents** *(list) --* 

            Device user agents that a rule **will not** match. All other device user agents will match.

            
            

            - *(string) --* 
        
          

          - **DateCreated** *(datetime) --* 

            The date and time at which an access rule was created.

            
          

          - **DateModified** *(datetime) --* 

            The date and time at which an access rule was modified.

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

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

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

  