instance_states
Creates, updates, deletes, gets or lists an instance_states resource.
Overview
| Name | instance_states |
| Type | Resource |
| Id | aws.lightsail.instance_states |
Fields
The following fields are returned by SELECT queries:
- get_instance_state
| Name | Datatype | Description |
|---|---|---|
name | string | The state of the instance (running or pending). |
code | integer | The status code for the instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_instance_state | select | region | Returns the state of a specific instance. Works on one instance at a time. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_instance_state
Returns the state of a specific instance. Works on one instance at a time.
SELECT
name,
code
FROM aws.lightsail.instance_states
WHERE region = '{{ region }}' -- required
;