Skip to content

get_mobile_device_access_effect

get_mobile_device_access_effect(
    organization_id: OrganizationId,
    *,
    config_overrides: Optional[WorkMailClientConfig] = None,
    device_type: Optional[DeviceType] = None,
    device_model: Optional[DeviceModel] = None,
    device_operating_system: Optional[DeviceOperatingSystem] = None,
    device_user_agent: Optional[DeviceUserAgent] = None,
) -> GetMobileDeviceAccessEffectResponse

Simulates the effect of the mobile device access rules for the given attributes of a sample access event. Use this method to test the effects of the current set of mobile device access rules for the WorkMail organization for a particular user's attributes.

Parameters:

  • organization_id (OrganizationId) –

    The WorkMail organization to simulate the access effect for.

  • device_type (Optional[DeviceType], default: None ) –

    Device type the simulated user will report.

  • device_model (Optional[DeviceModel], default: None ) –

    Device model the simulated user will report.

  • device_operating_system (Optional[DeviceOperatingSystem], default: None ) –

    Device operating system the simulated user will report.

  • device_user_agent (Optional[DeviceUserAgent], default: None ) –

    Device user agent the simulated user will report.

Raises:

Source code in docs_src/capo_workmail/_services/work_mail.py
def get_mobile_device_access_effect(
    self,
    organization_id: "capo_workmail.types.organization_id.OrganizationId",
    *,
    config_overrides: Optional[WorkMailClientConfig] = None,
    device_type: Optional["capo_workmail.types.device_type.DeviceType"] = None,
    device_model: Optional["capo_workmail.types.device_model.DeviceModel"] = None,
    device_operating_system: Optional[
        "capo_workmail.types.device_operating_system.DeviceOperatingSystem"
    ] = None,
    device_user_agent: Optional[
        "capo_workmail.types.device_user_agent.DeviceUserAgent"
    ] = None,
) -> "capo_workmail.types.get_mobile_device_access_effect_response.GetMobileDeviceAccessEffectResponse":
    """<p>Simulates the effect of the mobile device access rules for the given attributes of a sample access event. Use this method to test the effects of the current set of mobile device access rules for the WorkMail organization for a particular user's attributes.</p>

    Args:
        organization_id: <p>The WorkMail organization to simulate the access effect for.</p>
        device_type: <p>Device type the simulated user will report.</p>
        device_model: <p>Device model the simulated user will report.</p>
        device_operating_system: <p>Device operating system the simulated user will report.</p>
        device_user_agent: <p>Device user agent the simulated user will report.</p>

    Raises:
        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.get_mobile_device_access_effect_request.GetMobileDeviceAccessEffectRequest]",
    ) -> OperationResponse[
        "capo_workmail.types.get_mobile_device_access_effect_response.GetMobileDeviceAccessEffectResponse"
    ]:
        import capo_workmail._operations.work_mail_service.get_mobile_device_access_effect

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetMobileDeviceAccessEffect")
    )
    input_: capo_workmail.types.get_mobile_device_access_effect_request.GetMobileDeviceAccessEffectRequest = {
        "organization_id": organization_id
    }
    if device_type is not None:
        input_["device_type"] = device_type
    if device_model is not None:
        input_["device_model"] = device_model
    if device_operating_system is not None:
        input_["device_operating_system"] = device_operating_system
    if device_user_agent is not None:
        input_["device_user_agent"] = device_user_agent

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