ByCloud Docs
GuidesCLIAPISDK

Attach policy to role

bycloud iam roles-policies --role_id <role_id> --policy_id <policy_id> [flags]

Attach a policy to a role

Options

--role_id

stringrequired

Role ID

--output

(-o)

stringoptional

Output format: text, json, or yaml

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

Default: "text"

Body Options

--policy_id

stringrequired

Command

bycloud iam roles-policies \
--role_id "abc-123" \
--policy_id "abc-123"

Output

Success