1616 is_preview = True ,
1717)
1818class List (AAZCommand ):
19- """List all pool resources
19+ """List all pools
2020
2121 :example: List by resource group
2222 az mdp pool list --resource-group "rg1"
@@ -26,10 +26,10 @@ class List(AAZCommand):
2626 """
2727
2828 _aaz_info = {
29- "version" : "2023-12-13 -preview" ,
29+ "version" : "2024-04-04 -preview" ,
3030 "resources" : [
31- ["mgmt-plane" , "/subscriptions/{}/providers/microsoft.devopsinfrastructure/pools" , "2023-12-13 -preview" ],
32- ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.devopsinfrastructure/pools" , "2023-12-13 -preview" ],
31+ ["mgmt-plane" , "/subscriptions/{}/providers/microsoft.devopsinfrastructure/pools" , "2024-04-04 -preview" ],
32+ ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.devopsinfrastructure/pools" , "2024-04-04 -preview" ],
3333 ]
3434 }
3535
@@ -55,12 +55,12 @@ def _build_arguments_schema(cls, *args, **kwargs):
5555
5656 def _execute_operations (self ):
5757 self .pre_operations ()
58- condition_0 = has_value (self .ctx .args . resource_group ) and has_value (self .ctx .subscription_id )
59- condition_1 = has_value (self .ctx .subscription_id ) and has_value (self .ctx .args . resource_group ) is not True
58+ condition_0 = has_value (self .ctx .subscription_id ) and has_value (self .ctx .args . resource_group ) is not True
59+ condition_1 = has_value (self .ctx .args . resource_group ) and has_value (self .ctx .subscription_id )
6060 if condition_0 :
61- self .PoolsListByResourceGroup (ctx = self .ctx )()
62- if condition_1 :
6361 self .PoolsListBySubscription (ctx = self .ctx )()
62+ if condition_1 :
63+ self .PoolsListByResourceGroup (ctx = self .ctx )()
6464 self .post_operations ()
6565
6666 @register_callback
@@ -76,7 +76,7 @@ def _output(self, *args, **kwargs):
7676 next_link = self .deserialize_output (self .ctx .vars .instance .next_link )
7777 return result , next_link
7878
79- class PoolsListByResourceGroup (AAZHttpOperation ):
79+ class PoolsListBySubscription (AAZHttpOperation ):
8080 CLIENT_TYPE = "MgmtClient"
8181
8282 def __call__ (self , * args , ** kwargs ):
@@ -90,7 +90,7 @@ def __call__(self, *args, **kwargs):
9090 @property
9191 def url (self ):
9292 return self .client .format_url (
93- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.DevOpsInfrastructure/pools" ,
93+ "/subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/pools" ,
9494 ** self .url_parameters
9595 )
9696
@@ -105,10 +105,6 @@ def error_format(self):
105105 @property
106106 def url_parameters (self ):
107107 parameters = {
108- ** self .serialize_url_param (
109- "resourceGroupName" , self .ctx .args .resource_group ,
110- required = True ,
111- ),
112108 ** self .serialize_url_param (
113109 "subscriptionId" , self .ctx .subscription_id ,
114110 required = True ,
@@ -120,7 +116,7 @@ def url_parameters(self):
120116 def query_parameters (self ):
121117 parameters = {
122118 ** self .serialize_query_param (
123- "api-version" , "2023-12-13 -preview" ,
119+ "api-version" , "2024-04-04 -preview" ,
124120 required = True ,
125121 ),
126122 }
@@ -203,7 +199,9 @@ def _build_schema_on_200(cls):
203199 )
204200
205201 user_assigned_identities = cls ._schema_on_200 .value .Element .identity .user_assigned_identities
206- user_assigned_identities .Element = AAZObjectType ()
202+ user_assigned_identities .Element = AAZObjectType (
203+ nullable = True ,
204+ )
207205
208206 _element = cls ._schema_on_200 .value .Element .identity .user_assigned_identities .Element
209207 _element .client_id = AAZStrType (
@@ -247,11 +245,26 @@ def _build_schema_on_200(cls):
247245 agent_profile .resource_predictions = AAZObjectType (
248246 serialized_name = "resourcePredictions" ,
249247 )
248+ agent_profile .resource_predictions_profile = AAZObjectType (
249+ serialized_name = "resourcePredictionsProfile" ,
250+ )
251+
252+ resource_predictions_profile = cls ._schema_on_200 .value .Element .properties .agent_profile .resource_predictions_profile
253+ resource_predictions_profile .kind = AAZStrType (
254+ flags = {"required" : True },
255+ )
256+
257+ disc_automatic = cls ._schema_on_200 .value .Element .properties .agent_profile .resource_predictions_profile .discriminate_by ("kind" , "Automatic" )
258+ disc_automatic .prediction_preference = AAZStrType (
259+ serialized_name = "predictionPreference" ,
260+ )
250261
251262 disc_stateful = cls ._schema_on_200 .value .Element .properties .agent_profile .discriminate_by ("kind" , "Stateful" )
263+ disc_stateful .grace_period_time_span = AAZStrType (
264+ serialized_name = "gracePeriodTimeSpan" ,
265+ )
252266 disc_stateful .max_agent_lifetime = AAZStrType (
253267 serialized_name = "maxAgentLifetime" ,
254- flags = {"required" : True },
255268 )
256269
257270 fabric_profile = cls ._schema_on_200 .value .Element .properties .fabric_profile
@@ -284,7 +297,9 @@ def _build_schema_on_200(cls):
284297 _element .buffer = AAZStrType ()
285298 _element .resource_id = AAZStrType (
286299 serialized_name = "resourceId" ,
287- flags = {"required" : True },
300+ )
301+ _element .well_known_image_name = AAZStrType (
302+ serialized_name = "wellKnownImageName" ,
288303 )
289304
290305 aliases = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).images .Element .aliases
@@ -326,10 +341,28 @@ def _build_schema_on_200(cls):
326341 )
327342
328343 storage_profile = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).storage_profile
344+ storage_profile .data_disks = AAZListType (
345+ serialized_name = "dataDisks" ,
346+ )
329347 storage_profile .os_disk_storage_account_type = AAZStrType (
330348 serialized_name = "osDiskStorageAccountType" ,
331349 )
332350
351+ data_disks = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).storage_profile .data_disks
352+ data_disks .Element = AAZObjectType ()
353+
354+ _element = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).storage_profile .data_disks .Element
355+ _element .caching = AAZStrType ()
356+ _element .disk_size_gi_b = AAZIntType (
357+ serialized_name = "diskSizeGiB" ,
358+ )
359+ _element .drive_letter = AAZStrType (
360+ serialized_name = "driveLetter" ,
361+ )
362+ _element .storage_account_type = AAZStrType (
363+ serialized_name = "storageAccountType" ,
364+ )
365+
333366 organization_profile = cls ._schema_on_200 .value .Element .properties .organization_profile
334367 organization_profile .kind = AAZStrType (
335368 flags = {"required" : True },
@@ -411,7 +444,7 @@ def _build_schema_on_200(cls):
411444
412445 return cls ._schema_on_200
413446
414- class PoolsListBySubscription (AAZHttpOperation ):
447+ class PoolsListByResourceGroup (AAZHttpOperation ):
415448 CLIENT_TYPE = "MgmtClient"
416449
417450 def __call__ (self , * args , ** kwargs ):
@@ -425,7 +458,7 @@ def __call__(self, *args, **kwargs):
425458 @property
426459 def url (self ):
427460 return self .client .format_url (
428- "/subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/pools" ,
461+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.DevOpsInfrastructure/pools" ,
429462 ** self .url_parameters
430463 )
431464
@@ -440,6 +473,10 @@ def error_format(self):
440473 @property
441474 def url_parameters (self ):
442475 parameters = {
476+ ** self .serialize_url_param (
477+ "resourceGroupName" , self .ctx .args .resource_group ,
478+ required = True ,
479+ ),
443480 ** self .serialize_url_param (
444481 "subscriptionId" , self .ctx .subscription_id ,
445482 required = True ,
@@ -451,7 +488,7 @@ def url_parameters(self):
451488 def query_parameters (self ):
452489 parameters = {
453490 ** self .serialize_query_param (
454- "api-version" , "2023-12-13 -preview" ,
491+ "api-version" , "2024-04-04 -preview" ,
455492 required = True ,
456493 ),
457494 }
@@ -534,7 +571,9 @@ def _build_schema_on_200(cls):
534571 )
535572
536573 user_assigned_identities = cls ._schema_on_200 .value .Element .identity .user_assigned_identities
537- user_assigned_identities .Element = AAZObjectType ()
574+ user_assigned_identities .Element = AAZObjectType (
575+ nullable = True ,
576+ )
538577
539578 _element = cls ._schema_on_200 .value .Element .identity .user_assigned_identities .Element
540579 _element .client_id = AAZStrType (
@@ -578,11 +617,26 @@ def _build_schema_on_200(cls):
578617 agent_profile .resource_predictions = AAZObjectType (
579618 serialized_name = "resourcePredictions" ,
580619 )
620+ agent_profile .resource_predictions_profile = AAZObjectType (
621+ serialized_name = "resourcePredictionsProfile" ,
622+ )
623+
624+ resource_predictions_profile = cls ._schema_on_200 .value .Element .properties .agent_profile .resource_predictions_profile
625+ resource_predictions_profile .kind = AAZStrType (
626+ flags = {"required" : True },
627+ )
628+
629+ disc_automatic = cls ._schema_on_200 .value .Element .properties .agent_profile .resource_predictions_profile .discriminate_by ("kind" , "Automatic" )
630+ disc_automatic .prediction_preference = AAZStrType (
631+ serialized_name = "predictionPreference" ,
632+ )
581633
582634 disc_stateful = cls ._schema_on_200 .value .Element .properties .agent_profile .discriminate_by ("kind" , "Stateful" )
635+ disc_stateful .grace_period_time_span = AAZStrType (
636+ serialized_name = "gracePeriodTimeSpan" ,
637+ )
583638 disc_stateful .max_agent_lifetime = AAZStrType (
584639 serialized_name = "maxAgentLifetime" ,
585- flags = {"required" : True },
586640 )
587641
588642 fabric_profile = cls ._schema_on_200 .value .Element .properties .fabric_profile
@@ -615,7 +669,9 @@ def _build_schema_on_200(cls):
615669 _element .buffer = AAZStrType ()
616670 _element .resource_id = AAZStrType (
617671 serialized_name = "resourceId" ,
618- flags = {"required" : True },
672+ )
673+ _element .well_known_image_name = AAZStrType (
674+ serialized_name = "wellKnownImageName" ,
619675 )
620676
621677 aliases = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).images .Element .aliases
@@ -657,10 +713,28 @@ def _build_schema_on_200(cls):
657713 )
658714
659715 storage_profile = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).storage_profile
716+ storage_profile .data_disks = AAZListType (
717+ serialized_name = "dataDisks" ,
718+ )
660719 storage_profile .os_disk_storage_account_type = AAZStrType (
661720 serialized_name = "osDiskStorageAccountType" ,
662721 )
663722
723+ data_disks = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).storage_profile .data_disks
724+ data_disks .Element = AAZObjectType ()
725+
726+ _element = cls ._schema_on_200 .value .Element .properties .fabric_profile .discriminate_by ("kind" , "Vmss" ).storage_profile .data_disks .Element
727+ _element .caching = AAZStrType ()
728+ _element .disk_size_gi_b = AAZIntType (
729+ serialized_name = "diskSizeGiB" ,
730+ )
731+ _element .drive_letter = AAZStrType (
732+ serialized_name = "driveLetter" ,
733+ )
734+ _element .storage_account_type = AAZStrType (
735+ serialized_name = "storageAccountType" ,
736+ )
737+
664738 organization_profile = cls ._schema_on_200 .value .Element .properties .organization_profile
665739 organization_profile .kind = AAZStrType (
666740 flags = {"required" : True },
0 commit comments