[FEATURE REQUEST] Filter `fastly objectstore list` by name
Is your feature request related to a problem? Please describe.
After creating a new Object Store, I need to find the ID of the new store to use in HTTP API calls.
Currently fastly objectstore list returns all Object Stores in an account.
Describe the solution you'd like
I would like to be able to run fastly objectstore list --name=<my-store-name> --json and for that to return information about the store named <my-store-name> in JSON format
Describe alternatives you've considered
I currently use this to get the Object Store ID - fastly objectstore list | grep -A 3 'my-store' | tail -n 1 | grep -o '[a-z0-9]*'
Additional context
fastly objectstore insert,fastly objectstore get, and fastly objectstore delete all currently require an Object Store ID, it would be really useful if they accepted an Object Store name, it would remove the need for a customer to need to know the ID
👋🏻 yup I only just discovered this wasn't supporting --json today too and it should be.
While this could be done entirely in the CLI, I believe this is something that should be added to the Object Store API.
Now that #792 has landed, fastly object-store create supports --json, and both in the JSON and the non-JSON case it will output the store id just created.
Also fastly object-store list also supports --json so you could do something like fastly object-store list -j | jq '.Data[]|select(.Name == "store-name").ID'.
This does not address this issue but hopefully alleviates things a bit.
This is still an issue with fastly kv-store describe.