putVoiceConnectorLoggingConfiguration method
Future<PutVoiceConnectorLoggingConfigurationResponse>
putVoiceConnectorLoggingConfiguration({
- required LoggingConfiguration loggingConfiguration,
- required String voiceConnectorId,
Adds a logging configuration for the specified Amazon Chime Voice Connector. The logging configuration specifies whether SIP message logs are enabled for sending to Amazon CloudWatch Logs.
May throw UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.
Parameter loggingConfiguration
:
The logging configuration details to add.
Parameter voiceConnectorId
:
The Amazon Chime Voice Connector ID.
Implementation
Future<PutVoiceConnectorLoggingConfigurationResponse>
putVoiceConnectorLoggingConfiguration({
required LoggingConfiguration loggingConfiguration,
required String voiceConnectorId,
}) async {
ArgumentError.checkNotNull(loggingConfiguration, 'loggingConfiguration');
ArgumentError.checkNotNull(voiceConnectorId, 'voiceConnectorId');
final $payload = <String, dynamic>{
'LoggingConfiguration': loggingConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/voice-connectors/${Uri.encodeComponent(voiceConnectorId)}/logging-configuration',
exceptionFnMap: _exceptionFns,
);
return PutVoiceConnectorLoggingConfigurationResponse.fromJson(response);
}