全部产品
Search
文档中心

资源编排:DATASOURCE::VPC::VSwitch

更新时间:Sep 02, 2024

DATASOURCE::VPC::VSwitch类型用于查询单个交换机详情。

语法

{
  "Type": "DATASOURCE::VPC::VSwitch",
  "Properties": {
    "VSwitchId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

VSwitchId

String

交换机 ID。

返回值

Fn::GetAtt

  • IsDefault:是否是默认交换机。

  • RouteTableId:交换机关联的路由表 ID。

  • Description:交换机的描述。

  • ZoneId:交换机的所属可用区。

  • ResourceGroupId:资源组 ID。

  • AvailableIpAddressCount:可用 IP 数量。

  • VSwitchId:交换机 ID。

  • CreateTime:交换机的创建时间。

  • CidrBlock:交换机的私网地址范围。

  • VpcId:交换机所属的 VPC ID。

  • VSwitchName:交换机名称。

  • Ipv6CidrBlock:交换机的 IPv6 网段。

  • Tags:交换机绑定的标签列表信息。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VSwitchId:
        AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
        Type: String
        Description:
          en: The ID of the VSwitch.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::VPC::VSwitch
        Properties:
          VSwitchId:
            Ref: VSwitchId
    Outputs:
      IsDefault:
        Description: Indicates whether the VSwitch is a default VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - IsDefault
      RouteTableId:
        Description: The route table id.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - RouteTableId
      Description:
        Description: The description of VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Description
      ZoneId:
        Description: The zone ID  of the resource.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ZoneId
      ResourceGroupId:
        Description: The resource group id of VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ResourceGroupId
      AvailableIpAddressCount:
        Description: The number of available IP addresses.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - AvailableIpAddressCount
      VSwitchId:
        Description: The ID of the VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VSwitchId
      CreateTime:
        Description: The creation time of the VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CreateTime
      CidrBlock:
        Description: The IPv4 CIDR block of the VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CidrBlock
      VpcId:
        Description: The VPC ID.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VpcId
      VSwitchName:
        Description: The name of the VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VSwitchName
      Ipv6CidrBlock:
        Description: The IPv6 CIDR block of the VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Ipv6CidrBlock
      Tags:
        Description: The tags of VSwitch.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Tags
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VSwitchId": {
          "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
          "Type": "String",
          "Description": {
            "en": "The ID of the VSwitch."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::VPC::VSwitch",
          "Properties": {
            "VSwitchId": {
              "Ref": "VSwitchId"
            }
          }
        }
      },
      "Outputs": {
        "IsDefault": {
          "Description": "Indicates whether the VSwitch is a default VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "IsDefault"
            ]
          }
        },
        "RouteTableId": {
          "Description": "The route table id.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "RouteTableId"
            ]
          }
        },
        "Description": {
          "Description": "The description of VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Description"
            ]
          }
        },
        "ZoneId": {
          "Description": "The zone ID  of the resource.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ZoneId"
            ]
          }
        },
        "ResourceGroupId": {
          "Description": "The resource group id of VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ResourceGroupId"
            ]
          }
        },
        "AvailableIpAddressCount": {
          "Description": "The number of available IP addresses.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "AvailableIpAddressCount"
            ]
          }
        },
        "VSwitchId": {
          "Description": "The ID of the VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VSwitchId"
            ]
          }
        },
        "CreateTime": {
          "Description": "The creation time of the VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        },
        "CidrBlock": {
          "Description": "The IPv4 CIDR block of the VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CidrBlock"
            ]
          }
        },
        "VpcId": {
          "Description": "The VPC ID.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VpcId"
            ]
          }
        },
        "VSwitchName": {
          "Description": "The name of the VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VSwitchName"
            ]
          }
        },
        "Ipv6CidrBlock": {
          "Description": "The IPv6 CIDR block of the VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Ipv6CidrBlock"
            ]
          }
        },
        "Tags": {
          "Description": "The tags of VSwitch.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Tags"
            ]
          }
        }
      }
    }