GoodMem
ReferenceCLI

Apikey Update

Apikey Update CLI command reference

goodmem apikey update

Update an API key

Synopsis

Update an existing API key in the GoodMem service.

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

  # Default label strategy is 'replace' if not specified
  goodmem apikey update 123e4567-e89b-12d3-a456-426614174000 --label environment=production

Options

  -h, --help                    help for update
      --label strings           Labels in key=value format (can be specified multiple times)
      --label-strategy string   Label update strategy: 'replace' to overwrite all existing labels, 'merge' to add to existing 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)
      --output string    Output format: table, json, or simple (default "table")
      --server string    GoodMem server address (gRPC API) (default "https://localhost:9090")

SEE ALSO