Updates a custom role
PUThttps://apis.<domain>/iam/roles/:id
This operation overwrites all fields excepting ID, including those omitted from the request, so be sure to specify all properties. Properties that you do not include are reset to empty values.
Authorization Action:
iam:roles:update
Request
Path Parameters
id stringrequired
Unique ID. Cannot be changed.
- application/json
Body
required
name stringrequired
Name for the role.
actions string[]required
List of actions that this role scopes to.
tenants string[]
List of tenants this role belongs to.
Responses
- 200
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
role object
{
"id": "custom-role",
"name": "My Custom Application Manager Role",
"actions": [
"applications:*",
"iam:tenants:list"
]
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://apis.<domain>/iam/roles/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "My Updated Custom Application Manager Role",
"actions": [
"applications:*",
"iam:tenants:list"
]
}'