@@ -3195,14 +3195,12 @@ class ModernReservationRecommendation(ReservationRecommendation): # pylint: dis
3195
3195
:vartype net_savings: ~azure.mgmt.consumption.models.Amount
3196
3196
:ivar first_usage_date: The usage date for looking back.
3197
3197
:vartype first_usage_date: ~datetime.datetime
3198
- :ivar scope: Shared or single recommendation.
3198
+ :ivar scope: Shared or single recommendation. Required.
3199
3199
:vartype scope: str
3200
3200
:ivar sku_properties: List of sku properties.
3201
3201
:vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty]
3202
3202
:ivar sku_name: This is the ARM Sku name.
3203
3203
:vartype sku_name: str
3204
- :ivar subscription_id: Subscription ID.
3205
- :vartype subscription_id: str
3206
3204
"""
3207
3205
3208
3206
_validation = {
@@ -3228,10 +3226,9 @@ class ModernReservationRecommendation(ReservationRecommendation): # pylint: dis
3228
3226
"total_cost_with_reserved_instances" : {"readonly" : True },
3229
3227
"net_savings" : {"readonly" : True },
3230
3228
"first_usage_date" : {"readonly" : True },
3231
- "scope" : {"readonly " : True },
3229
+ "scope" : {"required " : True },
3232
3230
"sku_properties" : {"readonly" : True },
3233
3231
"sku_name" : {"readonly" : True },
3234
- "subscription_id" : {"readonly" : True },
3235
3232
}
3236
3233
3237
3234
_attribute_map = {
@@ -3260,7 +3257,6 @@ class ModernReservationRecommendation(ReservationRecommendation): # pylint: dis
3260
3257
"scope" : {"key" : "properties.scope" , "type" : "str" },
3261
3258
"sku_properties" : {"key" : "properties.skuProperties" , "type" : "[SkuProperty]" },
3262
3259
"sku_name" : {"key" : "properties.skuName" , "type" : "str" },
3263
- "subscription_id" : {"key" : "properties.subscriptionId" , "type" : "str" },
3264
3260
}
3265
3261
3266
3262
def __init__ (self , ** kwargs ): # pylint: disable=too-many-locals
@@ -3281,10 +3277,125 @@ def __init__(self, **kwargs): # pylint: disable=too-many-locals
3281
3277
self .total_cost_with_reserved_instances = None
3282
3278
self .net_savings = None
3283
3279
self .first_usage_date = None
3284
- self .scope = None
3280
+ self .scope : str = "modern"
3281
+ self .sku_properties = None
3282
+ self .sku_name = None
3283
+
3284
+
3285
+ class ModernReservationRecommendationProperties (_serialization .Model ): # pylint: disable=too-many-instance-attributes
3286
+ """The properties of the reservation recommendation.
3287
+
3288
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
3289
+ ModernSharedScopeReservationRecommendationProperties,
3290
+ ModernSingleScopeReservationRecommendationProperties
3291
+
3292
+ Variables are only populated by the server, and will be ignored when sending a request.
3293
+
3294
+ All required parameters must be populated in order to send to Azure.
3295
+
3296
+ :ivar location: Resource Location.
3297
+ :vartype location: str
3298
+ :ivar look_back_period: The number of days of usage to look back for recommendation.
3299
+ :vartype look_back_period: int
3300
+ :ivar instance_flexibility_ratio: The instance Flexibility Ratio.
3301
+ :vartype instance_flexibility_ratio: float
3302
+ :ivar instance_flexibility_group: The instance Flexibility Group.
3303
+ :vartype instance_flexibility_group: str
3304
+ :ivar normalized_size: The normalized Size.
3305
+ :vartype normalized_size: str
3306
+ :ivar recommended_quantity_normalized: The recommended Quantity Normalized.
3307
+ :vartype recommended_quantity_normalized: float
3308
+ :ivar meter_id: The meter id (GUID).
3309
+ :vartype meter_id: str
3310
+ :ivar term: RI recommendations in one or three year terms.
3311
+ :vartype term: str
3312
+ :ivar cost_with_no_reserved_instances: The total amount of cost without reserved instances.
3313
+ :vartype cost_with_no_reserved_instances: ~azure.mgmt.consumption.models.Amount
3314
+ :ivar recommended_quantity: Recommended quality for reserved instances.
3315
+ :vartype recommended_quantity: float
3316
+ :ivar resource_type: Resource type.
3317
+ :vartype resource_type: str
3318
+ :ivar total_cost_with_reserved_instances: The total amount of cost with reserved instances.
3319
+ :vartype total_cost_with_reserved_instances: ~azure.mgmt.consumption.models.Amount
3320
+ :ivar net_savings: Total estimated savings with reserved instances.
3321
+ :vartype net_savings: ~azure.mgmt.consumption.models.Amount
3322
+ :ivar first_usage_date: The usage date for looking back.
3323
+ :vartype first_usage_date: ~datetime.datetime
3324
+ :ivar scope: Shared or single recommendation. Required.
3325
+ :vartype scope: str
3326
+ :ivar sku_properties: List of sku properties.
3327
+ :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty]
3328
+ :ivar sku_name: This is the ARM Sku name.
3329
+ :vartype sku_name: str
3330
+ """
3331
+
3332
+ _validation = {
3333
+ "location" : {"readonly" : True },
3334
+ "look_back_period" : {"readonly" : True },
3335
+ "instance_flexibility_ratio" : {"readonly" : True },
3336
+ "instance_flexibility_group" : {"readonly" : True },
3337
+ "normalized_size" : {"readonly" : True },
3338
+ "recommended_quantity_normalized" : {"readonly" : True },
3339
+ "meter_id" : {"readonly" : True },
3340
+ "term" : {"readonly" : True },
3341
+ "cost_with_no_reserved_instances" : {"readonly" : True },
3342
+ "recommended_quantity" : {"readonly" : True },
3343
+ "resource_type" : {"readonly" : True },
3344
+ "total_cost_with_reserved_instances" : {"readonly" : True },
3345
+ "net_savings" : {"readonly" : True },
3346
+ "first_usage_date" : {"readonly" : True },
3347
+ "scope" : {"required" : True },
3348
+ "sku_properties" : {"readonly" : True },
3349
+ "sku_name" : {"readonly" : True },
3350
+ }
3351
+
3352
+ _attribute_map = {
3353
+ "location" : {"key" : "location" , "type" : "str" },
3354
+ "look_back_period" : {"key" : "lookBackPeriod" , "type" : "int" },
3355
+ "instance_flexibility_ratio" : {"key" : "instanceFlexibilityRatio" , "type" : "float" },
3356
+ "instance_flexibility_group" : {"key" : "instanceFlexibilityGroup" , "type" : "str" },
3357
+ "normalized_size" : {"key" : "normalizedSize" , "type" : "str" },
3358
+ "recommended_quantity_normalized" : {"key" : "recommendedQuantityNormalized" , "type" : "float" },
3359
+ "meter_id" : {"key" : "meterId" , "type" : "str" },
3360
+ "term" : {"key" : "term" , "type" : "str" },
3361
+ "cost_with_no_reserved_instances" : {"key" : "costWithNoReservedInstances" , "type" : "Amount" },
3362
+ "recommended_quantity" : {"key" : "recommendedQuantity" , "type" : "float" },
3363
+ "resource_type" : {"key" : "resourceType" , "type" : "str" },
3364
+ "total_cost_with_reserved_instances" : {"key" : "totalCostWithReservedInstances" , "type" : "Amount" },
3365
+ "net_savings" : {"key" : "netSavings" , "type" : "Amount" },
3366
+ "first_usage_date" : {"key" : "firstUsageDate" , "type" : "iso-8601" },
3367
+ "scope" : {"key" : "scope" , "type" : "str" },
3368
+ "sku_properties" : {"key" : "skuProperties" , "type" : "[SkuProperty]" },
3369
+ "sku_name" : {"key" : "skuName" , "type" : "str" },
3370
+ }
3371
+
3372
+ _subtype_map = {
3373
+ "scope" : {
3374
+ "Shared" : "ModernSharedScopeReservationRecommendationProperties" ,
3375
+ "Single" : "ModernSingleScopeReservationRecommendationProperties" ,
3376
+ }
3377
+ }
3378
+
3379
+ def __init__ (self , ** kwargs ):
3380
+ """ """
3381
+ super ().__init__ (** kwargs )
3382
+ self .location = None
3383
+ self .look_back_period = None
3384
+ self .instance_flexibility_ratio = None
3385
+ self .instance_flexibility_group = None
3386
+ self .normalized_size = None
3387
+ self .recommended_quantity_normalized = None
3388
+ self .meter_id = None
3389
+ self .term = None
3390
+ self .cost_with_no_reserved_instances = None
3391
+ self .recommended_quantity = None
3392
+ self .resource_type = None
3393
+ self .total_cost_with_reserved_instances = None
3394
+ self .net_savings = None
3395
+ self .first_usage_date = None
3396
+ self .scope : Optional [str ] = None
3285
3397
self .sku_properties = None
3286
3398
self .sku_name = None
3287
- self .subscription_id = None
3288
3399
3289
3400
3290
3401
class ModernReservationTransaction (ReservationTransactionResource ): # pylint: disable=too-many-instance-attributes
@@ -3453,6 +3564,193 @@ def __init__(self, **kwargs):
3453
3564
self .next_link = None
3454
3565
3455
3566
3567
+ class ModernSharedScopeReservationRecommendationProperties (
3568
+ ModernReservationRecommendationProperties
3569
+ ): # pylint: disable=too-many-instance-attributes
3570
+ """The properties of the modern reservation recommendation for shared scope.
3571
+
3572
+ Variables are only populated by the server, and will be ignored when sending a request.
3573
+
3574
+ All required parameters must be populated in order to send to Azure.
3575
+
3576
+ :ivar location: Resource Location.
3577
+ :vartype location: str
3578
+ :ivar look_back_period: The number of days of usage to look back for recommendation.
3579
+ :vartype look_back_period: int
3580
+ :ivar instance_flexibility_ratio: The instance Flexibility Ratio.
3581
+ :vartype instance_flexibility_ratio: float
3582
+ :ivar instance_flexibility_group: The instance Flexibility Group.
3583
+ :vartype instance_flexibility_group: str
3584
+ :ivar normalized_size: The normalized Size.
3585
+ :vartype normalized_size: str
3586
+ :ivar recommended_quantity_normalized: The recommended Quantity Normalized.
3587
+ :vartype recommended_quantity_normalized: float
3588
+ :ivar meter_id: The meter id (GUID).
3589
+ :vartype meter_id: str
3590
+ :ivar term: RI recommendations in one or three year terms.
3591
+ :vartype term: str
3592
+ :ivar cost_with_no_reserved_instances: The total amount of cost without reserved instances.
3593
+ :vartype cost_with_no_reserved_instances: ~azure.mgmt.consumption.models.Amount
3594
+ :ivar recommended_quantity: Recommended quality for reserved instances.
3595
+ :vartype recommended_quantity: float
3596
+ :ivar resource_type: Resource type.
3597
+ :vartype resource_type: str
3598
+ :ivar total_cost_with_reserved_instances: The total amount of cost with reserved instances.
3599
+ :vartype total_cost_with_reserved_instances: ~azure.mgmt.consumption.models.Amount
3600
+ :ivar net_savings: Total estimated savings with reserved instances.
3601
+ :vartype net_savings: ~azure.mgmt.consumption.models.Amount
3602
+ :ivar first_usage_date: The usage date for looking back.
3603
+ :vartype first_usage_date: ~datetime.datetime
3604
+ :ivar scope: Shared or single recommendation. Required.
3605
+ :vartype scope: str
3606
+ :ivar sku_properties: List of sku properties.
3607
+ :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty]
3608
+ :ivar sku_name: This is the ARM Sku name.
3609
+ :vartype sku_name: str
3610
+ """
3611
+
3612
+ _validation = {
3613
+ "location" : {"readonly" : True },
3614
+ "look_back_period" : {"readonly" : True },
3615
+ "instance_flexibility_ratio" : {"readonly" : True },
3616
+ "instance_flexibility_group" : {"readonly" : True },
3617
+ "normalized_size" : {"readonly" : True },
3618
+ "recommended_quantity_normalized" : {"readonly" : True },
3619
+ "meter_id" : {"readonly" : True },
3620
+ "term" : {"readonly" : True },
3621
+ "cost_with_no_reserved_instances" : {"readonly" : True },
3622
+ "recommended_quantity" : {"readonly" : True },
3623
+ "resource_type" : {"readonly" : True },
3624
+ "total_cost_with_reserved_instances" : {"readonly" : True },
3625
+ "net_savings" : {"readonly" : True },
3626
+ "first_usage_date" : {"readonly" : True },
3627
+ "scope" : {"required" : True },
3628
+ "sku_properties" : {"readonly" : True },
3629
+ "sku_name" : {"readonly" : True },
3630
+ }
3631
+
3632
+ _attribute_map = {
3633
+ "location" : {"key" : "location" , "type" : "str" },
3634
+ "look_back_period" : {"key" : "lookBackPeriod" , "type" : "int" },
3635
+ "instance_flexibility_ratio" : {"key" : "instanceFlexibilityRatio" , "type" : "float" },
3636
+ "instance_flexibility_group" : {"key" : "instanceFlexibilityGroup" , "type" : "str" },
3637
+ "normalized_size" : {"key" : "normalizedSize" , "type" : "str" },
3638
+ "recommended_quantity_normalized" : {"key" : "recommendedQuantityNormalized" , "type" : "float" },
3639
+ "meter_id" : {"key" : "meterId" , "type" : "str" },
3640
+ "term" : {"key" : "term" , "type" : "str" },
3641
+ "cost_with_no_reserved_instances" : {"key" : "costWithNoReservedInstances" , "type" : "Amount" },
3642
+ "recommended_quantity" : {"key" : "recommendedQuantity" , "type" : "float" },
3643
+ "resource_type" : {"key" : "resourceType" , "type" : "str" },
3644
+ "total_cost_with_reserved_instances" : {"key" : "totalCostWithReservedInstances" , "type" : "Amount" },
3645
+ "net_savings" : {"key" : "netSavings" , "type" : "Amount" },
3646
+ "first_usage_date" : {"key" : "firstUsageDate" , "type" : "iso-8601" },
3647
+ "scope" : {"key" : "scope" , "type" : "str" },
3648
+ "sku_properties" : {"key" : "skuProperties" , "type" : "[SkuProperty]" },
3649
+ "sku_name" : {"key" : "skuName" , "type" : "str" },
3650
+ }
3651
+
3652
+ def __init__ (self , ** kwargs ):
3653
+ """ """
3654
+ super ().__init__ (** kwargs )
3655
+ self .scope : str = "Shared"
3656
+
3657
+
3658
+ class ModernSingleScopeReservationRecommendationProperties (
3659
+ ModernReservationRecommendationProperties
3660
+ ): # pylint: disable=too-many-instance-attributes
3661
+ """The properties of the modern reservation recommendation for single scope.
3662
+
3663
+ Variables are only populated by the server, and will be ignored when sending a request.
3664
+
3665
+ All required parameters must be populated in order to send to Azure.
3666
+
3667
+ :ivar location: Resource Location.
3668
+ :vartype location: str
3669
+ :ivar look_back_period: The number of days of usage to look back for recommendation.
3670
+ :vartype look_back_period: int
3671
+ :ivar instance_flexibility_ratio: The instance Flexibility Ratio.
3672
+ :vartype instance_flexibility_ratio: float
3673
+ :ivar instance_flexibility_group: The instance Flexibility Group.
3674
+ :vartype instance_flexibility_group: str
3675
+ :ivar normalized_size: The normalized Size.
3676
+ :vartype normalized_size: str
3677
+ :ivar recommended_quantity_normalized: The recommended Quantity Normalized.
3678
+ :vartype recommended_quantity_normalized: float
3679
+ :ivar meter_id: The meter id (GUID).
3680
+ :vartype meter_id: str
3681
+ :ivar term: RI recommendations in one or three year terms.
3682
+ :vartype term: str
3683
+ :ivar cost_with_no_reserved_instances: The total amount of cost without reserved instances.
3684
+ :vartype cost_with_no_reserved_instances: ~azure.mgmt.consumption.models.Amount
3685
+ :ivar recommended_quantity: Recommended quality for reserved instances.
3686
+ :vartype recommended_quantity: float
3687
+ :ivar resource_type: Resource type.
3688
+ :vartype resource_type: str
3689
+ :ivar total_cost_with_reserved_instances: The total amount of cost with reserved instances.
3690
+ :vartype total_cost_with_reserved_instances: ~azure.mgmt.consumption.models.Amount
3691
+ :ivar net_savings: Total estimated savings with reserved instances.
3692
+ :vartype net_savings: ~azure.mgmt.consumption.models.Amount
3693
+ :ivar first_usage_date: The usage date for looking back.
3694
+ :vartype first_usage_date: ~datetime.datetime
3695
+ :ivar scope: Shared or single recommendation. Required.
3696
+ :vartype scope: str
3697
+ :ivar sku_properties: List of sku properties.
3698
+ :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty]
3699
+ :ivar sku_name: This is the ARM Sku name.
3700
+ :vartype sku_name: str
3701
+ :ivar subscription_id: Subscription ID associated with single scoped recommendation.
3702
+ :vartype subscription_id: str
3703
+ """
3704
+
3705
+ _validation = {
3706
+ "location" : {"readonly" : True },
3707
+ "look_back_period" : {"readonly" : True },
3708
+ "instance_flexibility_ratio" : {"readonly" : True },
3709
+ "instance_flexibility_group" : {"readonly" : True },
3710
+ "normalized_size" : {"readonly" : True },
3711
+ "recommended_quantity_normalized" : {"readonly" : True },
3712
+ "meter_id" : {"readonly" : True },
3713
+ "term" : {"readonly" : True },
3714
+ "cost_with_no_reserved_instances" : {"readonly" : True },
3715
+ "recommended_quantity" : {"readonly" : True },
3716
+ "resource_type" : {"readonly" : True },
3717
+ "total_cost_with_reserved_instances" : {"readonly" : True },
3718
+ "net_savings" : {"readonly" : True },
3719
+ "first_usage_date" : {"readonly" : True },
3720
+ "scope" : {"required" : True },
3721
+ "sku_properties" : {"readonly" : True },
3722
+ "sku_name" : {"readonly" : True },
3723
+ "subscription_id" : {"readonly" : True },
3724
+ }
3725
+
3726
+ _attribute_map = {
3727
+ "location" : {"key" : "location" , "type" : "str" },
3728
+ "look_back_period" : {"key" : "lookBackPeriod" , "type" : "int" },
3729
+ "instance_flexibility_ratio" : {"key" : "instanceFlexibilityRatio" , "type" : "float" },
3730
+ "instance_flexibility_group" : {"key" : "instanceFlexibilityGroup" , "type" : "str" },
3731
+ "normalized_size" : {"key" : "normalizedSize" , "type" : "str" },
3732
+ "recommended_quantity_normalized" : {"key" : "recommendedQuantityNormalized" , "type" : "float" },
3733
+ "meter_id" : {"key" : "meterId" , "type" : "str" },
3734
+ "term" : {"key" : "term" , "type" : "str" },
3735
+ "cost_with_no_reserved_instances" : {"key" : "costWithNoReservedInstances" , "type" : "Amount" },
3736
+ "recommended_quantity" : {"key" : "recommendedQuantity" , "type" : "float" },
3737
+ "resource_type" : {"key" : "resourceType" , "type" : "str" },
3738
+ "total_cost_with_reserved_instances" : {"key" : "totalCostWithReservedInstances" , "type" : "Amount" },
3739
+ "net_savings" : {"key" : "netSavings" , "type" : "Amount" },
3740
+ "first_usage_date" : {"key" : "firstUsageDate" , "type" : "iso-8601" },
3741
+ "scope" : {"key" : "scope" , "type" : "str" },
3742
+ "sku_properties" : {"key" : "skuProperties" , "type" : "[SkuProperty]" },
3743
+ "sku_name" : {"key" : "skuName" , "type" : "str" },
3744
+ "subscription_id" : {"key" : "subscriptionId" , "type" : "str" },
3745
+ }
3746
+
3747
+ def __init__ (self , ** kwargs ):
3748
+ """ """
3749
+ super ().__init__ (** kwargs )
3750
+ self .scope : str = "Single"
3751
+ self .subscription_id = None
3752
+
3753
+
3456
3754
class ModernUsageDetail (UsageDetail ): # pylint: disable=too-many-instance-attributes
3457
3755
"""Modern usage detail.
3458
3756
0 commit comments