@@ -28,6 +28,10 @@ class Create(AAZCommand):
2828
2929 :example: Create a Basic SKU Firewall with Virtual Hub
3030 az network firewall create -g MyResourceGroup -n MyFirewall --sku AZFW_Hub --tier Basic --vhub MyVHub --public-ip-count 2
31+
32+ :example: Create Azure Firewall With AutoscaleConfiguration
33+ az network firewall create -g MyResourceGroup -n MyFirewall --min-capacity 4
34+ az network firewall create -g MyResourceGroup -n MyFirewall --min-capacity 10 --max-capacity 10
3135 """
3236
3337 _aaz_info = {
@@ -66,10 +70,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
6670 _args_schema .resource_group = AAZResourceGroupNameArg (
6771 required = True ,
6872 )
69- _args_schema .extended_location = AAZObjectArg (
70- options = ["--extended-location" ],
71- help = "The extended location of type local virtual network gateway." ,
72- )
7373 _args_schema .location = AAZResourceLocationArg (
7474 help = "Resource location." ,
7575 fmt = AAZResourceLocationArgFormat (
@@ -109,23 +109,34 @@ def _build_arguments_schema(cls, *args, **kwargs):
109109 help = "Space-separated list of availability zones into which to provision the resource. Allowed values: 1, 2, 3." ,
110110 )
111111
112- extended_location = cls ._args_schema .extended_location
113- extended_location .name = AAZStrArg (
114- options = ["name" ],
115- help = "The name of the extended location." ,
116- )
117- extended_location .type = AAZStrArg (
118- options = ["type" ],
119- help = "The type of the extended location." ,
120- enum = {"EdgeZone" : "EdgeZone" },
121- )
122-
123112 tags = cls ._args_schema .tags
124113 tags .Element = AAZStrArg ()
125114
126115 zones = cls ._args_schema .zones
127116 zones .Element = AAZStrArg ()
128117
118+ # define Arg Group "AutoscaleConfiguration"
119+
120+ _args_schema = cls ._args_schema
121+ _args_schema .max_capacity = AAZIntArg (
122+ options = ["--max-capacity" ],
123+ arg_group = "AutoscaleConfiguration" ,
124+ help = "The maximum number of capacity units for this azure firewall. Use null to reset the value to the service default." ,
125+ nullable = True ,
126+ fmt = AAZIntArgFormat (
127+ minimum = 2 ,
128+ ),
129+ )
130+ _args_schema .min_capacity = AAZIntArg (
131+ options = ["--min-capacity" ],
132+ arg_group = "AutoscaleConfiguration" ,
133+ help = "The minimum number of capacity units for this azure firewall. Use null to reset the value to the service default." ,
134+ nullable = True ,
135+ fmt = AAZIntArgFormat (
136+ minimum = 2 ,
137+ ),
138+ )
139+
129140 # define Arg Group "HubIpAddresses"
130141
131142 # define Arg Group "Management IP Configuration"
@@ -151,6 +162,24 @@ def _build_arguments_schema(cls, *args, **kwargs):
151162
152163 # define Arg Group "Parameters"
153164
165+ _args_schema = cls ._args_schema
166+ _args_schema .extended_location = AAZObjectArg (
167+ options = ["--extended-location" ],
168+ arg_group = "Parameters" ,
169+ help = "The extended location of type local virtual network gateway." ,
170+ )
171+
172+ extended_location = cls ._args_schema .extended_location
173+ extended_location .name = AAZStrArg (
174+ options = ["name" ],
175+ help = "The name of the extended location." ,
176+ )
177+ extended_location .type = AAZStrArg (
178+ options = ["type" ],
179+ help = "The type of the extended location." ,
180+ enum = {"EdgeZone" : "EdgeZone" },
181+ )
182+
154183 # define Arg Group "Properties"
155184
156185 _args_schema = cls ._args_schema
@@ -351,6 +380,7 @@ def content(self):
351380 properties = _builder .get (".properties" )
352381 if properties is not None :
353382 properties .set_prop ("additionalProperties" , AAZDictType , ".additional_properties" )
383+ properties .set_prop ("autoscaleConfiguration" , AAZObjectType )
354384 properties .set_prop ("firewallPolicy" , AAZObjectType )
355385 properties .set_prop ("hubIPAddresses" , AAZObjectType )
356386 properties .set_prop ("ipConfigurations" , AAZListType , ".ip_configurations" )
@@ -363,6 +393,11 @@ def content(self):
363393 if additional_properties is not None :
364394 additional_properties .set_elements (AAZStrType , "." )
365395
396+ autoscale_configuration = _builder .get (".properties.autoscaleConfiguration" )
397+ if autoscale_configuration is not None :
398+ autoscale_configuration .set_prop ("maxCapacity" , AAZIntType , ".max_capacity" , typ_kwargs = {"nullable" : True })
399+ autoscale_configuration .set_prop ("minCapacity" , AAZIntType , ".min_capacity" , typ_kwargs = {"nullable" : True })
400+
366401 firewall_policy = _builder .get (".properties.firewallPolicy" )
367402 if firewall_policy is not None :
368403 firewall_policy .set_prop ("id" , AAZStrType , ".firewall_policy" )
0 commit comments