instance_snapshots
Creates, updates, deletes or gets an instance_snapshot resource or lists instance_snapshots in a region
Overview
| Name | instance_snapshots |
| Type | Resource |
| Description | Resource Type definition for AWS::Lightsail::InstanceSnapshot |
| Id | awscc.lightsail.instance_snapshots |
Fields
| Name | Datatype | Description |
|---|---|---|
instance_snapshot_name | string | The name of the snapshot. |
arn | string | The Amazon Resource Name (ARN) of the snapshot. |
instance_name | string | The instance from which the snapshot was created. |
resource_type | string | The type of resource (usually InstanceSnapshot). |
state | string | The state the snapshot is in. |
from_instance_name | string | The instance from which the snapshot was created. |
from_instance_arn | string | The Amazon Resource Name (ARN) of the instance from which the snapshot was created. |
size_in_gb | integer | The size in GB of the SSD |
is_from_auto_snapshot | boolean | A Boolean value indicating whether the snapshot was created from an automatic snapshot. |
support_code | string | Support code to help identify any issues |
location | object | The region name and Availability Zone where you created the snapshot. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
For more information, see AWS::Lightsail::InstanceSnapshot.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | InstanceSnapshotName, InstanceName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual instance_snapshot.
SELECT
region,
instance_snapshot_name,
arn,
instance_name,
resource_type,
state,
from_instance_name,
from_instance_arn,
size_in_gb,
is_from_auto_snapshot,
support_code,
location,
tags
FROM awscc.lightsail.instance_snapshots
WHERE region = 'us-east-1' AND data__Identifier = '<InstanceSnapshotName>';
INSERT example
Use the following StackQL query and manifest file to create a new instance_snapshot resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.lightsail.instance_snapshots (
InstanceSnapshotName,
InstanceName,
region
)
SELECT
'{{ InstanceSnapshotName }}',
'{{ InstanceName }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.lightsail.instance_snapshots (
InstanceSnapshotName,
InstanceName,
Tags,
region
)
SELECT
'{{ InstanceSnapshotName }}',
'{{ InstanceName }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: instance_snapshot
props:
- name: InstanceSnapshotName
value: '{{ InstanceSnapshotName }}'
- name: InstanceName
value: '{{ InstanceName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.lightsail.instance_snapshots
WHERE data__Identifier = '<InstanceSnapshotName>'
AND region = 'us-east-1';
Permissions
To operate on the instance_snapshots resource, the following permissions are required:
Create
lightsail:CreateInstanceSnapshot,
lightsail:GetInstanceSnapshot,
lightsail:TagResource
Read
lightsail:GetInstanceSnapshot
Update
lightsail:GetInstanceSnapshot,
lightsail:TagResource,
lightsail:UntagResource
Delete
lightsail:GetInstanceSnapshot,
lightsail:DeleteInstanceSnapshot
List
lightsail:GetInstanceSnapshots