Edit role
PUT /v1/roles/:roleID
Token scope required: roles:update
Any properties not provided in the request will be reset to their default values. If only changing one firewall rule, be sure to include the others as well, otherwise they will be removed.
Request
Path Parameters
- roleID string requiredExample: role-LO4SPDSWTZNJC676WFCZKUB3ZQ
- application/json
Request Body required
- description string
Possible values:
<= 255 characters
firewallRules object[]
Incoming firewall rules. Will replace existing list of rules.
Array [protocol string requiredPossible values: [
ANY
,TCP
,UDP
,ICMP
]description stringPossible values:
<= 255 characters
allowedRoleID string nullableRole 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 integer requiredPossible values:
>= 1
and<= 65535
First port number included in range.
to integer requiredPossible values:
>= 1
and<= 65535
Last port number included in range. Must be greater than
from
port.]
- 200
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
data object
id stringname stringdescription stringfirewallRules object[]
Array [protocol string requiredPossible values: [
ANY
,TCP
,UDP
,ICMP
]description stringPossible values:
<= 255 characters
allowedRoleID string nullableRole 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 integer requiredPossible values:
>= 1
and<= 65535
First port number included in range.
to integer requiredPossible values:
>= 1
and<= 65535
Last port number included in range. Must be greater than
from
port.]createdAt date-timemodifiedAt date-time- metadata object
{
"data": {
"id": "role-LO4SPDSWTZNJC676WFCZKUB3ZQ",
"name": "My new role",
"description": "",
"createdAt": "2023-02-15T13:59:09Z",
"modifiedAt": "2023-02-15T13:59:09Z",
"firewallRules": [
{
"protocol": "TCP",
"description": "allow SSH access",
"allowedRoleID": "role-G3TWUQ4FASQEF44MGMTSRBTYKM",
"portRange": {
"from": 22,
"to": 22
}
}
]
},
"metadata": {}
}