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]可以實現嵌套結構,且對於嵌套深度沒有限制。 |