createSchemaMapping method

Future<CreateSchemaMappingOutput> createSchemaMapping({
  1. required List<SchemaInputAttribute> mappedInputFields,
  2. required String schemaName,
  3. String? description,
  4. Map<String, String>? tags,
})

Creates a schema mapping, which defines the schema of the input customer records table. The SchemaMapping also provides Entity Resolution with some metadata about the table, such as the attribute types of the columns and which columns to match on.

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

Parameter mappedInputFields : A list of MappedInputFields. Each MappedInputField corresponds to a column the source data table, and contains column name plus additional information that Entity Resolution uses for matching.

Parameter schemaName : The name of the schema. There can't be multiple SchemaMappings with the same name.

Parameter description : A description of the schema.

Parameter tags : The tags used to organize, track, or control access for this resource.

Implementation

Future<CreateSchemaMappingOutput> createSchemaMapping({
  required List<SchemaInputAttribute> mappedInputFields,
  required String schemaName,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'mappedInputFields': mappedInputFields,
    'schemaName': schemaName,
    if (description != null) 'description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/schemas',
    exceptionFnMap: _exceptionFns,
  );
  return CreateSchemaMappingOutput.fromJson(response);
}