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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args ProductVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ProductVersionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProductVersionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var productVersionResource = new ProductVersion("productVersionResource", ProductVersionArgs.builder()
.productId("string")
.productVersionName("string")
.templateType("string")
.templateUrl("string")
.active(false)
.description("string")
.guidance("string")
.build());
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")
const productVersionResource = new alicloud.servicecatalog.ProductVersion("productVersionResource", {
productId: "string",
productVersionName: "string",
templateType: "string",
templateUrl: "string",
active: false,
description: "string",
guidance: "string",
});
type: alicloud:servicecatalog:ProductVersion
properties:
active: false
description: string
guidance: string
productId: string
productVersionName: string
templateType: string
templateUrl: string
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:
- Product
Id string - Product ID
- Product
Version stringName - The name of the resource
- Template
Type string - Template Type
- Template
Url string - Template URL
- Active bool
- Whether the version is activated
- Description string
- Version description
- Guidance string
- Administrator guidance
- Product
Id string - Product ID
- Product
Version stringName - The name of the resource
- Template
Type string - Template Type
- Template
Url string - Template URL
- Active bool
- Whether the version is activated
- Description string
- Version description
- Guidance string
- Administrator guidance
- product
Id String - Product ID
- product
Version StringName - The name of the resource
- template
Type String - Template Type
- template
Url String - Template URL
- active Boolean
- Whether the version is activated
- description String
- Version description
- guidance String
- Administrator guidance
- product
Id string - Product ID
- product
Version stringName - The name of the resource
- template
Type string - Template Type
- template
Url string - Template URL
- active boolean
- Whether the version is activated
- description string
- Version description
- guidance string
- Administrator guidance
- product_
id str - Product ID
- product_
version_ strname - The name of the resource
- template_
type str - Template Type
- template_
url str - Template URL
- active bool
- Whether the version is activated
- description str
- Version description
- guidance str
- Administrator guidance
- product
Id String - Product ID
- product
Version StringName - The name of the resource
- template
Type String - Template Type
- template
Url 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:
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time 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.
- create
Time 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Active bool
- Whether the version is activated
- Create
Time string - The creation time of the resource
- Description string
- Version description
- Guidance string
- Administrator guidance
- Product
Id string - Product ID
- Product
Version stringName - The name of the resource
- Template
Type string - Template Type
- Template
Url string - Template URL
- Active bool
- Whether the version is activated
- Create
Time string - The creation time of the resource
- Description string
- Version description
- Guidance string
- Administrator guidance
- Product
Id string - Product ID
- Product
Version stringName - The name of the resource
- Template
Type string - Template Type
- Template
Url string - Template URL
- active Boolean
- Whether the version is activated
- create
Time String - The creation time of the resource
- description String
- Version description
- guidance String
- Administrator guidance
- product
Id String - Product ID
- product
Version StringName - The name of the resource
- template
Type String - Template Type
- template
Url String - Template URL
- active boolean
- Whether the version is activated
- create
Time string - The creation time of the resource
- description string
- Version description
- guidance string
- Administrator guidance
- product
Id string - Product ID
- product
Version stringName - The name of the resource
- template
Type string - Template Type
- template
Url 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 str - Product ID
- product_
version_ strname - The name of the resource
- template_
type str - Template Type
- template_
url str - Template URL
- active Boolean
- Whether the version is activated
- create
Time String - The creation time of the resource
- description String
- Version description
- guidance String
- Administrator guidance
- product
Id String - Product ID
- product
Version StringName - The name of the resource
- template
Type String - Template Type
- template
Url String - Template URL
Import
Service Catalog Product Version can be imported using the id, e.g.
$ pulumi import alicloud:servicecatalog/productVersion:ProductVersion example <id>
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.