alicloud.servicecatalog.Product
Explore with Pulumi AI
Provides a Service Catalog Product resource.
Service catalog product, IaC template encapsulation concept.
For information about Service Catalog Product and how to use it, see What is Product.
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 _default = new alicloud.servicecatalog.Product("default", {
providerName: name,
description: "desc",
productName: name,
productType: "Ros",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.servicecatalog.Product("default",
provider_name=name,
description="desc",
product_name=name,
product_type="Ros")
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
}
_, err := servicecatalog.NewProduct(ctx, "default", &servicecatalog.ProductArgs{
ProviderName: pulumi.String(name),
Description: pulumi.String("desc"),
ProductName: pulumi.String(name),
ProductType: pulumi.String("Ros"),
})
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 @default = new AliCloud.ServiceCatalog.Product("default", new()
{
ProviderName = name,
Description = "desc",
ProductName = name,
ProductType = "Ros",
});
});
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 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 default_ = new Product("default", ProductArgs.builder()
.providerName(name)
.description("desc")
.productName(name)
.productType("Ros")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:servicecatalog:Product
properties:
providerName: ${name}
description: desc
productName: ${name}
productType: Ros
Create Product Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Product(name: string, args: ProductArgs, opts?: CustomResourceOptions);
@overload
def Product(resource_name: str,
args: ProductArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Product(resource_name: str,
opts: Optional[ResourceOptions] = None,
product_name: Optional[str] = None,
product_type: Optional[str] = None,
provider_name: Optional[str] = None,
description: Optional[str] = None)
func NewProduct(ctx *Context, name string, args ProductArgs, opts ...ResourceOption) (*Product, error)
public Product(string name, ProductArgs args, CustomResourceOptions? opts = null)
public Product(String name, ProductArgs args)
public Product(String name, ProductArgs args, CustomResourceOptions options)
type: alicloud:servicecatalog:Product
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 ProductArgs
- 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 ProductArgs
- 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 ProductArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProductArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProductArgs
- 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 alicloudProductResource = new AliCloud.ServiceCatalog.Product("alicloudProductResource", new()
{
ProductName = "string",
ProductType = "string",
ProviderName = "string",
Description = "string",
});
example, err := servicecatalog.NewProduct(ctx, "alicloudProductResource", &servicecatalog.ProductArgs{
ProductName: pulumi.String("string"),
ProductType: pulumi.String("string"),
ProviderName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var alicloudProductResource = new Product("alicloudProductResource", ProductArgs.builder()
.productName("string")
.productType("string")
.providerName("string")
.description("string")
.build());
alicloud_product_resource = alicloud.servicecatalog.Product("alicloudProductResource",
product_name="string",
product_type="string",
provider_name="string",
description="string")
const alicloudProductResource = new alicloud.servicecatalog.Product("alicloudProductResource", {
productName: "string",
productType: "string",
providerName: "string",
description: "string",
});
type: alicloud:servicecatalog:Product
properties:
description: string
productName: string
productType: string
providerName: string
Product 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 Product resource accepts the following input properties:
- Product
Name string - The name of the product
- Product
Type string - The type of the product
- Provider
Name string - The provider name of the product
- Description string
- The description of the product
- Product
Name string - The name of the product
- Product
Type string - The type of the product
- Provider
Name string - The provider name of the product
- Description string
- The description of the product
- product
Name String - The name of the product
- product
Type String - The type of the product
- provider
Name String - The provider name of the product
- description String
- The description of the product
- product
Name string - The name of the product
- product
Type string - The type of the product
- provider
Name string - The provider name of the product
- description string
- The description of the product
- product_
name str - The name of the product
- product_
type str - The type of the product
- provider_
name str - The provider name of the product
- description str
- The description of the product
- product
Name String - The name of the product
- product
Type String - The type of the product
- provider
Name String - The provider name of the product
- description String
- The description of the product
Outputs
All input properties are implicitly available as output properties. Additionally, the Product resource produces the following output properties:
- Create
Time string - The creation time of the product
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The creation time of the product
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the product
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - The creation time of the product
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - The creation time of the product
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the product
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Product Resource
Get an existing Product 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?: ProductState, opts?: CustomResourceOptions): Product
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
product_name: Optional[str] = None,
product_type: Optional[str] = None,
provider_name: Optional[str] = None) -> Product
func GetProduct(ctx *Context, name string, id IDInput, state *ProductState, opts ...ResourceOption) (*Product, error)
public static Product Get(string name, Input<string> id, ProductState? state, CustomResourceOptions? opts = null)
public static Product get(String name, Output<String> id, ProductState 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.
- Create
Time string - The creation time of the product
- Description string
- The description of the product
- Product
Name string - The name of the product
- Product
Type string - The type of the product
- Provider
Name string - The provider name of the product
- Create
Time string - The creation time of the product
- Description string
- The description of the product
- Product
Name string - The name of the product
- Product
Type string - The type of the product
- Provider
Name string - The provider name of the product
- create
Time String - The creation time of the product
- description String
- The description of the product
- product
Name String - The name of the product
- product
Type String - The type of the product
- provider
Name String - The provider name of the product
- create
Time string - The creation time of the product
- description string
- The description of the product
- product
Name string - The name of the product
- product
Type string - The type of the product
- provider
Name string - The provider name of the product
- create_
time str - The creation time of the product
- description str
- The description of the product
- product_
name str - The name of the product
- product_
type str - The type of the product
- provider_
name str - The provider name of the product
- create
Time String - The creation time of the product
- description String
- The description of the product
- product
Name String - The name of the product
- product
Type String - The type of the product
- provider
Name String - The provider name of the product
Import
Service Catalog Product can be imported using the id, e.g.
$ pulumi import alicloud:servicecatalog/product:Product 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.