Deletes a custom role
DELETEhttps://apis.<domain>/iam/roles/:id
Deletes a specified custom role (you cannot delete compiuta-managed roles) and remove it from any statements that may have been using it. If such a statement has no other associated actions, the statement is deleted as well. Similarly, if that statement removal results in a policy with no other statements, that policy is removed as well.
Authorization Action:
iam:roles:delete
Request
Path Parameters
id stringrequired
ID of the role.
Responses
- 200
- default
A successful response.
- application/json
- Schema
- Example (auto)
Schema
objectobject
Example:
{"id":"custom-role","name":"My Custom Application Manager Role","actions":["applications:*","iam:tenants:list"]}{
"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.Delete, "https://apis.<domain>/iam/roles/:id");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());