dcloud iam grants createGrant capabilities on one resource to a user, group or role
Each capability id stands for a fixed set of IAM actions; the caller must already hold every action being granted, or the call is refused naming the one they lack. The resource must be one named thing in the caller’s own organization — a wildcard such as zone/* is refused, since org-wide reach belongs on the policy pages.
Synopsis
dcloud iam grants create --principal principal --resource resource --capabilities capabilitiesFlags
--principalRequiredobject
Who receives the capabilities: {kind: user|group|role, id}
Constraints: JSON
--resourceRequiredstring
The RN of one named resource of this organization; a wildcard is refused
Constraints: 1-500 chars
--capabilitiesRequiredarray of string
Capability IDs, e.g. repository.push or database.view; each must apply to the resource’s type, and you must hold every action it stands for
Constraints: 1-64 chars
Example
dcloud iam grants create --principal '{}' --resource example --capabilities '["example"]'Generated from the API description, the same one the API checks requests against and the CLI is built from.