Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::VPC::VSwitch

Última atualização: Jun 27, 2026

Consulta os detalhes de um vSwitch.

Sintaxe

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

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

VSwitchId

String

Sim

Sim

ID do vSwitch.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos da source de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos da source de dados durante a atualização da pilha.

  • Always: atualiza os recursos da source de dados durante a atualização da pilha.

Valores de retorno

Fn::GetAtt

  • IsDefault: indica se o vSwitch é o vSwitch padrão.

  • RouteTableId: ID da tabela de rotas associada ao vSwitch.

  • Description: descrição do vSwitch.

  • ZoneId: ID da zona do vSwitch.

  • ResourceGroupId: ID do grupo de recursos.

  • AvailableIpAddressCount: quantidade de endereços IP disponíveis.

  • VSwitchId: ID do vSwitch.

  • CreateTime: hora de criação do vSwitch.

  • CidrBlock: bloco CIDR IPv4 do vSwitch.

  • VpcId: ID da Virtual Private Cloud (VPC) à qual o vSwitch pertence.

  • VSwitchName: nome do vSwitch.

  • Ipv6CidrBlock: bloco CIDR IPv6 do vSwitch.

  • Tags: tags do vSwitch.

Exemplos

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
{
  "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"
        ]
      }
    }
  }
}