listCloudConnectors method

Future<ListCloudConnectorsResult> listCloudConnectors({
  1. List<CloudConnectorFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of cloud connectors in the current Amazon Web Services account and Amazon Web Services Region.

May throw InternalServerError.

Parameter filters : One or more filters to limit the cloud connectors returned in the response.

Parameter maxResults : The maximum number of items to return for this call.

Parameter nextToken : The token for the next set of items to return. (You received this token from a previous call.)

Implementation

Future<ListCloudConnectorsResult> listCloudConnectors({
  List<CloudConnectorFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    10,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.ListCloudConnectors'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListCloudConnectorsResult.fromJson(jsonResponse.body);
}