ALIYUN::DNS::AccessStrategy类型用于新增访问策略。
语法
{
"Type": "ALIYUN::DNS::AccessStrategy",
"Properties": {
"DefaultAddrPoolType": String,
"DefaultMinAvailableAddrNum": Integer,
"DefaultAddrPool": List,
"InstanceId": String,
"StrategyName": String,
"StrategyMode": String,
"AccessMode": String,
"DefaultLatencyOptimization": String,
"DefaultMaxReturnAddrNum": Integer,
"DefaultLbaStrategy": String,
"FailoverMinAvailableAddrNum": Integer,
"FailoverAddrPoolType": String,
"FailoverAddrPool": List,
"FailoverLatencyOptimization": String,
"FailoverLbaStrategy": String,
"FailoverMaxReturnAddrNum": Integer,
"Lines": List
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
DefaultAddrPool |
List |
是 |
是 |
访问策略的默认地址池。 |
长度限制:最小1,最大100。更多信息,请参考DefaultAddrPool属性。 |
|
DefaultAddrPoolType |
String |
是 |
否 |
默认地址池的类型。 |
允许值:
|
|
DefaultMinAvailableAddrNum |
Integer |
是 |
是 |
默认地址池的最小可用地址数量。 |
范围限制:最小1,最大400 |
|
InstanceId |
String |
是 |
否 |
DNS实例的ID。 |
无 |
|
StrategyMode |
String |
是 |
否 |
访问策略的模式。 |
允许值:
|
|
StrategyName |
String |
是 |
是 |
访问策略的名称。 |
无 |
|
AccessMode |
String |
否 |
是 |
访问策略的访问模式。 |
无 |
|
DefaultLatencyOptimization |
String |
否 |
是 |
是否为默认地址池启用延迟优化。 |
允许值:
|
|
DefaultLbaStrategy |
String |
否 |
是 |
默认地址池的负载均衡策略。 |
允许值:
|
|
DefaultMaxReturnAddrNum |
Integer |
否 |
是 |
默认地址池的最大返回地址数量。 |
范围限制:最小1,最大8 |
|
FailoverAddrPool |
List |
否 |
是 |
访问策略的故障转移地址池。 |
长度限制:最小1,最大100。 更多信息,请参考FailoverAddrPool属性。 |
|
FailoverAddrPoolType |
String |
否 |
是 |
故障转移地址池的类型。 |
允许值:
|
|
FailoverLatencyOptimization |
String |
否 |
是 |
是否为故障转移地址池启用延迟优化。 |
允许值:
|
|
FailoverLbaStrategy |
String |
否 |
是 |
故障转移地址池的负载均衡策略。 |
允许值:
|
|
FailoverMaxReturnAddrNum |
Integer |
否 |
是 |
故障转移地址池的最大返回地址数量。 |
范围限制:最小1,最大8 |
|
FailoverMinAvailableAddrNum |
Integer |
否 |
是 |
故障转移地址池的最小可用地址数量。 |
范围限制:最小1,最大400 |
|
Lines |
List |
否 |
是 |
访问策略的线路。 |
无 |
FailoverAddrPool语法
"FailoverAddrPool": [
{
"LbaWeight": Integer,
"Id": String
}
]
FailoverAddrPool属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Id |
String |
否 |
否 |
地址池的ID。 |
无 |
|
LbaWeight |
Integer |
否 |
否 |
地址池的负载均衡权重。 |
无 |
DefaultAddrPool语法
"DefaultAddrPool": [
{
"LbaWeight": Integer,
"Id": String
}
]
DefaultAddrPool属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Id |
String |
否 |
否 |
地址池的ID。 |
无 |
|
LbaWeight |
Integer |
否 |
否 |
地址池的负载均衡权重。 |
无 |
返回值
Fn::GetAtt
StrategyId:访问策略的ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DefaultAddrPoolType:
Type: String
Description:
en: The type of the default address pool.
zh: 默认地址池的类型。
AllowedValues:
- IPV4
- IPV6
- DOMAIN
Required: true
InstanceId:
Type: String
Description:
en: The ID of the Dns instance.
zh: DNS实例的ID。
Required: true
DefaultMinAvailableAddrNum:
Type: Number
Description:
en: The minimum available address number of the default address pool.
zh: 默认地址池的最小可用地址数量。
Required: true
MinValue: 1
MaxValue: 400
DefaultAddrPool:
AssociationPropertyMetadata:
Parameters:
LbaWeight:
Type: Number
Description:
en: The load balancing weight of the address pool.
zh: 地址池的负载均衡权重。
Required: false
Id:
Type: String
Description:
en: The ID of the address pool.
zh: 地址池的ID。
Required: false
AssociationProperty: List[Parameters]
Type: Json
Description:
en: The default address pool of the access strategy.
zh: 访问策略的默认地址池。
Required: true
MinLength: 1
MaxLength: 100
StrategyName:
Type: String
Description:
en: The name of the access strategy.
zh: 访问策略的名称。
Required: true
StrategyMode:
Type: String
Description:
en: The mode of the access strategy.
zh: 访问策略的模式。
AllowedValues:
- GEO
- LATENCY
Required: true
Resources:
AccessStrategy:
Type: ALIYUN::DNS::AccessStrategy
Properties:
DefaultAddrPoolType:
Ref: DefaultAddrPoolType
InstanceId:
Ref: InstanceId
DefaultMinAvailableAddrNum:
Ref: DefaultMinAvailableAddrNum
DefaultAddrPool:
Ref: DefaultAddrPool
StrategyName:
Ref: StrategyName
StrategyMode:
Ref: StrategyMode
Outputs:
StrategyId:
Description:
en: The ID of the access strategy.
zh: 访问策略的ID。
Value:
Fn::GetAtt:
- AccessStrategy
- StrategyId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DefaultAddrPoolType": {
"Type": "String",
"Description": {
"en": "The type of the default address pool.",
"zh": "默认地址池的类型。"
},
"AllowedValues": [
"IPV4",
"IPV6",
"DOMAIN"
],
"Required": true
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the Dns instance.",
"zh": "DNS实例的ID。"
},
"Required": true
},
"DefaultMinAvailableAddrNum": {
"Type": "Number",
"Description": {
"en": "The minimum available address number of the default address pool.",
"zh": "默认地址池的最小可用地址数量。"
},
"Required": true,
"MinValue": 1,
"MaxValue": 400
},
"DefaultAddrPool": {
"AssociationPropertyMetadata": {
"Parameters": {
"LbaWeight": {
"Type": "Number",
"Description": {
"en": "The load balancing weight of the address pool.",
"zh": "地址池的负载均衡权重。"
},
"Required": false
},
"Id": {
"Type": "String",
"Description": {
"en": "The ID of the address pool.",
"zh": "地址池的ID。"
},
"Required": false
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "The default address pool of the access strategy.",
"zh": "访问策略的默认地址池。"
},
"Required": true,
"MinLength": 1,
"MaxLength": 100
},
"StrategyName": {
"Type": "String",
"Description": {
"en": "The name of the access strategy.",
"zh": "访问策略的名称。"
},
"Required": true
},
"StrategyMode": {
"Type": "String",
"Description": {
"en": "The mode of the access strategy.",
"zh": "访问策略的模式。"
},
"AllowedValues": [
"GEO",
"LATENCY"
],
"Required": true
}
},
"Resources": {
"AccessStrategy": {
"Type": "ALIYUN::DNS::AccessStrategy",
"Properties": {
"DefaultAddrPoolType": {
"Ref": "DefaultAddrPoolType"
},
"InstanceId": {
"Ref": "InstanceId"
},
"DefaultMinAvailableAddrNum": {
"Ref": "DefaultMinAvailableAddrNum"
},
"DefaultAddrPool": {
"Ref": "DefaultAddrPool"
},
"StrategyName": {
"Ref": "StrategyName"
},
"StrategyMode": {
"Ref": "StrategyMode"
}
}
}
},
"Outputs": {
"StrategyId": {
"Description": {
"en": "The ID of the access strategy.",
"zh": "访问策略的ID。"
},
"Value": {
"Fn::GetAtt": [
"AccessStrategy",
"StrategyId"
]
}
}
}
}