iamrole create

Prev Next

This command creates an IAM Role.

Usage

      iamrole create --name NAME
                     --trust-policy TRUSTPOLICY
                    [--tenant-id TENANT]
                    [--description DESCRIPTION] 
                    [--identity-policies-ids POLICY_IDS]
    

Required Parameters

--name NAME

Specifies the name of IAM Role.

--trust-policy TRUSTPOLICY

Specifies the Trust policy, in JSON format.

Options

--tenant-id TENANT

Specifies the ID of the tenant to which this IAM Role belongs.

--description DESCRIPTION

Description of the IAM Role.

--identity-policies-ids POLICY_IDS

Specifies the Identity Policy IDs to attach to this role.

Specify POLICY_IDS as a comma-separated list of IDs. The policies must belong to the tenant associated with the role

Example: 1,2,3

Example

This example creates a new IAM Role named "read-only-role".

      vcli: admin> iamrole create --name read-only-role \
                                  --trust-policy '{"Version":"2012-10-17","Statement":...}' \
                                  --tenant-id 101 \
                                  --description "Read-only role for audit" \
                                  --identity-policies-ids 5,6