1818 alert_create_for_subscription_params ,
1919 alert_create_for_external_customer_params ,
2020)
21- from .._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
21+ from .._types import Body , Omit , Query , Headers , NotGiven , SequenceNotStr , omit , not_given
2222from .._utils import maybe_transform , async_maybe_transform
2323from .._compat import cached_property
2424from .._resource import SyncAPIResource , AsyncAPIResource
@@ -353,7 +353,9 @@ def create_for_subscription(
353353 * ,
354354 thresholds : Iterable [ThresholdParam ],
355355 type : Literal ["usage_exceeded" , "cost_exceeded" ],
356+ grouping_keys : Optional [SequenceNotStr [str ]] | Omit = omit ,
356357 metric_id : Optional [str ] | Omit = omit ,
358+ pricing_unit_id : Optional [str ] | Omit = omit ,
357359 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
358360 # The extra values given here take precedence over values defined on the client or passed to this method.
359361 extra_headers : Headers | None = None ,
@@ -380,8 +382,14 @@ def create_for_subscription(
380382
381383 type: The type of alert to create. This must be a valid alert type.
382384
385+ grouping_keys: The property keys to group cost alerts by. Only applicable for cost_exceeded
386+ alerts.
387+
383388 metric_id: The metric to track usage for.
384389
390+ pricing_unit_id: The pricing unit to use for grouped cost alerts. Required when grouping_keys is
391+ set.
392+
385393 extra_headers: Send extra headers
386394
387395 extra_query: Add additional query parameters to the request
@@ -400,7 +408,9 @@ def create_for_subscription(
400408 {
401409 "thresholds" : thresholds ,
402410 "type" : type ,
411+ "grouping_keys" : grouping_keys ,
403412 "metric_id" : metric_id ,
413+ "pricing_unit_id" : pricing_unit_id ,
404414 },
405415 alert_create_for_subscription_params .AlertCreateForSubscriptionParams ,
406416 ),
@@ -835,7 +845,9 @@ async def create_for_subscription(
835845 * ,
836846 thresholds : Iterable [ThresholdParam ],
837847 type : Literal ["usage_exceeded" , "cost_exceeded" ],
848+ grouping_keys : Optional [SequenceNotStr [str ]] | Omit = omit ,
838849 metric_id : Optional [str ] | Omit = omit ,
850+ pricing_unit_id : Optional [str ] | Omit = omit ,
839851 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
840852 # The extra values given here take precedence over values defined on the client or passed to this method.
841853 extra_headers : Headers | None = None ,
@@ -862,8 +874,14 @@ async def create_for_subscription(
862874
863875 type: The type of alert to create. This must be a valid alert type.
864876
877+ grouping_keys: The property keys to group cost alerts by. Only applicable for cost_exceeded
878+ alerts.
879+
865880 metric_id: The metric to track usage for.
866881
882+ pricing_unit_id: The pricing unit to use for grouped cost alerts. Required when grouping_keys is
883+ set.
884+
867885 extra_headers: Send extra headers
868886
869887 extra_query: Add additional query parameters to the request
@@ -882,7 +900,9 @@ async def create_for_subscription(
882900 {
883901 "thresholds" : thresholds ,
884902 "type" : type ,
903+ "grouping_keys" : grouping_keys ,
885904 "metric_id" : metric_id ,
905+ "pricing_unit_id" : pricing_unit_id ,
886906 },
887907 alert_create_for_subscription_params .AlertCreateForSubscriptionParams ,
888908 ),
0 commit comments