1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. servicecatalog
  5. ProductVersion
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.servicecatalog.ProductVersion

Explore with Pulumi AI

Provides a Service Catalog Product Version resource.

There can be one or more versions of the product.

For information about Service Catalog Product Version and how to use it, see What is Product Version.

NOTE: Available since v1.230.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultmaeTcE = new alicloud.servicecatalog.Product("defaultmaeTcE", {
    providerName: name,
    productName: name,
    productType: "Ros",
});
const _default = new alicloud.servicecatalog.ProductVersion("default", {
    guidance: "Default",
    templateUrl: "oss://servicecatalog-cn-hangzhou/1466115886172051/terraform/template/tpl-bp1x4v3r44u7u7/template.json",
    active: true,
    description: "产品版本测试",
    productVersionName: name,
    productId: defaultmaeTcE.id,
    templateType: "RosTerraformTemplate",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
defaultmae_tc_e = alicloud.servicecatalog.Product("defaultmaeTcE",
    provider_name=name,
    product_name=name,
    product_type="Ros")
default = alicloud.servicecatalog.ProductVersion("default",
    guidance="Default",
    template_url="oss://servicecatalog-cn-hangzhou/1466115886172051/terraform/template/tpl-bp1x4v3r44u7u7/template.json",
    active=True,
    description="产品版本测试",
    product_version_name=name,
    product_id=defaultmae_tc_e.id,
    template_type="RosTerraformTemplate")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/servicecatalog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		defaultmaeTcE, err := servicecatalog.NewProduct(ctx, "defaultmaeTcE", &servicecatalog.ProductArgs{
			ProviderName: pulumi.String(name),
			ProductName:  pulumi.String(name),
			ProductType:  pulumi.String("Ros"),
		})
		if err != nil {
			return err
		}
		_, err = servicecatalog.NewProductVersion(ctx, "default", &servicecatalog.ProductVersionArgs{
			Guidance:           pulumi.String("Default"),
			TemplateUrl:        pulumi.String("oss://servicecatalog-cn-hangzhou/1466115886172051/terraform/template/tpl-bp1x4v3r44u7u7/template.json"),
			Active:             pulumi.Bool(true),
			Description:        pulumi.String("产品版本测试"),
			ProductVersionName: pulumi.String(name),
			ProductId:          defaultmaeTcE.ID(),
			TemplateType:       pulumi.String("RosTerraformTemplate"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var defaultmaeTcE = new AliCloud.ServiceCatalog.Product("defaultmaeTcE", new()
    {
        ProviderName = name,
        ProductName = name,
        ProductType = "Ros",
    });

    var @default = new AliCloud.ServiceCatalog.ProductVersion("default", new()
    {
        Guidance = "Default",
        TemplateUrl = "oss://servicecatalog-cn-hangzhou/1466115886172051/terraform/template/tpl-bp1x4v3r44u7u7/template.json",
        Active = true,
        Description = "产品版本测试",
        ProductVersionName = name,
        ProductId = defaultmaeTcE.Id,
        TemplateType = "RosTerraformTemplate",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.servicecatalog.Product;
import com.pulumi.alicloud.servicecatalog.ProductArgs;
import com.pulumi.alicloud.servicecatalog.ProductVersion;
import com.pulumi.alicloud.servicecatalog.ProductVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        var defaultmaeTcE = new Product("defaultmaeTcE", ProductArgs.builder()
            .providerName(name)
            .productName(name)
            .productType("Ros")
            .build());

        var default_ = new ProductVersion("default", ProductVersionArgs.builder()
            .guidance("Default")
            .templateUrl("oss://servicecatalog-cn-hangzhou/1466115886172051/terraform/template/tpl-bp1x4v3r44u7u7/template.json")
            .active(true)
            .description("产品版本测试")
            .productVersionName(name)
            .productId(defaultmaeTcE.id())
            .templateType("RosTerraformTemplate")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  defaultmaeTcE:
    type: alicloud:servicecatalog:Product
    properties:
      providerName: ${name}
      productName: ${name}
      productType: Ros
  default:
    type: alicloud:servicecatalog:ProductVersion
    properties:
      guidance: Default
      templateUrl: oss://servicecatalog-cn-hangzhou/1466115886172051/terraform/template/tpl-bp1x4v3r44u7u7/template.json
      active: true
      description: 产品版本测试
      productVersionName: ${name}
      productId: ${defaultmaeTcE.id}
      templateType: RosTerraformTemplate
Copy

Create ProductVersion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ProductVersion(name: string, args: ProductVersionArgs, opts?: CustomResourceOptions);
@overload
def ProductVersion(resource_name: str,
                   args: ProductVersionArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ProductVersion(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   product_id: Optional[str] = None,
                   product_version_name: Optional[str] = None,
                   template_type: Optional[str] = None,
                   template_url: Optional[str] = None,
                   active: Optional[bool] = None,
                   description: Optional[str] = None,
                   guidance: Optional[str] = None)
func NewProductVersion(ctx *Context, name string, args ProductVersionArgs, opts ...ResourceOption) (*ProductVersion, error)
public ProductVersion(string name, ProductVersionArgs args, CustomResourceOptions? opts = null)
public ProductVersion(String name, ProductVersionArgs args)
public ProductVersion(String name, ProductVersionArgs args, CustomResourceOptions options)
type: alicloud:servicecatalog:ProductVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProductVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProductVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProductVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProductVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProductVersionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var productVersionResource = new AliCloud.ServiceCatalog.ProductVersion("productVersionResource", new()
{
    ProductId = "string",
    ProductVersionName = "string",
    TemplateType = "string",
    TemplateUrl = "string",
    Active = false,
    Description = "string",
    Guidance = "string",
});
Copy
example, err := servicecatalog.NewProductVersion(ctx, "productVersionResource", &servicecatalog.ProductVersionArgs{
	ProductId:          pulumi.String("string"),
	ProductVersionName: pulumi.String("string"),
	TemplateType:       pulumi.String("string"),
	TemplateUrl:        pulumi.String("string"),
	Active:             pulumi.Bool(false),
	Description:        pulumi.String("string"),
	Guidance:           pulumi.String("string"),
})
Copy
var productVersionResource = new ProductVersion("productVersionResource", ProductVersionArgs.builder()
    .productId("string")
    .productVersionName("string")
    .templateType("string")
    .templateUrl("string")
    .active(false)
    .description("string")
    .guidance("string")
    .build());
Copy
product_version_resource = alicloud.servicecatalog.ProductVersion("productVersionResource",
    product_id="string",
    product_version_name="string",
    template_type="string",
    template_url="string",
    active=False,
    description="string",
    guidance="string")
Copy
const productVersionResource = new alicloud.servicecatalog.ProductVersion("productVersionResource", {
    productId: "string",
    productVersionName: "string",
    templateType: "string",
    templateUrl: "string",
    active: false,
    description: "string",
    guidance: "string",
});
Copy
type: alicloud:servicecatalog:ProductVersion
properties:
    active: false
    description: string
    guidance: string
    productId: string
    productVersionName: string
    templateType: string
    templateUrl: string
Copy

ProductVersion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ProductVersion resource accepts the following input properties:

ProductId
This property is required.
Changes to this property will trigger replacement.
string
Product ID
ProductVersionName This property is required. string
The name of the resource
TemplateType
This property is required.
Changes to this property will trigger replacement.
string
Template Type
TemplateUrl
This property is required.
Changes to this property will trigger replacement.
string
Template URL
Active bool
Whether the version is activated
Description string
Version description
Guidance string
Administrator guidance
ProductId
This property is required.
Changes to this property will trigger replacement.
string
Product ID
ProductVersionName This property is required. string
The name of the resource
TemplateType
This property is required.
Changes to this property will trigger replacement.
string
Template Type
TemplateUrl
This property is required.
Changes to this property will trigger replacement.
string
Template URL
Active bool
Whether the version is activated
Description string
Version description
Guidance string
Administrator guidance
productId
This property is required.
Changes to this property will trigger replacement.
String
Product ID
productVersionName This property is required. String
The name of the resource
templateType
This property is required.
Changes to this property will trigger replacement.
String
Template Type
templateUrl
This property is required.
Changes to this property will trigger replacement.
String
Template URL
active Boolean
Whether the version is activated
description String
Version description
guidance String
Administrator guidance
productId
This property is required.
Changes to this property will trigger replacement.
string
Product ID
productVersionName This property is required. string
The name of the resource
templateType
This property is required.
Changes to this property will trigger replacement.
string
Template Type
templateUrl
This property is required.
Changes to this property will trigger replacement.
string
Template URL
active boolean
Whether the version is activated
description string
Version description
guidance string
Administrator guidance
product_id
This property is required.
Changes to this property will trigger replacement.
str
Product ID
product_version_name This property is required. str
The name of the resource
template_type
This property is required.
Changes to this property will trigger replacement.
str
Template Type
template_url
This property is required.
Changes to this property will trigger replacement.
str
Template URL
active bool
Whether the version is activated
description str
Version description
guidance str
Administrator guidance
productId
This property is required.
Changes to this property will trigger replacement.
String
Product ID
productVersionName This property is required. String
The name of the resource
templateType
This property is required.
Changes to this property will trigger replacement.
String
Template Type
templateUrl
This property is required.
Changes to this property will trigger replacement.
String
Template URL
active Boolean
Whether the version is activated
description String
Version description
guidance String
Administrator guidance

Outputs

All input properties are implicitly available as output properties. Additionally, the ProductVersion resource produces the following output properties:

CreateTime string
The creation time of the resource
Id string
The provider-assigned unique ID for this managed resource.
CreateTime string
The creation time of the resource
Id string
The provider-assigned unique ID for this managed resource.
createTime String
The creation time of the resource
id String
The provider-assigned unique ID for this managed resource.
createTime string
The creation time of the resource
id string
The provider-assigned unique ID for this managed resource.
create_time str
The creation time of the resource
id str
The provider-assigned unique ID for this managed resource.
createTime String
The creation time of the resource
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ProductVersion Resource

Get an existing ProductVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ProductVersionState, opts?: CustomResourceOptions): ProductVersion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        active: Optional[bool] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        guidance: Optional[str] = None,
        product_id: Optional[str] = None,
        product_version_name: Optional[str] = None,
        template_type: Optional[str] = None,
        template_url: Optional[str] = None) -> ProductVersion
func GetProductVersion(ctx *Context, name string, id IDInput, state *ProductVersionState, opts ...ResourceOption) (*ProductVersion, error)
public static ProductVersion Get(string name, Input<string> id, ProductVersionState? state, CustomResourceOptions? opts = null)
public static ProductVersion get(String name, Output<String> id, ProductVersionState state, CustomResourceOptions options)
resources:  _:    type: alicloud:servicecatalog:ProductVersion    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Active bool
Whether the version is activated
CreateTime string
The creation time of the resource
Description string
Version description
Guidance string
Administrator guidance
ProductId Changes to this property will trigger replacement. string
Product ID
ProductVersionName string
The name of the resource
TemplateType Changes to this property will trigger replacement. string
Template Type
TemplateUrl Changes to this property will trigger replacement. string
Template URL
Active bool
Whether the version is activated
CreateTime string
The creation time of the resource
Description string
Version description
Guidance string
Administrator guidance
ProductId Changes to this property will trigger replacement. string
Product ID
ProductVersionName string
The name of the resource
TemplateType Changes to this property will trigger replacement. string
Template Type
TemplateUrl Changes to this property will trigger replacement. string
Template URL
active Boolean
Whether the version is activated
createTime String
The creation time of the resource
description String
Version description
guidance String
Administrator guidance
productId Changes to this property will trigger replacement. String
Product ID
productVersionName String
The name of the resource
templateType Changes to this property will trigger replacement. String
Template Type
templateUrl Changes to this property will trigger replacement. String
Template URL
active boolean
Whether the version is activated
createTime string
The creation time of the resource
description string
Version description
guidance string
Administrator guidance
productId Changes to this property will trigger replacement. string
Product ID
productVersionName string
The name of the resource
templateType Changes to this property will trigger replacement. string
Template Type
templateUrl Changes to this property will trigger replacement. string
Template URL
active bool
Whether the version is activated
create_time str
The creation time of the resource
description str
Version description
guidance str
Administrator guidance
product_id Changes to this property will trigger replacement. str
Product ID
product_version_name str
The name of the resource
template_type Changes to this property will trigger replacement. str
Template Type
template_url Changes to this property will trigger replacement. str
Template URL
active Boolean
Whether the version is activated
createTime String
The creation time of the resource
description String
Version description
guidance String
Administrator guidance
productId Changes to this property will trigger replacement. String
Product ID
productVersionName String
The name of the resource
templateType Changes to this property will trigger replacement. String
Template Type
templateUrl Changes to this property will trigger replacement. String
Template URL

Import

Service Catalog Product Version can be imported using the id, e.g.

$ pulumi import alicloud:servicecatalog/productVersion:ProductVersion example <id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.