资源编排 ALIYUN::POLARDB::DBClusterAccessWhiteList

By | 2021年4月22日

ALIYUN::POLARDB::DBClusterAccessWhiteList类型用于修改允许访问数据库集群的IP名单。

语法

{
  "Type": "ALIYUN::POLARDB::DBClusterAccessWhiteList",
  "Properties": {
    "DBClusterId": String,
    "DBClusterIPArrayName": String,
    "SecurityIps": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
DBClusterId String 数据库集群ID。 无。
DBClusterIPArrayName String IP白名单分组的名称。 一个集群最多支持50个白名单分组。默认值:Default。
SecurityIps String IP白名单分组下的IP列表。 多个IP之间用英文逗号(,)隔开,支持以下两种格式:

  • IP地址形式,例如10.23.12.24。
  • CIDR形式,例如10.23.12.24/24(无类域间路由,24表示地址中前缀的长度,其范围为1~32)。

IP列表中的IP数量最多1000个。

返回值

Fn::GetAtt

DBClusterId:集群ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "DBClusterAccessWhiteList": {
      "Type": "ALIYUN::POLARDB::DBClusterAccessWhiteList",
      "Properties": {
        "DBClusterId": {
          "Ref": "DBClusterId"
        },
        "DBClusterIPArrayName": {
          "Ref": "DBClusterIPArrayName"
        },
        "SecurityIps": {
          "Ref": "SecurityIps"
        }
      }
    }
  },
  "Parameters": {
    "DBClusterId": {
      "Type": "String",
      "Description": "The ID of the ApsaraDB for POLARDB cluster whose IP address whitelist is to be modified."
    },
    "DBClusterIPArrayName": {
      "MinLength": 1,
      "Type": "String",
      "Description": "The name of the IP address whitelist group. If you do not specify this parameter,\nthe Default whitelist group is modified by default.\nNote You can create up to 50 whitelist groups for an ApsaraDB for POLARDB cluster."
    },
    "SecurityIps": {
      "Type": "String",
      "Description": "The IP addresses to be added to the IP address whitelist group to be modified. Each\nwhitelist group can contain a maximum of 1,000 IP addresses. Separate multiple IP\naddresses with a comma (,). The following two formats are supported:\nIP address: for example, 10.23.12.24.\nClassless inter-domain routing (CIDR) block: for example, 10.23.12.24/24, where the\nsuffix /24 indicates the number of bits for the prefix of the IP address. The suffix\nranges from 1 to 32."
    }
  },
  "Outputs": {
    "DBClusterId": {
      "Description": "The ID of the ApsaraDB for POLARDB cluster whose IP address whitelist is to be modified.",
      "Value": {
        "Fn::GetAtt": [
          "DBClusterAccessWhiteList",
          "DBClusterId"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  DBClusterAccessWhiteList:
    Type: ALIYUN::POLARDB::DBClusterAccessWhiteList
    Properties:
      DBClusterId:
        Ref: DBClusterId
      DBClusterIPArrayName:
        Ref: DBClusterIPArrayName
      SecurityIps:
        Ref: SecurityIps
Parameters:
  DBClusterId:
    Type: String
    Description: The ID of the ApsaraDB for POLARDB cluster whose IP address whitelist
      is to be modified.
  DBClusterIPArrayName:
    MinLength: 1
    Type: String
    Description: |-
      The name of the IP address whitelist group. If you do not specify this parameter,
      the Default whitelist group is modified by default.
      Note You can create up to 50 whitelist groups for an ApsaraDB for POLARDB cluster.
  SecurityIps:
    Type: String
    Description: |-
      The IP addresses to be added to the IP address whitelist group to be modified. Each
      whitelist group can contain a maximum of 1,000 IP addresses. Separate multiple IP
      addresses with a comma (,). The following two formats are supported:
      IP address: for example, 10.23.12.24.
      Classless inter-domain routing (CIDR) block: for example, 10.23.12.24/24, where the
      suffix /24 indicates the number of bits for the prefix of the IP address. The suffix
      ranges from 1 to 32.
Outputs:
  DBClusterId:
    Description: The ID of the ApsaraDB for POLARDB cluster whose IP address whitelist
      is to be modified.
    Value:
      Fn::GetAtt:
      - DBClusterAccessWhiteList
      - DBClusterId

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注