Skip to main content

Updates a custom role

PUT 

https://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.

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

A successful response.

Schema
    role object
    namestring

    Name for the role.

    idstring

    Unique ID. Cannot be changed.

    typecompiuta.api.iam.v2.Type (string)

    Possible values: [COMPIUTA_MANAGED, CUSTOM]

    Default value: COMPIUTA_MANAGED
    actionsstring[]

    List of actions this role scopes to. Will contain one or more.

    tenantsstring[]

    List of tenants this role belongs to. May be empty.

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());
Request Collapse all
Base URL
https://apis.<domain>
Parameters
— pathrequired
Body required
{
  "name": "My Updated Custom Application Manager Role",
  "actions": [
    "applications:*",
    "iam:tenants:list"
  ]
}