Skip to content

start_metadata_generation_run async

start_metadata_generation_run(
    domain_identifier: DomainId,
    target: MetadataGenerationRunTarget,
    owning_project_identifier: ProjectId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    type: Optional[MetadataGenerationRunType] = None,
    types: Optional[MetadataGenerationRunTypes] = None,
    client_token: Optional[ClientToken] = None,
) -> StartMetadataGenerationRunOutput

Starts the metadata generation run.

Prerequisites:

  • Asset must be created and belong to the specified domain and project.

  • Asset type must be supported for metadata generation (e.g., Amazon Web Services Glue table).

  • Asset must have a structured schema with valid rows and columns.

  • Valid values for --type: BUSINESS_DESCRIPTIONS, BUSINESS_NAMES, BUSINESS_GLOSSARY_ASSOCIATIONS.

  • The user must have permission to run metadata generation in the domain/project.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the Amazon DataZone domain where you want to start a metadata generation run.

  • type (Optional[MetadataGenerationRunType], default: None ) –

    The type of the metadata generation run.

  • types (Optional[MetadataGenerationRunTypes], default: None ) –

    The types of the metadata generation run.

  • target (MetadataGenerationRunTarget) –

    The asset for which you want to start a metadata generation run.

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

    A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.

  • owning_project_identifier (ProjectId) –

    The ID of the project that owns the asset for which you want to start a metadata generation run.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def start_metadata_generation_run(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    target: "capo_datazone.types.metadata_generation_run_target.MetadataGenerationRunTarget",
    owning_project_identifier: "capo_datazone.types.project_id.ProjectId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    type: Optional[
        "capo_datazone.types.metadata_generation_run_type.MetadataGenerationRunType"
    ] = None,
    types: Optional[
        "capo_datazone.types.metadata_generation_run_types.MetadataGenerationRunTypes"
    ] = None,
    client_token: Optional["capo_datazone.types.client_token.ClientToken"] = None,
) -> "capo_datazone.types.start_metadata_generation_run_output.StartMetadataGenerationRunOutput":
    """<p>Starts the metadata generation run.</p> <p>Prerequisites:</p> <ul> <li> <p>Asset must be created and belong to the specified domain and project. </p> </li> <li> <p>Asset type must be supported for metadata generation (e.g., Amazon Web Services Glue table).</p> </li> <li> <p>Asset must have a structured schema with valid rows and columns.</p> </li> <li> <p>Valid values for --type: BUSINESS_DESCRIPTIONS, BUSINESS_NAMES, BUSINESS_GLOSSARY_ASSOCIATIONS.</p> </li> <li> <p>The user must have permission to run metadata generation in the domain/project.</p> </li> </ul>

    Args:
        domain_identifier: <p>The ID of the Amazon DataZone domain where you want to start a metadata generation run.</p>
        type: <p>The type of the metadata generation run.</p>
        types: <p>The types of the metadata generation run.</p>
        target: <p>The asset for which you want to start a metadata generation run.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
        owning_project_identifier: <p>The ID of the project that owns the asset for which you want to start a metadata generation run.</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.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</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.start_metadata_generation_run_input.StartMetadataGenerationRunInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.start_metadata_generation_run_output.StartMetadataGenerationRunOutput"
    ]:
        import capo_datazone._operations.data_zone.start_metadata_generation_run

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartMetadataGenerationRun")
    )
    input_: capo_datazone.types.start_metadata_generation_run_input.StartMetadataGenerationRunInput = {
        "domain_identifier": domain_identifier,
        "target": target,
        "owning_project_identifier": owning_project_identifier,
    }
    if type is not None:
        input_["type"] = type
    if types is not None:
        input_["types"] = types
    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