describeRiskConfiguration method
Given an app client or user pool ID where threat protection is configured, describes the risk configuration. This operation returns details about adaptive authentication, compromised credentials, and IP-address allow- and denylists. For more information about threat protection, see Threat protection.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw OperationNotEnabledException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
May throw UserPoolAddOnNotEnabledException.
Parameter userPoolId :
The ID of the user pool with the risk configuration that you want to
inspect. You can apply default risk configuration at the user pool level
and further customize it from user pool defaults at the app-client level.
Specify ClientId to inspect client-level configuration, or
UserPoolId to inspect pool-level configuration.
Parameter clientId :
The ID of the app client with the risk configuration that you want to
inspect. You can apply default risk configuration at the user pool level
and further customize it from user pool defaults at the app-client level.
Specify ClientId to inspect client-level configuration, or
UserPoolId to inspect pool-level configuration.
Implementation
Future<DescribeRiskConfigurationResponse> describeRiskConfiguration({
required String userPoolId,
String? clientId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSCognitoIdentityProviderService.DescribeRiskConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'UserPoolId': userPoolId,
if (clientId != null) 'ClientId': clientId,
},
);
return DescribeRiskConfigurationResponse.fromJson(jsonResponse.body);
}