update_limits

DataLoadLimitsApi.update_limits(role_id, update_limits_request, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Update file data load limits

Updates concurrent data-load slot limits. Requires system-settings.manage. Send integers under Limits for every configured target. Redshift applies only when DWH is configured.

Parameters:
  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Also recorded in audit logs. (required)

  • update_limits_request (UpdateLimitsRequest) – (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:

UpdateLimitsResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /limits

Request

Request / response example

{
  "Limits": {
    "S3": 200,
    "S3Athena": 50,
    "Redshift": 80,
    "Lakeformation": 50,
    "Dynamodb": 200
  }
}

Success (HTTP 200)

Limits were written to SSM.

Request / response example

{
  "Message": "Successfully updated the data load limits."
}

Errors

Documented error codes: AUTH-1001, AUTH-1003, AUTH-1030, IPV-1002, GE-1001, IPV-1001, DLL-1002, DLL-1003, DLL-1004.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: AUTH-1001 (missing role_id), AUTH-1003 (user not on role), AUTH-1030 (missing system-settings.manage), IPV-1002 (role_id not found), GE-1001 (missing or empty Limits), IPV-1001 (empty or 0 value), DLL-1002 (sum over overall cap), DLL-1003 (value outside that target’s min/max).

role_id header missing

{
  "Message": "AUTH-1001 - Missing role information in event header"
}

User is not attached to the role

{
  "Message": "AUTH-1003 - User is not authorized to use Role - AdminRole"
}

Caller lacks system-settings.manage

{
  "Message": "AUTH-1030 - User is not authorized to update file data load limits due to the following missing permission(s) - {'System Settings': ['manage']}"
}

role_id does not exist

{
  "Message": "IPV-1002 - Invalid RoleId - role-123, resource not found."
}

Limits missing or empty

{
  "Message": "GE-1001 - Invalid input body"
}

Target value empty or 0

{
  "Message": "IPV-1001 - Parameter S3 is a required value."
}

Sum of limits exceeds overall cap

{
  "Message": "DLL-1002 - Sum of all data load limits exceeded the overall limit. Maximum overall limit is 600"
}

Target value outside min/max

{
  "Message": "DLL-1003 - Invalid limit. Minimum and Maximum data load limit for S3 is 75 and 1500 respectively."
}

HTTP 500

AWS account-settings failure uses {“Message”: “DLL-1004 - Failed to retrieve lambda concurrency for the account with error - <text>”}. That lookup runs before the permission check. Invalid JSON and other uncaught errors use {“Message”: “<raw exception>”}.

Failed to read account concurrency

{
  "Message": "DLL-1004 - Failed to retrieve lambda concurrency for the account with error - An error occurred (AccessDeniedException) when calling the GetAccountSettings operation"
}

Request body is not valid JSON

{
  "Message": "Expecting value: line 1 column 1 (char 0)"
}