import_volume
¶
import_volume(
*,
config_overrides: Optional[EC2ClientConfig] = None,
availability_zone_id: Optional[AvailabilityZoneId] = None,
dry_run: Optional[Boolean] = None,
availability_zone: Optional[String] = None,
image: Optional[DiskImageDetail] = None,
description: Optional[String] = None,
volume: Optional[VolumeDetail] = None,
) -> ImportVolumeResult
This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead. To import a disk to a snapshot, use ImportSnapshot instead.
Creates an import volume task using metadata from the specified disk image.
For information about the import manifest referenced by this API action, see VM Import Manifest.
This API action is not supported by the Command Line Interface (CLI).
Parameters:
-
availability_zone_id(Optional[AvailabilityZoneId], default:None) –The ID of the Availability Zone for the resulting EBS volume.
Either
AvailabilityZoneorAvailabilityZoneIdmust be specified, but not both. -
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
availability_zone(Optional[String], default:None) –The Availability Zone for the resulting EBS volume.
Either
AvailabilityZoneorAvailabilityZoneIdmust be specified, but not both. -
image(Optional[DiskImageDetail], default:None) –The disk image.
-
description(Optional[String], default:None) –A description of the volume.
-
volume(Optional[VolumeDetail], default:None) –The volume size.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
48447 48448 48449 48450 48451 48452 48453 48454 48455 48456 48457 48458 48459 48460 48461 48462 48463 48464 48465 48466 48467 48468 48469 48470 48471 48472 48473 48474 48475 48476 48477 48478 48479 48480 48481 48482 48483 48484 48485 48486 48487 48488 48489 48490 48491 48492 48493 48494 48495 48496 48497 48498 48499 48500 48501 48502 48503 48504 48505 48506 48507 48508 48509 48510 48511 48512 48513 48514 48515 48516 48517 48518 48519 48520 48521 48522 48523 48524 48525 48526 48527 48528 | |