ByCloud Docs
GuidesCLIAPISDK

Create role

bycloud iam roles create --name <name> [flags]

Create a new role in the current organization

Options

--output

(-o)

stringoptional

Output format: text, json, or yaml

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

Default: "text"

Body Options

--name

stringrequired

--description

stringoptional

--policy_ids

arrayoptional

--trust_policy

objectoptional

Defines who/what can assume this role using CRN patterns

Command

bycloud iam roles create \
--name "my-resource"

Output

ID 550e8400-e29b-41d4-a716-446655440000
CRN crn::iam:role:550e8400-e29b-41d4-a716-446655440000
NAME S3ReadOnly
DESCRIPTION Read-only access to S3 buckets
TRUST_POLICY
PRINCIPALS crn:spo1:compute:instance:*
POLICY_IDS 550e8400-e29b-41d4-a716-446655440000, 550e8400-e29b-41d4-a716-446655440000
CREATED_AT 2024-01-15T10:30:00Z
UPDATED_AT 2024-01-15T10:30:00Z