turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_vpc_vswitch

Alicloud VSwitch is a logical subdivision of an IP network. It enables dividing a network into two or more networks.

Examples

Basic info

select
name,
vswitch_id,
status,
cidr_block,
zone_id,
is_default
from
alicloud_vpc_vswitch;

Get the number of available IP addresses in each VSwitch

select
name,
vswitch_id,
available_ip_address_count,
power(2, 32 - masklen(cidr_block :: cidr)) -1 as raw_size
from
alicloud_vpc_vswitch;

Route Table info associated with VSwitch

select
name,
vswitch_id,
route_table ->> 'RouteTableId' as route_table_id,
route_table ->> 'RouteTableType' as route_table_type,
route_table -> 'RouteEntrys' -> 'RouteEntry' as route_entry
from
alicloud_vpc_vswitch;

VSwitch count by VPC ID

select
vpc_id,
count(vswitch_id) as vswitch_count
from
alicloud_vpc_vswitch
group by
vpc_id;

.inspect alicloud_vpc_vswitch

VSwitches to divide the VPC network into one or more subnets.

NameTypeDescription
account_idtextThe Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
available_ip_address_countbigintThe number of available IP addresses in the VSwitch.
cidr_blockcidrThe IPv4 CIDR block of the VPC.
cloud_resourcesjsonbThe list of resources in the VSwitch.
creation_timetimestamp without time zoneThe creation time of the VPC.
descriptiontextThe description of the VPC.
ipv6_cidr_blockcidrThe IPv6 CIDR block of the VPC.
is_defaultbooleanTrue if the VPC is the default VPC in the region.
nametextThe name of the VPC.
network_acl_idtextA list of IDs of NAT Gateways.
owner_idtextThe ID of the owner of the VPC.
regiontextThe Alicloud region in which the resource is located.
resource_group_idtextThe ID of the resource group to which the VPC belongs.
route_tablejsonbDetails of the route table.
share_typetext
statustextThe status of the VPC. Pending: The VPC is being configured. Available: The VPC is available.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA map of tags for the resource.
titletextTitle of the resource.
vpc_idtextThe ID of the VPC to which the VSwitch belongs.
vswitch_idtextThe unique ID of the VPC.
zone_idtextThe zone to which the VSwitch belongs.