Skip to content

update_provisioning_artifact async

update_provisioning_artifact(
    product_id: Id,
    provisioning_artifact_id: Id,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    name: Optional[ProvisioningArtifactName] = None,
    description: Optional[ProvisioningArtifactDescription] = None,
    active: Optional[ProvisioningArtifactActive] = None,
    guidance: Optional[ProvisioningArtifactGuidance] = None,
) -> UpdateProvisioningArtifactOutput

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

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

Parameters:

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

    The language code.

    • jp - Japanese

    • zh - Chinese

  • product_id (Id) –

    The product identifier.

  • provisioning_artifact_id (Id) –

    The identifier of the provisioning artifact.

  • name (Optional[ProvisioningArtifactName], default: None ) –

    The updated name of the provisioning artifact.

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

    The updated description of the provisioning artifact.

  • active (Optional[ProvisioningArtifactActive], default: None ) –

    Indicates whether the product version is active.

    Inactive provisioning artifacts are invisible to end users. End users cannot launch or update a provisioned product from an inactive provisioning artifact.

  • guidance (Optional[ProvisioningArtifactGuidance], default: None ) –

    Information set by the administrator to provide guidance to end users about which provisioning artifacts to use.

    The DEFAULT value indicates that the product version is active.

    The administrator can set the guidance to DEPRECATED to inform users that the product version is deprecated. Users are able to make updates to a provisioned product of a deprecated version but cannot launch new provisioned products using a deprecated version.

Raises:

Source code in docs_src/capo_service_catalog/_services/async_service_catalog.py
async def update_provisioning_artifact(
    self,
    product_id: "capo_service_catalog.types.id.Id",
    provisioning_artifact_id: "capo_service_catalog.types.id.Id",
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
    name: Optional[
        "capo_service_catalog.types.provisioning_artifact_name.ProvisioningArtifactName"
    ] = None,
    description: Optional[
        "capo_service_catalog.types.provisioning_artifact_description.ProvisioningArtifactDescription"
    ] = None,
    active: Optional[
        "capo_service_catalog.types.provisioning_artifact_active.ProvisioningArtifactActive"
    ] = None,
    guidance: Optional[
        "capo_service_catalog.types.provisioning_artifact_guidance.ProvisioningArtifactGuidance"
    ] = None,
) -> "capo_service_catalog.types.update_provisioning_artifact_output.UpdateProvisioningArtifactOutput":
    """<p>Updates the specified provisioning artifact (also known as a version) for the specified product.</p> <p>You cannot update a provisioning artifact for a product that was shared with you.</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>
        provisioning_artifact_id: <p>The identifier of the provisioning artifact.</p>
        name: <p>The updated name of the provisioning artifact.</p>
        description: <p>The updated description of the provisioning artifact.</p>
        active: <p>Indicates whether the product version is active.</p> <p>Inactive provisioning artifacts are invisible to end users. End users cannot launch or update a provisioned product from an inactive provisioning artifact.</p>
        guidance: <p>Information set by the administrator to provide guidance to end users about which provisioning artifacts to use.</p> <p>The <code>DEFAULT</code> value indicates that the product version is active.</p> <p>The administrator can set the guidance to <code>DEPRECATED</code> to inform users that the product version is deprecated. Users are able to make updates to a provisioned product of a deprecated version but cannot launch new provisioned products using a deprecated version.</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.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.update_provisioning_artifact_input.UpdateProvisioningArtifactInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.update_provisioning_artifact_output.UpdateProvisioningArtifactOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.update_provisioning_artifact

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProvisioningArtifact")
    )
    input_: capo_service_catalog.types.update_provisioning_artifact_input.UpdateProvisioningArtifactInput = {
        "product_id": product_id,
        "provisioning_artifact_id": provisioning_artifact_id,
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if active is not None:
        input_["active"] = active
    if guidance is not None:
        input_["guidance"] = guidance

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