updateLink method

Future<UpdateLinkResponse> updateLink({
  1. required String gatewayId,
  2. required String linkId,
  3. LinkLogSettings? logSettings,
  4. int? timeoutInMillis,
})

Updates the configuration of a link between gateways.

Allows you to modify settings and parameters for an existing link.

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

Parameter gatewayId : The unique identifier of the gateway.

Parameter linkId : The unique identifier of the link.

Parameter logSettings : Settings for the application logs.

Parameter timeoutInMillis : The timeout value in milliseconds.

Implementation

Future<UpdateLinkResponse> updateLink({
  required String gatewayId,
  required String linkId,
  LinkLogSettings? logSettings,
  int? timeoutInMillis,
}) async {
  _s.validateNumRange(
    'timeoutInMillis',
    timeoutInMillis,
    100,
    5000,
  );
  final $payload = <String, dynamic>{
    if (logSettings != null) 'logSettings': logSettings,
    if (timeoutInMillis != null) 'timeoutInMillis': timeoutInMillis,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/gateway/${Uri.encodeComponent(gatewayId)}/link/${Uri.encodeComponent(linkId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateLinkResponse.fromJson(response);
}