listServiceInstances method
List service instances with summary data. This action lists service instances of all services in the Amazon Web Services account.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter filters :
An array of filtering criteria that scope down the result list. By
default, all service instances in the Amazon Web Services account are
returned.
Parameter maxResults :
The maximum number of service instances to list.
Parameter nextToken :
A token that indicates the location of the next service in the array of
service instances, after the list of service instances that was previously
requested.
Parameter serviceName :
The name of the service that the service instance belongs to.
Parameter sortBy :
The field that the result list is sorted by.
When you choose to sort by serviceName, service instances
within each service are sorted by service instance name.
Default: serviceName
Parameter sortOrder :
Result list sort order.
Default: ASCENDING
Implementation
Future<ListServiceInstancesOutput> listServiceInstances({
List<ListServiceInstancesFilter>? filters,
int? maxResults,
String? nextToken,
String? serviceName,
ListServiceInstancesSortBy? sortBy,
SortOrder? sortOrder,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.ListServiceInstances'
};
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,
if (serviceName != null) 'serviceName': serviceName,
if (sortBy != null) 'sortBy': sortBy.value,
if (sortOrder != null) 'sortOrder': sortOrder.value,
},
);
return ListServiceInstancesOutput.fromJson(jsonResponse.body);
}