Skip to content

create_provisioned_product_plan

create_provisioned_product_plan(
    plan_name: ProvisionedProductPlanName,
    plan_type: ProvisionedProductPlanType,
    product_id: Id,
    provisioned_product_name: ProvisionedProductName,
    provisioning_artifact_id: Id,
    idempotency_token: IdempotencyToken,
    *,
    config_overrides: Optional[ServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    notification_arns: Optional[NotificationArns] = None,
    path_id: Optional[Id] = None,
    provisioning_parameters: Optional[UpdateProvisioningParameters] = None,
    tags: Optional[Tags] = None,
) -> CreateProvisionedProductPlanOutput

Creates a plan.

A plan includes the list of resources to be created (when provisioning a new product) or modified (when updating a provisioned product) when the plan is executed.

You can create one plan for each provisioned product. To create a plan for an existing provisioned product, the product status must be AVAILABLE or TAINTED.

To view the resource changes in the change set, use DescribeProvisionedProductPlan. To create or modify the provisioned product, use ExecuteProvisionedProductPlan.

Parameters:

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

    The language code.

    • jp - Japanese

    • zh - Chinese

  • plan_name (ProvisionedProductPlanName) –

    The name of the plan.

  • plan_type (ProvisionedProductPlanType) –

    The plan type.

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

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

  • 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.

  • product_id (Id) –

    The product identifier.

  • 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_artifact_id (Id) –

    The identifier of the provisioning artifact.

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

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

  • 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.

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

    One or more tags.

    If the plan is for an existing provisioned product, the product must have a RESOURCE_UPDATE constraint with TagUpdatesOnProvisionedProduct set to ALLOWED to allow tag updates.

Raises:

Source code in docs_src/capo_service_catalog/_services/service_catalog.py
def create_provisioned_product_plan(
    self,
    plan_name: "capo_service_catalog.types.provisioned_product_plan_name.ProvisionedProductPlanName",
    plan_type: "capo_service_catalog.types.provisioned_product_plan_type.ProvisionedProductPlanType",
    product_id: "capo_service_catalog.types.id.Id",
    provisioned_product_name: "capo_service_catalog.types.provisioned_product_name.ProvisionedProductName",
    provisioning_artifact_id: "capo_service_catalog.types.id.Id",
    idempotency_token: "capo_service_catalog.types.idempotency_token.IdempotencyToken",
    *,
    config_overrides: Optional[ServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
    notification_arns: Optional[
        "capo_service_catalog.types.notification_arns.NotificationArns"
    ] = None,
    path_id: Optional["capo_service_catalog.types.id.Id"] = None,
    provisioning_parameters: Optional[
        "capo_service_catalog.types.update_provisioning_parameters.UpdateProvisioningParameters"
    ] = None,
    tags: Optional["capo_service_catalog.types.tags.Tags"] = None,
) -> "capo_service_catalog.types.create_provisioned_product_plan_output.CreateProvisionedProductPlanOutput":
    """<p>Creates a plan.</p> <p>A plan includes the list of resources to be created (when provisioning a new product) or modified (when updating a provisioned product) when the plan is executed.</p> <p>You can create one plan for each provisioned product. To create a plan for an existing provisioned product, the product status must be AVAILABLE or TAINTED.</p> <p>To view the resource changes in the change set, use <a>DescribeProvisionedProductPlan</a>. To create or modify the provisioned product, use <a>ExecuteProvisionedProductPlan</a>.</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>
        plan_name: <p>The name of the plan.</p>
        plan_type: <p>The plan type.</p>
        notification_arns: <p>Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related events.</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>.</p>
        product_id: <p>The product identifier.</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_artifact_id: <p>The identifier of the provisioning artifact.</p>
        provisioning_parameters: <p>Parameters specified by the administrator that are required for provisioning the product.</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>
        tags: <p>One or more tags.</p> <p>If the plan is for an existing provisioned product, the product must have a <code>RESOURCE_UPDATE</code> constraint with <code>TagUpdatesOnProvisionedProduct</code> set to <code>ALLOWED</code> to allow tag updates.</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.invalid_state_exception.InvalidStateException: <p>An attempt was made to modify a resource that is in a state that is not valid. Check your resources to ensure that they are in valid states before retrying 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.
    """

    def _handler(
        req: "OperationRequest[capo_service_catalog.types.create_provisioned_product_plan_input.CreateProvisionedProductPlanInput]",
    ) -> OperationResponse[
        "capo_service_catalog.types.create_provisioned_product_plan_output.CreateProvisionedProductPlanOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.create_provisioned_product_plan

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProvisionedProductPlan")
    )
    input_: capo_service_catalog.types.create_provisioned_product_plan_input.CreateProvisionedProductPlanInput = {
        "plan_name": plan_name,
        "plan_type": plan_type,
        "product_id": product_id,
        "provisioned_product_name": provisioned_product_name,
        "provisioning_artifact_id": provisioning_artifact_id,
        "idempotency_token": idempotency_token,
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if notification_arns is not None:
        input_["notification_arns"] = notification_arns
    if path_id is not None:
        input_["path_id"] = path_id
    if provisioning_parameters is not None:
        input_["provisioning_parameters"] = provisioning_parameters
    if tags is not None:
        input_["tags"] = tags

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