Skip to content

list_mobile_device_access_overrides

list_mobile_device_access_overrides(
    organization_id: OrganizationId,
    *,
    config_overrides: Optional[WorkMailClientConfig] = None,
    user_id: Optional[EntityIdentifier] = None,
    device_id: Optional[DeviceId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListMobileDeviceAccessOverridesResponse

Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.

Parameters:

  • organization_id (OrganizationId) –

    The WorkMail organization under which to list mobile device access overrides.

  • user_id (Optional[EntityIdentifier], default: None ) –

    The WorkMail user under which you list the mobile device access overrides. Accepts the following types of user identities:

    • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: [email protected]

    • User name: user

  • device_id (Optional[DeviceId], default: None ) –

    The mobile device to which the access override applies.

  • next_token (Optional[NextToken], default: None ) –

    The token to use to retrieve the next page of results. The first call does not require a token.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return in a single call.

Raises:

Source code in docs_src/capo_workmail/_services/work_mail.py
def list_mobile_device_access_overrides(
    self,
    organization_id: "capo_workmail.types.organization_id.OrganizationId",
    *,
    config_overrides: Optional[WorkMailClientConfig] = None,
    user_id: Optional[
        "capo_workmail.types.entity_identifier.EntityIdentifier"
    ] = None,
    device_id: Optional["capo_workmail.types.device_id.DeviceId"] = None,
    next_token: Optional["capo_workmail.types.next_token.NextToken"] = None,
    max_results: Optional["capo_workmail.types.max_results.MaxResults"] = None,
) -> "capo_workmail.types.list_mobile_device_access_overrides_response.ListMobileDeviceAccessOverridesResponse":
    """<p>Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.</p>

    Args:
        organization_id: <p>The WorkMail organization under which to list mobile device access overrides.</p>
        user_id: <p>The WorkMail user under which you list the mobile device access overrides. Accepts the following types of user identities:</p> <ul> <li> <p>User ID: <code>12345678-1234-1234-1234-123456789012</code> or <code>S-1-1-12-1234567890-123456789-123456789-1234</code> </p> </li> <li> <p>Email address: <code>[email protected]</code> </p> </li> <li> <p>User name: <code>user</code> </p> </li> </ul>
        device_id: <p>The mobile device to which the access override applies.</p>
        next_token: <p>The token to use to retrieve the next page of results. The first call does not require a token.</p>
        max_results: <p>The maximum number of results to return in a single call.</p>

    Raises:
        capo_workmail.errors.entity_not_found_exception.EntityNotFoundException: <p>The identifier supplied for the user, group, or resource does not exist in your organization.</p>
        capo_workmail.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the input parameters don't match the service's restrictions.</p>
        capo_workmail.errors.organization_not_found_exception.OrganizationNotFoundException: <p>An operation received a valid organization identifier that either doesn't belong or exist in the system.</p>
        capo_workmail.errors.organization_state_exception.OrganizationStateException: <p>The organization must have a valid state to perform certain operations on the organization or its members.</p>
        capo_workmail.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workmail.types.list_mobile_device_access_overrides_request.ListMobileDeviceAccessOverridesRequest]",
    ) -> OperationResponse[
        "capo_workmail.types.list_mobile_device_access_overrides_response.ListMobileDeviceAccessOverridesResponse"
    ]:
        import capo_workmail._operations.work_mail_service.list_mobile_device_access_overrides

        output, http_response = (
            capo_workmail._operations.work_mail_service.list_mobile_device_access_overrides.list_mobile_device_access_overrides(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMobileDeviceAccessOverrides")
    )
    input_: capo_workmail.types.list_mobile_device_access_overrides_request.ListMobileDeviceAccessOverridesRequest = {
        "organization_id": organization_id
    }
    if user_id is not None:
        input_["user_id"] = user_id
    if device_id is not None:
        input_["device_id"] = device_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output