Lightsail / Client / get_auto_snapshots

get_auto_snapshots#

Lightsail.Client.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'
)
Parameters:

resourceName (string) –

[REQUIRED]

The name of the source instance or disk from which to get automatic snapshot information.

Return type:

dict

Returns:

Response Syntax

{
    '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

  • (dict) –

    • resourceName (string) –

      The name of the source instance or disk for the automatic snapshots.

    • resourceType (string) –

      The resource type of the automatic snapshot. The possible values are Instance, and Disk.

    • autoSnapshots (list) –

      An array of objects that describe the automatic snapshots that are available for the specified source instance or disk.

      • (dict) –

        Describes an automatic snapshot.

        • date (string) –

          The date of the automatic snapshot in YYYY-MM-DD format.

        • createdAt (datetime) –

          The timestamp when the automatic snapshot was created.

        • status (string) –

          The status of the automatic snapshot.

        • fromAttachedDisks (list) –

          An array of objects that describe the block storage disks attached to the instance when the automatic snapshot was created.

          • (dict) –

            Describes a block storage disk that is attached to an instance, and is included in an automatic snapshot.

            • path (string) –

              The path of the disk ( /dev/xvdf).

            • sizeInGb (integer) –

              The size of the disk in GB.

Exceptions