listDaemons method
Returns a list of daemons. You can filter the results by cluster or capacity provider.
May throw AccessDeniedException.
May throw ClientException.
May throw ClusterNotFoundException.
May throw InvalidParameterException.
May throw ServerException.
May throw UnsupportedFeatureException.
Parameter capacityProviderArns :
The Amazon Resource Names (ARNs) of the capacity providers to filter
daemons by. Only daemons associated with the specified capacity providers
are returned.
Parameter clusterArn :
The Amazon Resource Name (ARN) of the cluster to filter daemons by. If not
specified, daemons from all clusters are returned.
Parameter maxResults :
The maximum number of daemon results that ListDaemons
returned in paginated output. When this parameter is used,
ListDaemons 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
ListDaemons request with the returned nextToken
value. This value can be between 1 and 100. If this parameter isn't used,
then ListDaemons returns up to 100 results and a
nextToken value if applicable.
Parameter nextToken :
The nextToken value returned from a ListDaemons
request indicating that more results are available to fulfill the request
and further calls will be needed. If maxResults was provided,
it's possible for the number of results to be fewer than
maxResults.
Implementation
Future<ListDaemonsResponse> listDaemons({
List<String>? capacityProviderArns,
String? clusterArn,
int? maxResults,
String? nextToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.ListDaemons'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (capacityProviderArns != null)
'capacityProviderArns': capacityProviderArns,
if (clusterArn != null) 'clusterArn': clusterArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListDaemonsResponse.fromJson(jsonResponse.body);
}