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_ecs_snapshot

The Alibaba Cloud snapshot service allows you to create crash-consistent snapshots for all disk categories. Crash-consistent snapshots are an effective solution to disaster recovery and are used to back up data, create custom images, and implement disaster recovery for applications.

Examples

List of snapshots which are not encrypted

select
name,
snapshot_id,
arn,
encrypted
from
alicloud_ecs_snapshot
where
not encrypted;

List of unused snapshots

select
name,
snapshot_id,
type
from
alicloud_ecs_snapshot
where
usage = 'none';

Find the snapshot count per disk

select
source_disk_id,
count(*) as snapshot
from
alicloud_ecs_snapshot
group by
source_disk_id;

List of snapshots without owner tag key

select
name,
snapshot_id,
tags
from
alicloud_ecs_snapshot
where
tags ->> 'owner' is null;

List of snapshots older than 90 days

select
name,
snapshot_id,
type,
creation_time,
age(creation_time),
retention_days
from
alicloud_ecs_snapshot
where
creation_time <= (current_date - interval '90' day)
order by
creation_time;

Query examples

Control examples

.inspect alicloud_ecs_snapshot

ECS Disk Snapshot.

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.
arntextThe Alibaba Cloud Resource Name (ARN) of the snapshot.
creation_timetimestamp with time zoneThe time when the snapshot was created.
descriptiontextA user provided, human readable description for this resource.
encryptedbooleanIndicates whether the snapshot was encrypted.
instant_accessbooleanIndicates whether the instant access feature is enabled.
instant_access_retention_daysbigintIndicates the retention period of the instant access feature. After the retention per iod ends, the snapshot is automatically released.
kms_key_idtextThe ID of the KMS key used by the data disk.
last_modified_timetimestamp with time zoneThe time when the snapshot was last changed.
nametextA friendly name for the resource.
product_codetextThe product code of the Alibaba Cloud Marketplace image.
progresstextThe progress of the snapshot creation task. Unit: percent (%).
regiontextThe region ID where the resource is located.
remain_timebigintThe remaining time required to create the snapshot (in seconds).
resource_group_idtextThe ID of the resource group to which the snapshot belongs.
retention_daysbigintThe number of days that an automatic snapshot can be retained.
serial_numbertextThe serial number of the snapshot.
snapshot_idtextAn unique identifier for the resource.
source_disk_idtextThe ID of the source disk. This parameter is retained even after the source disk of the snapshot is released.
source_disk_sizetextThe capacity of the source disk (in GiB).
source_disk_typetextThe category of the source disk.
statustextSpecifies the current state of the resource.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the resource.
titletextTitle of the resource.
typetextThe type of the snapshot. Default value: all. Possible values are: auto, user, and all.
usagetextIndicates whether the snapshot has been used to create images or disks.