All Products
Search
Document Center

Resource Management:DeleteRole

Last Updated:Feb 13, 2025

Deletes a RAM role.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RoleNamestringYes

The name of the RAM role.

The name must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-).

ECSAdmin

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

898FAB24-7509-43EE-A287-086FE4C44394

Examples

Sample success responses

JSONformat

{
  "RequestId": "898FAB24-7509-43EE-A287-086FE4C44394"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.RoleName.InvalidCharsThe specified role name contains invalid characters.The specified role name contains invalid characters.
400InvalidParameter.RoleName.LengthThe maximum length of the role name is exceeded.The maximum length of the role name is exceeded.
404EntityNotExist.RoleThe role does not exist.The role does not exist.
409DeleteConflict.Role.PolicyThe role cannot have any attached policies when you delete it.The role cannot have any attached policies when you delete it.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history