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_rds_instance
Provides an RDS instance resource. A DB instance is an isolated database environment in the cloud. A DB instance can contain multiple user-created databases.
Examples
Basic info
select db_instance_id, arn, vpc_id, creation_time, enginefrom alicloud_rds_instance;
DB instance count in each region
select region_id as region, db_instance_class, count(*)from alicloud_rds_instancegroup by region_id, db_instance_class;
List DB instances whose engine is MySQL
select db_instance_id, vpc_id, creation_time, enginefrom alicloud_rds_instancewhere engine = 'MySQL';
List DB instances that are currently running
select db_instance_id, vpc_id, creation_time, enginefrom alicloud_rds_instancewhere db_instance_status = 'Running';
List DB instances that allow 0.0.0.0/0
select db_instance_id, security_ipsfrom alicloud_rds_instancewhere security_ips :: jsonb ? '0.0.0.0/0';
List DB instances with SSL encryption disabled
select db_instance_id, vpc_id, creation_time, engine, ssl_encryptionfrom alicloud_rds_instancewhere ssl_status = 'Disabled';
List DB instances with TDE disabled
select db_instance_id, vpc_id, creation_time, engine, tde_statusfrom alicloud_rds_instancewhere tde_status = 'Disabled';
Get security group configuration details for instances
select i.db_instance_id, s ->> 'NetworkType' as network_type, s ->> 'RegionId' as security_group_region_id, s ->> 'SecurityGroupId' as security_group_idfrom alicloud_rds_instance as i, jsonb_array_elements(security_group_configuration) as s;
Get encryption details for all the instances
select i.arn as instance_arn, i.title as instance_name, encryption_key, k.title as kms_key_namefrom alicloud_rds_instance i left join alicloud_kms_key k on encryption_key = key_id;
Query examples
- ecs_autoscaling_groups_for_rds_instance
- ecs_security_groups_for_rds_instance
- rds_backups_for_rds_instance
- rds_databases_for_rds_instance
- rds_db_instance_configuration
- rds_instance_1_year_count
- rds_instance_24_hours_count
- rds_instance_30_90_days_count
- rds_instance_30_days_count
- rds_instance_90_365_days_count
- rds_instance_by_account
- rds_instance_by_class
- rds_instance_by_creation_month
- rds_instance_by_engine_type
- rds_instance_by_region
- rds_instance_class
- rds_instance_collector_policy
- rds_instance_count
- rds_instance_engine_type
- rds_instance_input
- rds_instance_instance_public_access
- rds_instance_overview
- rds_instance_parameter_groups
- rds_instance_public_count
- rds_instance_security_ips
- rds_instance_storage
- rds_instance_tags
- rds_instances_for_ecs_security_group
- rds_instances_for_vpc
- rds_instances_for_vpc_vswitch
- target_ro_rds_db_instances_for_rds_instance
- vpc_vpcs_for_rds_instance
- vpc_vswitch_association
- vpc_vswitches_for_rds_instance
Control examples
- rds_db_instance_long_running
- rds_db_instance_low_connection_count
- rds_instance_postgresql_log_connections_parameter_on
- rds_instance_postgresql_log_disconnections_parameter_on
- rds_instance_postgresql_log_duration_parameter_on
- rds_instance_restrict_access_to_internet
- rds_instance_sql_audit_enabled
- rds_instance_sql_audit_retention_period_180_days
- rds_instance_ssl_enabled
- rds_instance_tde_enabled
- rds_instance_age_table
- rds_instance_by_encryption_status
- rds_instance_by_status
- rds_instance_instance_tde_status
- rds_instance_public_access_table
- rds_instance_public_status
- rds_instance_ssl_disabled_count
- rds_instance_ssl_status
- rds_instance_unencrypted_count
.inspect alicloud_rds_instance
Provides an RDS instance resource. A DB instance is an isolated database environment in the cloud. A DB instance can contain multiple user-created databases.
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. |
account_max_quantity | bigint | The maximum number of accounts that can be created on the instance. |
account_type | text | |
advanced_features | text | An array that consists of advanced features. The advanced features are separated by commas (,). This parameter is supported only for instances that run SQL Server. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. |
arn | text | The Alibaba Cloud Resource Name (ARN) of the RDS instance. |
auto_upgrade_minor_version | text | The method that is used to update the minor engine version of the instance. |
availability_value | text | The availability status of the instance. Unit: %. |
category | text | The RDS edition of the instance. |
collation | text | The character set collation of the instance. |
connection_mode | text | The connection mode of the instances. |
connection_string | text | The internal endpoint of the instance. |
console_version | text | The type of proxy that is enabled on the instance. |
creation_time | timestamp with time zone | The creation time of the Instance. |
db_instance_class | text | The instance type of the instances. |
db_instance_cpu | text | The number of CPUs that are configured for the instance. |
db_instance_description | text | The description of the DB Instance. |
db_instance_disk_used | text | |
db_instance_id | text | The ID of the single instance to query. |
db_instance_memory | double precision | The memory capacity of the instance. Unit: MB. |
db_instance_net_type | text | The ID of the resource group to which the VPC belongs. |
db_instance_status | text | The status of the instances |
db_instance_storage | bigint | The type of storage media that is used by the instance. |
db_instance_storage_type | text | The type of storage media that is used by the instance. |
db_instance_type | text | The role of the instances. |
db_max_quantity | bigint | The maximum number of databases that can be created on the instance. |
dedicated_host_group_id | text | The ID of the dedicated cluster to which the instances belong if the instances are created in a dedicated cluster. |
dispense_mode | text | |
encryption_key | text | The custom encryption key for the instance. |
engine | text | The database engine that the instances run. |
engine_version | text | The version of the database engine that the instances run. |
expire_time | timestamp with time zone | Instance expire time |
guard_db_instance_id | text | The ID of the disaster recovery instance that is attached to the instance if a disaster recovery instance is deployed. |
increment_source_db_instance_id | text | The ID of the instance from which incremental data comes. The incremental data of a disaster recovery or read-only instance comes from its primary instance. If this parameter is not returned, the instance is a primary instance. |
ins_id | bigint | |
instance_network_type | text | The network type of the instances. |
ip_type | text | |
latest_kernel_version | text | |
lock_mode | text | The lock mode of the instance. |
lock_reason | text | The reason why the instance is locked. |
maintain_time | text | The maintenance window of the instance. The maintenance window is displayed in UTC+8 in the ApsaraDB RDS console. |
master_instance_id | text | The ID of the primary instance to which the instance is attached. If this parameter is not returned, the instance is a primary instance. |
max_connections | bigint | The maximum number of concurrent connections that are allowed by the instance. |
max_iops | bigint | The maximum number of I/O requests that the instance can process per second. |
multiple_temp_upgrade | boolean | |
origin_configuration | text | |
parameters | jsonb | The list of running parameters for the instance. |
pay_type | text | The billing method of the instances. |
port | text | The internal port of the instance. |
proxy_type | bigint | The type of proxy that is enabled on the instance. |
readonly_db_instance_ids | jsonb | An array that consists of the IDs of the read-only instances attached to the primary instance. |
region | text | The Alicloud region in which the resource is located. |
region_id | text | The ID of the region to which the instances belong. |
resource_group_id | text | The ID of the resource group to which the instances belong. |
security_group_configuration | jsonb | ECS security groups that are bound to an ApsaraDB for the instance. |
security_ip_mode | text | The network isolation mode of the instance. |
security_ips | jsonb | An array that consists of IP addresses in the IP address whitelist. |
security_ips_src | jsonb | An array that consists of IP details. |
sql_collector_policy | jsonb | The status of the SQL Explorer (SQL Audit) feature. |
sql_collector_retention | bigint | The log backup retention duration that is allowed by the SQL explorer feature on the instance. |
ssl_status | text | The SSL encryption status of the Instance |
super_permission_mode | text | Indicates whether the instance supports superuser accounts, such as the system administrator (SA) account, Active Directory (AD) account, and host account. |
support_create_super_account | text | |
support_upgrade_account_type | text | |
tags | jsonb | A map of tags for the resource. |
tags_src | jsonb | A map of tags for the resource. |
tde_status | text | The TDE status at the instance level. Valid values: Enable | Disable. |
temp_db_instance_id | text | The ID of the temporary instance that is attached to the instance if a temporary instance is deployed. |
temp_upgrade_recovery_class | text | |
temp_upgrade_recovery_cpu | bigint | |
temp_upgrade_recovery_max_connections | text | |
temp_upgrade_recovery_max_iops | text | |
temp_upgrade_recovery_memory | bigint | |
temp_upgrade_recovery_time | text | |
temp_upgrade_time_end | text | |
temp_upgrade_time_start | text | |
time_zone | text | The time zone of the instance. |
title | text | Title of the resource. |
vpc_cloud_instance_id | text | The ID of the cloud instance on which the specified VPC is deployed. |
vpc_id | text | The ID of the VPC to which the instances belong. |
vswitch_id | text | The ID of the vSwitch associated with the specified VPC. |
zone_id | text | The ID of the zone to which the instances belong. |