全部產品
Search
文件中心

:ALIYUN::CLOUDFW::AddressBook

更新時間:Jul 19, 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"
        ]
      }
    }
  }
}