updateHarnessEndpoint method

Future<UpdateHarnessEndpointResponse> updateHarnessEndpoint({
  1. required String endpointName,
  2. required String harnessId,
  3. String? clientToken,
  4. String? description,
  5. String? targetVersion,
})

Operation to update a harness endpoint.

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

Parameter endpointName : The name of the endpoint to update.

Parameter harnessId : The ID of the harness that the endpoint belongs to.

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

Parameter description : A description of the endpoint. If not specified, the existing value is retained.

Parameter targetVersion : The harness version that the endpoint points to. If not specified, the existing value is retained.

Implementation

Future<UpdateHarnessEndpointResponse> updateHarnessEndpoint({
  required String endpointName,
  required String harnessId,
  String? clientToken,
  String? description,
  String? targetVersion,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (targetVersion != null) 'targetVersion': targetVersion,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/harnesses/${Uri.encodeComponent(harnessId)}/endpoints/${Uri.encodeComponent(endpointName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateHarnessEndpointResponse.fromJson(response);
}