describeEventTopics method

Future<DescribeEventTopicsResult> describeEventTopics({
  1. String? directoryId,
  2. List<String>? topicNames,
})

Obtains information about which SNS topics receive status messages from the specified directory.

If no input parameters are provided, such as DirectoryId or TopicName, this request describes all of the associations in the account.

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

Parameter directoryId : The Directory ID for which to get the list of associated SNS topics. If this member is null, associations for all Directory IDs are returned.

Parameter topicNames : A list of SNS topic names for which to obtain the information. If this member is null, all associations for the specified Directory ID are returned.

An empty list results in an InvalidParameterException being thrown.

Implementation

Future<DescribeEventTopicsResult> describeEventTopics({
  String? directoryId,
  List<String>? topicNames,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.DescribeEventTopics'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (directoryId != null) 'DirectoryId': directoryId,
      if (topicNames != null) 'TopicNames': topicNames,
    },
  );

  return DescribeEventTopicsResult.fromJson(jsonResponse.body);
}