describeRiskConfiguration method
Describes the risk configuration.
May throw ResourceNotFoundException. May throw InvalidParameterException. May throw TooManyRequestsException. May throw NotAuthorizedException. May throw UserPoolAddOnNotEnabledException. May throw InternalErrorException.
Parameter userPoolId
:
The user pool ID.
Parameter clientId
:
The app client ID.
Implementation
Future<DescribeRiskConfigurationResponse> describeRiskConfiguration({
required String userPoolId,
String? clientId,
}) async {
ArgumentError.checkNotNull(userPoolId, 'userPoolId');
_s.validateStringLength(
'userPoolId',
userPoolId,
1,
55,
isRequired: true,
);
_s.validateStringLength(
'clientId',
clientId,
1,
128,
);
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);
}