Skip to content

create_provisioning_artifact async

create_provisioning_artifact(
    product_id: Id,
    parameters: ProvisioningArtifactProperties,
    idempotency_token: IdempotencyToken,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
) -> CreateProvisioningArtifactOutput

Creates a provisioning artifact (also known as a version) for the specified product.

You cannot create a provisioning artifact for a product that was shared with you.

The user or role that performs this operation must have the cloudformation:GetTemplate IAM policy permission. This policy permission is required when using the ImportFromPhysicalId template source in the information data section.

Parameters:

  • accept_language (Optional[AcceptLanguage], default: None ) –

    The language code.

    • jp - Japanese

    • zh - Chinese

  • product_id (Id) –

    The product identifier.

  • parameters (ProvisioningArtifactProperties) –

    The configuration for the provisioning artifact.

  • idempotency_token (IdempotencyToken) –

    A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.

Raises:

Source code in docs_src/capo_service_catalog/_services/async_service_catalog.py
async def create_provisioning_artifact(
    self,
    product_id: "capo_service_catalog.types.id.Id",
    parameters: "capo_service_catalog.types.provisioning_artifact_properties.ProvisioningArtifactProperties",
    idempotency_token: "capo_service_catalog.types.idempotency_token.IdempotencyToken",
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
) -> "capo_service_catalog.types.create_provisioning_artifact_output.CreateProvisioningArtifactOutput":
    """<p>Creates a provisioning artifact (also known as a version) for the specified product.</p> <p>You cannot create a provisioning artifact for a product that was shared with you.</p> <p>The user or role that performs this operation must have the <code>cloudformation:GetTemplate</code> IAM policy permission. This policy permission is required when using the <code>ImportFromPhysicalId</code> template source in the information data section.</p>

    Args:
        accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
        product_id: <p>The product identifier.</p>
        parameters: <p>The configuration for the provisioning artifact.</p>
        idempotency_token: <p>A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.</p>

    Raises:
        capo_service_catalog.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the operation are not valid.</p>
        capo_service_catalog.errors.limit_exceeded_exception.LimitExceededException: <p>The current limits of the service would have been exceeded by this operation. Decrease your resource use or increase your service limits and retry the operation.</p>
        capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_service_catalog.types.create_provisioning_artifact_input.CreateProvisioningArtifactInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.create_provisioning_artifact_output.CreateProvisioningArtifactOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.create_provisioning_artifact

        (
            output,
            http_response,
        ) = await capo_service_catalog._operations.aws242_service_catalog_service.create_provisioning_artifact.async_create_provisioning_artifact(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProvisioningArtifact")
    )
    input_: capo_service_catalog.types.create_provisioning_artifact_input.CreateProvisioningArtifactInput = {
        "product_id": product_id,
        "parameters": parameters,
        "idempotency_token": idempotency_token,
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language

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