updateInput method

Future<UpdateInputResponse> updateInput({
  1. required InputDefinition inputDefinition,
  2. required String inputName,
  3. String? inputDescription,
})

Updates an input.

May throw InvalidRequestException. May throw ThrottlingException. May throw ResourceNotFoundException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ResourceInUseException.

Parameter inputDefinition : The definition of the input.

Parameter inputName : The name of the input you want to update.

Parameter inputDescription : A brief description of the input.

Implementation

Future<UpdateInputResponse> updateInput({
  required InputDefinition inputDefinition,
  required String inputName,
  String? inputDescription,
}) async {
  ArgumentError.checkNotNull(inputDefinition, 'inputDefinition');
  ArgumentError.checkNotNull(inputName, 'inputName');
  _s.validateStringLength(
    'inputName',
    inputName,
    1,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'inputDescription',
    inputDescription,
    0,
    128,
  );
  final $payload = <String, dynamic>{
    'inputDefinition': inputDefinition,
    if (inputDescription != null) 'inputDescription': inputDescription,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/inputs/${Uri.encodeComponent(inputName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateInputResponse.fromJson(response);
}