alicloud.oos.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 System.Collections.Generic;
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 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:
- Parameter
Name string The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- Type string
The data type of the common parameter. Valid values:
String
andStringList
.- Value string
The value of the common parameter. The value must be
1
to4096
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:
- Description string
The description of the common parameter. The description must be
1
to200
characters in length.- Resource
Group stringId The ID of the Resource Group.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Parameter
Name string The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- Type string
The data type of the common parameter. Valid values:
String
andStringList
.- Value string
The value of the common parameter. The value must be
1
to4096
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:
- Description string
The description of the common parameter. The description must be
1
to200
characters in length.- Resource
Group stringId The ID of the Resource Group.
- map[string]interface{}
A mapping of tags to assign to the resource.
- parameter
Name String The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- type String
The data type of the common parameter. Valid values:
String
andStringList
.- value String
The value of the common parameter. The value must be
1
to4096
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:
- description String
The description of the common parameter. The description must be
1
to200
characters in length.- resource
Group StringId The ID of the Resource Group.
- Map<String,Object>
A mapping of tags to assign to the resource.
- parameter
Name string The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- type string
The data type of the common parameter. Valid values:
String
andStringList
.- value string
The value of the common parameter. The value must be
1
to4096
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:
- description string
The description of the common parameter. The description must be
1
to200
characters in length.- resource
Group stringId The ID of the Resource Group.
- {[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
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- type str
The data type of the common parameter. Valid values:
String
andStringList
.- value str
The value of the common parameter. The value must be
1
to4096
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:
- description str
The description of the common parameter. The description must be
1
to200
characters in length.- resource_
group_ strid The ID of the Resource Group.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- parameter
Name String The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- type String
The data type of the common parameter. Valid values:
String
andStringList
.- value String
The value of the common parameter. The value must be
1
to4096
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:
- description String
The description of the common parameter. The description must be
1
to200
characters in length.- resource
Group StringId The ID of the Resource Group.
- 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.
- Constraints string
The constraints of the common parameter. This value follows the json format. By default, this parameter is null. Valid values:
- Description string
The description of the common parameter. The description must be
1
to200
characters in length.- Parameter
Name string The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- Resource
Group stringId The ID of the Resource Group.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Type string
The data type of the common parameter. Valid values:
String
andStringList
.- Value string
The value of the common parameter. The value must be
1
to4096
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:
- Description string
The description of the common parameter. The description must be
1
to200
characters in length.- Parameter
Name string The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- Resource
Group stringId The ID of the Resource Group.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Type string
The data type of the common parameter. Valid values:
String
andStringList
.- Value string
The value of the common parameter. The value must be
1
to4096
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:
- description String
The description of the common parameter. The description must be
1
to200
characters in length.- parameter
Name String The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- resource
Group StringId The ID of the Resource Group.
- Map<String,Object>
A mapping of tags to assign to the resource.
- type String
The data type of the common parameter. Valid values:
String
andStringList
.- value String
The value of the common parameter. The value must be
1
to4096
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:
- description string
The description of the common parameter. The description must be
1
to200
characters in length.- parameter
Name string The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- resource
Group stringId The ID of the Resource Group.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- type string
The data type of the common parameter. Valid values:
String
andStringList
.- value string
The value of the common parameter. The value must be
1
to4096
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:
- description str
The description of the common parameter. The description must be
1
to200
characters in length.- parameter_
name str The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- resource_
group_ strid The ID of the Resource Group.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- type str
The data type of the common parameter. Valid values:
String
andStringList
.- value str
The value of the common parameter. The value must be
1
to4096
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:
- description String
The description of the common parameter. The description must be
1
to200
characters in length.- parameter
Name String The name of the common parameter. The name must be
2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.- resource
Group StringId The ID of the Resource Group.
- Map<Any>
A mapping of tags to assign to the resource.
- type String
The data type of the common parameter. Valid values:
String
andStringList
.- value String
The value of the common parameter. The value must be
1
to4096
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
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.