1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. oos
  5. Parameter
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.oos.Parameter

Explore with Pulumi AI

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),
});
Copy
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)
Copy
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, &resourcemanager.GetResourceGroupsArgs{}, 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
	})
}
Copy
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)),
    });

});
Copy
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());

    }
}
Copy
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: {}
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. ParameterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ParameterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ParameterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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" },
    },
});
Copy
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"),
	},
})
Copy
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());
Copy
parameter_resource = alicloud.oos.Parameter("parameterResource",
    parameter_name="string",
    type="string",
    value="string",
    constraints="string",
    description="string",
    resource_group_id="string",
    tags={
        "string": "string",
    })
Copy
const parameterResource = new alicloud.oos.Parameter("parameterResource", {
    parameterName: "string",
    type: "string",
    value: "string",
    constraints: "string",
    description: "string",
    resourceGroupId: "string",
    tags: {
        string: "string",
    },
});
Copy
type: alicloud:oos:Parameter
properties:
    constraints: string
    description: string
    parameterName: string
    resourceGroupId: string
    tags:
        string: string
    type: string
    value: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Parameter resource accepts the following input properties:

ParameterName
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The data type of the common parameter. Valid values: String and StringList.
Value This property is required. string
The value of the common parameter. The value must be 1 to 4096 characters in length.
Constraints Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The data type of the common parameter. Valid values: String and StringList.
Value This property is required. string
The value of the common parameter. The value must be 1 to 4096 characters in length.
Constraints Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The data type of the common parameter. Valid values: String and StringList.
value This property is required. String
The value of the common parameter. The value must be 1 to 4096 characters in length.
constraints Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The data type of the common parameter. Valid values: String and StringList.
value This property is required. string
The value of the common parameter. The value must be 1 to 4096 characters in length.
constraints Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
str
The data type of the common parameter. Valid values: String and StringList.
value This property is required. str
The value of the common parameter. The value must be 1 to 4096 characters in length.
constraints Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The data type of the common parameter. Valid values: String and StringList.
value This property is required. String
The value of the common parameter. The value must be 1 to 4096 characters in length.
constraints Changes to this property will trigger replacement. 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)
resources:  _:    type: alicloud:oos:Parameter    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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>
Copy

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.