- StreamNative Cloud
- Managed access
Work with users
As an administrator, you can invite users to your organization, as well as update and delete the current users.
Work with users through snctl
In this document, we named the organization matrix
for an example
Create a user through snctl
To create a user, follow these steps.
Define a user named
ironman
by using a manifest file and save the manifest fileuser-ironman.yaml
.apiVersion: cloud.streamnative.io/v1alpha1 kind: User metadata: namespace: matrix name: ironman spec: email: [email protected]
The following table lists fields in the manifest file.
Field Description apiVersion Specify the version of Pulsar API server. kind Specify the component to be created. metadata Configure the metadata information about the user.
- namespace: specify the name of the organization.
- name: specify the name of the user.spec Specify the email address for the user. Apply the manifest file to create the user.
snctl apply -f /path/to/user-ironman.yaml
Check whether the user is created successfully.
snctl describe users [email protected]
Output
Name: [email protected] Namespace: matrix Labels: <none> Annotations: <none> API Version: cloud.streamnative.io/v1alpha1 Kind: User Metadata: Creation Timestamp: 2020-08-10T14:31:12Z Finalizers: user.finalizers.cloud.streamnative.io Generation: 1 Resource Version: 104126 Self Link: /apis/cloud.streamnative.io/v1alpha1/namespaces/matrix/users/[email protected] UID: 5f6297c6-8e64-4175-b866-bb6362437f29 Spec: Email: [email protected] Status: Events: <none>
Check users through snctl
You can use the following command to check users created for an organization.
snctl get users
Output
NAME CREATED AT
[email protected] 2020-08-10T14:31:12Z
Check user details through snctl
Before checking details about a user, you should use the following command to confirm whether the target user is available.
snctl get users
Then, you can use the following command to check details about a specific user.
snctl describe users USER_NAME
The following example checks details about the user [email protected]
.
snctl describe users [email protected]
Output
Name: [email protected]
Namespace: matrix
Labels: <none>
Annotations: <none>
API Version: cloud.streamnative.io/v1alpha1
Kind: User
Metadata:
Creation Timestamp: 2020-08-10T14:31:12Z
Finalizers:
user.finalizers.cloud.streamnative.io
Generation: 1
Resource Version: 104126
Self Link: /apis/cloud.streamnative.io/v1alpha1/namespaces/matrix/users/[email protected]
UID: 5f6297c6-8e64-4175-b866-bb6362437f29
Spec:
Email: [email protected]
Status:
Events: <none>
Delete a user through snctl
You can use the following command to delete a specific user based on the user name.
snctl delete users USER_NAME
In addition, you can use the following command to delete the cluster based on the type and name specified in the manifest file.
snctl delete -f ./user-ironman.yaml
Work with users through StreamNative Cloud Console
This section describes how to work with users through the StreamNative Cloud Console.
Invite a user
To invite a user, follow these steps.
If you are a member of multiple organizations, navigate to the organization you want to invite a user to. In the upper-right corner of the StreamNative Cloud Console, click your Profile and select Switch Organization to check your created organizations.
On the Organization you want to invite teammates to, click Invite Teammates.
On the User page, click Invite User and a dialog box displays.
Enter the user's email address and then click Confirm.
Check users through StreamNative Cloud Console
In the upper-right corner of the StreamNative Cloud Console, click your Profile and select Users from the drop-down list to view the users for an organization, including the email address and status of the users.
Delete a user through StreamNative Cloud Console
As an administrator, you can delete a user.
To delete a user, follow these steps.
In the upper-right corner of the StreamNative Cloud Console, click your Profile and select Users from the drop-down list.
Click Delete in the Actions column.
A dialog box displays asking, Are you sure you want to delete this user?
Click Confirm.