Deletes a role.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RoleName |
string |
Yes |
The name of the role. The name must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). |
ECSAdmin |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
898FAB24-7509-43EE-A287-086FE4C44394 |
Examples
Success response
JSON format
{
"RequestId": "898FAB24-7509-43EE-A287-086FE4C44394"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.RoleName.InvalidChars | The specified role name contains invalid characters. | The specified role name contains invalid characters. |
| 400 | InvalidParameter.RoleName.Length | The maximum length of the role name is exceeded. | The maximum length of the role name is exceeded. |
| 404 | EntityNotExist.Role | The role does not exist. | The role does not exist. |
| 409 | DeleteConflict.Role.Policy | The role cannot have any attached policies when you delete it. | The role cannot have any attached policies when you delete it. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.