oci-go-sdk
oci-go-sdk copied to clipboard
How to list block volumes using freeform tags as filter
ListVolume does not take tags as input filter in request body. I want to get list of only volumes that have certain tags applied to them. I know that I can get list of all the volumes in my account using this API and then filter them out at client side. But I want to avoid doing that at client side. Is there any way to just get list of volumes based on tags assigned to them?
Hi @vinayakshnd , Unfortunately, the block volume team confirmed that they are not supporting sorting by tags right now.
The good news is that there are a couple of options they suggested:
- list all volumes and filter by tags on the client (as suggested by you in the ticket)
- keep the volumes in a special volume group and get that volume group
Please give this a try and let us know if you have any issues. Hope this helps. Thanks.