DATASOURCE::VPC::PrefixList类型用于查询指定前缀列表的列表信息。
语法
{
  "Type": "DATASOURCE::VPC::PrefixList",
  "Properties": {
    "PrefixListId": String,
    "RefreshOptions": String
  }
}属性
属性名称  | 类型  | 必须  | 允许更新  | 描述  | 约束  | 
PrefixListId  | String  | 是  | 是  | 要查询的前缀列表ID。  | 无  | 
RefreshOptions  | String  | 否  | 是  | 当资源栈更新时,数据源资源的刷新策略。  | 有效值: 
  | 
返回值
Fn::GetAtt
MaxEntries:前缀列表中CIDR地址块的最大条目数。
ResourceGroupId:前缀列表所属的资源组ID。
OwnerId:前缀列表所属的阿里云账号(主账号)。
PrefixListDescription:前缀列表的描述信息。
IpVersion:前缀列表的IP版本。
PrefixListId:查询到的前缀列表ID。
PrefixListName:前缀列表的名称。
CreateTime:创建前缀列表的时间。
Entries:前缀列表中的CIDR地址块列表。
Tags:标签列表。
ShareType:前缀列表的共享类型。
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  PrefixListId:
    Description:
      en: The ID of the query Prefix List.
    Required: true
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      PrefixListId:
        Ref: PrefixListId
    Type: DATASOURCE::VPC::PrefixList
Outputs:
  CreateTime:
    Description: The time when the prefix list was created.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - CreateTime
  Entries:
    Description: The CIDR address block list of the prefix list.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Entries
  IpVersion:
    Description: The IP version of the prefix list.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - IpVersion
  MaxEntries:
    Description: The maximum number of entries for CIDR address blocks in the prefix
      list.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - MaxEntries
  OwnerId:
    Description: The Alibaba Cloud account (primary account) to which the prefix list
      belongs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - OwnerId
  PrefixListDescription:
    Description: The description of the prefix list.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - PrefixListDescription
  PrefixListId:
    Description: The ID of the query Prefix List.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - PrefixListId
  PrefixListName:
    Description: The name of the prefix list.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - PrefixListName
  ResourceGroupId:
    Description: The ID of the resource group to which the VPC belongs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - ResourceGroupId
  ShareType:
    Description: The share type of the prefix list.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - ShareType
  Tags:
    Description: The tags of PrefixList.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Tags
                        {
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PrefixListId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the query Prefix List."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::PrefixList",
      "Properties": {
        "PrefixListId": {
          "Ref": "PrefixListId"
        }
      }
    }
  },
  "Outputs": {
    "MaxEntries": {
      "Description": "The maximum number of entries for CIDR address blocks in the prefix list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MaxEntries"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group to which the VPC belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "OwnerId": {
      "Description": "The Alibaba Cloud account (primary account) to which the prefix list belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "OwnerId"
        ]
      }
    },
    "PrefixListDescription": {
      "Description": "The description of the prefix list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PrefixListDescription"
        ]
      }
    },
    "IpVersion": {
      "Description": "The IP version of the prefix list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IpVersion"
        ]
      }
    },
    "PrefixListId": {
      "Description": "The ID of the query Prefix List.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PrefixListId"
        ]
      }
    },
    "PrefixListName": {
      "Description": "The name of the prefix list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PrefixListName"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the prefix list was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "Entries": {
      "Description": "The CIDR address block list of the prefix list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Entries"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of PrefixList.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    },
    "ShareType": {
      "Description": "The share type of the prefix list.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ShareType"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?