1. Packages
  2. Alicloud Provider
  3. API Docs
  4. servicecatalog
  5. Product
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.servicecatalog.Product

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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

    The Product resource accepts the following input properties:

    ProductName string
    The name of the product
    ProductType string
    The type of the product
    ProviderName string
    The provider name of the product
    Description string
    The description of the product
    ProductName string
    The name of the product
    ProductType string
    The type of the product
    ProviderName string
    The provider name of the product
    Description string
    The description of the product
    productName String
    The name of the product
    productType String
    The type of the product
    providerName String
    The provider name of the product
    description String
    The description of the product
    productName string
    The name of the product
    productType string
    The type of the product
    providerName 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
    productName String
    The name of the product
    productType String
    The type of the product
    providerName 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:

    CreateTime string
    The creation time of the product
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The creation time of the product
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the product
    id String
    The provider-assigned unique ID for this managed resource.
    createTime 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.
    createTime 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.
    The following state arguments are supported:
    CreateTime string
    The creation time of the product
    Description string
    The description of the product
    ProductName string
    The name of the product
    ProductType string
    The type of the product
    ProviderName string
    The provider name of the product
    CreateTime string
    The creation time of the product
    Description string
    The description of the product
    ProductName string
    The name of the product
    ProductType string
    The type of the product
    ProviderName string
    The provider name of the product
    createTime String
    The creation time of the product
    description String
    The description of the product
    productName String
    The name of the product
    productType String
    The type of the product
    providerName String
    The provider name of the product
    createTime string
    The creation time of the product
    description string
    The description of the product
    productName string
    The name of the product
    productType string
    The type of the product
    providerName 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
    createTime String
    The creation time of the product
    description String
    The description of the product
    productName String
    The name of the product
    productType String
    The type of the product
    providerName 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.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi