get_auto_snapshots
(**kwargs)¶Returns the available automatic snapshots for an instance or disk. For more information, see the Amazon Lightsail Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.get_auto_snapshots(
resourceName='string'
)
[REQUIRED]
The name of the source instance or disk from which to get automatic snapshot information.
{
'resourceName': 'string',
'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
'autoSnapshots': [
{
'date': 'string',
'createdAt': datetime(2015, 1, 1),
'status': 'Success'|'Failed'|'InProgress'|'NotFound',
'fromAttachedDisks': [
{
'path': 'string',
'sizeInGb': 123
},
]
},
]
}
Response Structure
The name of the source instance or disk for the automatic snapshots.
The resource type (e.g., Instance
or Disk
).
An array of objects that describe the automatic snapshots that are available for the specified source instance or disk.
Describes an automatic snapshot.
The date of the automatic snapshot in YYYY-MM-DD
format.
The timestamp when the automatic snapshot was created.
The status of the automatic snapshot.
An array of objects that describe the block storage disks attached to the instance when the automatic snapshot was created.
Describes a block storage disk that is attached to an instance, and is included in an automatic snapshot.
The path of the disk (e.g., /dev/xvdf
).
The size of the disk in GB.
Exceptions
Lightsail.Client.exceptions.ServiceException
Lightsail.Client.exceptions.InvalidInputException
Lightsail.Client.exceptions.NotFoundException
Lightsail.Client.exceptions.OperationFailureException
Lightsail.Client.exceptions.AccessDeniedException
Lightsail.Client.exceptions.UnauthenticatedException