ByCloud Docs
GuidesCLIAPISDK

List groups with policy

bycloud iam policies-groups list --policy_id <policy_id> [flags]

List all groups that have this policy attached

Options

--policy_id

stringrequired

Policy ID

--limit

integeroptional

Maximum number of items to return

Default: 20

--marker

stringoptional

ID of the last item from the previous page (for pagination)

--output

(-o)

stringoptional

Output format: text, json, or yaml

Values: "text", "json", "yaml"

Default: "text"

Command

bycloud iam policies-groups list \
--policy_id "abc-123"

Output

ID CRN NAME DESCRIPTION MEMBER_COUNT
550e8400-e29b-41d4-a716-446655 crn::iam:group:550e8400-e29b-4 developers Development team members 1
550e8400-e29b-41d4-a716-446655 crn::iam:group:550e8400-e29b-4 developers Development team members 1