全部产品
Search
文档中心

资源编排:ALIYUN::DNS::AddressPool

更新时间:Mar 30, 2026

ALIYUN::DNS::AddressPool类型用于创建地址池。

语法

{
  "Type": "ALIYUN::DNS::AddressPool",
  "Properties": {
    "Addr": List,
    "InstanceId": String,
    "LbaStrategy": String,
    "Name": String,
    "Type": String,
    "EvaluationCount": Integer,
    "IspCityNode": List,
    "Interval": Integer,
    "MonitorExtendInfo": Map,
    "MonitorStatus": String,
    "ProtocolType": String,
    "Timeout": Integer
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Addr

List

地址池中的地址列表。

长度限制:最小1,最大50。更多信息,请参考Addr属性

InstanceId

String

GTM实例的ID。

LbaStrategy

String

负载均衡策略。

允许值:

  • ALL_RR: 返回全部地址

  • RATIO:按权重返回地址

Name

String

地址池的名称。

Type

String

地址池的类型。

允许值:

  • IPV4:ipv4 地址

  • IPV6: ipv6 地址

  • DOMAIN:域名

EvaluationCount

Integer

系统在将地址标记为不健康之前等待每个地址响应的次数。

范围限制:最小1,最大9999999

Interval

Integer

两次连续健康检查之间的间隔。

单位为秒。范围限制:最小1,最大9999999

IspCityNode

List

ISP城市节点列表。

长度限制:最小1,最大20。更多信息,请参考IspCityNode属性

MonitorExtendInfo

Map

健康检查的扩展信息。

MonitorStatus

String

地址池的监控状态。

允许值:

  • OPEN:开启

  • CLOSE:关闭

  • UNCONFIGURED:未配置

ProtocolType

String

协议类型。

允许值:

  • HTTP

  • HTTPS

  • PING

  • TCP

Timeout

Integer

健康检查的超时时间。

单位为秒。范围限制:最小1,最大9999999

IspCityNode语法

"IspCityNode": [
  {
    "CityCode": String,
    "IspCode": String
  }
]

IspCityNode属性

属性名称

类型

必须

允许更新

描述

约束

CityCode

String

城市代码。

IspCode

String

ISP代码。

Addr语法

"Addr": [
  {
    "AttributeInfo": Map,
    "LbaWeight": Integer,
    "Mode": String,
    "Addr": String,
    "Remark": String
  }
]

Addr属性

属性名称

类型

必须

允许更新

描述

约束

Addr

String

地址值。

AttributeInfo

Map

地址的属性信息。

Mode

String

地址的模式。

允许值:

  • SMART:智能返回

  • ONLINE:永远在线

  • OFFLINE:永远离线

LbaWeight

Integer

地址的权重。

Remark

String

地址的备注。

返回值

Fn::GetAtt

AddrPoolId:地址池的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Type:
    Type: String
    Description:
      en: 'The type of the address pool. Valid values: Ipv4, Ipv6, Domain.'
      zh: 地址池的类型。取值范围:Ipv4、Ipv6、Domain。
    AllowedValues:
      - IPV4
      - IPV6
      - DOMAIN
    Required: true
  LbaStrategy:
    Type: String
    Description:
      en: 'The load balancing strategy. Valid values: RoundRobin, Weighted, FallbackToFirst.'
      zh: 负载均衡策略。取值范围:RoundRobin、Weighted、FallbackToFirst。
    AllowedValues:
      - ALL_RR
      - RATIO
    Required: true
  InstanceId:
    Type: String
    Description:
      en: The ID of the GTM instance.
      zh: GTM实例的ID。
    Required: true
  Addr:
    AssociationPropertyMetadata:
      Parameter:
        AssociationPropertyMetadata:
          Parameters:
            AttributeInfo:
              Type: Json
              Description:
                en: The attribute information of the address.
                zh: 地址的属性信息。
              Required: true
            LbaWeight:
              Type: Number
              Description:
                en: The weight of the address.
                zh: 地址的权重。
              Required: false
            Mode:
              Type: String
              Description:
                en: 'The mode of the address. Valid values: Normal, Maintenance.'
                zh: 地址的模式。取值范围:Normal、Maintenance。
              AllowedValues:
                - SMART
                - ONLINE
                - OFFLINE
              Required: true
            Addr:
              Type: String
              Description:
                en: The address value.
                zh: 地址值。
              Required: true
            Remark:
              Type: String
              Description:
                en: The remark of the address.
                zh: 地址的备注。
              Required: false
        Type: Json
        Required: false
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: The list of addresses in the address pool.
      zh: 地址池中的地址列表。
    Required: true
    MinLength: 1
    MaxLength: 50
  Name:
    Type: String
    Description:
      en: The name of the address pool.
      zh: 地址池的名称。
    Required: true
Resources:
  AddressPool:
    Type: ALIYUN::DNS::AddressPool
    Properties:
      Type:
        Ref: Type
      LbaStrategy:
        Ref: LbaStrategy
      InstanceId:
        Ref: InstanceId
      Addr:
        Ref: Addr
      Name:
        Ref: Name
Outputs:
  AddrPoolId:
    Description:
      en: The ID of the address pool.
      zh: 地址池的ID。
    Value:
      Fn::GetAtt:
        - AddressPool
        - AddrPoolId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Type": {
      "Type": "String",
      "Description": {
        "en": "The type of the address pool. Valid values: Ipv4, Ipv6, Domain.",
        "zh": "地址池的类型。取值范围:Ipv4、Ipv6、Domain。"
      },
      "AllowedValues": [
        "IPV4",
        "IPV6",
        "DOMAIN"
      ],
      "Required": true
    },
    "LbaStrategy": {
      "Type": "String",
      "Description": {
        "en": "The load balancing strategy. Valid values: RoundRobin, Weighted, FallbackToFirst.",
        "zh": "负载均衡策略。取值范围:RoundRobin、Weighted、FallbackToFirst。"
      },
      "AllowedValues": [
        "ALL_RR",
        "RATIO"
      ],
      "Required": true
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the GTM instance.",
        "zh": "GTM实例的ID。"
      },
      "Required": true
    },
    "Addr": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "AssociationPropertyMetadata": {
            "Parameters": {
              "AttributeInfo": {
                "Type": "Json",
                "Description": {
                  "en": "The attribute information of the address.",
                  "zh": "地址的属性信息。"
                },
                "Required": true
              },
              "LbaWeight": {
                "Type": "Number",
                "Description": {
                  "en": "The weight of the address.",
                  "zh": "地址的权重。"
                },
                "Required": false
              },
              "Mode": {
                "Type": "String",
                "Description": {
                  "en": "The mode of the address. Valid values: Normal, Maintenance.",
                  "zh": "地址的模式。取值范围:Normal、Maintenance。"
                },
                "AllowedValues": [
                  "SMART",
                  "ONLINE",
                  "OFFLINE"
                ],
                "Required": true
              },
              "Addr": {
                "Type": "String",
                "Description": {
                  "en": "The address value.",
                  "zh": "地址值。"
                },
                "Required": true
              },
              "Remark": {
                "Type": "String",
                "Description": {
                  "en": "The remark of the address.",
                  "zh": "地址的备注。"
                },
                "Required": false
              }
            }
          },
          "Type": "Json",
          "Required": false
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The list of addresses in the address pool.",
        "zh": "地址池中的地址列表。"
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 50
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the address pool.",
        "zh": "地址池的名称。"
      },
      "Required": true
    }
  },
  "Resources": {
    "AddressPool": {
      "Type": "ALIYUN::DNS::AddressPool",
      "Properties": {
        "Type": {
          "Ref": "Type"
        },
        "LbaStrategy": {
          "Ref": "LbaStrategy"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Addr": {
          "Ref": "Addr"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "AddrPoolId": {
      "Description": {
        "en": "The ID of the address pool.",
        "zh": "地址池的ID。"
      },
      "Value": {
        "Fn::GetAtt": [
          "AddressPool",
          "AddrPoolId"
        ]
      }
    }
  }
}