Zum Inhalt springen

Create and manage credentials

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

List, create, view and delete service keys

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

This article describes how to handle credentials for your MariaDB 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 MariaDB instance:

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

You get something like the following output:

ID
──────────────────────────────────────
ccaf719c-b954-4190-93c9-6b9ccb55c530

In this case ccaf719c-b954-4190-93c9-6b9ccb55c530 is the service key ID.

To create a service key for a MariaDB instance:

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

You get the following output:

Created credentials for instance "my-mariadb-instance". Credentials ID: a0dc53d2-e6fe-49ed-aac3-5bb5f374ecc2
Username: a9s32142d4c4993ce4c2c928285e007
Password: <hidden>
Host: mad30dc70-1.data.eu01.onstackit.cloud
Port: 49271
URI: mysql://a9s32142d4c4993ce4c2c928285e007:a9s69c596f707f28fddcef2f5eb4326c58d47bbc3f9@mad30dc70-1.data.eu01.onstackit.cloud:49271/mad30dc70

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

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

Use List service keys to get the service-key-id for the requested service key.

You get an output which is similiar to the following:

ID │ ccaf719c-b954-4190-93c9-6b9ccb55c530
──────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
USERNAME │ a9s87adfa95ea09124e3034355524d2
──────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
PASSWORD │ a9sec3e313c1038a9316c63ac19d83133167bb07aec
──────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
URI │ mysql://a9s87adfa95ea09124e3034355524d2:a9sec3e313c1038a9316c63ac19d83133167bb07aec@mad30dc70-1.data.eu01.onstackit.cloud:49271/mad30dc70

To delete a service key for a MariaDB instance:

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

After confirmation, you get the following output:

Deleted credentials a9s87adfa95ea09124e3034355524d2 of instance "my-mariadb-instance"