CmdID

CmdID / aws / aws lightsail

aws lightsail create-disk-snapshot

Creates a snapshot of a block storage disk. AWS CLI reference

2 examples 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

Example 1: To create a snapshot of a disk

The following create-disk-snapshot example creates a snapshot named DiskSnapshot-1 of the specified block storage disk.

aws lightsail create-disk-snapshot --disk-name Disk-1 --disk-snapshot-name DiskSnapshot-1Identify
--disk-nameThe unique name of the source disk (Disk-Virginia-1).
--disk-snapshot-nameThe name of the destination disk snapshot (my-disk-snapshot) based on the source disk.
Its output, shortened
{
    "operations": [
        {
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "resourceName": "DiskSnapshot-1",
            "resourceType": "DiskSnapshot",
            "createdAt": 1569625129.739,
            "location": {
                "availabilityZone": "all",
                "regionName": "us-west-2"
            },
            "isTerminal": false,
            "operationDetails": "Disk-1",
            "operationType": "CreateDiskSnapshot",
            "status": "Started",
            "statusChangedAt": 1569625129.739
        },
        {
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "resourceName": "Disk-1",
            "resourceType": "Disk",
            "createdAt": 1569625129.739,
            "location": {
                "availabilityZone": "us-west-2a",
                "regionName": "us-west-2"
            },
            "isTerminal": false,
            "operationDetails": "DiskSnapshot-1",
            "operationType": "CreateDiskSnapshot",
            "status": "Started",
… 4 more lines

Example 2: To create a snapshot of an instance's system disk

The following create-disk-snapshot example creates a snapshot of the specified instance's system disk.

aws lightsail create-disk-snapshot --instance-name WordPress-1 --disk-snapshot-name SystemDiskSnapshot-1Identify
--instance-nameThe unique name of the source instance (Amazon_Linux-512MB-Virginia-1).
--disk-snapshot-nameThe name of the destination disk snapshot (my-disk-snapshot) based on the source disk.
Its output, shortened
{
    "operations": [
        {
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
            "resourceName": "SystemDiskSnapshot-1",
            "resourceType": "DiskSnapshot",
            "createdAt": 1569625294.685,
            "location": {
                "availabilityZone": "all",
                "regionName": "us-west-2"
            },
            "isTerminal": false,
            "operationDetails": "WordPress-1",
            "operationType": "CreateDiskSnapshot",
            "status": "Started",
            "statusChangedAt": 1569625294.685
        },
        {
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE44444",
            "resourceName": "WordPress-1",
            "resourceType": "Instance",
            "createdAt": 1569625294.685,
            "location": {
                "availabilityZone": "us-west-2a",
                "regionName": "us-west-2"
            },
            "isTerminal": false,
            "operationDetails": "SystemDiskSnapshot-1",
            "operationType": "CreateDiskSnapshot",
            "status": "Started",
… 4 more lines

For more information, see Snapshots in Amazon Lightsail and Creating a snapshot of an instance root volume in Amazon Lightsail in the Lightsail Developer Guide.

Options

4 in the AWS CLI reference
--disk-nameThe unique name of the source disk (Disk-Virginia-1).
--disk-snapshot-nameThe name of the destination disk snapshot (my-disk-snapshot) based on the source disk.
--instance-nameThe unique name of the source instance (Amazon_Linux-512MB-Virginia-1).
--tagsThe tag keys and optional values to add to the resource during create.