文档

DATASOURCE::VPC::VSwitches

更新时间:

DATASOURCE::VPC::VSwitches类型用于查询已创建的交换机。

语法

{
  "Type": "DATASOURCE::VPC::VSwitches",
  "Properties": {
    "IsDefault": Boolean,
    "DhcpOptionsSetId": String,
    "RouteTableId": String,
    "VpcId": String,
    "ResourceGroupId": String,
    "VSwitchIds": List,
    "VSwitchOwnerId": String,
    "VSwitchName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

IsDefault

Boolean

是否查询资源栈所在地域下的默认交换机。

取值:

  • true(默认值):查询。

  • false:不查询。

DhcpOptionsSetId

String

DHCP选项集ID。

RouteTableId

String

路由表ID。

VpcId

String

交换机所属的VPC ID。

ResourceGroupId

String

交换机所属的资源组ID。

VSwitchIds

List

交换机ID列表。

最多支持指定20个交换机。

VSwitchOwnerId

String

交换机所属的账号ID。

VSwitchName

String

交换机名称。

返回数据(Fn::GetAtt)

  • VSwitchIds:交换机ID列表。

  • VSwitches:交换机的详细信息列表。

属性名称

类型

描述

约束

VSwitchIds

List

交换机ID列表。

示例:['vsw-bp1g7w2q0t1ybav6****','vsw-ag457w2q0t1yba35****']

VSwitches

List

交换机的详细信息列表。

VpcId

String

交换机所属的VPC ID。

示例:vpc-257gcdcdq64****

Status

String

交换机状态。

取值:

  • Pending:配置中。

  • Available:可用。

IsDefault

Boolean

是否是默认交换机。

取值:

  • true:是默认交换机。

  • false:不是默认交换机。

AvailableIpAddressCount

String

交换机中可用的IP地址数量。

NetworkAclId

String

网络ACL ID。

示例:nacl-a2do9e413e0spzasx****

VSwitchId

String

交换机ID。

示例:vsw-25bcdxs7pv1****

CidrBlock

String

交换机的IPv4网段。

Description

String

交换机的描述信息。

ResourceGroupId

String

交换机所属的资源组ID。

示例:rg-acfmxazb4ph6aiy****

ZoneId

String

交换机所属的可用区。

Ipv6CidrBlock

String

交换机的IPv6网段。

VSwitchName

String

交换机的名称。

Tags

List

交换机标签信息。

示例:

[{
    "Value": "",
    "Key": "do-not-delete"
}]

RouteTable

List

路由表信息。

示例:

{
    "RouteTableId": "vtb-bp1rne1a22e0dlwvd****",
    "RouteTableType": "System"
}

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
    Label: Existing VPC Instance ID
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::VPC::VSwitches
    Properties:
      VpcId:
        Ref: VpcId
Outputs:
  VSwitchIds:
    Description: The list of The vSwitch Ids.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VSwitchIds
  VSwitches:
    Description: The detailed information about the vSwitches.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VSwitches

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": "Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud",
      "Label": "Existing VPC Instance ID"
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::VSwitches",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        }
      }
    }
  },
  "Outputs": {
    "VSwitchIds": {
      "Description": "The list of The vSwitch Ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VSwitchIds"
        ]
      }
    },
    "VSwitches": {
      "Description": "The detailed information about the vSwitches.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VSwitches"
        ]
      }
    }
  }
}
  • 本页导读 (1)
文档反馈