Lists the access control rules for the specified organization.
Parameters:
-
organization_id
(OrganizationId)
–
The identifier for the organization.
Raises:
Source code in docs_src/capo_workmail/_services/work_mail.py
| def list_access_control_rules(
self,
organization_id: "capo_workmail.types.organization_id.OrganizationId",
*,
config_overrides: Optional[WorkMailClientConfig] = None,
) -> "capo_workmail.types.list_access_control_rules_response.ListAccessControlRulesResponse":
"""<p>Lists the access control rules for the specified organization.</p>
Args:
organization_id: <p>The identifier for the organization.</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.list_access_control_rules_request.ListAccessControlRulesRequest]",
) -> OperationResponse[
"capo_workmail.types.list_access_control_rules_response.ListAccessControlRulesResponse"
]:
import capo_workmail._operations.work_mail_service.list_access_control_rules
output, http_response = (
capo_workmail._operations.work_mail_service.list_access_control_rules.list_access_control_rules(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAccessControlRules")
)
input_: capo_workmail.types.list_access_control_rules_request.ListAccessControlRulesRequest = {
"organization_id": organization_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|