listConnectors method

Future<ListConnectorsResponse> listConnectors({
  1. String? connectorNamePrefix,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of all the connectors in this account and Region. The list is limited to connectors whose name starts with the specified prefix. The response also includes a description of each of the listed connectors.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter connectorNamePrefix : The name prefix that you want to use to search for and list connectors.

Parameter maxResults : The maximum number of connectors to list in one response.

Parameter nextToken : If the response of a ListConnectors operation is truncated, it will include a NextToken. Send this NextToken in a subsequent request to continue listing from where the previous operation left off.

Implementation

Future<ListConnectorsResponse> listConnectors({
  String? connectorNamePrefix,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (connectorNamePrefix != null)
      'connectorNamePrefix': [connectorNamePrefix],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/connectors',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListConnectorsResponse.fromJson(response);
}