Consulta vSwitches existentes.
Sintaxe
{
"Type": "DATASOURCE::VPC::VSwitches",
"Properties": {
"IsDefault": Boolean,
"DhcpOptionsSetId": String,
"RouteTableId": String,
"VpcId": String,
"ResourceGroupId": String,
"VSwitchIds": List,
"VSwitchOwnerId": String,
"VSwitchName": String,
"RefreshOptions": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
IsDefault |
Boolean |
Não |
Sim |
Especifica se o vSwitch padrão na região da pilha deve ser consultado. |
Valores válidos:
|
|
DhcpOptionsSetId |
String |
Não |
Sim |
ID do conjunto de opções DHCP. |
Nenhuma. |
|
RouteTableId |
String |
Não |
Sim |
ID da tabela de rotas. |
Nenhuma. |
|
VpcId |
String |
Não |
Sim |
ID da VPC à qual o vSwitch pertence. |
Nenhuma. |
|
ResourceGroupId |
String |
Não |
Sim |
ID do grupo de recursos ao qual o vSwitch pertence. |
Nenhuma. |
|
|
List |
Não |
Sim |
IDs dos vSwitches. |
Especifique até 20 IDs de vSwitch. |
|
|
String |
Não |
Sim |
ID da conta Alibaba Cloud à qual o vSwitch pertence. |
Nenhuma. |
|
|
String |
Não |
Sim |
Nome do vSwitch. |
Nenhuma. |
|
RefreshOptions |
String |
Não |
Sim |
Política de atualização dos recursos de source de dados durante a atualização da pilha. |
Valores válidos:
|
Valores de retorno (Fn::GetAtt)
VSwitchIds: IDs dos vSwitches.VSwitches: detalhes dos vSwitches.
|
Propriedade |
Tipo |
Descrição |
Restrição |
|
|
List |
IDs dos vSwitches. |
Exemplo: |
|
|
List |
Detalhes dos vSwitches. |
Nenhuma. |
|
VpcId |
String |
ID da VPC à qual o vSwitch pertence. |
Exemplo: |
|
Status |
String |
Status do vSwitch. |
Valores válidos:
|
|
IsDefault |
Boolean |
Indica se o vSwitch é o padrão. |
Valores válidos:
|
|
AvailableIpAddressCount |
String |
Número de endereços IP disponíveis no vSwitch. |
Nenhuma. |
|
NetworkAclId |
String |
ID da ACL de rede. |
Exemplo: |
|
|
String |
ID do vSwitch. |
Exemplo: |
|
CidrBlock |
String |
Bloco CIDR IPv4 do vSwitch. |
Nenhuma. |
|
Description |
String |
Descrição do vSwitch. |
Nenhuma. |
|
ResourceGroupId |
String |
ID do grupo de recursos ao qual o vSwitch pertence. |
Exemplo: |
|
ZoneId |
String |
Zona à qual o vSwitch pertence. |
Nenhuma. |
|
Ipv6CidrBlock |
String |
Bloco CIDR IPv6 do vSwitch. |
Nenhuma. |
|
|
String |
Nome do vSwitch. |
Nenhuma. |
|
Tags |
List |
Tags do vSwitch. |
Exemplo:
|
|
RouteTable |
List |
Detalhes da tabela de rotas. |
Exemplo:
|
Exemplos
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
{
"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"
]
}
}
}
}