limitry.client.QuotaAlerts¶
- class limitry.client.QuotaAlerts[source]¶
Bases:
objectOperations for quotaalerts.
- __init__(client)[source]¶
Initialize QuotaAlerts operations.
- Parameters:
client (
Client) – The Limitry client instance- Return type:
None
Methods
__init__(client)Initialize QuotaAlerts operations.
delete(alert_id)Delete a quota alert.
get(alert_id)Get a quota alert.
get_history(alert_id[, limit, cursor])Get alert history.
update(alert_id, request)Update a quota alert.
- __init__(client)[source]¶
Initialize QuotaAlerts operations.
- Parameters:
client (
Client) – The Limitry client instance- Return type:
None
- async get(alert_id)[source]¶
Get a quota alert.
Get details of a specific alert.
- Parameters:
alert_id (
str) – No description provided- Returns:
Alert details
- Return type:
QuotaAlert
Example:
result = await client.quota-alerts.get_quota_alert( "alertid_123" ) print(result)
- Raises:
AuthenticationError – Unauthorized
APIError – Alert not found
NetworkError – If a network error occurs
- Parameters:
alert_id (str)
- Return type:
QuotaAlert
- async update(alert_id, request)[source]¶
Update a quota alert.
Update the threshold for an alert.
- Parameters:
alert_id (
str) – No description providedrequest (
QuotaAlertsPutRequest) – QuotaAlertsPutRequest object
- Returns:
Alert updated successfully
- Return type:
QuotaAlert
Example:
request = QuotaAlertsPutRequest( threshold=123 ) result = await client.quota-alerts.update_quota_alert( "alertid_123", request ) print(result)
- Raises:
AuthenticationError – Unauthorized
APIError – Alert not found
NetworkError – If a network error occurs
- Parameters:
alert_id (str)
request (QuotaAlertsPutRequest)
- Return type:
QuotaAlert
- async delete(alert_id)[source]¶
Delete a quota alert.
Remove an alert configuration.
- Parameters:
alert_id (
str) – No description provided- Returns:
Alert deleted successfully
- Return type:
QuotaAlertsDeleteResponse
Example:
result = await client.quota-alerts.delete_quota_alert( "alertid_123" ) print(result)
- Raises:
AuthenticationError – Unauthorized
APIError – Alert not found
NetworkError – If a network error occurs
- Parameters:
alert_id (str)
- Return type:
QuotaAlertsDeleteResponse
- async get_history(alert_id, limit=None, cursor=None)[source]¶
Get alert history.
View a log of triggered alerts for a specific alert.
- Parameters:
- Returns:
Alert history
- Return type:
PaginatedResponse[QuotaAlertLog]
Example:
items = await client.quota-alerts.get_quota_alert_history( "alertid_123" ) for item in items.data: print(item)
- Raises:
AuthenticationError – Unauthorized
APIError – Alert not found
NetworkError – If a network error occurs
- Parameters:
- Return type:
PaginatedResponse[QuotaAlertLog]