createModel method
Creates a model using the specified model type.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter eventTypeName :
The name of the event type.
Parameter modelId :
The model ID.
Parameter modelType :
The model type.
Parameter description :
The model description.
Parameter tags :
A collection of key and value pairs.
Implementation
Future<void> createModel({
required String eventTypeName,
required String modelId,
required ModelTypeEnum modelType,
String? description,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.CreateModel'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'eventTypeName': eventTypeName,
'modelId': modelId,
'modelType': modelType.value,
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
},
);
}