createInput method
Creates an input.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceAlreadyExistsException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter inputDefinition :
The definition of the input.
Parameter inputName :
The name you want to give to the input.
Parameter inputDescription :
A brief description of the input.
Parameter tags :
Metadata that can be used to manage the input.
Implementation
Future<CreateInputResponse> createInput({
required InputDefinition inputDefinition,
required String inputName,
String? inputDescription,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'inputDefinition': inputDefinition,
'inputName': inputName,
if (inputDescription != null) 'inputDescription': inputDescription,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/inputs',
exceptionFnMap: _exceptionFns,
);
return CreateInputResponse.fromJson(response);
}