unsubscribeFromEvent method
Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.
May throw AccessDeniedException.
May throw InternalException.
May throw InvalidInputException.
May throw NoSuchEntityException.
May throw ServiceTemporarilyUnavailableException.
Parameter event :
The event for which you want to stop receiving SNS notifications.
Parameter resourceArn :
The ARN of the assessment template that is used during the event for which
you want to stop receiving SNS notifications.
Parameter topicArn :
The ARN of the SNS topic to which SNS notifications are sent.
Implementation
Future<void> unsubscribeFromEvent({
required InspectorEvent event,
required String resourceArn,
required String topicArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'InspectorService.UnsubscribeFromEvent'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'event': event.value,
'resourceArn': resourceArn,
'topicArn': topicArn,
},
);
}