Skip to content

get_form_type async

get_form_type(
    domain_identifier: DomainId,
    form_type_identifier: FormTypeIdentifier,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    revision: Optional[Revision] = None,
) -> GetFormTypeOutput

Gets a metadata form type in Amazon DataZone.

Form types define the structure and validation rules for collecting metadata about assets in Amazon DataZone. They act as templates that ensure consistent metadata capture across similar types of assets, while allowing for customization to meet specific organizational needs. Form types can include required fields, validation rules, and dependencies, helping maintain high-quality metadata that makes data assets more discoverable and usable.

  • The form type with the specified identifier must exist in the given domain.

  • The domain must be valid and active.

  • User must have permission on the form type.

  • The form type should not be deleted or in an invalid state.

One use case for this API is to determine whether a form field is indexed for search.

A searchable field will be annotated 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. If a field is indexed technical identifier search, it will be annotated with @amazon.datazone#searchable(modes:["TECHNICAL"]). If a field is indexed for lexical search (supports stemmed and prefix matches but not semantic matches), it will be annotated with @amazon.datazone#searchable(modes:["LEXICAL"]).

A field storing glossary term IDs (which is filterable) will be annotated with @amazon.datazone#glossaryterm("${glossaryId}").

Parameters:

  • domain_identifier (DomainId) –

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

  • form_type_identifier (FormTypeIdentifier) –

    The ID of the metadata form type.

  • revision (Optional[Revision], default: None ) –

    The revision of this metadata form type.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def get_form_type(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    form_type_identifier: "capo_datazone.types.form_type_identifier.FormTypeIdentifier",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    revision: Optional["capo_datazone.types.revision.Revision"] = None,
) -> "capo_datazone.types.get_form_type_output.GetFormTypeOutput":
    """<p>Gets a metadata form type in Amazon DataZone.</p> <p>Form types define the structure and validation rules for collecting metadata about assets in Amazon DataZone. They act as templates that ensure consistent metadata capture across similar types of assets, while allowing for customization to meet specific organizational needs. Form types can include required fields, validation rules, and dependencies, helping maintain high-quality metadata that makes data assets more discoverable and usable.</p> <ul> <li> <p>The form type with the specified identifier must exist in the given domain. </p> </li> <li> <p>The domain must be valid and active.</p> </li> <li> <p>User must have permission on the form type.</p> </li> <li> <p>The form type should not be deleted or in an invalid state.</p> </li> </ul> <p>One use case for this API is to determine whether a form field is indexed for search. </p> <p>A searchable field will be annotated 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. If a field is indexed technical identifier search, it will be annotated with <code>@amazon.datazone#searchable(modes:["TECHNICAL"])</code>. If a field is indexed for lexical search (supports stemmed and prefix matches but not semantic matches), it will be annotated with <code>@amazon.datazone#searchable(modes:["LEXICAL"])</code>.</p> <p>A field storing glossary term IDs (which is filterable) will be annotated with <code>@amazon.datazone#glossaryterm("${glossaryId}")</code>. </p>

    Args:
        domain_identifier: <p>The ID of the Amazon DataZone domain in which this metadata form type exists.</p>
        form_type_identifier: <p>The ID of the metadata form type.</p>
        revision: <p>The revision of this 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.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</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.get_form_type_input.GetFormTypeInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.get_form_type_output.GetFormTypeOutput"
    ]:
        import capo_datazone._operations.data_zone.get_form_type

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

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

        return capo_datazone.types.get_form_type_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetFormType", redact_output=_redact_output),
    )
    input_: capo_datazone.types.get_form_type_input.GetFormTypeInput = {
        "domain_identifier": domain_identifier,
        "form_type_identifier": form_type_identifier,
    }
    if revision is not None:
        input_["revision"] = revision

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