Path: blob/main/L4assets/DSandMLOpsAssets/CLIandSDK/Notebooks/CPDaaS-02 User Management.ipynb
1928 views
Cloud Pak for Data as a Service user management
Make sure to set the API_key variable in the next cell before executing it
This notebook covers:
Adding python functions from a zip file
Getting an access token from an API key
Listing the members of the account
Listing available groups
Listing available roles
Inviting a user to the account
Removing a user from the account
References:
Support functions
instructions:
In the next empty cell, use
Insert to code,StreamingBody objectfor the filecpdalllibs.zipMake sure to use
streaming_body_1in the line:
streaming_body_1 = cos_client.get_object(Bucket=bucket, Key=object_key)['Body']
Get an access token
List the users in the account
List available groups
List access group members
This is a default group. Everyone is a member of this group so no-one is listed
Create a group
List available roles
There are three types of roles: custom, service, and system
Invite a user to the account
There is no need to have a valid user email. For this exercise, using [email protected] works fine.
Note that we automatically add the user to the new group that was created earlier.
List the members of the new group
We should see the new user. The user id is preceded by "BSS-"
Delete a user from the account
Delete the new group
Author
Jacques Roy is a member of the IBM Enablement for Data and AI
Copyright © 2023. This notebook and its source code are released under the terms of the MIT License.