Enables or disables a DMARC policy for a given organization.
Parameters:
-
organization_id
(OrganizationId)
–
The ID of the organization that you are applying the DMARC policy to.
-
enforced
(BooleanObject)
–
Enforces or suspends a policy after it's applied.
Raises:
Source code in docs_src/capo_workmail/_services/work_mail.py
| def put_inbound_dmarc_settings(
self,
organization_id: "capo_workmail.types.organization_id.OrganizationId",
enforced: "capo_workmail.types.boolean_object.BooleanObject",
*,
config_overrides: Optional[WorkMailClientConfig] = None,
) -> "capo_workmail.types.put_inbound_dmarc_settings_response.PutInboundDmarcSettingsResponse":
"""<p>Enables or disables a DMARC policy for a given organization.</p>
Args:
organization_id: <p>The ID of the organization that you are applying the DMARC policy to.</p>
enforced: <p>Enforces or suspends a policy after it's applied.</p>
Raises:
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.put_inbound_dmarc_settings_request.PutInboundDmarcSettingsRequest]",
) -> OperationResponse[
"capo_workmail.types.put_inbound_dmarc_settings_response.PutInboundDmarcSettingsResponse"
]:
import capo_workmail._operations.work_mail_service.put_inbound_dmarc_settings
output, http_response = (
capo_workmail._operations.work_mail_service.put_inbound_dmarc_settings.put_inbound_dmarc_settings(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutInboundDmarcSettings")
)
input_: capo_workmail.types.put_inbound_dmarc_settings_request.PutInboundDmarcSettingsRequest = {
"organization_id": organization_id,
"enforced": enforced,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|