全部产品
Search
文档中心

资源编排:ALIYUN::CLOUDFW::AddressBook

更新时间:Jul 18, 2024

ALIYUN::CLOUDFW::AddressBook类型用于添加安全访问控制地址簿,包括IP地址簿、ECS标签地址簿、端口地址簿和域名地址簿。

语法

{
  "Type": "ALIYUN::CLOUDFW::AddressBook",
  "Properties": {
    "GroupType": String,
    "AutoAddTagEcs": Boolean,
    "Description": String,
    "TagRelation": String,
    "RegionId": String,
    "GroupName": String,
    "AddressList": String,
    "TagList": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Description

String

地址簿的描述信息。

无。

GroupName

String

地址簿的名称。

无。

GroupType

String

地址簿的类型。

取值范围:

  • IP:IP地址簿。

  • domain:域名地址簿。

  • port:端口地址簿。

  • tag:ECS标签地址簿。

AddressList

String

地址簿的地址列表,多个地址间用英文逗号分隔。

说明

当GroupType为IP、port或domain时必须设置。

  • 当GroupType为IP时,地址列表中填写IP地址。例如:10.10.XX.XX/32,10.10.XX.XX/24。

  • 当GroupType为port时,地址列表中填写端口或端口范围。例如:80,100/200。

  • 当GroupType为domain时,地址列表中填写域名。例如:demo1.aliyun.com,demo2.aliyun.com

AutoAddTagEcs

Boolean

是否自动添加新匹配标签的ECS公网IP到地址簿。

取值范围:

  • true

  • false

RegionId

String

地域。默认值:cn-hangzhou。

取值范围:

  • cn-hangzhou

  • ap-southeast-1

TagList

List

待匹配的ECS标签。

无。

TagRelation

String

待匹配的多个ECS标签间的关系。

取值范围:

  • and:多个标签间为“与”关系,即同时匹配多个标签的ECS公网IP才会被加入地址簿。

  • or:多个标签间为“或”关系,即只要匹配一个标签的ECS公网IP就会被加入地址簿。

TagList语法

"TagList": [
  {
    "TagKey": String,
    "TagValue": String
  }
]

TagList属性

属性名称

类型

必须

允许更新

描述

约束

TagKey

String

待匹配的ECS标签Key。

无。

TagValue

String

待匹配的ECS标签值。

无。

返回值

Fn::GetAtt

GroupUuid:添加成功后返回的地址簿唯一标识ID。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  AddressBook:
    Type: ALIYUN::CLOUDFW::AddressBook
    Properties:
      GroupType:
        Ref: GroupType
      AutoAddTagEcs:
        Ref: AutoAddTagEcs
      Description:
        Ref: Description
      TagRelation:
        Ref: TagRelation
      RegionId:
        Ref: RegionId
      GroupName:
        Ref: GroupName
      AddressList:
        Ref: AddressList
      TagList:
        Ref: TagList
Parameters:
  GroupType:
    Type: String
    Description: 'Type the address book, the optional values: ip: IP Address Book.
      domain: domain name address book .port: Port Address Book. tag: ECS label address
      book'
    AllowedValues:
    - domain
    - ip
    - port
    - tag
  AutoAddTagEcs:
    Default: false
    Type: Boolean
    Description: Whether to automatically add new ECS public network IP matching tags
      to the address book. Default to false.
    AllowedValues:
    - 'True'
    - 'true'
    - 'False'
    - 'false'
  Description:
    MinLength: 1
    Type: String
    Description: Address book description.
  TagRelation:
    Type: String
    Description: 'The relationship between the labels to be matched more ECS. and:
      the relationship between multiple labels. and: that matches both ECS IP public
      network more tags will be added to the address book. or: a plurality of inter-labeled
      or relationship, i.e., as long as a matching tag ECS public IP address book
      will be added.'
    AllowedValues:
    - and
    - or
  RegionId:
    Default: cn-hangzhou
    Type: String
    Description: Region ID. Default to cn-hangzhou.
    AllowedValues:
    - cn-hangzhou
    - ap-southeast-1
  GroupName:
    Type: String
    Description: Name Address book.
  AddressList:
    Type: String
    Description: |-
      Address list of the address book, between multiple addresses separated by commas.
      Note: When GroupType ip, it must be set to port or domain.
      When GroupType as ip, address list, fill in the IP address. For example: 10.10.XX.XX/32, 10.10.XX.XX/24
      When GroupType for the port, the address list to fill in ports or port ranges. For example: 80, 100/200
      When GroupType for the domain, the domain name to fill in the address list. For example: demo1.aliyun.com, demo2.aliyun.com
  TagList:
    Type: Json
    Description: ''
    MaxLength: 100
Outputs:
  GroupUuid:
    Description: After a successful return to the address book to add unique identification
      ID.
    Value:
      Fn::GetAtt:
      - AddressBook
      - GroupUuid

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "AddressBook": {
      "Type": "ALIYUN::CLOUDFW::AddressBook",
      "Properties": {
        "GroupType": {
          "Ref": "GroupType"
        },
        "AutoAddTagEcs": {
          "Ref": "AutoAddTagEcs"
        },
        "Description": {
          "Ref": "Description"
        },
        "TagRelation": {
          "Ref": "TagRelation"
        },
        "RegionId": {
          "Ref": "RegionId"
        },
        "GroupName": {
          "Ref": "GroupName"
        },
        "AddressList": {
          "Ref": "AddressList"
        },
        "TagList": {
          "Ref": "TagList"
        }
      }
    }
  },
  "Parameters": {
    "GroupType": {
      "Type": "String",
      "Description": "Type the address book, the optional values: ip: IP Address Book. domain: domain name address book .port: Port Address Book. tag: ECS label address book",
      "AllowedValues": [
        "domain",
        "ip",
        "port",
        "tag"
      ]
    },
    "AutoAddTagEcs": {
      "Default": false,
      "Type": "Boolean",
      "Description": "Whether to automatically add new ECS public network IP matching tags to the address book. Default to false.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Description": {
      "MinLength": 1,
      "Type": "String",
      "Description": "Address book description."
    },
    "TagRelation": {
      "Type": "String",
      "Description": "The relationship between the labels to be matched more ECS. and: the relationship between multiple labels. and: that matches both ECS IP public network more tags will be added to the address book. or: a plurality of inter-labeled or relationship, i.e., as long as a matching tag ECS public IP address book will be added.",
      "AllowedValues": [
        "and",
        "or"
      ]
    },
    "RegionId": {
      "Default": "cn-hangzhou",
      "Type": "String",
      "Description": "Region ID. Default to cn-hangzhou.",
      "AllowedValues": [
        "cn-hangzhou",
        "ap-southeast-1"
      ]
    },
    "GroupName": {
      "Type": "String",
      "Description": "Name Address book."
    },
    "AddressList": {
      "Type": "String",
      "Description": "Address list of the address book, between multiple addresses separated by commas.\nNote: When GroupType ip, it must be set to port or domain.\nWhen GroupType as ip, address list, fill in the IP address. For example: 10.10.XX.XX/32, 10.10.XX.XX/24\nWhen GroupType for the port, the address list to fill in ports or port ranges. For example: 80, 100/200\nWhen GroupType for the domain, the domain name to fill in the address list. For example: demo1.aliyun.com, demo2.aliyun.com"
    },
    "TagList": {
      "Type": "Json",
      "Description": "",
      "MaxLength": 100
    }
  },
  "Outputs": {
    "GroupUuid": {
      "Description": "After a successful return to the address book to add unique identification ID.",
      "Value": {
        "Fn::GetAtt": [
          "AddressBook",
          "GroupUuid"
        ]
      }
    }
  }
}