subscribe method
Creates an association between a notification rule and an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client so that the associated target can receive notifications when the events described in the rule are triggered.
May throw ConfigurationException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter arn :
The Amazon Resource Name (ARN) of the notification rule for which you want
to create the association.
Parameter clientRequestToken :
An enumeration token that, when provided in a request, returns the next
batch of the results.
Implementation
Future<SubscribeResult> subscribe({
required String arn,
required Target target,
String? clientRequestToken,
}) async {
final $payload = <String, dynamic>{
'Arn': arn,
'Target': target,
if (clientRequestToken != null) 'ClientRequestToken': clientRequestToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/subscribe',
exceptionFnMap: _exceptionFns,
);
return SubscribeResult.fromJson(response);
}