get_lambda_concurrency¶
- ManagementApi.get_lambda_concurrency(role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get account Lambda concurrency limit
Returns the AWS account ConcurrentExecutions limit for this region. Requires system-settings.view. If AWS does not return that limit, 1000 is used.
- 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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /lambda-concurrency
Success (HTTP 200)¶
Account concurrency limit as an integer.
Request / response example
{
"LambdaConcurrentExecutions": 1000
}
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 AWS Lambda concurrent executions for the region 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, so DLL-1004 can return even without system-settings.view. 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'"
}