-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be7f7f1
commit 9f49cc4
Showing
87 changed files
with
1,226 additions
and
1,027 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
jobs/dbacademy_jobs/administration/delete-account-user.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import os | ||
from dbacademy.clients.darest import accounts | ||
from dbacademy.common import Cloud | ||
from dbacademy.clients.darest import accounts_client | ||
|
||
|
||
accounts = accounts.from_args_aws(account_id=os.environ.get("WORKSPACE_SETUP_CURR_ACCOUNT_ID"), | ||
username=os.environ.get("WORKSPACE_SETUP_CURR_USERNAME"), | ||
password=os.environ.get("WORKSPACE_SETUP_CURR_PASSWORD")) | ||
accounts = accounts_client.from_args(cloud=Cloud.AWS, | ||
account_id=os.environ.get("WORKSPACE_SETUP_CURR_ACCOUNT_ID"), | ||
username=os.environ.get("WORKSPACE_SETUP_CURR_USERNAME"), | ||
password=os.environ.get("WORKSPACE_SETUP_CURR_PASSWORD")) | ||
|
||
for username in ["[email protected]"]: | ||
user = accounts.scim.users.get_by_username(username) | ||
if user is not None: | ||
print(f"Deleting {username}.") | ||
accounts.scim.users.delete_by_id(user.get("id")) | ||
|
||
pass | ||
# for username in ["[email protected]"]: | ||
# user = accounts.scim.users.get_by_username(username) | ||
# if user is not None: | ||
# print(f"Deleting {username}.") | ||
# accounts.scim.users.delete_by_id(user.get("id")) |
13 changes: 7 additions & 6 deletions
13
jobs/dbacademy_jobs/administration/list_workspace_admins.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.