getAccessControlEffect method
Gets the effects of an organization's access control rules as they apply to a specified IPv4 address, access protocol action, and user ID or impersonation role ID. You must provide either the user ID or impersonation role ID. Impersonation role ID can only be used with Action EWS.
May throw EntityNotFoundException.
May throw InvalidParameterException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
May throw ResourceNotFoundException.
Parameter action :
The access protocol action. Valid values include ActiveSync,
AutoDiscover, EWS, IMAP,
SMTP, WindowsOutlook, and WebMail.
Parameter ipAddress :
The IPv4 address.
Parameter organizationId :
The identifier for the organization.
Parameter impersonationRoleId :
The impersonation role ID.
Parameter userId :
The user ID.
Implementation
Future<GetAccessControlEffectResponse> getAccessControlEffect({
required String action,
required String ipAddress,
required String organizationId,
String? impersonationRoleId,
String? userId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.GetAccessControlEffect'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Action': action,
'IpAddress': ipAddress,
'OrganizationId': organizationId,
if (impersonationRoleId != null)
'ImpersonationRoleId': impersonationRoleId,
if (userId != null) 'UserId': userId,
},
);
return GetAccessControlEffectResponse.fromJson(jsonResponse.body);
}