Advertisement
fkeles

oci-cli-find-admin-users.sh

Sep 23rd, 2023 (edited)
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | Source Code | 0 0
  1. ubuntu@FAKELES-7310:~$ oci iam group list-users --compartment-id $TENANCY_OCID --group-id $(oci iam group list --compartment-id $TENANCY_OCID --name Administrators --query 'data[*]."id"' --raw-output | egrep -v -e "\[" -e "\]" | sed 's/\"//g;s/,//g') --query 'data[*].{OCID:id,Name:name}' --output table
  2. +--------+--------------------------------------------------+
  3. | Name   | OCID                                             |
  4. +--------+--------------------------------------------------+
  5. | User 1 | ocid1.user.oc1.................................. |
  6. | User 2 | ocid1.user.oc1.................................. |
  7. | User 3 | ocid1.user.oc1.................................. |
  8. | User 4 | ocid1.user.oc1.................................. |
  9. | User 5 | ocid1.user.oc1.................................. |
  10. | User 6 | ocid1.user.oc1.................................. |
  11. +--------+--------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement