Skip to content

create_data_product async

create_data_product(
    domain_identifier: DomainId,
    name: DataProductName,
    owning_project_identifier: ProjectId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    description: Optional[DataProductDescription] = None,
    glossary_terms: Optional[GlossaryTerms] = None,
    forms_input: Optional[FormInputList] = None,
    items: Optional[DataProductItems] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateDataProductOutput

Creates a data product.

A data product is a comprehensive package that combines data assets with their associated metadata, documentation, and access controls. It's designed to serve specific business needs or use cases, making it easier for users to find and consume data appropriately. Data products include important information about data quality, freshness, and usage guidelines, effectively bridging the gap between data producers and consumers while ensuring proper governance.

Prerequisites:

  • The domain must exist and be accessible.

  • The owning project must be valid and active.

  • The name must be unique within the domain (no existing data product with the same name).

  • User must have create permissions for data products in the project.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the domain where the data product is created.

  • name (DataProductName) –

    The name of the data product.

  • owning_project_identifier (ProjectId) –

    The ID of the owning project of the data product.

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

    The description of the data product.

  • glossary_terms (Optional[GlossaryTerms], default: None ) –

    The glossary terms of the data product.

  • forms_input (Optional[FormInputList], default: None ) –

    The metadata forms of the data product.

  • items (Optional[DataProductItems], default: None ) –

    The data assets of the data product.

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

    A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def create_data_product(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    name: "capo_datazone.types.data_product_name.DataProductName",
    owning_project_identifier: "capo_datazone.types.project_id.ProjectId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    description: Optional[
        "capo_datazone.types.data_product_description.DataProductDescription"
    ] = None,
    glossary_terms: Optional[
        "capo_datazone.types.glossary_terms.GlossaryTerms"
    ] = None,
    forms_input: Optional[
        "capo_datazone.types.form_input_list.FormInputList"
    ] = None,
    items: Optional[
        "capo_datazone.types.data_product_items.DataProductItems"
    ] = None,
    client_token: Optional["capo_datazone.types.client_token.ClientToken"] = None,
) -> "capo_datazone.types.create_data_product_output.CreateDataProductOutput":
    """<p>Creates a data product.</p> <p>A data product is a comprehensive package that combines data assets with their associated metadata, documentation, and access controls. It's designed to serve specific business needs or use cases, making it easier for users to find and consume data appropriately. Data products include important information about data quality, freshness, and usage guidelines, effectively bridging the gap between data producers and consumers while ensuring proper governance.</p> <p>Prerequisites:</p> <ul> <li> <p>The domain must exist and be accessible. </p> </li> <li> <p>The owning project must be valid and active.</p> </li> <li> <p>The name must be unique within the domain (no existing data product with the same name).</p> </li> <li> <p>User must have create permissions for data products in the project.</p> </li> </ul>

    Args:
        domain_identifier: <p>The ID of the domain where the data product is created.</p>
        name: <p>The name of the data product.</p>
        owning_project_identifier: <p>The ID of the owning project of the data product.</p>
        description: <p>The description of the data product.</p>
        glossary_terms: <p>The glossary terms of the data product.</p>
        forms_input: <p>The metadata forms of the data product.</p>
        items: <p>The data assets of the data product.</p>
        client_token: <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</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.create_data_product_input.CreateDataProductInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.create_data_product_output.CreateDataProductOutput"
    ]:
        import capo_datazone._operations.data_zone.create_data_product

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

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

        return capo_datazone.types.create_data_product_input.redact_sensitive(
            input_
        )

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

        return capo_datazone.types.create_data_product_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateDataProduct",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.create_data_product_input.CreateDataProductInput = {
        "domain_identifier": domain_identifier,
        "name": name,
        "owning_project_identifier": owning_project_identifier,
    }
    if description is not None:
        input_["description"] = description
    if glossary_terms is not None:
        input_["glossary_terms"] = glossary_terms
    if forms_input is not None:
        input_["forms_input"] = forms_input
    if items is not None:
        input_["items"] = items
    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