-
Notifications
You must be signed in to change notification settings - Fork 3
New GrafanaApiKey
Creates a new API key in Grafana
New-GrafanaApiKey [-Name] <String> [-Role] <String> [<CommonParameters>]
New-GrafanaApiKey -Name RickyBobby -Role Admin
New-GrafanaApiKey -Name Alice -Role Editor
The friendly name of the API key
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The access level for the key. Available options are Admin,Editor, and Viewer
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The generated API key is only displayed at runtime. If you need to retain it for any reason, be sure to it somewhere safe. It is highly recommended you run this command saved to a variable such as $ApiKey = New-GrafanaApiKey -Name ElmerFudd -Role Viewer. This way you can access the properties Name and Key within the variable. E.g. $ApiKey.name, or $ApiKey.key.
-
Configuration
-
Admin
-
API Keys
-
Alerts
-
Dashboards
-
Folders
-
Snapshots
-
Other