ByCloud Docs
GuidesCLIAPISDK

Attach policy to service account

bycloud iam service-accounts-policies --service_account_id <service_account_id> --policy_id <policy_id> [flags]

Attach a policy to a service account

Options

--service_account_id

stringrequired

Service Account ID

--output

(-o)

stringoptional

Output format: text, json, or yaml

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

Default: "text"

Body Options

--policy_id

stringrequired

Command

bycloud iam service-accounts-policies \
--service_account_id "abc-123" \
--policy_id "abc-123"

Output

Success