sync_aws_system_roles¶
- ConsoleAccessApi.sync_aws_system_roles(role_id, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sync custom AWS IAM roles from S3
Starts an asynchronous sync of custom AWS IAM roles from policy documents under the Amorphic core S3 custom-roles prefix. The API returns immediately after Event-invoking this Lambda with invoke_type=async; the async run creates/updates/deletes custom roles to match templates and emails admins. Success Message is “Custom roles actions started, You’ll get an email about the details of custom role actions.” Not idempotent in effect (each call triggers a new sync). Requires role_id (AUTH-1001 if missing).
- Parameters:
role_id (str) – Amorphic role ID used for authorization. (required)
content_type (str) – Optional; no request body is required for this sync.
_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: POST /aws-roles
Success (HTTP 200)¶
Async sync started (SyncAwsSystemRolesResponse).
Sync kicked off
{
"Message": "Custom roles actions started, You'll get an email about the details of custom role actions."
}
Errors¶
Documented error codes: AUTH-1001.
HTTP 400
Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1001 (missing role_id).
Missing role_id header
{
"Message": "AUTH-1001 - Missing role information in event header"
}
HTTP 500
Backend failure invoking the async sync or unexpected error.
Unexpected failure
{
"Message": "<exception text>"
}