deregisterEventTopic method

Future<void> deregisterEventTopic({
  1. required String directoryId,
  2. required String topicName,
})

Removes the specified directory as a publisher to the specified SNS topic.

May throw EntityDoesNotExistException. May throw InvalidParameterException. May throw ClientException. May throw ServiceException.

Parameter directoryId : The Directory ID to remove as a publisher. This directory will no longer send messages to the specified SNS topic.

Parameter topicName : The name of the SNS topic from which to remove the directory as a publisher.

Implementation

Future<void> deregisterEventTopic({
  required String directoryId,
  required String topicName,
}) async {
  ArgumentError.checkNotNull(directoryId, 'directoryId');
  ArgumentError.checkNotNull(topicName, 'topicName');
  _s.validateStringLength(
    'topicName',
    topicName,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.DeregisterEventTopic'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      'TopicName': topicName,
    },
  );
}