delete_volume
¶
delete_volume(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 | |