|
| 1 | +--- |
| 2 | +subcategory: "Auto Scaling(AS)" |
| 3 | +layout: "tencentcloud" |
| 4 | +page_title: "TencentCloud: tencentcloud_as_instances" |
| 5 | +sidebar_current: "docs-tencentcloud-datasource-as_instances" |
| 6 | +description: |- |
| 7 | + Use this data source to query detailed information of as instances |
| 8 | +--- |
| 9 | + |
| 10 | +# tencentcloud_as_instances |
| 11 | + |
| 12 | +Use this data source to query detailed information of as instances |
| 13 | + |
| 14 | +## Example Usage |
| 15 | + |
| 16 | +```hcl |
| 17 | +data "tencentcloud_as_instances" "instances" { |
| 18 | + filters { |
| 19 | + name = "auto-scaling-group-id" |
| 20 | + values = [tencentcloud_as_scaling_group.scaling_group.id] |
| 21 | + } |
| 22 | +} |
| 23 | +``` |
| 24 | + |
| 25 | +## Argument Reference |
| 26 | + |
| 27 | +The following arguments are supported: |
| 28 | + |
| 29 | +* `filters` - (Optional, List) Filter conditions. If there are multiple Filters, the relationship between Filters is a logical AND (AND) relationship. If there are multiple Values in the same Filter, the relationship between Values under the same Filter is a logical OR (OR) relationship. |
| 30 | +* `instance_ids` - (Optional, Set: [`String`]) Instance ID of the cloud server (CVM) to be queried. The limit is 100 per request. |
| 31 | +* `result_output_file` - (Optional, String) Used to save results. |
| 32 | + |
| 33 | +The `filters` object supports the following: |
| 34 | + |
| 35 | +* `name` - (Required, String) Fields to be filtered. Valid names: `instance-id`: Filters by instance ID, `auto-scaling-group-id`: Filter by scaling group ID. |
| 36 | +* `values` - (Required, Set) Value of the field. |
| 37 | + |
| 38 | +## Attributes Reference |
| 39 | + |
| 40 | +In addition to all arguments above, the following attributes are exported: |
| 41 | + |
| 42 | +* `instance_list` - List of instance details. |
| 43 | + * `add_time` - The time when the instance joined the group. |
| 44 | + * `auto_scaling_group_id` - Auto scaling group ID. |
| 45 | + * `auto_scaling_group_name` - Auto scaling group name. |
| 46 | + * `creation_type` - Valid values: `AUTO_CREATION`, `MANUAL_ATTACHING`. |
| 47 | + * `health_status` - Health status, the valid values are HEALTHY and UNHEALTHY. |
| 48 | + * `instance_id` - Instance ID. |
| 49 | + * `instance_type` - Instance type. |
| 50 | + * `launch_configuration_id` - Launch configuration ID. |
| 51 | + * `launch_configuration_name` - Launch configuration name. |
| 52 | + * `life_cycle_state` - Life cycle state. Please refer to the link for field value details: https://cloud.tencent.com/document/api/377/20453#Instance. |
| 53 | + * `protected_from_scale_in` - Enable scale in protection. |
| 54 | + * `version_number` - Version ID. |
| 55 | + * `zone` - Available zone. |
| 56 | + |
| 57 | + |
0 commit comments