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

NameAccessible byRequired Params
create_resourceINSERTInstanceSnapshotName, InstanceName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

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

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