Skip to content

provision_product

provision_product(
    provisioned_product_name: ProvisionedProductName,
    provision_token: IdempotencyToken,
    *,
    config_overrides: Optional[ServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    product_id: Optional[Id] = None,
    product_name: Optional[ProductViewName] = None,
    provisioning_artifact_id: Optional[Id] = None,
    provisioning_artifact_name: Optional[ProvisioningArtifactName] = None,
    path_id: Optional[Id] = None,
    path_name: Optional[PortfolioDisplayName] = None,
    provisioning_parameters: Optional[ProvisioningParameters] = None,
    provisioning_preferences: Optional[ProvisioningPreferences] = None,
    tags: Optional[Tags] = None,
    notification_arns: Optional[NotificationArns] = None,
) -> ProvisionProductOutput

Provisions the specified product.

A provisioned product is a resourced instance of a product. For example, provisioning a product that's based on an CloudFormation template launches an CloudFormation stack and its underlying resources. You can check the status of this request using DescribeRecord.

If the request contains a tag key with an empty list of values, there's a tag conflict for that key. Don't include conflicted keys as tags, or this will cause the error "Parameter validation failed: Missing required parameter in Tags[N]:Value".

When provisioning a product that's been added to a portfolio, you must grant your user, group, or role access to the portfolio. For more information, see Granting users access in the Service Catalog User Guide.

Parameters:

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

    The language code.

    • jp - Japanese

    • zh - Chinese

  • product_id (Optional[Id], default: None ) –

    The product identifier. You must provide the name or ID, but not both.

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

    The name of the product. You must provide the name or ID, but not both.

  • provisioning_artifact_id (Optional[Id], default: None ) –

    The identifier of the provisioning artifact. You must provide the name or ID, but not both.

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

    The name of the provisioning artifact. You must provide the name or ID, but not both.

  • path_id (Optional[Id], default: None ) –

    The path identifier of the product. This value is optional if the product has a default path, and required if the product has more than one path. To list the paths for a product, use ListLaunchPaths. You must provide the name or ID, but not both.

  • path_name (Optional[PortfolioDisplayName], default: None ) –

    The name of the path. You must provide the name or ID, but not both.

  • provisioned_product_name (ProvisionedProductName) –

    A user-friendly name for the provisioned product. This value must be unique for the Amazon Web Services account and cannot be updated after the product is provisioned.

  • provisioning_parameters (Optional[ProvisioningParameters], default: None ) –

    Parameters specified by the administrator that are required for provisioning the product.

  • provisioning_preferences (Optional[ProvisioningPreferences], default: None ) –

    An object that contains information about the provisioning preferences for a stack set.

  • tags (Optional[Tags], default: None ) –

    One or more tags.

  • notification_arns (Optional[NotificationArns], default: None ) –

    Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related events.

  • provision_token (IdempotencyToken) –

    An idempotency token that uniquely identifies the provisioning request.

Raises:

Source code in docs_src/capo_service_catalog/_services/service_catalog.py
def provision_product(
    self,
    provisioned_product_name: "capo_service_catalog.types.provisioned_product_name.ProvisionedProductName",
    provision_token: "capo_service_catalog.types.idempotency_token.IdempotencyToken",
    *,
    config_overrides: Optional[ServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
    product_id: Optional["capo_service_catalog.types.id.Id"] = None,
    product_name: Optional[
        "capo_service_catalog.types.product_view_name.ProductViewName"
    ] = None,
    provisioning_artifact_id: Optional["capo_service_catalog.types.id.Id"] = None,
    provisioning_artifact_name: Optional[
        "capo_service_catalog.types.provisioning_artifact_name.ProvisioningArtifactName"
    ] = None,
    path_id: Optional["capo_service_catalog.types.id.Id"] = None,
    path_name: Optional[
        "capo_service_catalog.types.portfolio_display_name.PortfolioDisplayName"
    ] = None,
    provisioning_parameters: Optional[
        "capo_service_catalog.types.provisioning_parameters.ProvisioningParameters"
    ] = None,
    provisioning_preferences: Optional[
        "capo_service_catalog.types.provisioning_preferences.ProvisioningPreferences"
    ] = None,
    tags: Optional["capo_service_catalog.types.tags.Tags"] = None,
    notification_arns: Optional[
        "capo_service_catalog.types.notification_arns.NotificationArns"
    ] = None,
) -> "capo_service_catalog.types.provision_product_output.ProvisionProductOutput":
    """<p> Provisions the specified product. </p> <p> A provisioned product is a resourced instance of a product. For example, provisioning a product that's based on an CloudFormation template launches an CloudFormation stack and its underlying resources. You can check the status of this request using <a>DescribeRecord</a>. </p> <p> If the request contains a tag key with an empty list of values, there's a tag conflict for that key. Don't include conflicted keys as tags, or this will cause the error "Parameter validation failed: Missing required parameter in Tags[<i>N</i>]:<i>Value</i>". </p> <note> <p> When provisioning a product that's been added to a portfolio, you must grant your user, group, or role access to the portfolio. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/catalogs_portfolios_users.html">Granting users access</a> in the <i>Service Catalog User Guide</i>. </p> </note>

    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. You must provide the name or ID, but not both.</p>
        product_name: <p>The name of the product. You must provide the name or ID, but not both.</p>
        provisioning_artifact_id: <p>The identifier of the provisioning artifact. You must provide the name or ID, but not both.</p>
        provisioning_artifact_name: <p>The name of the provisioning artifact. You must provide the name or ID, but not both.</p>
        path_id: <p>The path identifier of the product. This value is optional if the product has a default path, and required if the product has more than one path. To list the paths for a product, use <a>ListLaunchPaths</a>. You must provide the name or ID, but not both.</p>
        path_name: <p>The name of the path. You must provide the name or ID, but not both.</p>
        provisioned_product_name: <p>A user-friendly name for the provisioned product. This value must be unique for the Amazon Web Services account and cannot be updated after the product is provisioned.</p>
        provisioning_parameters: <p>Parameters specified by the administrator that are required for provisioning the product.</p>
        provisioning_preferences: <p>An object that contains information about the provisioning preferences for a stack set.</p>
        tags: <p>One or more tags.</p>
        notification_arns: <p>Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related events.</p>
        provision_token: <p>An idempotency token that uniquely identifies the provisioning request.</p>

    Raises:
        capo_service_catalog.errors.duplicate_resource_exception.DuplicateResourceException: <p>The specified resource is a duplicate.</p>
        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.
    """

    def _handler(
        req: "OperationRequest[capo_service_catalog.types.provision_product_input.ProvisionProductInput]",
    ) -> OperationResponse[
        "capo_service_catalog.types.provision_product_output.ProvisionProductOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.provision_product

        output, http_response = (
            capo_service_catalog._operations.aws242_service_catalog_service.provision_product.provision_product(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ProvisionProduct")
    )
    input_: capo_service_catalog.types.provision_product_input.ProvisionProductInput = {
        "provisioned_product_name": provisioned_product_name,
        "provision_token": provision_token,
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if product_id is not None:
        input_["product_id"] = product_id
    if product_name is not None:
        input_["product_name"] = product_name
    if provisioning_artifact_id is not None:
        input_["provisioning_artifact_id"] = provisioning_artifact_id
    if provisioning_artifact_name is not None:
        input_["provisioning_artifact_name"] = provisioning_artifact_name
    if path_id is not None:
        input_["path_id"] = path_id
    if path_name is not None:
        input_["path_name"] = path_name
    if provisioning_parameters is not None:
        input_["provisioning_parameters"] = provisioning_parameters
    if provisioning_preferences is not None:
        input_["provisioning_preferences"] = provisioning_preferences
    if tags is not None:
        input_["tags"] = tags
    if notification_arns is not None:
        input_["notification_arns"] = notification_arns

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output