deleteHarness method

Future<DeleteHarnessResponse> deleteHarness({
  1. required String harnessId,
  2. String? clientToken,
  3. bool? deleteManagedMemory,
})

Operation to delete a Harness.

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

Parameter harnessId : The ID of the harness to delete.

Parameter clientToken : A unique, case-sensitive identifier to ensure idempotency of the request.

Parameter deleteManagedMemory : Whether to delete the managed memory on harness deletion. Default: true. If false, the memory is disassociated and becomes a regular customer-owned resource.

Implementation

Future<DeleteHarnessResponse> deleteHarness({
  required String harnessId,
  String? clientToken,
  bool? deleteManagedMemory,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
    if (deleteManagedMemory != null)
      'deleteManagedMemory': [deleteManagedMemory.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/harnesses/${Uri.encodeComponent(harnessId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteHarnessResponse.fromJson(response);
}