Prerequisites
- You need to have an organization
- You need a service account with admin permission
Authentication
StreamNative cloud supports OAuth2 authentication to managing cloud resources. You can use any language http OAuth2 client to connect to the SN cloud. Run the OAuth2 client credential flow using the curl command to get an access token to access the cloud. Download the service account with admin permissions from the console, then run the following command.Management ServiceAccount
List ServiceAccounts
Create ServiceAccount
Request Body:annotations.cloud.streamnative.io/service-account-role
to ""
, it will create a service account with non-admin permissions
Example:
Get Service Account
Delete Service Account
deletionTimestamp
means this resource will be deleted
Management PulsarInstance
List PulsarInstances
See list service accounts, just replaceserviceaccounts
with pulsarinstances
Create PulsarInstance
availabilityMode
and poolRef
Please take a look at the pulsarinsatnce section of snctl
Response:
Get PulsarInstance
See get service account, just replaceserviceaccounts
with pulsarinstances
Delete PulsarInstance
See delete service account, just replaceserviceaccounts
with pulsarinstances
Management User
List User
See list service accounts, just replaceserviceaccounts
with users
Get User
See get service account, just replaceserviceaccounts
with users
Create User
Delete User
See delete service account, just replaceserviceaccounts
with users
Management PulsarCluster
List PulsarCluster
See list service accounts, just replaceserviceaccounts
with pulsarclusters
Create PulsarCluster
Spec
: Please take a look at the pulsarcluster section of snctl
Response:
Get PulsarClustser
See get service account, just replaceserviceaccounts
with pulsarclusters
Update PulsarCluster
Delete PulsarCluster
See delete service account, just replaceserviceaccounts
with pulsarclusters
Management Apikey
List Apikey
See list service accounts, just replaceserviceaccounts
with apikeys
Create Apikey
Generate public key and private key, please refer to this module to generate it. Please save the pem and private key in a secure place, it will be used to encrypt and decrypt your apikey token in the futureGet Apikey
See get service account, just replaceserviceaccounts
with apikeys
If you save the privateKey from above, you can, you can convert status.encryptedToken.jwe
to original token, ImportPrivateKey
from this module. If you lost the privateKey, you will no longer be able to get the original token
Revoke ApiKey
Delete Apikey
See get service account, just replaceserviceaccounts
with apikeys