Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Filter fastly objectstore list by name #761

Open
JakeChampion opened this issue Jan 16, 2023 · 3 comments
Open

[FEATURE REQUEST] Filter fastly objectstore list by name #761

JakeChampion opened this issue Jan 16, 2023 · 3 comments

Comments

@JakeChampion
Copy link
Contributor

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

@Integralist
Copy link
Collaborator

👋🏻 yup I only just discovered this wasn't supporting --json today too and it should be.

@fgsch
Copy link
Member

fgsch commented Feb 6, 2023

While this could be done entirely in the CLI, I believe this is something that should be added to the Object Store API.

@fgsch
Copy link
Member

fgsch commented Feb 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants