ALIYUN::OOS::Parameter类型用于创建一个普通参数。
语法
{
"Type": "ALIYUN::OOS::Parameter",
"Properties": {
"Type": String,
"Constraints": String,
"Description": String,
"Value": String,
"Name": String,
"ResourceGroupId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|
Type | String | 是 | 否 | 参数类型。 | 取值: |
Constraints | String | 否 | 否 | 参数的约束条件。 | 取值:- AllowedValues:参数允许值。支持数组类型的字符串。
- AllowedPattern:正则表达式。
- MinLength:参数最小长度。
- MaxLength:参数最大长度。
|
Description | String | 否 | 是 | 参数的描述信息。 | 长度不超过200个字符。 |
Value | String | 是 | 是 | 参数值。 | 长度不超过4096个字符。 |
Name | String | 是 | 否 | 参数名称。 | 长度不超过200个字符。不能以ALIYUN 、ACS 、ALIBABA 、ALICLOUD 、OOS 开头,可包含英文字母、数字、短划线(-)和下划线(_)。 |
ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 |
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
Parameter:
Type: ALIYUN::OOS::Parameter
Properties:
Type: String
Value: echo hello world
Description: Prefix for Interruption Handler parameters
Name:
Fn::Join:
- ''
- - /ecs-test-handler/run_commands/test-SampleWebAppAutoScalingGroup-
- Ref: ALIYUN::StackId
Outputs:
Value:
Description: The Value of the parameter.
Value:
Fn::GetAtt:
- Parameter
- Value
Name:
Description: The Name of the parameter.
Value:
Fn::GetAtt:
- Parameter
- Name
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"Parameter": {
"Type": "ALIYUN::OOS::Parameter",
"Properties": {
"Type": "String",
"Value": "echo hello world",
"Description": "Prefix for Interruption Handler parameters",
"Name": {
"Fn::Join": [
"",
[
"/ecs-test-handler/run_commands/test-SampleWebAppAutoScalingGroup-",
{
"Ref": "ALIYUN::StackId"
}
]
]
}
}
}
},
"Outputs": {
"Value": {
"Description": "The Value of the parameter.",
"Value": {
"Fn::GetAtt": [
"Parameter",
"Value"
]
}
},
"Name": {
"Description": "The Name of the parameter.",
"Value": {
"Fn::GetAtt": [
"Parameter",
"Name"
]
}
}
}
}