getHarness method

Future<GetHarnessResponse> getHarness({
  1. required String harnessId,
  2. String? harnessVersion,
})

Operation to get a single harness.

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

Parameter harnessId : The ID of the harness to retrieve.

Parameter harnessVersion : Specific version of the harness to retrieve. If omitted, returns the current Harness configuration, including its status.

Implementation

Future<GetHarnessResponse> getHarness({
  required String harnessId,
  String? harnessVersion,
}) async {
  final $query = <String, List<String>>{
    if (harnessVersion != null) 'harnessVersion': [harnessVersion],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/harnesses/${Uri.encodeComponent(harnessId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetHarnessResponse.fromJson(response);
}