DATASOURCE::VPC::Vpc

DATASOURCE::VPC::Vpc类型用于查询单个VPC详情。

语法

{
  "Type": "DATASOURCE::VPC::Vpc",
  "Properties": {
    "VpcId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

VpcId

String

专有网络ID。

返回值

Fn::GetAtt

  • IsDefault:是否查询指定地域下的默认 VPC

  • Description:VPC 的描述信息。

  • ClassicLinkEnabled:VPC ClassicLink的状态。

  • ResourceGroupId:要查询的 VPC 所属的资源组 ID。

  • SecondaryCidrBlocks:附加网段信息。

  • VSwitchIds:查询到的 VPC 中交换机的列表信息。

  • CreateTime:专有网络的创建时间。

  • RouterId:VPC 路由器的 ID。

  • CidrBlock:VPC 的 IPv4 网段。

  • UserCidrs:用户侧网段的列表。

  • DhcpOptionsSetId:DHCP 选项集的 ID。

  • VpcId:专有网络ID。

  • VpcName:VPC 的名称。

  • Ipv6CidrBlock:VPC 的 IPv6 网段。

  • Ipv6CidrBlocks:VPC 的 IPv6 网段信息。

  • Tags:VPC 的标签信息。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VpcId:
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
        Type: String
        Description:
          en: The ID of the VPC.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::VPC::Vpc
        Properties:
          VpcId:
            Ref: VpcId
    Outputs:
      IsDefault:
        Description: |-
          Indicates whether to query the default VPC in the specified region. Valid values: 
          - true (default): All VPCs in the specified region are queried.
          - false: The default VPC is not queried.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - IsDefault
      Description:
        Description: The description of the VPC.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Description
      ClassicLinkEnabled:
        Description: status of vpc  ClassicLink..
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ClassicLinkEnabled
      ResourceGroupId:
        Description: The ID of the resource group to which the VPC belongs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ResourceGroupId
      SecondaryCidrBlocks:
        Description: Additional network segment information.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - SecondaryCidrBlocks
      VSwitchIds:
        Description: A list of VSwitches in the VPC.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VSwitchIds
      CreateTime:
        Description: The time at which the VPC was created.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CreateTime
      RouterId:
        Description: The ID of the VRouter.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - RouterId
      CidrBlock:
        Description: The IPv4 CIDR block of the VPC.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CidrBlock
      UserCidrs:
        Description: A list of user CIDRs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - UserCidrs
      DhcpOptionsSetId:
        Description: The ID of the DHCP option set.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DhcpOptionsSetId
      VpcId:
        Description: The ID of the VPC.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VpcId
      VpcName:
        Description: The name of the VPC.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VpcName
      Ipv6CidrBlock:
        Description: The ipv6 cidr block of vpc.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Ipv6CidrBlock
      Ipv6CidrBlocks:
        Description: The IPv6 network segment of the VPC.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Ipv6CidrBlocks
      Tags:
        Description: The tags of Vpc.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Tags
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VpcId": {
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
          "Type": "String",
          "Description": {
            "en": "The ID of the VPC."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::VPC::Vpc",
          "Properties": {
            "VpcId": {
              "Ref": "VpcId"
            }
          }
        }
      },
      "Outputs": {
        "IsDefault": {
          "Description": "Indicates whether to query the default VPC in the specified region. Valid values: \n- true (default): All VPCs in the specified region are queried.\n- false: The default VPC is not queried.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "IsDefault"
            ]
          }
        },
        "Description": {
          "Description": "The description of the VPC.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Description"
            ]
          }
        },
        "ClassicLinkEnabled": {
          "Description": "status of vpc  ClassicLink..",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ClassicLinkEnabled"
            ]
          }
        },
        "ResourceGroupId": {
          "Description": "The ID of the resource group to which the VPC belongs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ResourceGroupId"
            ]
          }
        },
        "SecondaryCidrBlocks": {
          "Description": "Additional network segment information.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SecondaryCidrBlocks"
            ]
          }
        },
        "VSwitchIds": {
          "Description": "A list of VSwitches in the VPC.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VSwitchIds"
            ]
          }
        },
        "CreateTime": {
          "Description": "The time at which the VPC was created.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        },
        "RouterId": {
          "Description": "The ID of the VRouter.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "RouterId"
            ]
          }
        },
        "CidrBlock": {
          "Description": "The IPv4 CIDR block of the VPC.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CidrBlock"
            ]
          }
        },
        "UserCidrs": {
          "Description": "A list of user CIDRs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "UserCidrs"
            ]
          }
        },
        "DhcpOptionsSetId": {
          "Description": "The ID of the DHCP option set.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DhcpOptionsSetId"
            ]
          }
        },
        "VpcId": {
          "Description": "The ID of the VPC.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VpcId"
            ]
          }
        },
        "VpcName": {
          "Description": "The name of the VPC.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VpcName"
            ]
          }
        },
        "Ipv6CidrBlock": {
          "Description": "The ipv6 cidr block of vpc.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Ipv6CidrBlock"
            ]
          }
        },
        "Ipv6CidrBlocks": {
          "Description": "The IPv6 network segment of the VPC.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Ipv6CidrBlocks"
            ]
          }
        },
        "Tags": {
          "Description": "The tags of Vpc.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Tags"
            ]
          }
        }
      }
    }