listServices method
Returns a list of services. You can filter the results by cluster, launch type, and scheduling strategy.
May throw AccessDeniedException.
May throw ClientException.
May throw ClusterNotFoundException.
May throw InvalidParameterException.
May throw ServerException.
Parameter cluster :
The short name or full Amazon Resource Name (ARN) of the cluster to use
when filtering the ListServices results. If you do not
specify a cluster, the default cluster is assumed.
Parameter launchType :
The launch type to use when filtering the ListServices
results.
Parameter maxResults :
The maximum number of service results that ListServices
returned in paginated output. When this parameter is used,
ListServices only returns maxResults results in
a single page along with a nextToken response element. The
remaining results of the initial request can be seen by sending another
ListServices request with the returned nextToken
value. This value can be between 1 and 100. If this parameter isn't used,
then ListServices returns up to 10 results and a
nextToken value if applicable.
Parameter nextToken :
The nextToken value returned from a ListServices
request indicating that more results are available to fulfill the request
and further calls will be needed. If maxResults was provided,
it is possible the number of results to be fewer than
maxResults.
Parameter resourceManagementType :
The resourceManagementType type to use when filtering the
ListServices results.
Parameter schedulingStrategy :
The scheduling strategy to use when filtering the
ListServices results.
Implementation
Future<ListServicesResponse> listServices({
String? cluster,
LaunchType? launchType,
int? maxResults,
String? nextToken,
ResourceManagementType? resourceManagementType,
SchedulingStrategy? schedulingStrategy,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.ListServices'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (cluster != null) 'cluster': cluster,
if (launchType != null) 'launchType': launchType.value,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (resourceManagementType != null)
'resourceManagementType': resourceManagementType.value,
if (schedulingStrategy != null)
'schedulingStrategy': schedulingStrategy.value,
},
);
return ListServicesResponse.fromJson(jsonResponse.body);
}