stopDeployment method

Future<Deployment> stopDeployment({
  1. required String applicationId,
  2. required int deploymentNumber,
  3. required String environmentId,
})

Stops a deployment. This API action works only on deployments that have a status of DEPLOYING. This action moves the deployment to a status of ROLLED_BACK.

May throw ResourceNotFoundException. May throw InternalServerException. May throw BadRequestException.

Parameter applicationId : The application ID.

Parameter deploymentNumber : The sequence number of the deployment.

Parameter environmentId : The environment ID.

Implementation

Future<Deployment> stopDeployment({
  required String applicationId,
  required int deploymentNumber,
  required String environmentId,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(deploymentNumber, 'deploymentNumber');
  ArgumentError.checkNotNull(environmentId, 'environmentId');
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/environments/${Uri.encodeComponent(environmentId)}/deployments/${Uri.encodeComponent(deploymentNumber.toString())}',
    exceptionFnMap: _exceptionFns,
  );
  return Deployment.fromJson(response);
}