Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

Parameter

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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.ResourceManager.GetResourceGroups.InvokeAsync());
        var example = new AliCloud.Oos.Parameter("example", new AliCloud.Oos.ParameterArgs
        {
            ParameterName = "my-Parameter",
            Type = "String",
            Value = "example_value",
            Description = "example_value",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "OosParameter" },
            },
            ResourceGroupId = @default.Apply(@default => @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.AnyMap{
				"Created": pulumi.Any("TF"),
				"For":     pulumi.Any("OosParameter"),
			},
			ResourceGroupId: pulumi.String(_default.Groups[0].Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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());

    }
}
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)
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),
});
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

new Parameter(name: string, args: ParameterArgs, opts?: CustomResourceOptions);
@overload
def Parameter(resource_name: 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, Any]] = None,
              type: Optional[str] = None,
              value: Optional[str] = None)
@overload
def Parameter(resource_name: str,
              args: ParameterArgs,
              opts: Optional[ResourceOptions] = 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.

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.

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, object>

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]interface{}

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,Object>

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]: any}

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, Any]

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<Any>

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, Any]] = 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, object>

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]interface{}

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,Object>

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]: any}

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, Any]

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<Any>

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>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.