Skip to content

update_product async

update_product(
    id: Id,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    name: Optional[ProductViewName] = None,
    owner: Optional[ProductViewOwner] = None,
    description: Optional[ProductViewShortDescription] = None,
    distributor: Optional[ProductViewOwner] = None,
    support_description: Optional[SupportDescription] = None,
    support_email: Optional[SupportEmail] = None,
    support_url: Optional[SupportUrl] = None,
    add_tags: Optional[AddTags] = None,
    remove_tags: Optional[TagKeys] = None,
    source_connection: Optional[SourceConnection] = None,
) -> UpdateProductOutput

Updates the specified product.

Parameters:

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

    The language code.

    • jp - Japanese

    • zh - Chinese

  • id (Id) –

    The product identifier.

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

    The updated product name.

  • owner (Optional[ProductViewOwner], default: None ) –

    The updated owner of the product.

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

    The updated description of the product.

  • distributor (Optional[ProductViewOwner], default: None ) –

    The updated distributor of the product.

  • support_description (Optional[SupportDescription], default: None ) –

    The updated support description for the product.

  • support_email (Optional[SupportEmail], default: None ) –

    The updated support email for the product.

  • support_url (Optional[SupportUrl], default: None ) –

    The updated support URL for the product.

  • add_tags (Optional[AddTags], default: None ) –

    The tags to add to the product.

  • remove_tags (Optional[TagKeys], default: None ) –

    The tags to remove from the product.

  • source_connection (Optional[SourceConnection], default: None ) –

    Specifies connection details for the updated product and syncs the product to the connection source artifact. This automatically manages the product's artifacts based on changes to the source. The SourceConnection parameter consists of the following sub-fields.

    • Type

    • ConnectionParamters

Raises:

  • InvalidParametersException –

    One or more parameters provided to the operation are not valid.

  • ResourceNotFoundException –

    The specified resource was not found.

  • TagOptionNotMigratedException –

    An operation requiring TagOptions failed because the TagOptions migration process has not been performed for this account. Use the Amazon Web Services Management Console to perform the migration process before retrying the operation.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_service_catalog/_services/async_service_catalog.py
async def update_product(
    self,
    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.product_view_name.ProductViewName"
    ] = None,
    owner: Optional[
        "capo_service_catalog.types.product_view_owner.ProductViewOwner"
    ] = None,
    description: Optional[
        "capo_service_catalog.types.product_view_short_description.ProductViewShortDescription"
    ] = None,
    distributor: Optional[
        "capo_service_catalog.types.product_view_owner.ProductViewOwner"
    ] = None,
    support_description: Optional[
        "capo_service_catalog.types.support_description.SupportDescription"
    ] = None,
    support_email: Optional[
        "capo_service_catalog.types.support_email.SupportEmail"
    ] = None,
    support_url: Optional[
        "capo_service_catalog.types.support_url.SupportUrl"
    ] = None,
    add_tags: Optional["capo_service_catalog.types.add_tags.AddTags"] = None,
    remove_tags: Optional["capo_service_catalog.types.tag_keys.TagKeys"] = None,
    source_connection: Optional[
        "capo_service_catalog.types.source_connection.SourceConnection"
    ] = None,
) -> "capo_service_catalog.types.update_product_output.UpdateProductOutput":
    """<p>Updates the specified product.</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>
        id: <p>The product identifier.</p>
        name: <p>The updated product name.</p>
        owner: <p>The updated owner of the product.</p>
        description: <p>The updated description of the product.</p>
        distributor: <p>The updated distributor of the product.</p>
        support_description: <p>The updated support description for the product.</p>
        support_email: <p>The updated support email for the product.</p>
        support_url: <p>The updated support URL for the product.</p>
        add_tags: <p>The tags to add to the product.</p>
        remove_tags: <p>The tags to remove from the product.</p>
        source_connection: <p>Specifies connection details for the updated product and syncs the product to the connection source artifact. This automatically manages the product's artifacts based on changes to the source. The <code>SourceConnection</code> parameter consists of the following sub-fields.</p> <ul> <li> <p> <code>Type</code> </p> </li> <li> <p> <code>ConnectionParamters</code> </p> </li> </ul>

    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.tag_option_not_migrated_exception.TagOptionNotMigratedException: <p>An operation requiring TagOptions failed because the TagOptions migration process has not been performed for this account. Use the Amazon Web Services Management Console to perform the migration process before retrying the operation.</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_product_input.UpdateProductInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.update_product_output.UpdateProductOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.update_product

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProduct")
    )
    input_: capo_service_catalog.types.update_product_input.UpdateProductInput = {
        "id": id
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if name is not None:
        input_["name"] = name
    if owner is not None:
        input_["owner"] = owner
    if description is not None:
        input_["description"] = description
    if distributor is not None:
        input_["distributor"] = distributor
    if support_description is not None:
        input_["support_description"] = support_description
    if support_email is not None:
        input_["support_email"] = support_email
    if support_url is not None:
        input_["support_url"] = support_url
    if add_tags is not None:
        input_["add_tags"] = add_tags
    if remove_tags is not None:
        input_["remove_tags"] = remove_tags
    if source_connection is not None:
        input_["source_connection"] = source_connection

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