createRecommenderSchema method
Creates a recommender schema. A recommender schema defines the set of data columns available for training recommenders and filters under a domain.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter fields :
A map of dataset type to column definitions that specifies which data
columns to include in the schema. The _webAnalytics and
_catalogItem keys are supported.
Parameter recommenderSchemaName :
The name of the recommender schema. The name must be unique within the
domain.
Parameter tags :
The tags used to organize, track, or control access for this resource.
Implementation
Future<CreateRecommenderSchemaResponse> createRecommenderSchema({
required String domainName,
required Map<String, List<RecommenderSchemaField>> fields,
required String recommenderSchemaName,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Fields': fields,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/domains/${Uri.encodeComponent(domainName)}/recommender-schemas/${Uri.encodeComponent(recommenderSchemaName)}',
exceptionFnMap: _exceptionFns,
);
return CreateRecommenderSchemaResponse.fromJson(response);
}