cancelDeployment method

Future<CancelDeploymentResponse> cancelDeployment({
  1. required String deploymentId,
})

Cancels a deployment. This operation cancels the deployment for devices that haven't yet received it. If a device already received the deployment, this operation doesn't change anything for that device.

May throw ResourceNotFoundException. May throw ValidationException. May throw AccessDeniedException. May throw InternalServerException. May throw ConflictException. May throw ThrottlingException.

Parameter deploymentId : The ID of the deployment.

Implementation

Future<CancelDeploymentResponse> cancelDeployment({
  required String deploymentId,
}) async {
  ArgumentError.checkNotNull(deploymentId, 'deploymentId');
  _s.validateStringLength(
    'deploymentId',
    deploymentId,
    1,
    1152921504606846976,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri:
        '/greengrass/v2/deployments/${Uri.encodeComponent(deploymentId)}/cancel',
    exceptionFnMap: _exceptionFns,
  );
  return CancelDeploymentResponse.fromJson(response);
}