Skip to content

delete_mobile_device_access_override

delete_mobile_device_access_override(
    organization_id: OrganizationId,
    user_id: EntityIdentifier,
    device_id: DeviceId,
    *,
    config_overrides: Optional[WorkMailClientConfig] = None,
) -> DeleteMobileDeviceAccessOverrideResponse

Deletes the mobile device access override for the given WorkMail organization, user, and device.

Deleting already deleted and non-existing overrides does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.

Parameters:

  • organization_id (OrganizationId) –

    The WorkMail organization for which the access override will be deleted.

  • user_id (EntityIdentifier) –

    The WorkMail user for which you want to delete the override. 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 (DeviceId) –

    The mobile device for which you delete the override. DeviceId is case insensitive.

Raises:

Source code in docs_src/capo_workmail/_services/work_mail.py
def delete_mobile_device_access_override(
    self,
    organization_id: "capo_workmail.types.organization_id.OrganizationId",
    user_id: "capo_workmail.types.entity_identifier.EntityIdentifier",
    device_id: "capo_workmail.types.device_id.DeviceId",
    *,
    config_overrides: Optional[WorkMailClientConfig] = None,
) -> "capo_workmail.types.delete_mobile_device_access_override_response.DeleteMobileDeviceAccessOverrideResponse":
    """<p>Deletes the mobile device access override for the given WorkMail organization, user, and device.</p> <note> <p>Deleting already deleted and non-existing overrides does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.</p> </note>

    Args:
        organization_id: <p>The WorkMail organization for which the access override will be deleted.</p>
        user_id: <p>The WorkMail user for which you want to delete the override. 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 for which you delete the override. <code>DeviceId</code> is case insensitive.</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.delete_mobile_device_access_override_request.DeleteMobileDeviceAccessOverrideRequest]",
    ) -> OperationResponse[
        "capo_workmail.types.delete_mobile_device_access_override_response.DeleteMobileDeviceAccessOverrideResponse"
    ]:
        import capo_workmail._operations.work_mail_service.delete_mobile_device_access_override

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteMobileDeviceAccessOverride")
    )
    input_: capo_workmail.types.delete_mobile_device_access_override_request.DeleteMobileDeviceAccessOverrideRequest = {
        "organization_id": organization_id,
        "user_id": user_id,
        "device_id": device_id,
    }

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