diagrid apikey create
Create an API key
diagrid apikey create [flags]
Examples
# Create an API key with no expiration and Conductor editor role
diagrid apikey create --name my-key --role diagrid:editor
# Create an API key with no expiration and Catalyst editor role
diagrid apikey create --name my-key --role cra.diagrid:editor
# Create an API key with 24h expiration (duration in seconds)
diagrid apikey create --name my-key --role diagrid:editor --duration 86400
# Create an API key scoped to a specific project
diagrid apikey create --name my-key --role cra.diagrid:admin --scope project:my-project
# Create an API key scoped to a specific cluster
diagrid apikey create --name my-key --role diagrid:admin --scope cluster:my-cluster
Options
-n, --name string API key name
-r, --role string API key role (Conductor: diagrid:admin, diagrid:editor, diagrid:viewer; Catalyst: cra.diagrid:admin, cra.diagrid:editor, cra.diagrid:viewer)
-d, --duration int Expiration duration in seconds (no expiration if unset)
-s, --scope string Limit the API key to a specific scope (e.g. project:my-project or cluster:my-cluster)
-h, --help help for create
SEE ALSO
- diagrid apikey - Manage API keys