Skip to content

create_id_namespace

create_id_namespace(
    id_namespace_name: EntityName,
    type: IdNamespaceType,
    *,
    config_overrides: Optional[EntityResolutionClientConfig] = None,
    description: Optional[Description] = None,
    input_source_config: Optional[IdNamespaceInputSourceConfig] = None,
    id_mapping_workflow_properties: Optional[
        IdNamespaceIdMappingWorkflowPropertiesList
    ] = None,
    role_arn: Optional[RoleArn] = None,
    tags: Optional[TagMap] = None,
) -> CreateIdNamespaceOutput

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.

Parameters:

  • id_namespace_name (EntityName) –

    The name of the ID namespace.

  • description (Optional[Description], default: None ) –

    The description of the ID namespace.

  • input_source_config (Optional[IdNamespaceInputSourceConfig], default: None ) –

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

  • id_mapping_workflow_properties (Optional[IdNamespaceIdMappingWorkflowPropertiesList], default: None ) –

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

  • type (IdNamespaceType) –

    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.

  • role_arn (Optional[RoleArn], default: None ) –

    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.

  • tags (Optional[TagMap], default: None ) –

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

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request couldn't be processed because of conflict in the current state of the resource. Example: Workflow already exists, Schema already exists, Workflow is currently running, etc.

  • ExceedsLimitException –

    The request was rejected because it attempted to create resources beyond the current Entity Resolution account limits. The error message describes the limit exceeded.

  • InternalServerException –

    This exception occurs when there is an internal failure in the Entity Resolution service.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by Entity Resolution.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_entityresolution/_services/entity_resolution.py
def create_id_namespace(
    self,
    id_namespace_name: "capo_entityresolution.types.entity_name.EntityName",
    type: "capo_entityresolution.types.id_namespace_type.IdNamespaceType",
    *,
    config_overrides: Optional[EntityResolutionClientConfig] = None,
    description: Optional[
        "capo_entityresolution.types.description.Description"
    ] = None,
    input_source_config: Optional[
        "capo_entityresolution.types.id_namespace_input_source_config.IdNamespaceInputSourceConfig"
    ] = None,
    id_mapping_workflow_properties: Optional[
        "capo_entityresolution.types.id_namespace_id_mapping_workflow_properties_list.IdNamespaceIdMappingWorkflowPropertiesList"
    ] = None,
    role_arn: Optional["capo_entityresolution.types.role_arn.RoleArn"] = None,
    tags: Optional["capo_entityresolution.types.tag_map.TagMap"] = None,
) -> (
    "capo_entityresolution.types.create_id_namespace_output.CreateIdNamespaceOutput"
):
    """<p>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.</p>

    Args:
        id_namespace_name: <p>The name of the ID namespace.</p>
        description: <p>The description of the ID namespace.</p>
        input_source_config: <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
        id_mapping_workflow_properties: <p>Determines the properties of <code>IdMappingWorflow</code> where this <code>IdNamespace</code> can be used as a <code>Source</code> or a <code>Target</code>.</p>
        type: <p>The type of ID namespace. There are two types: <code>SOURCE</code> and <code>TARGET</code>. </p> <p>The <code>SOURCE</code> contains configurations for <code>sourceId</code> data that will be processed in an ID mapping workflow. </p> <p>The <code>TARGET</code> contains a configuration of <code>targetId</code> to which all <code>sourceIds</code> will resolve to.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this <code>IdNamespace</code> on your behalf as part of the workflow run.</p>
        tags: <p>The tags used to organize, track, or control access for this resource.</p>

    Raises:
        capo_entityresolution.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </p>
        capo_entityresolution.errors.conflict_exception.ConflictException: <p>The request couldn't be processed because of conflict in the current state of the resource. Example: Workflow already exists, Schema already exists, Workflow is currently running, etc. </p>
        capo_entityresolution.errors.exceeds_limit_exception.ExceedsLimitException: <p>The request was rejected because it attempted to create resources beyond the current Entity Resolution account limits. The error message describes the limit exceeded. </p>
        capo_entityresolution.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Entity Resolution service. </p>
        capo_entityresolution.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_entityresolution.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by Entity Resolution. </p>
        capo_entityresolution.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_entityresolution.types.create_id_namespace_input.CreateIdNamespaceInput]",
    ) -> OperationResponse[
        "capo_entityresolution.types.create_id_namespace_output.CreateIdNamespaceOutput"
    ]:
        import capo_entityresolution._operations.aws_venice_service.create_id_namespace

        output, http_response = (
            capo_entityresolution._operations.aws_venice_service.create_id_namespace.create_id_namespace(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateIdNamespace")
    )
    input_: capo_entityresolution.types.create_id_namespace_input.CreateIdNamespaceInput = {
        "id_namespace_name": id_namespace_name,
        "type": type,
    }
    if description is not None:
        input_["description"] = description
    if input_source_config is not None:
        input_["input_source_config"] = input_source_config
    if id_mapping_workflow_properties is not None:
        input_["id_mapping_workflow_properties"] = id_mapping_workflow_properties
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output