AWS vm-import documentation change
Summary
Expanded documentation for monitoring import snapshot tasks with AWS CLI and PowerShell, including detailed command examples and output formatting for both single tasks and all tasks
Security assessment
The changes improve operational documentation by adding monitoring examples but contain no security vulnerability fixes, security configuration guidance, or references to security incidents. The added fields like 'Encrypted' and 'KmsKeyId' in PowerShell examples reflect existing security features rather than new security documentation.
Diff
diff --git a/vm-import/latest/userguide/check-status-import-task.md b/vm-import/latest/userguide/check-status-import-task.md index 440ea2556..9dff9fcf4 100644 --- a//vm-import/latest/userguide/check-status-import-task.md +++ b//vm-import/latest/userguide/check-status-import-task.md @@ -7 +7 @@ -Use the [describe-import-snapshot-tasks](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-import-snapshot-tasks.html) command to check the status of an import snapshot task. +After you start an import snapshot task using VM Import/Export, you can monitor the import operation. If the task status is `active`, it means that the import task is in progress. The snapshot is ready to use when the status is `completed`. @@ -8,0 +9 @@ Use the [describe-import-snapshot-tasks](https://docs.aws.amazon.com/cli/latest/ +AWS CLI @@ -10 +10,0 @@ Use the [describe-import-snapshot-tasks](https://docs.aws.amazon.com/cli/latest/ - aws ec2 describe-import-snapshot-tasks --import-task-ids import-snap-1234567890abcdef0 @@ -12 +12,9 @@ Use the [describe-import-snapshot-tasks](https://docs.aws.amazon.com/cli/latest/ -The following is an example response. The status shown is `active`, which means that the import is in progress. The snapshot is ready to use when the status is `completed`. +###### To get the status of an import snapshot task + +Use the following [describe-import-snapshot-tasks](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-import-snapshot-tasks.html) command. + + + aws ec2 describe-import-snapshot-tasks \ + --import-task-ids import-snap-1234567890abcdef0 + +The following is example output. @@ -35,0 +44,84 @@ The following is an example response. The status shown is `active`, which means +###### To get the status of all import snapshot tasks + +Use the following [describe-import-snapshot-tasks](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-import-snapshot-tasks.html) command. + + + aws ec2 describe-import-snapshot-tasks \ + --query "ImportSnapshotTasks[*].{Description:Description, ImportTaskId:ImportTaskId, Status:SnapshotTaskDetail.Status, Progress: SnapshotTaskDetail.Progress, SnapshotID: SnapshotTaskDetail.SnapshotId, S3Key: SnapshotTaskDetail.UserBucket.S3Key}" \ + --output table + +The following is example output. You can display any additional fields that you need. + + + ---------------------------------------------------------------------------------------------------------------------------- + | DescribeImportSnapshotTasks | + +--------------+--------------------------------+-------------+-----------+----------------------+-------------------------+ + | Description | ImportTaskId | Status | Progress | S3Key | SnapshotID | + +--------------+--------------------------------+-------------+-----------+----------------------+-------------------------+ + | My server VM| import-snap-1234567890abcdef0 | active | 19 | my-server-vm.vmdk | | + | My server VM| import-snap-1234567890abcdef1 | completed | None | my-server-vm1.vmdk | snap-0bd3ea32600000000 | + | My server VM| import-snap-1234567890abcdef2 | completed | None | my-server-vm2.vmdk | snap-090ec0d0eb1111111 | + | My server VM| import-snap-1234567890abcdef3 | deleted | None | my-server-vm3.vmdk | | + +--------------+--------------------------------+-------------+-----------+----------------------+-------------------------+ + +PowerShell + + +###### To get the status of an import snapshot task + +Use the [Get-EC2ImportSnapshotTask](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2ImportSnapshotTask.html) cmdlet as follows. + + + Get-EC2ImportSnapshotTask ` + -ImportTaskId import-snap-1234567890abcdef0 | Format-List *, + @{Name='SnapshotTaskDetail';Expression={ $_.SnapshotTaskDetail | Out-String }}, + @{Name='UserBucket';Expression={ $_.SnapshotTaskDetail.UserBucket | Out-String }} + +The following is example output. + + + Description : My server VM + ImportTaskId : import-snap-1234567890abcdef0 + SnapshotTaskDetail : Amazon.EC2.Model.SnapshotTaskDetail + Tags : + SnapshotTaskDetail : + Description : + DiskImageSize : 2495933952 + Encrypted : + Format : VMDK + KmsKeyId : + Progress : + SnapshotId : snap-111222333444aaabb + Status : completed + StatusMessage : + Url : + UserBucket : Amazon.EC2.Model.UserBucketDetails + + + UserBucket : + S3Bucket S3Key + -------- ----- + amzn-s3-demo-import-bucket my-server-vm.vmdk + +###### To get the status of all import snapshot tasks + +Use the [Get-EC2ImportSnapshotTask](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2ImportSnapshotTask.html) cmdlet as follows. + + + Get-EC2ImportSnapshotTask | + Format-Table Description, ImportTaskId, + @{Name='Status';Expression={$_.SnapshotTaskDetail.Status}}, + @{Name='Progress';Expression={$_.SnapshotTaskDetail.Progress}}, + @{Name='SnapshotID';Expression={$_.SnapshotTaskDetail.SnapshotID}}, + @{Name='S3Key Source';Expression={$_.SnapshotTaskDetail.UserBucket.S3Key}} + +The following is example output. You can display any additional fields that you need. + + + Description ImportTaskId Status Progress SnapshotID S3Key Source + ----------- ------------ ------ -------- ---------- ------------ + My server VM import-snap-1234567890abcdef0 active 19 my-server-vm.vmdk + My server VM import-snap-1234567890abcdef1 completed snap-0450e071240000000 my-server-vm1.vmdk + My server VM import-snap-1234567890abcdef2 completed snap-0bd3ea32601111111 my-server-vm2.vmdk + My server VM import-snap-1234567890abcdef3 deleted my-server-vm3.vmdk +