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
Bodyrequired
namestringrequired
Name for the role.
actionsstring[]required
List of actions that this role scopes to.
tenantsstring[]
List of tenants this role belongs to.
Responses
- 200
- default
A successful response.
- application/json
- Schema
- Example (auto)
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 (auto)
Schema
codeinteger<int32>
messagestring
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://apis.<domain>/iam/roles/:id");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"name\": \"My Updated Custom Application Manager Role\",\n \"actions\": [\n \"applications:*\",\n \"iam:tenants:list\"\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());