4
4
5
5
from typing import Union , Iterable , Optional
6
6
from datetime import datetime
7
+ from typing_extensions import Literal
7
8
8
9
import httpx
9
10
@@ -154,7 +155,13 @@ def create_for_customer(
154
155
customer_id : str ,
155
156
* ,
156
157
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
+ ],
158
165
thresholds : Optional [Iterable [alert_create_for_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
159
166
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
160
167
# 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(
179
186
Args:
180
187
currency: The case sensitive currency or custom pricing unit to use for this alert.
181
188
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 .
183
190
184
- thresholds: The thresholds for the alert.
191
+ thresholds: The thresholds that define the values at which the alert will be triggered .
185
192
186
193
extra_headers: Send extra headers
187
194
@@ -220,7 +227,13 @@ def create_for_external_customer(
220
227
external_customer_id : str ,
221
228
* ,
222
229
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
+ ],
224
237
thresholds : Optional [Iterable [alert_create_for_external_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
225
238
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
226
239
# 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(
245
258
Args:
246
259
currency: The case sensitive currency or custom pricing unit to use for this alert.
247
260
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 .
249
262
250
- thresholds: The thresholds for the alert.
263
+ thresholds: The thresholds that define the values at which the alert will be triggered .
251
264
252
265
extra_headers: Send extra headers
253
266
@@ -288,7 +301,13 @@ def create_for_subscription(
288
301
subscription_id : str ,
289
302
* ,
290
303
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
+ ],
292
311
metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
293
312
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294
313
# 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(
312
331
usage or cost conditions met during the current billing cycle.
313
332
314
333
Args:
315
- thresholds: The thresholds for the alert.
334
+ thresholds: The thresholds that define the values at which the alert will be triggered .
316
335
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 .
318
337
319
338
metric_id: The metric to track usage for.
320
339
@@ -560,7 +579,13 @@ async def create_for_customer(
560
579
customer_id : str ,
561
580
* ,
562
581
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
+ ],
564
589
thresholds : Optional [Iterable [alert_create_for_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
565
590
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
566
591
# 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(
585
610
Args:
586
611
currency: The case sensitive currency or custom pricing unit to use for this alert.
587
612
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 .
589
614
590
- thresholds: The thresholds for the alert.
615
+ thresholds: The thresholds that define the values at which the alert will be triggered .
591
616
592
617
extra_headers: Send extra headers
593
618
@@ -626,7 +651,13 @@ async def create_for_external_customer(
626
651
external_customer_id : str ,
627
652
* ,
628
653
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
+ ],
630
661
thresholds : Optional [Iterable [alert_create_for_external_customer_params .Threshold ]] | NotGiven = NOT_GIVEN ,
631
662
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
632
663
# 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(
651
682
Args:
652
683
currency: The case sensitive currency or custom pricing unit to use for this alert.
653
684
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 .
655
686
656
- thresholds: The thresholds for the alert.
687
+ thresholds: The thresholds that define the values at which the alert will be triggered .
657
688
658
689
extra_headers: Send extra headers
659
690
@@ -694,7 +725,13 @@ async def create_for_subscription(
694
725
subscription_id : str ,
695
726
* ,
696
727
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
+ ],
698
735
metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
699
736
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
700
737
# 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(
718
755
usage or cost conditions met during the current billing cycle.
719
756
720
757
Args:
721
- thresholds: The thresholds for the alert.
758
+ thresholds: The thresholds that define the values at which the alert will be triggered .
722
759
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 .
724
761
725
762
metric_id: The metric to track usage for.
726
763
0 commit comments