-
Notifications
You must be signed in to change notification settings - Fork 1
Add API key management commands #82
Copy link
Copy link
Closed
Description
Summary
Add commands for managing New Relic API keys as convenient aliases to the underlying NerdGraph apiAccess* mutations. Currently key operations require hand-crafting GraphQL via nrq nerdgraph query, which is error-prone and hard to remember.
Proposed Commands
nrq keys list
List all API keys for the account (USER + INGEST).
nrq keys list [--type user|ingest] [--account <id>]
Wraps apiAccess.keySearch.
nrq keys get <id>
Get details for a specific key.
nrq keys get <key-id>
Wraps apiAccess.key.
nrq keys create
Create a new API key.
nrq keys create --type user --name "my-key" [--notes "description"] [--account <id>]
nrq keys create --type ingest --ingest-type license --name "my-key" [--account <id>]
Wraps apiAccessCreateKeys.
nrq keys delete <id>
Delete one or more keys.
nrq keys delete <key-id> [<key-id>...]
Wraps apiAccessDeleteKeys.
nrq keys update <id>
Update key name or notes.
nrq keys update <key-id> --name "new-name" [--notes "new notes"]
Wraps apiAccessUpdateKeys.
Context
During annual key rotations we frequently need to list, create, and delete keys. Having first-class CLI commands would make this much more ergonomic and scriptable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels