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

alicloud.oos.Parameter

Explore with Pulumi AI

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

    Provides a OOS Parameter resource.

    For information about OOS Parameter and how to use it, see What is Parameter.

    NOTE: Available in v1.147.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.resourcemanager.getResourceGroups({});
    const example = new alicloud.oos.Parameter("example", {
        parameterName: "my-Parameter",
        type: "String",
        value: "example_value",
        description: "example_value",
        tags: {
            Created: "TF",
            For: "OosParameter",
        },
        resourceGroupId: _default.then(_default => _default.groups?.[0]?.id),
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.resourcemanager.get_resource_groups()
    example = alicloud.oos.Parameter("example",
        parameter_name="my-Parameter",
        type="String",
        value="example_value",
        description="example_value",
        tags={
            "Created": "TF",
            "For": "OosParameter",
        },
        resource_group_id=default.groups[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = oos.NewParameter(ctx, "example", &oos.ParameterArgs{
    			ParameterName: pulumi.String("my-Parameter"),
    			Type:          pulumi.String("String"),
    			Value:         pulumi.String("example_value"),
    			Description:   pulumi.String("example_value"),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("OosParameter"),
    			},
    			ResourceGroupId: pulumi.String(_default.Groups[0].Id),
    		})
    		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 @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var example = new AliCloud.Oos.Parameter("example", new()
        {
            ParameterName = "my-Parameter",
            Type = "String",
            Value = "example_value",
            Description = "example_value",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "OosParameter" },
            },
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.oos.Parameter;
    import com.pulumi.alicloud.oos.ParameterArgs;
    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 default = ResourcemanagerFunctions.getResourceGroups();
    
            var example = new Parameter("example", ParameterArgs.builder()
                .parameterName("my-Parameter")
                .type("String")
                .value("example_value")
                .description("example_value")
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "OosParameter")
                ))
                .resourceGroupId(default_.groups()[0].id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:oos:Parameter
        properties:
          parameterName: my-Parameter
          type: String
          value: example_value
          description: example_value
          tags:
            Created: TF
            For: OosParameter
          resourceGroupId: ${default.groups[0].id}
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
    

    Create Parameter Resource

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

    Constructor syntax

    new Parameter(name: string, args: ParameterArgs, opts?: CustomResourceOptions);
    @overload
    def Parameter(resource_name: str,
                  args: ParameterArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Parameter(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  parameter_name: Optional[str] = None,
                  type: Optional[str] = None,
                  value: Optional[str] = None,
                  constraints: Optional[str] = None,
                  description: Optional[str] = None,
                  resource_group_id: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None)
    func NewParameter(ctx *Context, name string, args ParameterArgs, opts ...ResourceOption) (*Parameter, error)
    public Parameter(string name, ParameterArgs args, CustomResourceOptions? opts = null)
    public Parameter(String name, ParameterArgs args)
    public Parameter(String name, ParameterArgs args, CustomResourceOptions options)
    
    type: alicloud:oos:Parameter
    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 ParameterArgs
    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 ParameterArgs
    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 ParameterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ParameterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ParameterArgs
    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 parameterResource = new AliCloud.Oos.Parameter("parameterResource", new()
    {
        ParameterName = "string",
        Type = "string",
        Value = "string",
        Constraints = "string",
        Description = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := oos.NewParameter(ctx, "parameterResource", &oos.ParameterArgs{
    	ParameterName:   pulumi.String("string"),
    	Type:            pulumi.String("string"),
    	Value:           pulumi.String("string"),
    	Constraints:     pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var parameterResource = new Parameter("parameterResource", ParameterArgs.builder()
        .parameterName("string")
        .type("string")
        .value("string")
        .constraints("string")
        .description("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    parameter_resource = alicloud.oos.Parameter("parameterResource",
        parameter_name="string",
        type="string",
        value="string",
        constraints="string",
        description="string",
        resource_group_id="string",
        tags={
            "string": "string",
        })
    
    const parameterResource = new alicloud.oos.Parameter("parameterResource", {
        parameterName: "string",
        type: "string",
        value: "string",
        constraints: "string",
        description: "string",
        resourceGroupId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:oos:Parameter
    properties:
        constraints: string
        description: string
        parameterName: string
        resourceGroupId: string
        tags:
            string: string
        type: string
        value: string
    

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

    ParameterName string
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    Type string
    The data type of the common parameter. Valid values: String and StringList.
    Value string
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    Constraints string
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    Description string
    The description of the common parameter. The description must be 1 to 200 characters in length.
    ResourceGroupId string
    The ID of the Resource Group.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ParameterName string
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    Type string
    The data type of the common parameter. Valid values: String and StringList.
    Value string
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    Constraints string
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    Description string
    The description of the common parameter. The description must be 1 to 200 characters in length.
    ResourceGroupId string
    The ID of the Resource Group.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    parameterName String
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    type String
    The data type of the common parameter. Valid values: String and StringList.
    value String
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints String
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description String
    The description of the common parameter. The description must be 1 to 200 characters in length.
    resourceGroupId String
    The ID of the Resource Group.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    parameterName string
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    type string
    The data type of the common parameter. Valid values: String and StringList.
    value string
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints string
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description string
    The description of the common parameter. The description must be 1 to 200 characters in length.
    resourceGroupId string
    The ID of the Resource Group.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    parameter_name str
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    type str
    The data type of the common parameter. Valid values: String and StringList.
    value str
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints str
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description str
    The description of the common parameter. The description must be 1 to 200 characters in length.
    resource_group_id str
    The ID of the Resource Group.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    parameterName String
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    type String
    The data type of the common parameter. Valid values: String and StringList.
    value String
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints String
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description String
    The description of the common parameter. The description must be 1 to 200 characters in length.
    resourceGroupId String
    The ID of the Resource Group.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Parameter Resource

    Get an existing Parameter 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?: ParameterState, opts?: CustomResourceOptions): Parameter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            constraints: Optional[str] = None,
            description: Optional[str] = None,
            parameter_name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None,
            value: Optional[str] = None) -> Parameter
    func GetParameter(ctx *Context, name string, id IDInput, state *ParameterState, opts ...ResourceOption) (*Parameter, error)
    public static Parameter Get(string name, Input<string> id, ParameterState? state, CustomResourceOptions? opts = null)
    public static Parameter get(String name, Output<String> id, ParameterState 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:
    Constraints string
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    Description string
    The description of the common parameter. The description must be 1 to 200 characters in length.
    ParameterName string
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    ResourceGroupId string
    The ID of the Resource Group.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Type string
    The data type of the common parameter. Valid values: String and StringList.
    Value string
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    Constraints string
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    Description string
    The description of the common parameter. The description must be 1 to 200 characters in length.
    ParameterName string
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    ResourceGroupId string
    The ID of the Resource Group.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Type string
    The data type of the common parameter. Valid values: String and StringList.
    Value string
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints String
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description String
    The description of the common parameter. The description must be 1 to 200 characters in length.
    parameterName String
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    resourceGroupId String
    The ID of the Resource Group.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    type String
    The data type of the common parameter. Valid values: String and StringList.
    value String
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints string
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description string
    The description of the common parameter. The description must be 1 to 200 characters in length.
    parameterName string
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    resourceGroupId string
    The ID of the Resource Group.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    type string
    The data type of the common parameter. Valid values: String and StringList.
    value string
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints str
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description str
    The description of the common parameter. The description must be 1 to 200 characters in length.
    parameter_name str
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    resource_group_id str
    The ID of the Resource Group.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    type str
    The data type of the common parameter. Valid values: String and StringList.
    value str
    The value of the common parameter. The value must be 1 to 4096 characters in length.
    constraints String
    The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:

    • AllowedValues: The value that is allowed for the common parameter. It must be an array string.
    • AllowedPattern: The pattern that is allowed for the common parameter. It must be a regular expression.
    • MinLength: The minimum length of the common parameter.
    • MaxLength: The maximum length of the common parameter.
    description String
    The description of the common parameter. The description must be 1 to 200 characters in length.
    parameterName String
    The name of the common parameter. The name must be 2 to 180 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, ALICLOUD, or OOS.
    resourceGroupId String
    The ID of the Resource Group.
    tags Map<String>
    A mapping of tags to assign to the resource.
    type String
    The data type of the common parameter. Valid values: String and StringList.
    value String
    The value of the common parameter. The value must be 1 to 4096 characters in length.

    Import

    OOS Parameter can be imported using the id, e.g.

    $ pulumi import alicloud:oos/parameter:Parameter example <parameter_name>
    

    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