get_limits

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

Get file data load limits

Returns concurrent data-load slot limits per target. Requires system-settings.view. Redshift is omitted when DWH is not 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)

  • _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:

GetLimitsResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /limits

Success (HTTP 200)

Current slot limits as integers, keyed by target.

Request / response example

{
  "ConcurrentDataLoads": {
    "S3": 105,
    "S3Athena": 35,
    "Redshift": 63,
    "Lakeformation": 35,
    "Dynamodb": 105
  }
}

Errors

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

HTTP 400

Authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: AUTH-1001 (missing role_id), AUTH-1003 (user not on role), AUTH-1030 (missing system-settings.view), IPV-1002 (role_id not found).

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.view

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

role_id does not exist

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

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. 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"
}

Uncaught handler failure

{
  "Message": "'Authorization'"
}