ReferenceCLIAPI Keys
Apikey Update
Apikey Update CLI command reference
goodmem apikey update
Update an API key
Synopsis
Update an existing API key in the GoodMem service.
Omitting label flags preserves the current labels. Supplying one or more --label flags with --label-strategy replace replaces the complete label map, while merge preserves labels not named by the command. Explicitly supplying --label-strategy replace without any --label flags clears all labels. An empty merge is rejected because it would not change the key.
goodmem apikey update <api-key-id> [flags]Examples
# Update API key status
goodmem apikey update 123e4567-e89b-12d3-a456-426614174000 --status INACTIVE
# Replace all labels with new ones (old labels are removed)
goodmem apikey update 123e4567-e89b-12d3-a456-426614174000 \
--label key1=value1 --label key2=value2 --label-strategy replace
# Merge new labels with existing ones (old labels are preserved)
goodmem apikey update 123e4567-e89b-12d3-a456-426614174000 \
--label key1=newvalue --label-strategy merge
# Clear all labels
goodmem apikey update 123e4567-e89b-12d3-a456-426614174000 \
--label-strategy replaceOptions
-h, --help help for update
-l, --label strings Label key=value (repeatable)
--label-strategy string Label update strategy: replace or merge (replace with no --label clears all labels) (default "replace")
--status string Status of the API key (ACTIVE or INACTIVE)Options inherited from parent commands
--api-key string API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
-f, --format string Output format: table, json, or simple (default "table")
--server string GoodMem server address (gRPC API)SEE ALSO
- goodmem apikey - Manage GoodMem API keys