全部產品
Search
文件中心

:ALIYUN::POLARDB::DBClusterAccessWhiteList

更新時間:May 30, 2025

ALIYUN::POLARDB::DBClusterAccessWhiteList類型用於修改允許訪問資料庫叢集的IP名單。

文法

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

屬性

屬性名稱

類型

必須

允許更新

描述

約束

DBClusterId

String

資料庫叢集ID。

無。

DBClusterIPArrayName

String

IP白名單分組的名稱。

一個叢集最多支援50個白名單分組。預設值:Default。

說明

PolarDB叢集不允許刪除default分組的白名單。因此,如果資源建立時,DBClusterIPArrayName屬性設定為default,在該資源刪除時,ROS會忽略其刪除邏輯。

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。

樣本

{
  "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"
        ]
      }
    }
  }
}
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