copy_volumes
async
¶
copy_volumes(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
source_volume_id: Optional[VolumeId] = None,
iops: Optional[Integer] = None,
size: Optional[Integer] = None,
volume_type: Optional[VolumeType] = None,
dry_run: Optional[Boolean] = None,
tag_specifications: Optional[TagSpecificationList] = None,
multi_attach_enabled: Optional[Boolean] = None,
throughput: Optional[Integer] = None,
client_token: Optional[String] = None,
encrypted: Optional[Boolean] = None,
kms_key_id: Optional[KmsKeyId] = None,
) -> CopyVolumesResult
Creates a crash-consistent, point-in-time copy of an existing Amazon EBS volume within the same Availability Zone. The volume copy can be attached to an Amazon EC2 instance once it reaches the available state. For more information, see Copy an Amazon EBS volume.
Parameters:
-
source_volume_id(Optional[VolumeId], default:None) –The ID of the source EBS volume to copy.
-
iops(Optional[Integer], default:None) –The number of I/O operations per second (IOPS) to provision for the volume copy. Required for
io1andio2volumes. Optional forgp3volumes. Omit for all other volume types. Full provisioned IOPS performance can be achieved only once the volume copy is fully initialized.Valid ranges:
-
gp3:
3,000(default)- 80,000IOPS -
io1:
100 - 64,000IOPS -
io2:
100 - 256,000IOPS
Instances built on the Nitro System can support up to 256,000 IOPS. Other instances can support up to 32,000 IOPS.
-
-
size(Optional[Integer], default:None) –The size of the volume copy, in GiBs. The size must be equal to or greater than the size of the source volume. If not specified, the size defaults to the size of the source volume.
Maximum supported sizes:
-
gp2:
16,384GiB -
gp3:
65,536GiB -
io1:
16,384GiB -
io2:
65,536GiB -
st1 and sc1:
16,384GiB -
standard:
1024GiB
-
-
volume_type(Optional[VolumeType], default:None) –The volume type for the volume copy. If not specified, the volume type defaults to
gp2. -
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. -
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the volume copy during creation.
-
multi_attach_enabled(Optional[Boolean], default:None) –Indicates whether to enable Amazon EBS Multi-Attach for the volume copy. If you enable Multi-Attach, you can attach the volume to up to 16 Nitro instances in the same Availability Zone simultaneously. Supported with
io1andio2volumes only. For more information, see Amazon EBS Multi-Attach. -
throughput(Optional[Integer], default:None) –The throughput to provision for the volume copy, in MiB/s. Supported for
gp3volumes only. Omit for all other volume types. Full provisioned throughput performance can be achieved only once the volume copy is fully initialized.Valid Range:
125 - 2000MiB/s -
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
-
encrypted(Optional[Boolean], default:None) –Indicates whether to encrypt the volume copy. If the source volume is encrypted, the service always encrypts the copy regardless of this value. Set to
trueto encrypt a copy of an unencrypted source volume during the copy operation. If you setEncryptedtotruebut do not specifyKmsKeyId, the service uses the default KMS key for EBS encryption in your account. -
kms_key_id(Optional[KmsKeyId], default:None) –The identifier of the KMS key to use for encryption of the volume copy. Specify a symmetric encryption KMS key. You can specify a KMS key using the key ID, key ARN, alias name, or alias ARN. If you set
Encryptedtotruebut do not specify this parameter, the service uses the default KMS key for EBS encryption in your account. For cross-account volume copies, this must be a KMS key in the calling account.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 | |