describeFleetAdvisorCollectors method

Future<DescribeFleetAdvisorCollectorsResponse> describeFleetAdvisorCollectors({
  1. List<Filter>? filters,
  2. int? maxRecords,
  3. String? nextToken,
})
Returns a list of the Fleet Advisor collectors in your account.

May throw InvalidResourceStateFault.

Parameter filters : If you specify any of the following filters, the output includes information for only those collectors that meet the filter criteria:

  • collector-referenced-id – The ID of the collector agent, for example d4610ac5-e323-4ad9-bc50-eaf7249dfe9d.
  • collector-name – The name of the collector agent.
An example is: describe-fleet-advisor-collectors --filter Name="collector-referenced-id",Values="d4610ac5-e323-4ad9-bc50-eaf7249dfe9d"

Parameter maxRecords : Sets the maximum number of records returned in the response.

Parameter nextToken : If NextToken is returned by a previous response, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

Implementation

Future<DescribeFleetAdvisorCollectorsResponse>
    describeFleetAdvisorCollectors({
  List<Filter>? filters,
  int? maxRecords,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.DescribeFleetAdvisorCollectors'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxRecords != null) 'MaxRecords': maxRecords,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeFleetAdvisorCollectorsResponse.fromJson(jsonResponse.body);
}