Consulta as informações sobre vSwitches disponíveis que são utilizados para uma rede interna.
Experimente agora
Testar
Autorização RAM
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| VpcId |
string |
Não |
O ID da virtual private cloud (VPC) à qual os vSwitches pertencem. Nota
Você deve definir pelo menos um entre RegionId e VpcId. |
vpc-25cdvfeq58pl**** |
| VSwitchId |
string |
Não |
O ID do vSwitch que você deseja consultar. |
vsw-23dscddcffvf3**** |
| ZoneId |
string |
Não |
O ID da zona à qual os vSwitches pertencem. Você pode chamar a operação DescribeZones para consultar a lista de zonas mais recente. |
cn-hangzhou-d |
| RegionId |
string |
Não |
O ID da região do vSwitch. Você pode chamar a operação DescribeRegions para consultar a lista de regiões mais recente. Nota
Você deve definir pelo menos um entre RegionId e VpcId. |
cn-hangzhou |
| VSwitchName |
string |
Não |
O nome exato do vSwitch que você deseja consultar. A correspondência aproximada não é suportada. O nome deve ter de 1 a 128 caracteres e não pode começar com |
vSwitch |
| DryRun |
boolean |
Não |
Especifica se deve ser realizado apenas um dry run, sem executar a solicitação real. Valores válidos:
|
true |
| IsDefault |
boolean |
Não |
Especifica se devem ser consultados os vSwitches padrão na região especificada. Valores válidos:
Se você não definir este parâmetro, o sistema consultará todos os vSwitches na região especificada por padrão. |
true |
| RouteTableId |
string |
Não |
O ID da tabela de rotas. |
vtb-bp145q7glnuzdvzu2**** |
| ResourceGroupId |
string |
Não |
O ID do grupo de recursos ao qual o vSwitch pertence. |
rg-bp67acfmxazb4ph**** |
| PageNumber |
integer |
Não |
O número da página. Valor padrão: 1. |
1 |
| PageSize |
integer |
Não |
O número de entradas por página. Valor máximo: 50. Valor padrão: 10. |
10 |
| VSwitchOwnerId |
integer |
Não |
O ID da conta Alibaba Cloud à qual o vSwitch pertence. |
2546073170691**** |
| EnableIpv6 |
boolean |
Não |
Especifica se devem ser consultados vSwitches com IPv6 habilitado na região. Valores válidos:
Se você não definir este parâmetro, o sistema consultará todos os vSwitches na região especificada por padrão. |
false |
| Tag |
array<object> |
Não |
As tags. |
|
|
object |
Não |
|||
| Key |
string |
Não |
A chave da tag. Você pode especificar no máximo 20 chaves de tag. A chave da tag não pode ser uma string vazia. A chave da tag pode ter até 128 caracteres. Não pode começar com |
FinanceDept |
| Value |
string |
Não |
O valor da tag. Você pode especificar no máximo 20 valores de tag. O valor da tag pode ser uma string vazia. O valor da tag pode ter até 128 caracteres e não pode conter |
FinanceJoshua |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os parâmetros de resposta. |
||
| PageSize |
integer |
O número de entradas retornadas por página. |
10 |
| RequestId |
string |
O ID da solicitação. |
9A572171-4E27-40D1-BD36-D26C9E71E29E |
| PageNumber |
integer |
O número da página retornada. |
1 |
| TotalCount |
integer |
O número total de entradas retornadas. |
1 |
| VSwitches |
object |
||
| VSwitch |
array<object> |
Os detalhes sobre o vSwitch. |
|
|
array<object> |
|||
| VpcId |
string |
The ID of the VPC to which the vSwitch belongs. |
vpc-257gcdcdq64**** |
| Status |
string |
The status of the vSwitch. Valid values:
|
Available |
| CreationTime |
string |
The time when the vSwitch was created. |
2022-01-18T12:43:57Z |
| IsDefault |
boolean |
Indicates whether the vSwitch is the default vSwitch. Valid values:
|
true |
| AvailableIpAddressCount |
integer |
The number of available IP addresses in the vSwitch. |
1 |
| NetworkAclId |
string |
The ID of the network access control list (ACL). |
nacl-a2do9e413e0spzasx**** |
| OwnerId |
integer |
The ID of the Alibaba Cloud account to which the resource belongs. |
25346073170691**** |
| VSwitchId |
string |
The vSwitch ID. |
vsw-25bcdxs7pv1**** |
| CidrBlock |
string |
The IPv4 CIDR block of the vSwitch. |
172.16.0.0/24 |
| Description |
string |
The description of the vSwitch. |
VSwitchDescription |
| ResourceGroupId |
string |
The ID of the resource group to which the vSwitch belongs. |
rg-acfmxazb4ph6aiy**** |
| ZoneId |
string |
The ID of the zone to which the vSwitch belongs. |
cn-hangzhou-d |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the vSwitch. |
2408:4002:10c4:4e03::/64 |
| VSwitchName |
string |
The vSwitch name. |
vSwitch |
| ShareType |
string |
Indicates whether the vSwitch is shared.
|
Shared |
| EnabledIpv6 |
boolean |
Indicates whether IPv6 is enabled for the vSwitch. If you enable IPv6, you must configure an IPv6 CIDR block for the vSwitch. Valid values:
|
true |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the vSwitch. |
|
|
object |
|||
| Key |
string |
The tag key. |
department |
| Value |
string |
The tag value. |
dev |
| RouteTable |
object |
The information about the route table. |
|
| RouteTableId |
string |
The ID of the route table that is associated with the vSwitch. |
vrt-bp145q7glnuzdv**** |
| RouteTableType |
string |
The type of the route table. Valid values:
|
System |
Exemplos
Resposta de sucesso
JSON formato
{
"PageSize": 10,
"RequestId": "9A572171-4E27-40D1-BD36-D26C9E71E29E",
"PageNumber": 1,
"TotalCount": 1,
"VSwitches": {
"VSwitch": [
{
"VpcId": "vpc-257gcdcdq64****",
"Status": "Available",
"CreationTime": "2022-01-18T12:43:57Z",
"IsDefault": true,
"AvailableIpAddressCount": 1,
"NetworkAclId": "nacl-a2do9e413e0spzasx****",
"OwnerId": 0,
"VSwitchId": "vsw-25bcdxs7pv1****",
"CidrBlock": "172.16.0.0/24",
"Description": "VSwitchDescription",
"ResourceGroupId": "rg-acfmxazb4ph6aiy****",
"ZoneId": "cn-hangzhou-d",
"Ipv6CidrBlock": "2408:4002:10c4:4e03::/64",
"VSwitchName": "vSwitch",
"ShareType": "Shared",
"EnabledIpv6": true,
"Tags": {
"Tag": [
{
"Key": "department",
"Value": "dev"
}
]
},
"RouteTable": {
"RouteTableId": "vrt-bp145q7glnuzdv****",
"RouteTableType": "System"
}
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | Forbidden.VpcNotFound | Specified VPC can not found. | The specified VPC does not exist. |
| 400 | InvalidTagKey | The tag keys are not valid. | The tag index is invalid. |
| 400 | InvalidTagValue | The tag values are not valid. | The tag value is invalid. |
| 400 | IellgalParameter.OwnerAccount | The specified parameter OwnerAccount is not valid. | The specified parameter OwnerAccount is illegal. |
| 400 | IllegalParam.OwnerId | The specified parameter VSwitchOwnerId is not valid. | |
| 400 | InvalidVpcIdNumber.NotSupported | The number of vpcIds exceeds the limit. | The value of the vpcId parameter has reached the upper limit. |
| 400 | InvalidVSwitchIdNumber.NotSupported | The number of vSwitchIds exceeds the limit. | |
| 404 | InvalidVSwitchId.NotFound | VSwitch not exist. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.