Create a database user
This page provides information about how to create users in an Aerospike Cloud database cluster. Instructions are available for using the Aerospike Cloud Console or the Aerospike Cloud API.
Create a new user
-
Navigate to the clusters page.
-
Click the cluster to which you want to add a user.
a. If the cluster has no users, click Create database user.
b. If at least one user exists, click the Access manager tab and click + Add user.
-
Enter the following details for the new user:
Field Details Username A unique name to identify the user. Roles Select one or more roles to assign to the user. The available roles correspond to a subset of the privileges native to Aerospike. The sys-admin
anduser-admin
roles are not available in Aerospike Cloud.Password Create a password for the user that contains letters, numbers, or . * - : / _ @. Spaces are not allowed, and the password must be a minimum of 8 characters.
If you want to create a random strong password, click Autogenerate.
If you want to download the user details in a CSV file, click CSV.
Note: You can only see a user’s password when creating the user, and you can not modify or retrieve a user’s password after the user has been created.
-
Create a Cloud API key and retrieve a bearer token. See Using Cloud APIs for details about creating a key to use with the API.
-
Make a POST request to the endpoint for your database. Example:
Terminal window curl -X POST "https://api.aerospike.cloud/v2/databases/<database-id>/credentials" \-H "Authorization: Bearer <bearer-token>" \-H "Content-Type: application/json" \--data '{"name":"a-user-name","roles":["read-write"],"password": "pa$$word"}'
What’s next?
- Set up your VPC peering connection.
- Create an API key.