Skip to content

create_form_type async

create_form_type(
    domain_identifier: DomainId,
    name: FormTypeName,
    model: Model,
    owning_project_identifier: ProjectId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    status: Optional[FormTypeStatus] = None,
    description: Optional[Description] = None,
) -> CreateFormTypeOutput

Creates a metadata form type.

Prerequisites:

  • The domain must exist and be in an ENABLED state.

  • The owning project must exist and be accessible.

  • The name must be unique within the domain.

For custom form types, to indicate that a field should be searchable, annotate it with @amazon.datazone#searchable. By default, searchable fields are indexed for semantic search, where related query terms will match the attribute value even if they are not stemmed or keyword matches. To indicate that a field should be indexed for lexical search (which disables semantic search but supports stemmed and partial matches), annotate it with @amazon.datazone#searchable(modes:["LEXICAL"]). To indicate that a field should be indexed for technical identifier search (for more information on technical identifier search, see: https://aws.amazon.com/blogs/big-data/streamline-data-discovery-with-precise-technical-identifier-search-in-amazon-sagemaker-unified-studio/), annotate it with @amazon.datazone#searchable(modes:["TECHNICAL"]).

To denote that a field will store glossary term ids (which are filterable via the Search/SearchListings APIs), annotate it with @amazon.datazone#glossaryterm("${GLOSSARY_ID}"), where ${GLOSSARY_ID} is the id of the glossary that the glossary terms stored in the field belong to.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the Amazon DataZone domain in which this metadata form type is created.

  • name (FormTypeName) –

    The name of this Amazon DataZone metadata form type.

  • model (Model) –

    The model of this Amazon DataZone metadata form type.

  • owning_project_identifier (ProjectId) –

    The ID of the Amazon DataZone project that owns this metadata form type.

  • status (Optional[FormTypeStatus], default: None ) –

    The status of this Amazon DataZone metadata form type.

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

    The description of this Amazon DataZone metadata form type.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def create_form_type(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    name: "capo_datazone.types.form_type_name.FormTypeName",
    model: "capo_datazone.types.model.Model",
    owning_project_identifier: "capo_datazone.types.project_id.ProjectId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    status: Optional["capo_datazone.types.form_type_status.FormTypeStatus"] = None,
    description: Optional["capo_datazone.types.description.Description"] = None,
) -> "capo_datazone.types.create_form_type_output.CreateFormTypeOutput":
    """<p>Creates a metadata form type.</p> <p>Prerequisites:</p> <ul> <li> <p>The domain must exist and be in an <code>ENABLED</code> state. </p> </li> <li> <p>The owning project must exist and be accessible.</p> </li> <li> <p>The name must be unique within the domain.</p> </li> </ul> <p>For custom form types, to indicate that a field should be searchable, annotate it with <code>@amazon.datazone#searchable</code>. By default, searchable fields are indexed for semantic search, where related query terms will match the attribute value even if they are not stemmed or keyword matches. To indicate that a field should be indexed for lexical search (which disables semantic search but supports stemmed and partial matches), annotate it with <code>@amazon.datazone#searchable(modes:["LEXICAL"])</code>. To indicate that a field should be indexed for technical identifier search (for more information on technical identifier search, see: <a href="https://aws.amazon.com/blogs/big-data/streamline-data-discovery-with-precise-technical-identifier-search-in-amazon-sagemaker-unified-studio/">https://aws.amazon.com/blogs/big-data/streamline-data-discovery-with-precise-technical-identifier-search-in-amazon-sagemaker-unified-studio/</a>), annotate it with <code>@amazon.datazone#searchable(modes:["TECHNICAL"])</code>.</p> <p>To denote that a field will store glossary term ids (which are filterable via the Search/SearchListings APIs), annotate it with <code>@amazon.datazone#glossaryterm("${GLOSSARY_ID}")</code>, where <code>${GLOSSARY_ID}</code> is the id of the glossary that the glossary terms stored in the field belong to. </p>

    Args:
        domain_identifier: <p>The ID of the Amazon DataZone domain in which this metadata form type is created.</p>
        name: <p>The name of this Amazon DataZone metadata form type.</p>
        model: <p>The model of this Amazon DataZone metadata form type.</p>
        owning_project_identifier: <p>The ID of the Amazon DataZone project that owns this metadata form type.</p>
        status: <p>The status of this Amazon DataZone metadata form type.</p>
        description: <p>The description of this Amazon DataZone metadata form type.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.create_form_type_input.CreateFormTypeInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.create_form_type_output.CreateFormTypeOutput"
    ]:
        import capo_datazone._operations.data_zone.create_form_type

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.create_form_type.async_create_form_type(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datazone.types.create_form_type_input.CreateFormTypeInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.create_form_type_input

        return capo_datazone.types.create_form_type_input.redact_sensitive(input_)

    def _redact_output(
        output: "capo_datazone.types.create_form_type_output.CreateFormTypeOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.create_form_type_output

        return capo_datazone.types.create_form_type_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateFormType",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.create_form_type_input.CreateFormTypeInput = {
        "domain_identifier": domain_identifier,
        "name": name,
        "model": model,
        "owning_project_identifier": owning_project_identifier,
    }
    if status is not None:
        input_["status"] = status
    if description is not None:
        input_["description"] = description

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output