turbot/alicloud

GitHub
steampipe plugin install alicloudsteampipe plugin install alicloud
alicloud_accountalicloud_action_trailalicloud_cas_certificatealicloud_cms_monitor_hostalicloud_cs_kubernetes_clusteralicloud_cs_kubernetes_cluster_nodealicloud_ecs_auto_provisioning_groupalicloud_ecs_autoscaling_groupalicloud_ecs_diskalicloud_ecs_disk_metric_read_iopsalicloud_ecs_disk_metric_read_iops_dailyalicloud_ecs_disk_metric_read_iops_hourlyalicloud_ecs_disk_metric_write_iopsalicloud_ecs_disk_metric_write_iops_dailyalicloud_ecs_disk_metric_write_iops_hourlyalicloud_ecs_imagealicloud_ecs_instancealicloud_ecs_instance_metric_cpu_utilization_dailyalicloud_ecs_instance_metric_cpu_utilization_hourlyalicloud_ecs_key_pairalicloud_ecs_launch_templatealicloud_ecs_network_interfacealicloud_ecs_regionalicloud_ecs_security_groupalicloud_ecs_snapshotalicloud_ecs_zonealicloud_kms_keyalicloud_kms_secretalicloud_oss_bucketalicloud_ram_access_keyalicloud_ram_credential_reportalicloud_ram_groupalicloud_ram_password_policyalicloud_ram_policyalicloud_ram_rolealicloud_ram_security_preferencealicloud_ram_useralicloud_rds_backupalicloud_rds_databasealicloud_rds_instancealicloud_rds_instance_metric_connectionsalicloud_rds_instance_metric_connections_dailyalicloud_rds_instance_metric_cpu_utilizationalicloud_rds_instance_metric_cpu_utilization_dailyalicloud_rds_instance_metric_cpu_utilization_hourlyalicloud_security_center_field_statisticsalicloud_security_center_versionalicloud_slb_load_balanceralicloud_vpcalicloud_vpc_dhcp_options_setalicloud_vpc_eipalicloud_vpc_flow_logalicloud_vpc_nat_gatewayalicloud_vpc_network_aclalicloud_vpc_route_entryalicloud_vpc_route_tablealicloud_vpc_ssl_vpn_client_certalicloud_vpc_ssl_vpn_serveralicloud_vpc_vpn_connectionalicloud_vpc_vpn_customer_gatewayalicloud_vpc_vpn_gatewayalicloud_vpc_vswitch

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;

Query examples

.inspect alicloud_vpc_vswitch

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

NameTypeDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
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 with 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.