1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. servicecatalog
  5. Portfolio
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.servicecatalog.Portfolio

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a Service Catalog Portfolio resource.

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

    NOTE: Available since v1.204.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") || "tf_example";
    const _default = new alicloud.servicecatalog.Portfolio("default", {
        portfolioName: name,
        providerName: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default = alicloud.servicecatalog.Portfolio("default",
        portfolio_name=name,
        provider_name=name)
    
    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 := "tf_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := servicecatalog.NewPortfolio(ctx, "default", &servicecatalog.PortfolioArgs{
    			PortfolioName: pulumi.String(name),
    			ProviderName:  pulumi.String(name),
    		})
    		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") ?? "tf_example";
        var @default = new AliCloud.ServiceCatalog.Portfolio("default", new()
        {
            PortfolioName = name,
            ProviderName = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.servicecatalog.Portfolio;
    import com.pulumi.alicloud.servicecatalog.PortfolioArgs;
    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("tf_example");
            var default_ = new Portfolio("default", PortfolioArgs.builder()
                .portfolioName(name)
                .providerName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      default:
        type: alicloud:servicecatalog:Portfolio
        properties:
          portfolioName: ${name}
          providerName: ${name}
    

    Create Portfolio Resource

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

    Constructor syntax

    new Portfolio(name: string, args: PortfolioArgs, opts?: CustomResourceOptions);
    @overload
    def Portfolio(resource_name: str,
                  args: PortfolioArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Portfolio(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  portfolio_name: Optional[str] = None,
                  provider_name: Optional[str] = None,
                  description: Optional[str] = None)
    func NewPortfolio(ctx *Context, name string, args PortfolioArgs, opts ...ResourceOption) (*Portfolio, error)
    public Portfolio(string name, PortfolioArgs args, CustomResourceOptions? opts = null)
    public Portfolio(String name, PortfolioArgs args)
    public Portfolio(String name, PortfolioArgs args, CustomResourceOptions options)
    
    type: alicloud:servicecatalog:Portfolio
    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 PortfolioArgs
    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 PortfolioArgs
    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 PortfolioArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PortfolioArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PortfolioArgs
    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 portfolioResource = new AliCloud.ServiceCatalog.Portfolio("portfolioResource", new()
    {
        PortfolioName = "string",
        ProviderName = "string",
        Description = "string",
    });
    
    example, err := servicecatalog.NewPortfolio(ctx, "portfolioResource", &servicecatalog.PortfolioArgs{
    	PortfolioName: pulumi.String("string"),
    	ProviderName:  pulumi.String("string"),
    	Description:   pulumi.String("string"),
    })
    
    var portfolioResource = new Portfolio("portfolioResource", PortfolioArgs.builder()
        .portfolioName("string")
        .providerName("string")
        .description("string")
        .build());
    
    portfolio_resource = alicloud.servicecatalog.Portfolio("portfolioResource",
        portfolio_name="string",
        provider_name="string",
        description="string")
    
    const portfolioResource = new alicloud.servicecatalog.Portfolio("portfolioResource", {
        portfolioName: "string",
        providerName: "string",
        description: "string",
    });
    
    type: alicloud:servicecatalog:Portfolio
    properties:
        description: string
        portfolioName: string
        providerName: string
    

    Portfolio 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 Portfolio resource accepts the following input properties:

    PortfolioName string
    The name of the portfolio. The value must be 1 to 128 characters in length.
    ProviderName string
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    Description string
    The description of the portfolio. The value must be 1 to 128 characters in length.
    PortfolioName string
    The name of the portfolio. The value must be 1 to 128 characters in length.
    ProviderName string
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    Description string
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolioName String
    The name of the portfolio. The value must be 1 to 128 characters in length.
    providerName String
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    description String
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolioName string
    The name of the portfolio. The value must be 1 to 128 characters in length.
    providerName string
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    description string
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolio_name str
    The name of the portfolio. The value must be 1 to 128 characters in length.
    provider_name str
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    description str
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolioName String
    The name of the portfolio. The value must be 1 to 128 characters in length.
    providerName String
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    description String
    The description of the portfolio. The value must be 1 to 128 characters in length.

    Outputs

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

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

    Look up Existing Portfolio Resource

    Get an existing Portfolio 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?: PortfolioState, opts?: CustomResourceOptions): Portfolio
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            portfolio_arn: Optional[str] = None,
            portfolio_name: Optional[str] = None,
            provider_name: Optional[str] = None) -> Portfolio
    func GetPortfolio(ctx *Context, name string, id IDInput, state *PortfolioState, opts ...ResourceOption) (*Portfolio, error)
    public static Portfolio Get(string name, Input<string> id, PortfolioState? state, CustomResourceOptions? opts = null)
    public static Portfolio get(String name, Output<String> id, PortfolioState 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 portfolio.
    Description string
    The description of the portfolio. The value must be 1 to 128 characters in length.
    PortfolioArn string
    The ARN of the portfolio.
    PortfolioName string
    The name of the portfolio. The value must be 1 to 128 characters in length.
    ProviderName string
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    CreateTime string
    The creation time of the portfolio.
    Description string
    The description of the portfolio. The value must be 1 to 128 characters in length.
    PortfolioArn string
    The ARN of the portfolio.
    PortfolioName string
    The name of the portfolio. The value must be 1 to 128 characters in length.
    ProviderName string
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    createTime String
    The creation time of the portfolio.
    description String
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolioArn String
    The ARN of the portfolio.
    portfolioName String
    The name of the portfolio. The value must be 1 to 128 characters in length.
    providerName String
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    createTime string
    The creation time of the portfolio.
    description string
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolioArn string
    The ARN of the portfolio.
    portfolioName string
    The name of the portfolio. The value must be 1 to 128 characters in length.
    providerName string
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    create_time str
    The creation time of the portfolio.
    description str
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolio_arn str
    The ARN of the portfolio.
    portfolio_name str
    The name of the portfolio. The value must be 1 to 128 characters in length.
    provider_name str
    The provider name of the portfolio. The value must be 1 to 128 characters in length.
    createTime String
    The creation time of the portfolio.
    description String
    The description of the portfolio. The value must be 1 to 128 characters in length.
    portfolioArn String
    The ARN of the portfolio.
    portfolioName String
    The name of the portfolio. The value must be 1 to 128 characters in length.
    providerName String
    The provider name of the portfolio. The value must be 1 to 128 characters in length.

    Import

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

    $ pulumi import alicloud:servicecatalog/portfolio:Portfolio 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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi