get_instance_snapshots
(**kwargs)¶Returns all instance snapshots for the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_snapshots(
pageToken='string'
)
The token to advance to the next page of results from your request.
To get a page token, perform an initial GetInstanceSnapshots
request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.
{
'instanceSnapshots': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromAttachedDisks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
},
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'addOns': [
{
'name': 'string',
'status': 'string',
'snapshotTimeOfDay': 'string',
'nextSnapshotTimeOfDay': 'string',
'threshold': 'string',
'duration': 'string'
},
],
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123,
'autoMountStatus': 'Failed'|'Pending'|'Mounted'|'NotMounted'
},
],
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'isFromAutoSnapshot': True|False,
'sizeInGb': 123
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get instance snapshots request.
Describes an instance snapshot.
The name of the snapshot.
The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE
).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the snapshot was created (e.g., 1479907467.024
).
The region name and Availability Zone where you created the snapshot.
The Availability Zone. Follows the format us-east-2a
(case-sensitive).
The Amazon Web Services Region name.
The type of resource (usually InstanceSnapshot
).
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The state the snapshot is in.
The progress of the snapshot.
Note
This is populated only for disk snapshots, and is null
for instance snapshots.
An array of disk objects containing information about all block storage disks.
Describes a block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a
(case-sensitive).
The Amazon Web Services Region name.
The Lightsail resource type (e.g., Disk
).
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of objects representing the add-ons enabled on the disk.
Describes an add-on that is enabled for an Amazon Lightsail resource.
The name of the add-on.
The status of the add-on.
The daily time when an automatic snapshot is created.
The time shown is in HH:00
format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The next daily time an automatic snapshot will be created.
The time shown is in HH:00
format, and in Coordinated Universal Time (UTC).
The snapshot is automatically created between the time shown and up to 45 minutes after.
The trigger threshold of the action.
Warning
This add-on only applies to Lightsail for Research resources.
The amount of idle time in minutes after which your virtual computer will automatically stop.
Warning
This add-on only applies to Lightsail for Research resources.
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached
for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached
instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The status of automatically mounting a storage disk to a virtual computer.
Warning
This parameter only applies to Lightsail for Research resources.
The instance from which the snapshot was created.
The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE
).
The blueprint ID from which you created the snapshot (e.g., os_debian_8_3
). A blueprint is a virtual private server (or instance ) image used to create instances quickly.
The bundle ID from which you created the snapshot (e.g., micro_1_0
).
A Boolean value indicating whether the snapshot was created from an automatic snapshot.
The size in GB of the SSD.
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another GetInstanceSnapshots
request and specify the next page token using the pageToken
parameter.
Exceptions
Lightsail.Client.exceptions.ServiceException
Lightsail.Client.exceptions.InvalidInputException
Lightsail.Client.exceptions.NotFoundException
Lightsail.Client.exceptions.OperationFailureException
Lightsail.Client.exceptions.AccessDeniedException
Lightsail.Client.exceptions.AccountSetupInProgressException
Lightsail.Client.exceptions.UnauthenticatedException