listDaemonDeployments method
Returns a list of daemon deployments for a specified daemon. You can filter the results by status or creation time.
May throw AccessDeniedException.
May throw ClientException.
May throw ClusterNotFoundException.
May throw InvalidParameterException.
May throw ServerException.
May throw UnsupportedFeatureException.
Parameter daemonArn :
The Amazon Resource Name (ARN) of the daemon to list deployments for.
Parameter createdAt :
An optional filter to narrow the ListDaemonDeployments
results by creation time. If you don't specify a time range, all
deployments are returned.
Parameter maxResults :
The maximum number of daemon deployment results that
ListDaemonDeployments returned in paginated output. When this
parameter is used, ListDaemonDeployments 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
ListDaemonDeployments request with the returned
nextToken value. This value can be between 1 and 100. If this
parameter isn't used, then ListDaemonDeployments returns up
to 20 results and a nextToken value if applicable.
Parameter nextToken :
The nextToken value returned from a
ListDaemonDeployments 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.
Parameter status :
An optional filter to narrow the ListDaemonDeployments
results by deployment status. If you don't specify a status, all
deployments are returned.
Implementation
Future<ListDaemonDeploymentsResponse> listDaemonDeployments({
required String daemonArn,
CreatedAt? createdAt,
int? maxResults,
String? nextToken,
List<DaemonDeploymentStatus>? status,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.ListDaemonDeployments'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'daemonArn': daemonArn,
if (createdAt != null) 'createdAt': createdAt,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (status != null) 'status': status.map((e) => e.value).toList(),
},
);
return ListDaemonDeploymentsResponse.fromJson(jsonResponse.body);
}