put_access_control_rule
async
¶
put_access_control_rule(
name: AccessControlRuleName,
effect: AccessControlRuleEffect,
description: AccessControlRuleDescription,
organization_id: OrganizationId,
*,
config_overrides: Optional[AsyncWorkMailClientConfig] = None,
ip_ranges: Optional[IpRangeList] = None,
not_ip_ranges: Optional[IpRangeList] = None,
actions: Optional[ActionsList] = None,
not_actions: Optional[ActionsList] = None,
user_ids: Optional[UserIdList] = None,
not_user_ids: Optional[UserIdList] = None,
impersonation_role_ids: Optional[ImpersonationRoleIdList] = None,
not_impersonation_role_ids: Optional[ImpersonationRoleIdList] = None,
) -> PutAccessControlRuleResponse
Adds a new access control rule for the specified organization. The rule allows or denies access to the organization for the specified IPv4 addresses, access protocol actions, user IDs and impersonation IDs. Adding a new rule with the same name as an existing rule replaces the older rule.
Parameters:
-
name(AccessControlRuleName) –The rule name.
-
effect(AccessControlRuleEffect) –The rule effect.
-
description(AccessControlRuleDescription) –The rule description.
-
ip_ranges(Optional[IpRangeList], default:None) –IPv4 CIDR ranges to include in the rule.
-
not_ip_ranges(Optional[IpRangeList], default:None) –IPv4 CIDR ranges to exclude from the rule.
-
actions(Optional[ActionsList], default:None) –Access protocol actions to include in the rule. Valid values include
ActiveSync,AutoDiscover,EWS,IMAP,SMTP,WindowsOutlook, andWebMail. -
not_actions(Optional[ActionsList], default:None) –Access protocol actions to exclude from the rule. Valid values include
ActiveSync,AutoDiscover,EWS,IMAP,SMTP,WindowsOutlook, andWebMail. -
user_ids(Optional[UserIdList], default:None) –User IDs to include in the rule.
-
not_user_ids(Optional[UserIdList], default:None) –User IDs to exclude from the rule.
-
organization_id(OrganizationId) –The identifier of the organization.
-
impersonation_role_ids(Optional[ImpersonationRoleIdList], default:None) –Impersonation role IDs to include in the rule.
-
not_impersonation_role_ids(Optional[ImpersonationRoleIdList], default:None) –Impersonation role IDs to exclude from the rule.
Raises:
-
EntityNotFoundException–The identifier supplied for the user, group, or resource does not exist in your organization.
-
InvalidParameterException–One or more of the input parameters don't match the service's restrictions.
-
LimitExceededException–The request exceeds the limit of the resource.
-
OrganizationNotFoundException–An operation received a valid organization identifier that either doesn't belong or exist in the system.
-
OrganizationStateException–The organization must have a valid state to perform certain operations on the organization or its members.
-
ResourceNotFoundException–The resource cannot be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workmail/_services/async_work_mail.py
4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 | |