setLogDeliveryConfiguration method
Sets up or modifies the logging configuration of a user pool. User pools can export user notification logs and, when threat protection is active, user-activity logs. For more information, see Exporting user pool logs.
May throw FeatureUnavailableInTierException.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter logConfigurations :
A collection of the logging configurations for a user pool.
Parameter userPoolId :
The ID of the user pool where you want to configure logging.
Implementation
Future<SetLogDeliveryConfigurationResponse> setLogDeliveryConfiguration({
required List<LogConfigurationType> logConfigurations,
required String userPoolId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSCognitoIdentityProviderService.SetLogDeliveryConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'LogConfigurations': logConfigurations,
'UserPoolId': userPoolId,
},
);
return SetLogDeliveryConfigurationResponse.fromJson(jsonResponse.body);
}