Deletes a mobile device access rule for the specified WorkMail organization.
Deleting already deleted and non-existing rules 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 under which the rule will be deleted.
-
mobile_device_access_rule_id
(MobileDeviceAccessRuleId)
–
The identifier of the rule to be deleted.
Raises:
Source code in docs_src/capo_workmail/_services/async_work_mail.py
| async def delete_mobile_device_access_rule(
self,
organization_id: "capo_workmail.types.organization_id.OrganizationId",
mobile_device_access_rule_id: "capo_workmail.types.mobile_device_access_rule_id.MobileDeviceAccessRuleId",
*,
config_overrides: Optional[AsyncWorkMailClientConfig] = None,
) -> "capo_workmail.types.delete_mobile_device_access_rule_response.DeleteMobileDeviceAccessRuleResponse":
"""<p>Deletes a mobile device access rule for the specified WorkMail organization.</p> <note> <p>Deleting already deleted and non-existing rules 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 under which the rule will be deleted.</p>
mobile_device_access_rule_id: <p>The identifier of the rule to be deleted.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_workmail.types.delete_mobile_device_access_rule_request.DeleteMobileDeviceAccessRuleRequest]",
) -> AsyncOperationResponse[
"capo_workmail.types.delete_mobile_device_access_rule_response.DeleteMobileDeviceAccessRuleResponse"
]:
import capo_workmail._operations.work_mail_service.delete_mobile_device_access_rule
(
output,
http_response,
) = await capo_workmail._operations.work_mail_service.delete_mobile_device_access_rule.async_delete_mobile_device_access_rule(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteMobileDeviceAccessRule")
)
input_: capo_workmail.types.delete_mobile_device_access_rule_request.DeleteMobileDeviceAccessRuleRequest = {
"organization_id": organization_id,
"mobile_device_access_rule_id": mobile_device_access_rule_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|