listDeployments method
List deployments. You can filter the result list by environment, service, or a single service instance.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter componentName :
The name of a component for result list filtering. Proton returns
deployments associated with that component.
Parameter environmentName :
The name of an environment for result list filtering. Proton returns
deployments associated with the environment.
Parameter maxResults :
The maximum number of deployments to list.
Parameter nextToken :
A token that indicates the location of the next deployment in the array of
deployment, after the list of deployment that was previously requested.
Parameter serviceInstanceName :
The name of a service instance for result list filtering. Proton returns
the deployments associated with the service instance.
Parameter serviceName :
The name of a service for result list filtering. Proton returns
deployments associated with service instances of the service.
Implementation
Future<ListDeploymentsOutput> listDeployments({
String? componentName,
String? environmentName,
int? maxResults,
String? nextToken,
String? serviceInstanceName,
String? serviceName,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.ListDeployments'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (componentName != null) 'componentName': componentName,
if (environmentName != null) 'environmentName': environmentName,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (serviceInstanceName != null)
'serviceInstanceName': serviceInstanceName,
if (serviceName != null) 'serviceName': serviceName,
},
);
return ListDeploymentsOutput.fromJson(jsonResponse.body);
}