Skip to main content

instance_snapshots

Creates, updates, deletes or gets an instance_snapshot resource or lists instance_snapshots in a region

Overview

Nameinstance_snapshots
TypeResource
DescriptionResource Type definition for AWS::Lightsail::InstanceSnapshot
Idawscc.lightsail.instance_snapshots

Fields

NameDatatypeDescription
instance_snapshot_namestringThe name of the snapshot.
arnstringThe Amazon Resource Name (ARN) of the snapshot.
instance_namestringThe instance from which the snapshot was created.
resource_typestringThe type of resource (usually InstanceSnapshot).
statestringThe state the snapshot is in.
from_instance_namestringThe instance from which the snapshot was created.
from_instance_arnstringThe Amazon Resource Name (ARN) of the instance from which the snapshot was created.
size_in_gbintegerThe size in GB of the SSD
is_from_auto_snapshotbooleanA Boolean value indicating whether the snapshot was created from an automatic snapshot.
support_codestringSupport code to help identify any issues
locationobjectThe region name and Availability Zone where you created the snapshot.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::Lightsail::InstanceSnapshot.

Methods

NameResourceAccessible byRequired Params
create_resourceinstance_snapshotsINSERTInstanceSnapshotName, InstanceName, region
delete_resourceinstance_snapshotsDELETEIdentifier, region
update_resourceinstance_snapshotsUPDATEIdentifier, PatchDocument, region
list_resourcesinstance_snapshots_list_onlySELECTregion
get_resourceinstance_snapshotsSELECTIdentifier, 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
Identifier = '{{ instance_snapshot_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new instance_snapshot resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.lightsail.instance_snapshots (
InstanceSnapshotName,
InstanceName,
region
)
SELECT
'{{ instance_snapshot_name }}',
'{{ instance_name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a instance_snapshot resource, using stack-deploy.

/*+ update */
UPDATE awscc.lightsail.instance_snapshots
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ instance_snapshot_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.lightsail.instance_snapshots
WHERE
Identifier = '{{ instance_snapshot_name }}' AND
region = 'us-east-1';

Permissions

To operate on the instance_snapshots resource, the following permissions are required:

lightsail:CreateInstanceSnapshot,
lightsail:GetInstanceSnapshot,
lightsail:TagResource