I wanted to delete AWS EC2 volumes which were attached to instances.
But, I could not find any implementation in AWS's java sdk to do so.
Its equivalent cli command is : /usr/bin/aws ec2 delete-volume --volume-id $volumeId
But I want to do it via java sdk.
Any suggestions?
Use deleteVolume(DeleteVolumeRequest request)
:
Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).
See also: DeleteVolume
documentation
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.