@@ -31,9 +31,9 @@ class Create(AAZCommand):
3131 """
3232
3333 _aaz_info = {
34- "version" : "2023-09 -01" ,
34+ "version" : "2024-03 -01" ,
3535 "resources" : [
36- ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworkgateways/{}" , "2023-09 -01" ],
36+ ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/virtualnetworkgateways/{}" , "2024-03 -01" ],
3737 ]
3838 }
3939
@@ -106,6 +106,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
106106 options = ["--ip-configurations" ],
107107 help = "IP configurations for virtual network gateway." ,
108108 )
109+ _args_schema .resiliency_model = AAZStrArg (
110+ options = ["--resiliency-model" ],
111+ help = "Indicates if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed" ,
112+ enum = {"MultiHomed" : "MultiHomed" , "SingleHomed" : "SingleHomed" },
113+ )
109114 _args_schema .sku = AAZStrArg (
110115 options = ["--sku" ],
111116 help = "VNet gateway SKU." ,
@@ -219,6 +224,25 @@ def _build_arguments_schema(cls, *args, **kwargs):
219224
220225 # define Arg Group "BgpSettings"
221226
227+ # define Arg Group "Identity"
228+
229+ _args_schema = cls ._args_schema
230+ _args_schema .mi_system_assigned = AAZStrArg (
231+ options = ["--system-assigned" , "--mi-system-assigned" ],
232+ arg_group = "Identity" ,
233+ help = "Set the system managed identity." ,
234+ blank = "True" ,
235+ )
236+ _args_schema .mi_user_assigned = AAZListArg (
237+ options = ["--user-assigned" , "--mi-user-assigned" ],
238+ arg_group = "Identity" ,
239+ help = "Set the user managed identities." ,
240+ blank = [],
241+ )
242+
243+ mi_user_assigned = cls ._args_schema .mi_user_assigned
244+ mi_user_assigned .Element = AAZStrArg ()
245+
222246 # define Arg Group "Nat Rule"
223247
224248 _args_schema = cls ._args_schema
@@ -488,7 +512,7 @@ def url_parameters(self):
488512 def query_parameters (self ):
489513 parameters = {
490514 ** self .serialize_query_param (
491- "api-version" , "2023-09 -01" ,
515+ "api-version" , "2024-03 -01" ,
492516 required = True ,
493517 ),
494518 }
@@ -514,6 +538,7 @@ def content(self):
514538 typ_kwargs = {"flags" : {"required" : True , "client_flatten" : True }}
515539 )
516540 _builder .set_prop ("extendedLocation" , AAZObjectType )
541+ _builder .set_prop ("identity" , AAZIdentityObjectType )
517542 _builder .set_prop ("location" , AAZStrType , ".location" )
518543 _builder .set_prop ("properties" , AAZObjectType , "." , typ_kwargs = {"flags" : {"required" : True , "client_flatten" : True }})
519544 _builder .set_prop ("tags" , AAZDictType , ".tags" )
@@ -523,6 +548,15 @@ def content(self):
523548 extended_location .set_prop ("name" , AAZStrType , ".edge_zone" )
524549 extended_location .set_prop ("type" , AAZStrType , ".edge_zone_type" )
525550
551+ identity = _builder .get (".identity" )
552+ if identity is not None :
553+ identity .set_prop ("userAssigned" , AAZListType , ".mi_user_assigned" , typ_kwargs = {"flags" : {"action" : "create" }})
554+ identity .set_prop ("systemAssigned" , AAZStrType , ".mi_system_assigned" , typ_kwargs = {"flags" : {"action" : "create" }})
555+
556+ user_assigned = _builder .get (".identity.userAssigned" )
557+ if user_assigned is not None :
558+ user_assigned .set_elements (AAZStrType , "." )
559+
526560 properties = _builder .get (".properties" )
527561 if properties is not None :
528562 properties .set_prop ("activeActive" , AAZBoolType , ".active" )
@@ -537,6 +571,7 @@ def content(self):
537571 properties .set_prop ("gatewayType" , AAZStrType , ".gateway_type" )
538572 properties .set_prop ("ipConfigurations" , AAZListType , ".ip_configurations" )
539573 properties .set_prop ("natRules" , AAZListType , ".nat_rules" )
574+ properties .set_prop ("resiliencyModel" , AAZStrType , ".resiliency_model" )
540575 properties .set_prop ("sku" , AAZObjectType )
541576 properties .set_prop ("vNetExtendedLocationResourceId" , AAZStrType , ".edge_zone_vnet_id" )
542577 properties .set_prop ("vpnClientConfiguration" , AAZObjectType )
@@ -704,6 +739,7 @@ def _build_schema_on_200_201(cls):
704739 serialized_name = "extendedLocation" ,
705740 )
706741 _schema_on_200_201 .id = AAZStrType ()
742+ _schema_on_200_201 .identity = AAZIdentityObjectType ()
707743 _schema_on_200_201 .location = AAZStrType ()
708744 _schema_on_200_201 .name = AAZStrType (
709745 flags = {"read_only" : True },
@@ -720,6 +756,33 @@ def _build_schema_on_200_201(cls):
720756 extended_location .name = AAZStrType ()
721757 extended_location .type = AAZStrType ()
722758
759+ identity = cls ._schema_on_200_201 .identity
760+ identity .principal_id = AAZStrType (
761+ serialized_name = "principalId" ,
762+ flags = {"read_only" : True },
763+ )
764+ identity .tenant_id = AAZStrType (
765+ serialized_name = "tenantId" ,
766+ flags = {"read_only" : True },
767+ )
768+ identity .type = AAZStrType ()
769+ identity .user_assigned_identities = AAZDictType (
770+ serialized_name = "userAssignedIdentities" ,
771+ )
772+
773+ user_assigned_identities = cls ._schema_on_200_201 .identity .user_assigned_identities
774+ user_assigned_identities .Element = AAZObjectType ()
775+
776+ _element = cls ._schema_on_200_201 .identity .user_assigned_identities .Element
777+ _element .client_id = AAZStrType (
778+ serialized_name = "clientId" ,
779+ flags = {"read_only" : True },
780+ )
781+ _element .principal_id = AAZStrType (
782+ serialized_name = "principalId" ,
783+ flags = {"read_only" : True },
784+ )
785+
723786 properties = cls ._schema_on_200_201 .properties
724787 properties .active_active = AAZBoolType (
725788 serialized_name = "activeActive" ,
@@ -779,6 +842,9 @@ def _build_schema_on_200_201(cls):
779842 serialized_name = "provisioningState" ,
780843 flags = {"read_only" : True },
781844 )
845+ properties .resiliency_model = AAZStrType (
846+ serialized_name = "resiliencyModel" ,
847+ )
782848 properties .resource_guid = AAZStrType (
783849 serialized_name = "resourceGuid" ,
784850 flags = {"read_only" : True },
0 commit comments