getAccessControlEffect method
Gets the effects of an organization's access control rules as they apply to a specified IPv4 address, access protocol action, or user ID.
May throw EntityNotFoundException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.
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 userId
:
The user ID.
Implementation
Future<GetAccessControlEffectResponse> getAccessControlEffect({
required String action,
required String ipAddress,
required String organizationId,
required String userId,
}) async {
ArgumentError.checkNotNull(action, 'action');
_s.validateStringLength(
'action',
action,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(ipAddress, 'ipAddress');
_s.validateStringLength(
'ipAddress',
ipAddress,
1,
15,
isRequired: true,
);
ArgumentError.checkNotNull(organizationId, 'organizationId');
_s.validateStringLength(
'organizationId',
organizationId,
34,
34,
isRequired: true,
);
ArgumentError.checkNotNull(userId, 'userId');
_s.validateStringLength(
'userId',
userId,
12,
256,
isRequired: true,
);
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,
'UserId': userId,
},
);
return GetAccessControlEffectResponse.fromJson(jsonResponse.body);
}