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, encryptedfrom alicloud_ecs_snapshotwhere not encrypted;
List of unused snapshots
select name, snapshot_id, typefrom alicloud_ecs_snapshotwhere usage = 'none';
Find the snapshot count per disk
select source_disk_id, count(*) as snapshotfrom alicloud_ecs_snapshotgroup by source_disk_id;
List of snapshots without owner tag key
select name, snapshot_id, tagsfrom alicloud_ecs_snapshotwhere tags ->> 'owner' is null;
List of snapshots older than 90 days
select name, snapshot_id, type, creation_time, age(creation_time), retention_daysfrom alicloud_ecs_snapshotwhere creation_time <= (current_date - interval '90' day)order by creation_time;
Query examples
- ecs_images_for_ecs_snapshot
- ecs_instances_for_ecs_snapshot
- ecs_launch_templates_for_ecs_snapshot
- ecs_snapshot_1_year_count
- ecs_snapshot_24_hours_count
- ecs_snapshot_30_90_days_count
- ecs_snapshot_30_days_count
- ecs_snapshot_90_365_days_count
- ecs_snapshot_age
- ecs_snapshot_by_account
- ecs_snapshot_by_creation_month
- ecs_snapshot_by_region
- ecs_snapshot_by_usage
- ecs_snapshot_count
- ecs_snapshot_encryption
- ecs_snapshot_input
- ecs_snapshot_instant_access
- ecs_snapshot_overview
- ecs_snapshot_storage_by_account
- ecs_snapshot_storage_by_age
- ecs_snapshot_storage_by_region
- ecs_snapshot_storage_total
- ecs_snapshot_tags
- ecs_snapshot_usage
- ecs_snapshot_usage_source_disk_size
- ecs_snapshots_for_ecs_instance
- ecs_snapshots_for_kms_key
- ecs_unencrypted_snapshot_count
- ecs_unused_snapshot_count
- kms_key_rds_instances
- kms_keys_for_ecs_snapshot
- source_ecs_disks_for_ecs_snapshot
- source_ecs_snapshots_for_ecs_disk
- target_ecs_disks_for_ecs_snapshot
- target_ecs_snapshots_for_ecs_disk
Control examples
- ecs_snapshot_max_age
- ecs_snapshot_age_table
- ecs_snapshot_by_encryption_status
- ecs_snapshot_encryption_status
- ecs_snapshot_source_disk
- ecs_snapshot_state
.inspect alicloud_ecs_snapshot
ECS Disk Snapshot.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
account_id | text | The alicloud Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. |
arn | text | The Alibaba Cloud Resource Name (ARN) of the snapshot. |
creation_time | timestamp with time zone | The time when the snapshot was created. |
description | text | A user provided, human readable description for this resource. |
encrypted | boolean | Indicates whether the snapshot was encrypted. |
instant_access | boolean | Indicates whether the instant access feature is enabled. |
instant_access_retention_days | bigint | Indicates the retention period of the instant access feature. After the retention per iod ends, the snapshot is automatically released. |
kms_key_id | text | The ID of the KMS key used by the data disk. |
last_modified_time | timestamp with time zone | The time when the snapshot was last changed. |
name | text | A friendly name for the resource. |
product_code | text | The product code of the Alibaba Cloud Marketplace image. |
progress | text | The progress of the snapshot creation task. Unit: percent (%). |
region | text | The region ID where the resource is located. |
remain_time | bigint | The remaining time required to create the snapshot (in seconds). |
resource_group_id | text | The ID of the resource group to which the snapshot belongs. |
retention_days | bigint | The number of days that an automatic snapshot can be retained. |
serial_number | text | The serial number of the snapshot. |
snapshot_id | text | An unique identifier for the resource. |
source_disk_id | text | The ID of the source disk. This parameter is retained even after the source disk of the snapshot is released. |
source_disk_size | text | The capacity of the source disk (in GiB). |
source_disk_type | text | The category of the source disk. |
status | text | Specifies the current state of the resource. |
tags | jsonb | A map of tags for the resource. |
tags_src | jsonb | A list of tags attached with the resource. |
title | text | Title of the resource. |
type | text | The type of the snapshot. Default value: all. Possible values are: auto, user, and all. |
usage | text | Indicates whether the snapshot has been used to create images or disks. |