Zum Inhalt springen

Create and manage credentials for your instances

Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen

List, create, view and delete a service keys:

Section titled “List, create, view and delete a service keys:”

This article describes how to handle credentials for your Redis instance. A service key is the only available form of credential that you can create for now. With a service key you can fully authenticate yourself against your instance.

To get a list of all service keys for a Redis instance:

FlagDescription
instance-idInstance ID of the instance you want to query
Terminal window
stackit redis credentials list --instance-id <instance-id>

You get something like the following output:

ID
──────────────────────────────────────
b355ca17-4231-467c-b7f5-e22f979777f1

In this case b355ca17-4231-467c-b7f5-e22f979777f1 is the service key ID.

To create a service key for a Redis instance:

FlagDescriptionDefaultOptional
instance-idInstance ID of the instance you want to query
show-passwordUsername of the new userx
Terminal window
stackit redis credentials create --instance-id <instance-id>

You get an output similiar to this:

Created credentials for instance "redis-ypqvqby0khea". Credentials ID: 67a5f5c3-121b-452e-baa2-43afaee9ca43
Username: a9s-brk-usr-fdd2f75db85a8291c91e50f621970f4aacb19c3ad1ed305b4f057
Password: <hidden>
Host: red601d47-master-1.data.eu01.onstackit.cloud
Port: 53137
URI: rediss://a9s-brk-usr-fdd2f75db85a8291c91e50f621970f4aacb19c3ad1ed305b4f057:a9s215dd18cb44612ad154f13ecc7fa80c50bfdf90604854eab9edb56eb56217f@red601d47-master-1.data.eu01.onstackit.cloud:53137

To get details of a service key for a Redis instance:

FlagDescriptionDefaultOptional
instance-idInstance ID of the instance you want to query
credentials-idThe ID of the service key
Terminal window
stackit redis credentials describe <credentials-id> --instance-id <instance-id>

You can get use List service keys to get the credentials-id for the requested service key.

You get an output which is similiar to the following:

ID │ 67a5f5c3-121b-452e-baa2-43afaee9ca43 >
──────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────>
USERNAME │ a9s-brk-usr-fdd2f75db85a8291c91e50f621970f4aacb19c3ad1ed305b4f057 >
──────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────>
PASSWORD │ a9s215dd18cb44612ad154f13ecc7fa80c50bfdf90604854eab9edb56eb56217f >
──────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────>
URI │ rediss://a9s-brk-usr-fdd2f75db85a8291c91e50f621970f4aacb19c3ad1ed305b4f057:a9s215dd18cb44612ad154f13ecc7fa80c50bfdf90604854eab9edb56eb56217f@red601d47-master-1.data.eu01.onstackit.cloud:53137

To delete a service key for a Redis instance:

FlagDescriptionDefaultOptional
instance-idInstance ID of the instance you want to query
credentials-idThe ID of the service key
Terminal window
stackit redis credentials delete <credentials-id> --instance-id <instance-id>

After comfirmation you get the following output:

Deleted credentials b355ca17-4231-467c-b7f5-e22f979777f1 of instance "my-redis-instance"