DATASOURCE::CLOUDFW::AddressBooks类型用于查询云防火墙访问控制策略地址簿的详细信息。
语法
{
  "Type": "DATASOURCE::CLOUDFW::AddressBooks",
  "Properties": {
    "GroupType": String,
    "Lang": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| GroupType | String | 否 | 是 | 地址簿的类型。 | 取值: 
 说明  不设置该参数表示查询IP地址簿和ECS标签地址簿。 | 
| Lang | String | 否 | 是 | 请求消息的语言类型。 | 取值: 
 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- AddressBooks:地址簿信息列表。 
- GroupUuids:地址簿的唯一标识ID列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| GroupUuids | List | 地址簿的唯一标识ID列表。 | 无 | 
| AddressBooks | List | 地址簿信息列表。 | 无 | 
| AutoAddTagEcs | String | 是否自动添加新匹配标签的ECS(新购且完成标签设置的ECS或修改标签的ECS)公网IP到地址簿。 | 取值: 
 | 
| Tags | List | 标签信息。 | 无 | 
| GroupUuid | String | 地址簿的唯一标识ID。 | 无 | 
| AddressListCount | String | 地址簿中包含地址的个数。 | 无 | 
| GroupName | String | 地址簿的名称。 | 无 | 
| ReferenceCount | String | 地址簿被引用次数。 | 无 | 
| TagRelation | String | 多个ECS标签间的关系。 | 取值: 
 | 
| AddressList | List | 地址簿的地址列表。 | 无 | 
| Description | String | 地址簿的描述信息。 | 无 | 
| GroupType | String | 地址簿的类型。 | 取值: 
 | 
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GroupType:
    AllowedValues:
    - ip
    - domain
    - port
    - tag
    Description:
      en: 'Address Book, it can be set to include:
        - **ip**: an IP address book
        - **domain**: domain name address book
        - **port**: port Address Book
        - **tag**:ECS tag address book.'
    Required: false
    Type: String
  Lang:
    Description:
      en: 'The language type of the received message.
        - **zh** (default): Chinese.
        - **en**: English.'
    Required: false
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      GroupType:
        Ref: GroupType
      Lang:
        Ref: Lang
    Type: DATASOURCE::CLOUDFW::AddressBooks
Outputs:
  AddressBooks:
    Description: The list of address books.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - AddressBooks
  GroupUuids:
    Description: The list of group uuids.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - GroupUuids
                        JSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupType": {
      "Type": "String",
      "Description": {
        "en": "Address Book, it can be set to include:\n- **ip**: an IP address book\n- **domain**: domain name address book\n- **port**: port Address Book\n- **tag**:ECS tag address book."
      },
      "AllowedValues": [
        "ip",
        "domain",
        "port",
        "tag"
      ],
      "Required": false
    },
    "Lang": {
      "Type": "String",
      "Description": {
        "en": "The language type of the received message.\n- **zh** (default): Chinese.\n- **en**: English."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::CLOUDFW::AddressBooks",
      "Properties": {
        "GroupType": {
          "Ref": "GroupType"
        },
        "Lang": {
          "Ref": "Lang"
        }
      }
    }
  },
  "Outputs": {
    "AddressBooks": {
      "Description": "The list of address books.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AddressBooks"
        ]
      }
    },
    "GroupUuids": {
      "Description": "The list of group uuids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GroupUuids"
        ]
      }
    }
  }
}