delete_aws_system_role¶
- ConsoleAccessApi.delete_aws_system_role(id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Delete a custom AWS console access role
Deletes a custom AWS console access role: DynamoDB item, IAM role, and S3 policy document. System roles cannot be deleted (GE-1034 → HTTP 500). Custom roles with UsersAttached cannot be deleted (GE-1034 → HTTP 500). Missing RoleId also GE-1034 → 500. Success Message is “Custom AWS role deleted successfully”. DynamoDB delete failure returns DB-1003 (400). IAM/S3 failures return GE-1034/GE-1032 as GenericFailure → 500. Not idempotent after success.
- Parameters:
id (str) – RoleId of the custom AWS console access role to delete. (required)
role_id (str) – Amorphic role ID used for authorization. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: DELETE /aws-roles/{id}
Success (HTTP 200)¶
Custom role deleted (DeleteAwsSystemRoleResponse).
Custom role deleted
{
"Message": "Custom AWS role deleted successfully"
}
Errors¶
Documented error codes: AUTH-1001, DB-1003, GE-1020, GE-1034, GE-1032.
HTTP 400
Validation failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1001, DB-1003 (DynamoDB delete failed), GE-1020-style update failures are not typical here.
DynamoDB delete failed
{
"Message": "DB-1003 - Failed to delete entry in dynamoDB table, please check for errors"
}
HTTP 500
Missing role, system role, users still attached, or IAM/S3 delete failures use GenericFailure (often GE-1034 / GE-1032) → HTTP 500.
Cannot delete system role
{
"Message": "GE-1034 - Failed, Can't delete system aws roles"
}
Custom role still has users
{
"Message": "GE-1034 - Failed, Custom aws roles having users attached can't be deleted"
}
RoleId missing
{
"Message": "GE-1034 - There's no role with specified RoleId"
}