turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_ecs_autoscaling_group

Auto Scaling is a service to automatically adjust computing resources based on your volume of user requests. When the demand for computing resources increase, Auto Scaling automatically adds ECS instances to serve additional user requests, or alternatively removes instances in the case of decreased user requests.

Examples

Basic auto scaling group info

select
name,
load_balancer_ids,
default_cooldown,
active_capacity,
desired_capacity,
min_size,
max_size
from
alicloud_ecs_autoscaling_group;

Autoscaling group instance details

select
asg.name as autoscaling_group_name,
i.instance_type,
i.os_name_en,
i.private_ip_address,
i.public_ip_address,
ins_detail ->> 'InstanceId' as instance_id,
ins_detail ->> 'CreationType' as instance_creation_type,
ins_detail ->> 'HealthStatus' as health_status,
ins_detail ->> 'ScalingConfigurationId' as scaling_configuration_id,
ins_detail ->> 'ScalingGroupId' as scaling_group_id,
ins_detail -> 'LaunchTemplateId' as launch_template_id,
ins_detail -> 'LaunchTemplateVersion' as launch_template_version
from
alicloud_ecs_autoscaling_group as asg,
jsonb_array_elements(asg.scaling_instances) as ins_detail,
alicloud_ecs_instance as i
where
ins_detail ->> 'InstanceId' = i.instance_id
and asg.name = 'js_as_1';

List of Autoscaling Group for which deletion protection is not enabled

select
name,
scaling_group_id,
group_deletion_protection
from
alicloud_ecs_autoscaling_group
where
not group_deletion_protection;

.inspect alicloud_ecs_autoscaling_group

Elastic Compute Autoscaling Group

NameTypeDescription
account_idtextThe Alicloud Account ID in which the resource is located.
active_capacitybigintThe number of ECS instances that have been added to the scaling group and are running properly.
active_scaling_configuration_idtextThe ID of the active scaling configuration in the scaling group.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
compensate_with_on_demandbooleanSpecifies whether to automatically create pay-as-you-go instances to meet the requirement for the number of ECS instances in the scaling group when the number of preemptible instances cannot be reached due to reasons such as cost or insufficient resources.
creation_timetimestamp without time zoneThe time when the scaling group was created.
db_instance_idsjsonbThe IDs of the ApsaraDB RDS instances that are associated with the scaling group.
default_cooldownbigintThe default cooldown period of the scaling group (in seconds).
desired_capacitybigintThe expected number of ECS instances in the scaling group. Auto Scaling automatically keeps the ECS instances at this number.
group_deletion_protectionbooleanIndicates whether scaling group deletion protection is enabled.
health_check_typetextThe health check mode of the scaling group.
launch_template_idtextThe ID of the launch template used by the scaling group.
launch_template_versiontextThe version of the launch template used by the scaling group.
life_cycle_statetextThe lifecycle status of the scaling group.
load_balancer_idsjsonbThe IDs of the SLB instances that are associated with the scaling group.
max_sizebigintThe maximum number of ECS instances in the scaling group.
min_sizebigintThe minimum number of ECS instances in the scaling group.
modification_timetimestamp without time zoneThe time when the scaling group was modified.
multi_az_policytextThe ECS instance scaling policy for a multi-zone scaling group.
nametextA friendly name for the resource.
on_demand_base_capacitybigintThe minimum number of pay-as-you-go instances required in the scaling group. Valid values: 0 to 1000.
on_demand_percentage_above_base_capacitybigintThe percentage of pay-as-you-go instances to be created when instances are added to the scaling group.
pending_capacitybigintThe number of ECS instances that are being added to the scaling group, but are still being configured.
pending_wait_capacitybigintThe number of ECS instances that are in the pending state to be added in the scaling group.
protected_capacitybigintThe number of ECS instances that are in the protected state in the scaling group.
regiontextThe Alicloud region in which the resource is located.
removal_policiesjsonbDetails about policies for removing ECS instances from the scaling group.
removing_capacitybigintThe number of ECS instances that are being removed from the scaling group.
removing_wait_capacitybigintThe number of ECS instances that are in the pending state to be removed from the scaling group.
scaling_configurationsjsonbA list of scaling configurations.
scaling_group_idtextAn unique identifier for the resource.
scaling_instancesjsonbA list of ECS instances in a scaling group.
scaling_policytextSpecifies the reclaim policy of the scaling group.
spot_instance_poolsbigintThe number of available instance types. Auto Scaling will create preemptible instances of multiple instance types available at the lowest cost. Valid values: 0 to 10.
spot_instance_remedybooleanSpecifies whether to supplement preemptible instances when the target capacity of preemptible instances is not fulfilled.
standby_capacitybigintThe number of instances that are in the standby state in the scaling group.
stopped_capacitybigintThe number of instances that are in the stopped state in the scaling group.
suspended_processesjsonbThe scaling activity that is suspended. If no scaling activity is suspended, the returned value is null.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the resource.
titletextTitle of the resource.
total_capacitybigintThe total number of ECS instances in the scaling group.
vpc_idtextThe ID of the VPC to which the scaling group belongs.
vserver_groupsjsonbDetails about backend server groups.
vswitch_idtextThe ID of the VSwitch that is associated with the scaling group.
vswitch_idsjsonbA collection of IDs of the VSwitches that are associated with the scaling group.