AssociationProperty取值 | 说明 | 对应的AssociationPropertyMetadata |
Auto | ROS会基于Terraform原始数据结构,自动生成AssociationProperty和AssociationPropertyMetadata等字段。
说明 仅对Terraform类型模板的JSON类型参数生效。 | Overwrite:补充或覆盖内层嵌套参数的定义。 该参数可选,为字典类型,组成部分如下: 键 内层嵌套参数的路径。路径规则如下: 示例如下: // name的路径为name。
// address的路径为address。
variable "user_information" {
type = object({
name = string
address = string
})
}
// region_ids中元素的路径为*。
variable "region_ids" {
type = list(string)
}
// internal的路径为*.internal,可简写为internal。
// external的路径为*.external,可简写为external。
// protocol的路径为*.protocol,可简写为protocol。
variable "docker_ports" {
type = list(object({
internal = number
external = number
protocol = string
}))
}
// b的路径为 *.b,可简写为b。
// b中元素的路径为*.b.*,可简写为b.*
// c的路径为*.c,可简写为c。
// d的路径为*.c.*.d,可简写为c.d。
// d中元素的路径为*.c.*.d.*,可简写为c.d.*。
// e的路径为*.e,可简写为e。
// e中元素的路径为*.e.*,可简写为e.*。
// e中元素的路径为*.e.*.*,可简写为e.*.*(必须保留两个*)。
// f的路径为*.f,可简写为f。
// g的路径为*.f.*.*.g,可简写为f.g。
// g中元素的路径为*.f.*.*.g.*,可简写为f.g.*。
variable "complex_type_demo" {
type = list(object({
b = list(string)
c = list(object({
d = list(string)
}))
e = list(list(string))
f = list(list(object({
g = list(string)
})))
}))
}
|
AutoCompleteInput | 自动生成随机字符串。 | CharacterClasses Class:字符类型。取值: lowercase uppercase number specialCharacter
Min:当前类型字符的最少个数。 SpecialCharacters:指定的特殊字符(当Class为specialCharacter时有效)。 Start:是否可以以特殊字符开头(当Class为specialCharacter时有效)。 End:是否可以以特殊字符结尾(当Class为specialCharacter时有效)。
Prefix:字符串前缀。 Suffix:字符串后缀。 Length:字符串长度。
示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ManagedKubernetesClusterName": {
"Type": "String",
"Label": {
"en": "Managed Kubernetes Cluster Name",
"zh-cn": "ACK托管版集群名称"
},
"AssociationProperty": "AutoCompleteInput",
"AssociationPropertyMetadata": {
"Length": 5,
"Prefix": "cluster-for-mse-",
"Suffix": "-by-ros",
"CharacterClasses": [
{
"Class": "lowercase",
"min": 1
}
]
}
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ManagedKubernetesClusterName:
Type: String
Label:
en: Managed Kubernetes Cluster Name
zh-cn: ACK托管版集群名称
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: cluster-for-mse-
Suffix: '-by-ros'
CharacterClasses:
- Class: lowercase
min: 1
|
ChargeType | 付费类型。取值: | 无 |
Code | 代码输入。 | 无 |
CommaDelimitedList | 输入用逗号分隔的数组。 | 无 |
Cron | Cron表达式,指定定时任务执行时间的格式化字符串。 | 无 |
DateTime | 日期。 | GMTZone:GMT可用区。 TimeZone:时区描述。
示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DateTime": {
"Type": "String",
"AssociationProperty": "DateTime"
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DateTime:
Type: String
AssociationProperty: DateTime
示例说明 示例中通过指定参数DateTime的AssociationProperty为DateTime,来设置日期。
|
FileContent | 从本地文件读取内容。 | AcceptFileSuffixes:接受上传的文件类型。多个文件类型之间用半角逗号分隔开。 |
GMTZone | GMT可用区选择。 | 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"GMTZone": {
"Type": "String",
"AssociationProperty": "GMTZone"
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
GMTZone:
Type: String
AssociationProperty: GMTZone
示例说明 示例中通过指定参数GMTZone的AssociationProperty属性为GMTZone,设置GMT可用区。
|
Json | JSON对象输入。 | 无 |
List[Parameter] | 参数列表。使用缩进排布。 仅对Json类型参数生效。 | Parameter:参数定义。 Mode:展示样式 Collapse:折叠样式。(默认值) Table:表格样式。
更多信息,请参见概览。 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionIds": {
"Label": {
"en": "ECS Region Ids",
"zh-cn": "ECS地域列表"
},
"MaxLength": 100,
"MinLength": 1,
"Type": "Json",
"AssociationProperty": "List[Parameter]",
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId",
"MinLength": 1,
"MaxLength": 64
}
}
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionIds:
Label:
en: ECS Region Ids
zh-cn: ECS地域列表
MaxLength: 100
MinLength: 1
Type: Json
AssociationProperty: List[Parameter]
AssociationPropertyMetadata:
Parameter:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
MinLength: 1
MaxLength: 64
示例说明 示例中通过指定AssociationProperty为List[Parameter],AssociationPropertyMetadata为Parameter,实现多个ECS地域ID在控制台缩进排布的效果。
|
List[Parameters] | 参数组列表。使用表格排布。 仅对Json类型参数生效。 | |
OOSServiceRole | OOS的服务角色。 | RegionId:地域ID(默认为资源栈所属地域)。 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId"
},
"OosServiceRole": {
"Type": "String",
"AssociationProperty": "OOSServiceRole",
"AssociationPropertyMetadata": {
"RegionId": "${RegionId}"
}
}
}
}
YAML示例; ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
OosServiceRole:
Type: String
AssociationProperty: OOSServiceRole
AssociationPropertyMetadata:
RegionId: ${RegionId}
示例说明 示例中通过指定参数OosServiceRole的AssociationProperty属性为OOSServiceRole,设置OOS的服务角色。
|
Password | 密码输入。 | 无 |
RateControl | OOS的执行速率。 | 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RateControl": {
"Type": "String",
"AssociationProperty": "RateControl"
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RateControl:
Type: String
AssociationProperty: RateControl
示例说明 示例中通过指定参数RateControl的AssociationProperty属性为RateControl,配置OOS执行速率。
|
Tags | 标签。 | 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId"
},
"Tags": {
"Type": "String",
"AssociationProperty": "Tags",
"AssociationPropertyMetadata": {
"RegionId": "${RegionId}",
"ResourceType": "ALIYUN::ECS::INSTANCE"
}
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
Tags:
Type: String
AssociationProperty: Tags
AssociationPropertyMetadata:
RegionId: ${RegionId}
ResourceType: ALIYUN::ECS::INSTANCE
示例说明 示例中通过指定参数Tags的AssociationProperty属性为Tags,AssociationPropertyMetadata属性为RegionId、ResourceType,获取ECS实例的自定义标签信息。
|
Targets | ECS实例对象。支持通过实例ID、标签、资源组等方式选择实例。 | RegionId:地域ID(默认为资源栈所属地域)。 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId"
},
"Targets": {
"Type": "String",
"AssociationProperty": "Targets",
"AssociationPropertyMetadata": {
"RegionId": "${RegionId}"
}
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RegionId:
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
Targets:
Type: String
AssociationProperty: Targets
AssociationPropertyMetadata:
RegionId: ${RegionId}
示例说明 示例中通过指定参数Targets的AssociationProperty属性为Targets,AssociationPropertyMetadata属性为RegionId,获取ECS实例对象。
|
TextArea | 富文本输入。 | 无 |
TimeTriggerWeekly | 按周选择时间。 | 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TimeTriggerWeekly": {
"Type": "String",
"AssociationProperty": "TimeTriggerWeekly"
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TimeTriggerWeekly:
Type: String
AssociationProperty: TimeTriggerWeekly
示例说明 示例中通过指定参数TimeTriggerWeekly的AssociationProperty属性为TimeTriggerWeekly,实现按周选择时间。
|
TimeZone | 时区选择。 | 示例如下: 示例代码 JSON示例: {
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TimeZone": {
"Type": "String",
"AssociationProperty": "TimeZone"
}
}
}
YAML示例: ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TimeZone:
Type: String
AssociationProperty: TimeZone
示例说明 示例中通过指定参数TimeZone的AssociationProperty属性为TimeZone,来配置时区。
|
无 | 使用缩进排布。 仅对Json类型参数生效。
说明 不指定AssociationProperty,仅指定AssociationPropertyMetadata,为参数实现缩进排布。 |
说明 结合List[Parameter]可以实现嵌套结构,且对于嵌套深度没有限制。 |