getMobileDeviceAccessEffect method
Simulates the effect of the mobile device access rules for the given attributes of a sample access event. Use this method to test the effects of the current set of mobile device access rules for the WorkMail organization for a particular user's attributes.
May throw InvalidParameterException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
Parameter organizationId :
The WorkMail organization to simulate the access effect for.
Parameter deviceModel :
Device model the simulated user will report.
Parameter deviceOperatingSystem :
Device operating system the simulated user will report.
Parameter deviceType :
Device type the simulated user will report.
Parameter deviceUserAgent :
Device user agent the simulated user will report.
Implementation
Future<GetMobileDeviceAccessEffectResponse> getMobileDeviceAccessEffect({
required String organizationId,
String? deviceModel,
String? deviceOperatingSystem,
String? deviceType,
String? deviceUserAgent,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.GetMobileDeviceAccessEffect'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationId': organizationId,
if (deviceModel != null) 'DeviceModel': deviceModel,
if (deviceOperatingSystem != null)
'DeviceOperatingSystem': deviceOperatingSystem,
if (deviceType != null) 'DeviceType': deviceType,
if (deviceUserAgent != null) 'DeviceUserAgent': deviceUserAgent,
},
);
return GetMobileDeviceAccessEffectResponse.fromJson(jsonResponse.body);
}