createIdNamespace method

Future<CreateIdNamespaceOutput> createIdNamespace({
  1. required String idNamespaceName,
  2. required IdNamespaceType type,
  3. String? description,
  4. List<IdNamespaceIdMappingWorkflowProperties>? idMappingWorkflowProperties,
  5. List<IdNamespaceInputSource>? inputSourceConfig,
  6. String? roleArn,
  7. Map<String, String>? tags,
})

Creates an ID namespace object which will help customers provide metadata explaining their dataset and how to use it. Each ID namespace must have a unique name. To modify an existing ID namespace, use the UpdateIdNamespace API.

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

Parameter idNamespaceName : The name of the ID namespace.

Parameter type : The type of ID namespace. There are two types: SOURCE and TARGET.

The SOURCE contains configurations for sourceId data that will be processed in an ID mapping workflow.

The TARGET contains a configuration of targetId to which all sourceIds will resolve to.

Parameter description : The description of the ID namespace.

Parameter idMappingWorkflowProperties : Determines the properties of IdMappingWorflow where this IdNamespace can be used as a Source or a Target.

Parameter inputSourceConfig : A list of InputSource objects, which have the fields InputSourceARN and SchemaName.

Parameter roleArn : The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this IdNamespace on your behalf as part of the workflow run.

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

Implementation

Future<CreateIdNamespaceOutput> createIdNamespace({
  required String idNamespaceName,
  required IdNamespaceType type,
  String? description,
  List<IdNamespaceIdMappingWorkflowProperties>? idMappingWorkflowProperties,
  List<IdNamespaceInputSource>? inputSourceConfig,
  String? roleArn,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'idNamespaceName': idNamespaceName,
    'type': type.value,
    if (description != null) 'description': description,
    if (idMappingWorkflowProperties != null)
      'idMappingWorkflowProperties': idMappingWorkflowProperties,
    if (inputSourceConfig != null) 'inputSourceConfig': inputSourceConfig,
    if (roleArn != null) 'roleArn': roleArn,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/idnamespaces',
    exceptionFnMap: _exceptionFns,
  );
  return CreateIdNamespaceOutput.fromJson(response);
}