update_aws_system_role¶
- ConsoleAccessApi.update_aws_system_role(id, role_id, update_aws_role_info, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update users attached to an AWS console access role
Replaces UsersAttached on the role. Required body key UsersAttached (else IPV-1038). Empty list detaches all users. Each listed user must be valid and active (else GE-1034 → HTTP 500). Missing RoleId → GE-1034 HTTP 500. Updates each user’s AwsRoles map and the console-access roles table. Success Message is “User access on role updated successfully!”. Role name, description, and permissions are not editable here.
- Parameters:
id (str) – RoleId of the AWS console access role to update. (required)
role_id (str) – Amorphic role ID used for authorization. (required)
update_aws_role_info (UpdateAwsRoleInfo) – (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: PUT /aws-roles/{id}
Request¶
Request / response example
{
"UsersAttached": [
"user1",
"user2"
]
}
Success (HTTP 200)¶
UsersAttached updated (UpdateAwsSystemRoleResponse).
Users replaced
{
"Message": "User access on role updated successfully!"
}
Errors¶
Documented error codes: AUTH-1001, IPV-1038, GE-1020, GE-1034.
HTTP 400
Validation failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1001, IPV-1038 (missing UsersAttached), GE-1020 (failed to update User or ConsoleAccessRoles table).
UsersAttached missing from body
{
"Message": "IPV-1038 - Request body doesn't have required keys UsersAttached to carryout this operation"
}
Table update failed
{
"Message": "GE-1020 - Unable to update ConsoleAccessRoles table, please retry or contact administrator"
}
HTTP 500
Missing RoleId or invalid/inactive user in UsersAttached uses GE-1034 GenericFailure → HTTP 500.
User not valid/active
{
"Message": "GE-1034 - User userX is either not a valid user or not active"
}
RoleId missing
{
"Message": "GE-1034 - There's no role with specified RoleId"
}