copy_volumes¶
Operation¶
copy_volumes
async
¶
copy_volumes(request: CopyVolumesInput | CopyVolumesInputDict, /, *, plugins: list[Plugin] | None = None) -> CopyVolumesOutput
copy_volumes(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CopyVolumesInputDict]) -> CopyVolumesOutput
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:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CopyVolumesOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
CopyVolumesInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CopyVolumesInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
This field is autopopulated if not provided.
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | 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 is UnauthorizedOperation.
encrypted
class-attribute
instance-attribute
¶
encrypted: bool | 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 true to encrypt a copy of an unencrypted source volume
during the copy operation. If you set Encrypted to true but do not
specify KmsKeyId, the service uses the default KMS key for EBS
encryption in your account.
iops
class-attribute
instance-attribute
¶
iops: int | None = ...
The number of I/O operations per second (IOPS) to provision for the
volume copy. Required for io1 and io2 volumes. Optional for gp3
volumes. 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
Note
Instances built on the Nitro System can support up to 256,000 IOPS. Other instances can support up to 32,000 IOPS.
kms_key_id
class-attribute
instance-attribute
¶
kms_key_id: str | 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 Encrypted to
true but 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.
multi_attach_enabled
class-attribute
instance-attribute
¶
multi_attach_enabled: bool | 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
io1 and io2 volumes only. For more information, see Amazon EBS
Multi-Attach.
size
class-attribute
instance-attribute
¶
size: int | 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
source_volume_id
class-attribute
instance-attribute
¶
source_volume_id: str | None = ...
The ID of the source EBS volume to copy.
tag_specifications
class-attribute
instance-attribute
¶
tag_specifications: list[TagSpecification] | None = ...
The tags to apply to the volume copy during creation.
throughput
class-attribute
instance-attribute
¶
throughput: int | None = ...
The throughput to provision for the volume copy, in MiB/s. Supported for
gp3 volumes 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 - 2000 MiB/s
Dictionaries¶
CopyVolumesInputDict
¶
Bases: TypedDict
Dictionary form of CopyVolumesInput.
Attributes¶
client_token
instance-attribute
¶
client_token: str | None
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
This field is autopopulated if not provided.
dry_run
instance-attribute
¶
dry_run: bool | 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 is UnauthorizedOperation.
encrypted
instance-attribute
¶
encrypted: bool | 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 true to encrypt a copy of an unencrypted source volume
during the copy operation. If you set Encrypted to true but do not
specify KmsKeyId, the service uses the default KMS key for EBS
encryption in your account.
iops
instance-attribute
¶
iops: int | None
The number of I/O operations per second (IOPS) to provision for the
volume copy. Required for io1 and io2 volumes. Optional for gp3
volumes. 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
Note
Instances built on the Nitro System can support up to 256,000 IOPS. Other instances can support up to 32,000 IOPS.
kms_key_id
instance-attribute
¶
kms_key_id: str | 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 Encrypted to
true but 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.
multi_attach_enabled
instance-attribute
¶
multi_attach_enabled: bool | 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
io1 and io2 volumes only. For more information, see Amazon EBS
Multi-Attach.
size
instance-attribute
¶
size: int | 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
source_volume_id
instance-attribute
¶
The ID of the source EBS volume to copy.
tag_specifications
instance-attribute
¶
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None
The tags to apply to the volume copy during creation.
throughput
instance-attribute
¶
throughput: int | None
The throughput to provision for the volume copy, in MiB/s. Supported for
gp3 volumes 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 - 2000 MiB/s
Output¶
CopyVolumesOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CopyVolumesOutput structure.