listConfigurations method

Future<ListConfigurationsResponse> listConfigurations({
  1. required ConfigurationItemType configurationType,
  2. List<Filter>? filters,
  3. int? maxResults,
  4. String? nextToken,
  5. List<OrderByElement>? orderBy,
})

Retrieves a list of configuration items as specified by the value passed to the required parameter configurationType. Optional filtering may be applied to refine search results.

May throw AuthorizationErrorException. May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InvalidParameterValueException. May throw ServerInternalErrorException. May throw HomeRegionNotSetException.

Parameter configurationType : A valid configuration identified by Application Discovery Service.

Parameter filters : You can filter the request using various logical operators and a key-value format. For example:

{"key": "serverType", "value": "webServer"}

For a complete list of filter options and guidance about using them with this action, see Using the ListConfigurations Action in the AWS Application Discovery Service User Guide.

Parameter maxResults : The total number of items to return. The maximum value is 100.

Parameter nextToken : Token to retrieve the next set of results. For example, if a previous call to ListConfigurations returned 100 items, but you set ListConfigurationsRequest$maxResults to 10, you received a set of 10 results along with a token. Use that token in this query to get the next set of 10.

Parameter orderBy : Certain filter criteria return output that can be sorted in ascending or descending order. For a list of output characteristics for each filter, see Using the ListConfigurations Action in the AWS Application Discovery Service User Guide.

Implementation

Future<ListConfigurationsResponse> listConfigurations({
  required ConfigurationItemType configurationType,
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
  List<OrderByElement>? orderBy,
}) async {
  ArgumentError.checkNotNull(configurationType, 'configurationType');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSPoseidonService_V2015_11_01.ListConfigurations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'configurationType': configurationType.toValue(),
      if (filters != null) 'filters': filters,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (orderBy != null) 'orderBy': orderBy,
    },
  );

  return ListConfigurationsResponse.fromJson(jsonResponse.body);
}