Lightsail / Client / get_export_snapshot_records

get_export_snapshot_records#

Lightsail.Client.get_export_snapshot_records(**kwargs)#

Returns all export snapshot records created as a result of the export snapshot operation.

An export snapshot record can be used to create a new Amazon EC2 instance and its related resources with the CreateCloudFormationStack action.

See also: AWS API Documentation

Request Syntax

response = client.get_export_snapshot_records(
    pageToken='string'
)
Parameters:

pageToken (string) –

The token to advance to the next page of results from your request.

To get a page token, perform an initial GetExportSnapshotRecords 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.

Return type:

dict

Returns:

Response Syntax

{
    'exportSnapshotRecords': [
        {
            'name': 'string',
            'arn': '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',
            'state': 'Started'|'Succeeded'|'Failed',
            'sourceInfo': {
                'resourceType': 'InstanceSnapshot'|'DiskSnapshot',
                'createdAt': datetime(2015, 1, 1),
                'name': 'string',
                'arn': 'string',
                'fromResourceName': 'string',
                'fromResourceArn': 'string',
                'instanceSnapshotInfo': {
                    'fromBundleId': 'string',
                    'fromBlueprintId': 'string',
                    'fromDiskInfo': [
                        {
                            'name': 'string',
                            'path': 'string',
                            'sizeInGb': 123,
                            'isSystemDisk': True|False
                        },
                    ]
                },
                'diskSnapshotInfo': {
                    'sizeInGb': 123
                }
            },
            'destinationInfo': {
                'id': 'string',
                'service': 'string'
            }
        },
    ],
    'nextPageToken': 'string'
}

Response Structure

  • (dict) –

    • exportSnapshotRecords (list) –

      A list of objects describing the export snapshot records.

      • (dict) –

        Describes an export snapshot record.

        • name (string) –

          The export snapshot record name.

        • arn (string) –

          The Amazon Resource Name (ARN) of the export snapshot record.

        • createdAt (datetime) –

          The date when the export snapshot record was created.

        • location (dict) –

          The AWS Region and Availability Zone where the export snapshot record is located.

          • availabilityZone (string) –

            The Availability Zone. Follows the format us-east-2a (case-sensitive).

          • regionName (string) –

            The Amazon Web Services Region name.

        • resourceType (string) –

          The Lightsail resource type ( ExportSnapshotRecord).

        • state (string) –

          The state of the export snapshot record.

        • sourceInfo (dict) –

          A list of objects describing the source of the export snapshot record.

          • resourceType (string) –

            The Lightsail resource type ( InstanceSnapshot or DiskSnapshot).

          • createdAt (datetime) –

            The date when the source instance or disk snapshot was created.

          • name (string) –

            The name of the source instance or disk snapshot.

          • arn (string) –

            The Amazon Resource Name (ARN) of the source instance or disk snapshot.

          • fromResourceName (string) –

            The name of the snapshot’s source instance or disk.

          • fromResourceArn (string) –

            The Amazon Resource Name (ARN) of the snapshot’s source instance or disk.

          • instanceSnapshotInfo (dict) –

            A list of objects describing an instance snapshot.

            • fromBundleId (string) –

              The bundle ID from which the source instance was created ( micro_1_0).

            • fromBlueprintId (string) –

              The blueprint ID from which the source instance ( os_debian_8_3).

            • fromDiskInfo (list) –

              A list of objects describing the disks that were attached to the source instance.

              • (dict) –

                Describes a disk.

                • name (string) –

                  The disk name.

                • path (string) –

                  The disk path.

                • sizeInGb (integer) –

                  The size of the disk in GB ( 32).

                • isSystemDisk (boolean) –

                  A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

          • diskSnapshotInfo (dict) –

            A list of objects describing a disk snapshot.

            • sizeInGb (integer) –

              The size of the disk in GB ( 32).

        • destinationInfo (dict) –

          A list of objects describing the destination of the export snapshot record.

          • id (string) –

            The ID of the resource created at the destination.

          • service (string) –

            The destination service of the record.

    • nextPageToken (string) –

      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 GetExportSnapshotRecords request and specify the next page token using the pageToken parameter.

Exceptions