ALIYUN::POLARDB::GlobalSecurityIPGroup

ALIYUN::POLARDB::GlobalSecurityIPGroup类型用于创建全局IP白名单模板。

语法

{
  "Type": "ALIYUN::POLARDB::GlobalSecurityIPGroup",
  "Properties": {
    "GlobalIgName": String,
    "GIpList": List,
    "ResourceGroupId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

GlobalIgName

String

IP白名单模板名称。

IP白名单模板名称需满足如下要求:

  • 由小写字母、数字、下划线(_)组成。

  • 由字母开头、字母或数字结尾。

  • 长度为 2~120 个字符。

GIpList

List

白名单模板内的IP地址。

所有IP白名单累计支持添加 1000IP地址或地址段。

ResourceGroupId

String

资源组ID。

返回值

Fn::GetAtt

GlobalSecurityGroupId:IP白名单模板ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GlobalIgName:
    Type: String
    Description:
      en: |-
        The name of the IP whitelist template. The name must meet the following requirements:
        The name can contain lowercase letters, digits, and underscores (_).
        The name must start with a letter and end with a letter or digit.
        The name must be 2 to 120 characters in length.
    Required: true
    AllowedPattern: ^[a-z][a-z0-9_]*[a-z0-9]$
    MinLength: 2
    MaxLength: 120
  GIpList:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: The IP address in the whitelist template.
        Required: false
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: |-
        The IP addresses in the whitelist template.
        You can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists.
    Required: true
    MinLength: 1
    MaxLength: 1000
Resources:
  GlobalSecurityIPGroup:
    Type: ALIYUN::POLARDB::GlobalSecurityIPGroup
    Properties:
      GlobalIgName:
        Ref: GlobalIgName
      GIpList:
        Ref: GIpList
Outputs:
  GlobalSecurityGroupId:
    Description: The ID of the IP whitelist template.
    Value:
      Fn::GetAtt:
        - GlobalSecurityIPGroup
        - GlobalSecurityGroupId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GlobalIgName": {
      "Type": "String",
      "Description": {
        "en": "The name of the IP whitelist template. The name must meet the following requirements:\nThe name can contain lowercase letters, digits, and underscores (_).\nThe name must start with a letter and end with a letter or digit.\nThe name must be 2 to 120 characters in length."
      },
      "Required": true,
      "AllowedPattern": "^[a-z][a-z0-9_]*[a-z0-9]$",
      "MinLength": 2,
      "MaxLength": 120
    },
    "GIpList": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "The IP address in the whitelist template."
          },
          "Required": false
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The IP addresses in the whitelist template.\nYou can create up to 1,000 IP addresses or CIDR blocks for all IP whitelists."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 1000
    }
  },
  "Resources": {
    "GlobalSecurityIPGroup": {
      "Type": "ALIYUN::POLARDB::GlobalSecurityIPGroup",
      "Properties": {
        "GlobalIgName": {
          "Ref": "GlobalIgName"
        },
        "GIpList": {
          "Ref": "GIpList"
        }
      }
    }
  },
  "Outputs": {
    "GlobalSecurityGroupId": {
      "Description": "The ID of the IP whitelist template.",
      "Value": {
        "Fn::GetAtt": [
          "GlobalSecurityIPGroup",
          "GlobalSecurityGroupId"
        ]
      }
    }
  }
}