1515 "connectedmachine extension image list" ,
1616)
1717class List (AAZCommand ):
18- """List all Extension versions based on location, publisher, extensionType.
18+ """List all Extension versions based on location, publisher, extensionType
1919
20- :example: Sample command for extension image list
21- az connectedmachine extension image list --publisher microsoft.azure.monitor --extension-type azuremonitorlinuxagent --location eastus
20+ :example: GET a list of extension metadata
21+ az connectedmachine extension image list --location EastUS -- publisher microsoft.azure.monitor --extension-type azuremonitorlinuxagent
2222 """
2323
2424 _aaz_info = {
2525 "version" : "2024-11-10-preview" ,
2626 "resources" : [
27- ["mgmt-plane" , "/subscriptions/{}/ providers/microsoft.hybridcompute/locations/{}/publishers/{}/extensiontypes/{}/versions" , "2024-11-10-preview" ],
27+ ["mgmt-plane" , "/providers/microsoft.hybridcompute/locations/{}/publishers/{}/extensiontypes/{}/versions" , "2024-11-10-preview" ],
2828 ]
2929 }
3030
31+ AZ_SUPPORT_PAGINATION = True
32+
3133 def _handler (self , command_args ):
3234 super ()._handler (command_args )
33- self ._execute_operations ()
34- return self ._output ()
35+ return self .build_paging (self ._execute_operations , self ._output )
3536
3637 _args_schema = None
3738
@@ -45,23 +46,23 @@ def _build_arguments_schema(cls, *args, **kwargs):
4546
4647 _args_schema = cls ._args_schema
4748 _args_schema .extension_type = AAZStrArg (
48- options = ["--type" , "-- extension-type" ],
49+ options = ["--extension-type" ],
4950 help = "The extensionType of the Extension being received." ,
5051 required = True ,
5152 )
5253 _args_schema .location = AAZResourceLocationArg (
5354 required = True ,
5455 )
5556 _args_schema .publisher = AAZStrArg (
56- options = ["-p" , "- -publisher" ],
57+ options = ["--publisher" ],
5758 help = "The publisher of the Extension being received." ,
5859 required = True ,
5960 )
6061 return cls ._args_schema
6162
6263 def _execute_operations (self ):
6364 self .pre_operations ()
64- self .ExtensionMetadataList (ctx = self .ctx )()
65+ self .ExtensionMetadataV2List (ctx = self .ctx )()
6566 self .post_operations ()
6667
6768 @register_callback
@@ -74,9 +75,10 @@ def post_operations(self):
7475
7576 def _output (self , * args , ** kwargs ):
7677 result = self .deserialize_output (self .ctx .vars .instance .value , client_flatten = True )
77- return result
78+ next_link = self .deserialize_output (self .ctx .vars .instance .next_link )
79+ return result , next_link
7880
79- class ExtensionMetadataList (AAZHttpOperation ):
81+ class ExtensionMetadataV2List (AAZHttpOperation ):
8082 CLIENT_TYPE = "MgmtClient"
8183
8284 def __call__ (self , * args , ** kwargs ):
@@ -90,7 +92,7 @@ def __call__(self, *args, **kwargs):
9092 @property
9193 def url (self ):
9294 return self .client .format_url (
93- "/subscriptions/{subscriptionId}/ providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions" ,
95+ "/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions" ,
9496 ** self .url_parameters
9597 )
9698
@@ -117,10 +119,6 @@ def url_parameters(self):
117119 "publisher" , self .ctx .args .publisher ,
118120 required = True ,
119121 ),
120- ** self .serialize_url_param (
121- "subscriptionId" , self .ctx .subscription_id ,
122- required = True ,
123- ),
124122 }
125123 return parameters
126124
@@ -161,6 +159,9 @@ def _build_schema_on_200(cls):
161159 cls ._schema_on_200 = AAZObjectType ()
162160
163161 _schema_on_200 = cls ._schema_on_200
162+ _schema_on_200 .next_link = AAZStrType (
163+ serialized_name = "nextLink" ,
164+ )
164165 _schema_on_200 .value = AAZListType (
165166 flags = {"read_only" : True },
166167 )
@@ -187,17 +188,38 @@ def _build_schema_on_200(cls):
187188 )
188189
189190 properties = cls ._schema_on_200 .value .Element .properties
191+ properties .architecture = AAZListType (
192+ flags = {"read_only" : True },
193+ )
194+ properties .extension_signature_uri = AAZStrType (
195+ serialized_name = "extensionSignatureUri" ,
196+ flags = {"read_only" : True },
197+ )
190198 properties .extension_type = AAZStrType (
191199 serialized_name = "extensionType" ,
192200 flags = {"read_only" : True },
193201 )
202+ properties .extension_uris = AAZListType (
203+ serialized_name = "extensionUris" ,
204+ flags = {"read_only" : True },
205+ )
206+ properties .operating_system = AAZStrType (
207+ serialized_name = "operatingSystem" ,
208+ flags = {"read_only" : True },
209+ )
194210 properties .publisher = AAZStrType (
195211 flags = {"read_only" : True },
196212 )
197213 properties .version = AAZStrType (
198214 flags = {"read_only" : True },
199215 )
200216
217+ architecture = cls ._schema_on_200 .value .Element .properties .architecture
218+ architecture .Element = AAZStrType ()
219+
220+ extension_uris = cls ._schema_on_200 .value .Element .properties .extension_uris
221+ extension_uris .Element = AAZStrType ()
222+
201223 system_data = cls ._schema_on_200 .value .Element .system_data
202224 system_data .created_at = AAZStrType (
203225 serialized_name = "createdAt" ,
0 commit comments