Skip to content

put_form_type async

put_form_type(
    name: FormTypeName,
    schema: FormTypeSchema,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    client_token: Optional[HashString] = None,
) -> PutFormTypeResponse

Creates or updates a form type in Glue Data Catalog. A form type defines the schema for structured metadata that can be attached to assets.

Parameters:

  • name (FormTypeName) –

    The name of the form type. Must start with an uppercase letter.

  • schema (FormTypeSchema) –

    The Smithy IDL schema definition for the form type.

  • client_token (Optional[HashString], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def put_form_type(
    self,
    name: "capo_glue.types.form_type_name.FormTypeName",
    schema: "capo_glue.types.form_type_schema.FormTypeSchema",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    client_token: Optional["capo_glue.types.hash_string.HashString"] = None,
) -> "capo_glue.types.put_form_type_response.PutFormTypeResponse":
    """<p>Creates or updates a form type in Glue Data Catalog. A form type defines the schema for structured metadata that can be attached to assets.</p>

    Args:
        name: <p>The name of the form type. Must start with an uppercase letter.</p>
        schema: <p>The Smithy IDL schema definition for the form type.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.throttling_exception.ThrottlingException: <p>The throttling threshhold was exceeded.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.put_form_type_request.PutFormTypeRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.put_form_type_response.PutFormTypeResponse"
    ]:
        import capo_glue._operations.aws_glue.put_form_type

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.put_form_type.async_put_form_type(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutFormType")
    )
    input_: capo_glue.types.put_form_type_request.PutFormTypeRequest = {
        "name": name,
        "schema": schema,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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