create_mobile_device_access_rule
¶
create_mobile_device_access_rule(
organization_id: OrganizationId,
name: MobileDeviceAccessRuleName,
effect: MobileDeviceAccessRuleEffect,
*,
config_overrides: Optional[WorkMailClientConfig] = None,
client_token: Optional[IdempotencyClientToken] = None,
description: Optional[MobileDeviceAccessRuleDescription] = None,
device_types: Optional[DeviceTypeList] = None,
not_device_types: Optional[DeviceTypeList] = None,
device_models: Optional[DeviceModelList] = None,
not_device_models: Optional[DeviceModelList] = None,
device_operating_systems: Optional[DeviceOperatingSystemList] = None,
not_device_operating_systems: Optional[DeviceOperatingSystemList] = None,
device_user_agents: Optional[DeviceUserAgentList] = None,
not_device_user_agents: Optional[DeviceUserAgentList] = None,
) -> CreateMobileDeviceAccessRuleResponse
Creates a new mobile device access rule for the specified WorkMail organization.
Parameters:
-
organization_id(OrganizationId) –The WorkMail organization under which the rule will be created.
-
client_token(Optional[IdempotencyClientToken], default:None) –The idempotency token for the client request.
-
name(MobileDeviceAccessRuleName) –The rule name.
-
description(Optional[MobileDeviceAccessRuleDescription], default:None) –The rule description.
-
effect(MobileDeviceAccessRuleEffect) –The effect of the rule when it matches. Allowed values are
ALLOWorDENY. -
device_types(Optional[DeviceTypeList], default:None) –Device types that the rule will match.
-
not_device_types(Optional[DeviceTypeList], default:None) –Device types that the rule will not match. All other device types will match.
-
device_models(Optional[DeviceModelList], default:None) –Device models that the rule will match.
-
not_device_models(Optional[DeviceModelList], default:None) –Device models that the rule will not match. All other device models will match.
-
device_operating_systems(Optional[DeviceOperatingSystemList], default:None) –Device operating systems that the rule will match.
-
not_device_operating_systems(Optional[DeviceOperatingSystemList], default:None) –Device operating systems that the rule will not match. All other device operating systems will match.
-
device_user_agents(Optional[DeviceUserAgentList], default:None) –Device user agents that the rule will match.
-
not_device_user_agents(Optional[DeviceUserAgentList], default:None) –Device user agents that the rule will not match. All other device user agents will match.
Raises:
-
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workmail/_services/work_mail.py
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 | |