Skip to main content

Create role

POST 

/v1/roles

Create a new role.

Token scope required: roles:create

Request

Body

required

    name stringrequired

    Possible values: non-empty and <= 50 characters

    Name of the new role

    description string

    Possible values: <= 255 characters

    Optional description

    firewallRules

    object[]

    Incoming firewall rules

  • Array [

  • protocol stringrequired

    Possible values: [ANY, TCP, UDP, ICMP]

    description string

    Possible values: <= 255 characters

    allowedRoleID stringnullable

    Role ID to allow with this firewall rule. If not specified, all roles are included.

    allowedTags key:value[]

    Tags to allow with this firewall rule. An empty list allows all tags. key is max 20 characters, value is max 50 characters, no whitespace around either allowed

    portRange

    object

    nullable

    Range of ports for this firewall rule. If not provided or set to null, all ports are allowed.

    from integerrequired

    Possible values: >= 1 and <= 65535

    First port number included in range.

    to integerrequired

    Possible values: >= 1 and <= 65535

    Last port number included in range. Must be greater than from port.

  • ]

Responses

Successful operation

Schema

    data

    object

    id string
    name string
    description string

    firewallRules

    object[]

  • Array [

  • protocol stringrequired

    Possible values: [ANY, TCP, UDP, ICMP]

    description string

    Possible values: <= 255 characters

    allowedRoleID stringnullable

    Role ID to allow with this firewall rule. If not specified, all roles are included.

    allowedTags key:value[]

    Tags to allow with this firewall rule. An empty list allows all tags. key is max 20 characters, value is max 50 characters, no whitespace around either allowed

    portRange

    object

    nullable

    Range of ports for this firewall rule. If not provided or set to null, all ports are allowed.

    from integerrequired

    Possible values: >= 1 and <= 65535

    First port number included in range.

    to integerrequired

    Possible values: >= 1 and <= 65535

    Last port number included in range. Must be greater than from port.

  • ]

  • createdAt date-time
    modifiedAt date-time
    metadata object
Loading...