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_nat_gateway

NAT gateways are enterprise-class gateways that provide the Source Network Address Translation (SNAT) and Destination Network Address Translation (DNAT) features. Each NAT gateway provides a throughput capacity of up to 10 Gbit/s. NAT gateways also support cross-zone disaster recovery.

Examples

Basic info

select
name,
nat_gateway_id,
vpc_id nat_type,
status,
description,
billing_method,
region,
account_id
from
alicloud_vpc_nat_gateway;

List IP address details for NAT gateways

select
nat_gateway_id,
address ->> 'IpAddress' as ip_address,
address ->> 'AllocationId' as allocation_id
from
alicloud_vpc_nat_gateway,
jsonb_array_elements(ip_lists) as address;

List private network info for NAT gateways

select
name,
nat_gateway_id,
nat_gateway_private_info ->> 'EniInstanceId' as eni_instance_id,
nat_gateway_private_info ->> 'IzNo' as nat_gateway_zone_id,
nat_gateway_private_info ->> 'MaxBandwidth' as max_bandwidth,
nat_gateway_private_info ->> 'PrivateIpAddress' as private_ip_address,
nat_gateway_private_info ->> 'VswitchId' as vswitch_id
from
alicloud_vpc_nat_gateway;

List NAT gateways that have traffic monitoring disabled

select
name,
nat_gateway_id,
ecs_metric_enabled
from
alicloud_vpc_nat_gateway
where
not ecs_metric_enabled;

List NAT gateways that have deletion protection disabled

select
name,
nat_gateway_id,
deletion_protection
from
alicloud_vpc_nat_gateway
where
not deletion_protection;

Count of NAT gateways per VPC ID

select
vpc_id,
count(*) as nat_gateway_count
from
alicloud_vpc_nat_gateway
group by
vpc_id;

Query examples

Control examples

.inspect alicloud_vpc_nat_gateway

Aliclod VPC NAT Gateway

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.
auto_paybooleanIndicates whether auto pay is enabled.
billing_methodtextThe billing method of the NAT gateway.
business_statustextThe status of the NAT gateway.
creation_timetimestamp with time zoneThe time when the NAT gateway was created.
deletion_protectionbooleanIndicates whether deletion protection is enabled.
descriptiontextThe description of the NAT gateway.
ecs_metric_enabledbooleanIndicates whether the traffic monitoring feature is enabled.
expired_imetimestamp with time zoneThe time when the NAT gateway expires.
forward_table_idsjsonbThe ID of the Destination Network Address Translation (DNAT) table.
internet_charge_typetextThe billing method of the NAT gateway.
ip_listsjsonbThe elastic IP address (EIP) that is associated with the NAT gateway.
nametextThe name of the NAT gateway.
nat_gateway_idtextThe ID of the NAT gateway.
nat_gateway_private_infojsonbThe information of the virtual private cloud (VPC) to which the enhanced NAT gateway belongs.
nat_typetextThe type of the NAT gateway. Valid values: 'Normal' and 'Enhanced'.
regiontextThe Alicloud region in which the resource is located.
resource_group_idtextThe ID of the resource group.
snat_table_idsjsonbThe ID of the SNAT table for the NAT gateway.
spectextThe size of the NAT gateway.
statustextThe state of the NAT gateway.
titletextTitle of the resource.
vpc_idtextThe ID of the virtual private cloud (VPC) to which the NAT gateway belongs.