addNotificationChannels method
Add up to 2 anomaly notifications channels for a profiling group.
May throw ServiceQuotaExceededException. May throw InternalServerException. May throw ConflictException. May throw ValidationException. May throw ThrottlingException. May throw ResourceNotFoundException.
Parameter channels
:
One or 2 channels to report to when anomalies are detected.
Parameter profilingGroupName
:
The name of the profiling group that we are setting up notifications for.
Implementation
Future<AddNotificationChannelsResponse> addNotificationChannels({
required List<Channel> channels,
required String profilingGroupName,
}) async {
ArgumentError.checkNotNull(channels, 'channels');
ArgumentError.checkNotNull(profilingGroupName, 'profilingGroupName');
_s.validateStringLength(
'profilingGroupName',
profilingGroupName,
1,
255,
isRequired: true,
);
final $payload = <String, dynamic>{
'channels': channels,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/profilingGroups/${Uri.encodeComponent(profilingGroupName)}/notificationConfiguration',
exceptionFnMap: _exceptionFns,
);
return AddNotificationChannelsResponse.fromJson(response);
}