delete_volume
async
¶
delete_volume(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
volume_id: Optional[VolumeId] = None,
dry_run: Optional[Boolean] = None,
) -> None
Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).
The volume can remain in the deleting state for several minutes.
For more information, see Delete an Amazon EBS volume in the Amazon EBS User Guide.
Parameters:
-
volume_id(Optional[VolumeId], default:None) –The ID of the volume.
-
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.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To delete a volume
This example deletes an available volume with the volume ID of vol-049df61146c4d7901. If the command succeeds, no output is returned.
Source code in docs_src/capo_ec2/_services/async_ec2.py
20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 | |