@@ -47,19 +47,17 @@ def _build_arguments_schema(cls, *args, **kwargs):
4747 # define Arg Group ""
4848
4949 _args_schema = cls ._args_schema
50- _args_schema .resource_group = AAZResourceGroupNameArg (
51- help = "Name of the resource group" ,
52- )
50+ _args_schema .resource_group = AAZResourceGroupNameArg ()
5351 return cls ._args_schema
5452
5553 def _execute_operations (self ):
5654 self .pre_operations ()
57- condition_0 = has_value (self .ctx .args . resource_group ) and has_value (self .ctx .subscription_id )
58- condition_1 = has_value (self .ctx .subscription_id ) and has_value (self .ctx .args . resource_group ) is not True
55+ condition_0 = has_value (self .ctx .subscription_id ) and has_value (self .ctx .args . resource_group ) is not True
56+ condition_1 = has_value (self .ctx .args . resource_group ) and has_value (self .ctx .subscription_id )
5957 if condition_0 :
60- self .OrganizationsListByResourceGroup (ctx = self .ctx )()
61- if condition_1 :
6258 self .OrganizationsListBySubscription (ctx = self .ctx )()
59+ if condition_1 :
60+ self .OrganizationsListByResourceGroup (ctx = self .ctx )()
6361 self .post_operations ()
6462
6563 @register_callback
@@ -75,7 +73,7 @@ def _output(self, *args, **kwargs):
7573 next_link = self .deserialize_output (self .ctx .vars .instance .next_link )
7674 return result , next_link
7775
78- class OrganizationsListByResourceGroup (AAZHttpOperation ):
76+ class OrganizationsListBySubscription (AAZHttpOperation ):
7977 CLIENT_TYPE = "MgmtClient"
8078
8179 def __call__ (self , * args , ** kwargs ):
@@ -89,7 +87,7 @@ def __call__(self, *args, **kwargs):
8987 @property
9088 def url (self ):
9189 return self .client .format_url (
92- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Neon.Postgres/organizations" ,
90+ "/subscriptions/{subscriptionId}/providers/Neon.Postgres/organizations" ,
9391 ** self .url_parameters
9492 )
9593
@@ -104,10 +102,6 @@ def error_format(self):
104102 @property
105103 def url_parameters (self ):
106104 parameters = {
107- ** self .serialize_url_param (
108- "resourceGroupName" , self .ctx .args .resource_group ,
109- required = True ,
110- ),
111105 ** self .serialize_url_param (
112106 "subscriptionId" , self .ctx .subscription_id ,
113107 required = True ,
@@ -323,7 +317,7 @@ def _build_schema_on_200(cls):
323317
324318 return cls ._schema_on_200
325319
326- class OrganizationsListBySubscription (AAZHttpOperation ):
320+ class OrganizationsListByResourceGroup (AAZHttpOperation ):
327321 CLIENT_TYPE = "MgmtClient"
328322
329323 def __call__ (self , * args , ** kwargs ):
@@ -337,7 +331,7 @@ def __call__(self, *args, **kwargs):
337331 @property
338332 def url (self ):
339333 return self .client .format_url (
340- "/subscriptions/{subscriptionId}/providers/Neon.Postgres/organizations" ,
334+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Neon.Postgres/organizations" ,
341335 ** self .url_parameters
342336 )
343337
@@ -352,6 +346,10 @@ def error_format(self):
352346 @property
353347 def url_parameters (self ):
354348 parameters = {
349+ ** self .serialize_url_param (
350+ "resourceGroupName" , self .ctx .args .resource_group ,
351+ required = True ,
352+ ),
355353 ** self .serialize_url_param (
356354 "subscriptionId" , self .ctx .subscription_id ,
357355 required = True ,
0 commit comments