44
55from typing import Union , Iterable , Optional
66from datetime import datetime
7+ from typing_extensions import Literal
78
89import httpx
910
@@ -154,7 +155,13 @@ def create_for_customer(
154155 customer_id : str ,
155156 * ,
156157 currency : str ,
157- type : str ,
158+ type : Literal [
159+ "usage_exceeded" ,
160+ "cost_exceeded" ,
161+ "credit_balance_depleted" ,
162+ "credit_balance_dropped" ,
163+ "credit_balance_recovered" ,
164+ ],
158165 thresholds : Optional [Iterable [alert_create_for_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
159166 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
160167 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -179,9 +186,9 @@ def create_for_customer(
179186 Args:
180187 currency: The case sensitive currency or custom pricing unit to use for this alert.
181188
182- type: The thresholds that define the values at which the alert will be triggered .
189+ type: The type of alert to create. This must be a valid alert type .
183190
184- thresholds: The thresholds for the alert.
191+ thresholds: The thresholds that define the values at which the alert will be triggered .
185192
186193 extra_headers: Send extra headers
187194
@@ -220,7 +227,13 @@ def create_for_external_customer(
220227 external_customer_id : str ,
221228 * ,
222229 currency : str ,
223- type : str ,
230+ type : Literal [
231+ "usage_exceeded" ,
232+ "cost_exceeded" ,
233+ "credit_balance_depleted" ,
234+ "credit_balance_dropped" ,
235+ "credit_balance_recovered" ,
236+ ],
224237 thresholds : Optional [Iterable [alert_create_for_external_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
225238 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
226239 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -245,9 +258,9 @@ def create_for_external_customer(
245258 Args:
246259 currency: The case sensitive currency or custom pricing unit to use for this alert.
247260
248- type: The thresholds that define the values at which the alert will be triggered .
261+ type: The type of alert to create. This must be a valid alert type .
249262
250- thresholds: The thresholds for the alert.
263+ thresholds: The thresholds that define the values at which the alert will be triggered .
251264
252265 extra_headers: Send extra headers
253266
@@ -288,7 +301,13 @@ def create_for_subscription(
288301 subscription_id : str ,
289302 * ,
290303 thresholds : Iterable [alert_create_for_subscription_params .Threshold ],
291- type : str ,
304+ type : Literal [
305+ "usage_exceeded" ,
306+ "cost_exceeded" ,
307+ "credit_balance_depleted" ,
308+ "credit_balance_dropped" ,
309+ "credit_balance_recovered" ,
310+ ],
292311 metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
293312 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294313 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -312,9 +331,9 @@ def create_for_subscription(
312331 usage or cost conditions met during the current billing cycle.
313332
314333 Args:
315- thresholds: The thresholds for the alert.
334+ thresholds: The thresholds that define the values at which the alert will be triggered .
316335
317- type: The thresholds that define the values at which the alert will be triggered .
336+ type: The type of alert to create. This must be a valid alert type .
318337
319338 metric_id: The metric to track usage for.
320339
@@ -560,7 +579,13 @@ async def create_for_customer(
560579 customer_id : str ,
561580 * ,
562581 currency : str ,
563- type : str ,
582+ type : Literal [
583+ "usage_exceeded" ,
584+ "cost_exceeded" ,
585+ "credit_balance_depleted" ,
586+ "credit_balance_dropped" ,
587+ "credit_balance_recovered" ,
588+ ],
564589 thresholds : Optional [Iterable [alert_create_for_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
565590 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
566591 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -585,9 +610,9 @@ async def create_for_customer(
585610 Args:
586611 currency: The case sensitive currency or custom pricing unit to use for this alert.
587612
588- type: The thresholds that define the values at which the alert will be triggered .
613+ type: The type of alert to create. This must be a valid alert type .
589614
590- thresholds: The thresholds for the alert.
615+ thresholds: The thresholds that define the values at which the alert will be triggered .
591616
592617 extra_headers: Send extra headers
593618
@@ -626,7 +651,13 @@ async def create_for_external_customer(
626651 external_customer_id : str ,
627652 * ,
628653 currency : str ,
629- type : str ,
654+ type : Literal [
655+ "usage_exceeded" ,
656+ "cost_exceeded" ,
657+ "credit_balance_depleted" ,
658+ "credit_balance_dropped" ,
659+ "credit_balance_recovered" ,
660+ ],
630661 thresholds : Optional [Iterable [alert_create_for_external_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
631662 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
632663 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -651,9 +682,9 @@ async def create_for_external_customer(
651682 Args:
652683 currency: The case sensitive currency or custom pricing unit to use for this alert.
653684
654- type: The thresholds that define the values at which the alert will be triggered .
685+ type: The type of alert to create. This must be a valid alert type .
655686
656- thresholds: The thresholds for the alert.
687+ thresholds: The thresholds that define the values at which the alert will be triggered .
657688
658689 extra_headers: Send extra headers
659690
@@ -694,7 +725,13 @@ async def create_for_subscription(
694725 subscription_id : str ,
695726 * ,
696727 thresholds : Iterable [alert_create_for_subscription_params .Threshold ],
697- type : str ,
728+ type : Literal [
729+ "usage_exceeded" ,
730+ "cost_exceeded" ,
731+ "credit_balance_depleted" ,
732+ "credit_balance_dropped" ,
733+ "credit_balance_recovered" ,
734+ ],
698735 metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
699736 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
700737 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -718,9 +755,9 @@ async def create_for_subscription(
718755 usage or cost conditions met during the current billing cycle.
719756
720757 Args:
721- thresholds: The thresholds for the alert.
758+ thresholds: The thresholds that define the values at which the alert will be triggered .
722759
723- type: The thresholds that define the values at which the alert will be triggered .
760+ type: The type of alert to create. This must be a valid alert type .
724761
725762 metric_id: The metric to track usage for.
726763
0 commit comments