@@ -19,12 +19,15 @@ class Create(AAZCommand):
1919
2020 :example: Create a scheduler in eastus
2121 az durabletask scheduler create --resource-group testrg --name testscheduler --location eastus --ip-allowlist "[0.0.0.0/0]" --sku-capacity 1, --sku-name "Dedicated" --tags "{}"
22+
23+ :example: Create a Consumption SKU scheduler with public network access disabled
24+ az durabletask scheduler create --resource-group rgopenapi --name testscheduler --location northcentralus --sku-name "Consumption" --public-network-access Disabled --tags "{department:research,development:true}"
2225 """
2326
2427 _aaz_info = {
25- "version" : "2025-11 -01" ,
28+ "version" : "2026-02 -01" ,
2629 "resources" : [
27- ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.durabletask/schedulers/{}" , "2025-11 -01" ],
30+ ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.durabletask/schedulers/{}" , "2026-02 -01" ],
2831 ]
2932 }
3033
@@ -64,6 +67,13 @@ def _build_arguments_schema(cls, *args, **kwargs):
6467 options = ["--ip-allowlist" ],
6568 arg_group = "Properties" ,
6669 help = "IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR" ,
70+ default = [],
71+ )
72+ _args_schema .public_network_access = AAZStrArg (
73+ options = ["--public-network-access" ],
74+ arg_group = "Properties" ,
75+ help = "Allow or disallow public network access to durable task scheduler" ,
76+ enum = {"Disabled" : "Disabled" , "Enabled" : "Enabled" },
6777 )
6878
6979 ip_allowlist = cls ._args_schema .ip_allowlist
@@ -186,7 +196,7 @@ def url_parameters(self):
186196 def query_parameters (self ):
187197 parameters = {
188198 ** self .serialize_query_param (
189- "api-version" , "2025-11 -01" ,
199+ "api-version" , "2026-02 -01" ,
190200 required = True ,
191201 ),
192202 }
@@ -218,6 +228,7 @@ def content(self):
218228 properties = _builder .get (".properties" )
219229 if properties is not None :
220230 properties .set_prop ("ipAllowlist" , AAZListType , ".ip_allowlist" , typ_kwargs = {"flags" : {"required" : True }})
231+ properties .set_prop ("publicNetworkAccess" , AAZStrType , ".public_network_access" )
221232 properties .set_prop ("sku" , AAZObjectType , "." , typ_kwargs = {"flags" : {"required" : True }})
222233
223234 ip_allowlist = _builder .get (".properties.ipAllowlist" )
@@ -267,6 +278,7 @@ def _build_schema_on_200_201(cls):
267278 serialized_name = "systemData" ,
268279 flags = {"read_only" : True },
269280 )
281+ _CreateHelper ._build_schema_system_data_read (_schema_on_200_201 .system_data )
270282 _schema_on_200_201 .tags = AAZDictType ()
271283 _schema_on_200_201 .type = AAZStrType (
272284 flags = {"read_only" : True },
@@ -280,45 +292,86 @@ def _build_schema_on_200_201(cls):
280292 serialized_name = "ipAllowlist" ,
281293 flags = {"required" : True },
282294 )
295+ properties .private_endpoint_connections = AAZListType (
296+ serialized_name = "privateEndpointConnections" ,
297+ flags = {"read_only" : True },
298+ )
283299 properties .provisioning_state = AAZStrType (
284300 serialized_name = "provisioningState" ,
285301 flags = {"read_only" : True },
286302 )
303+ properties .public_network_access = AAZStrType (
304+ serialized_name = "publicNetworkAccess" ,
305+ )
287306 properties .sku = AAZObjectType (
288307 flags = {"required" : True },
289308 )
290309
291310 ip_allowlist = cls ._schema_on_200_201 .properties .ip_allowlist
292311 ip_allowlist .Element = AAZStrType ()
293312
294- sku = cls ._schema_on_200_201 .properties .sku
295- sku .capacity = AAZIntType ()
296- sku .name = AAZStrType (
297- flags = {"required" : True },
313+ private_endpoint_connections = cls ._schema_on_200_201 .properties .private_endpoint_connections
314+ private_endpoint_connections .Element = AAZObjectType ()
315+
316+ _element = cls ._schema_on_200_201 .properties .private_endpoint_connections .Element
317+ _element .id = AAZStrType (
318+ flags = {"read_only" : True },
298319 )
299- sku .redundancy_state = AAZStrType (
300- serialized_name = "redundancyState" ,
320+ _element .name = AAZStrType (
321+ flags = {"read_only" : True },
322+ )
323+ _element .properties = AAZObjectType (
324+ flags = {"client_flatten" : True },
325+ )
326+ _element .system_data = AAZObjectType (
327+ serialized_name = "systemData" ,
328+ flags = {"read_only" : True },
329+ )
330+ _CreateHelper ._build_schema_system_data_read (_element .system_data )
331+ _element .type = AAZStrType (
301332 flags = {"read_only" : True },
302333 )
303334
304- system_data = cls ._schema_on_200_201 .system_data
305- system_data .created_at = AAZStrType (
306- serialized_name = "createdAt" ,
335+ properties = cls ._schema_on_200_201 .properties .private_endpoint_connections .Element .properties
336+ properties .group_ids = AAZListType (
337+ serialized_name = "groupIds" ,
338+ flags = {"read_only" : True },
307339 )
308- system_data . created_by = AAZStrType (
309- serialized_name = "createdBy " ,
340+ properties . private_endpoint = AAZObjectType (
341+ serialized_name = "privateEndpoint " ,
310342 )
311- system_data .created_by_type = AAZStrType (
312- serialized_name = "createdByType" ,
343+ properties .private_link_service_connection_state = AAZObjectType (
344+ serialized_name = "privateLinkServiceConnectionState" ,
345+ flags = {"required" : True },
313346 )
314- system_data .last_modified_at = AAZStrType (
315- serialized_name = "lastModifiedAt" ,
347+ properties .provisioning_state = AAZStrType (
348+ serialized_name = "provisioningState" ,
349+ flags = {"read_only" : True },
316350 )
317- system_data .last_modified_by = AAZStrType (
318- serialized_name = "lastModifiedBy" ,
351+
352+ group_ids = cls ._schema_on_200_201 .properties .private_endpoint_connections .Element .properties .group_ids
353+ group_ids .Element = AAZStrType ()
354+
355+ private_endpoint = cls ._schema_on_200_201 .properties .private_endpoint_connections .Element .properties .private_endpoint
356+ private_endpoint .id = AAZStrType (
357+ flags = {"read_only" : True },
358+ )
359+
360+ private_link_service_connection_state = cls ._schema_on_200_201 .properties .private_endpoint_connections .Element .properties .private_link_service_connection_state
361+ private_link_service_connection_state .actions_required = AAZStrType (
362+ serialized_name = "actionsRequired" ,
319363 )
320- system_data .last_modified_by_type = AAZStrType (
321- serialized_name = "lastModifiedByType" ,
364+ private_link_service_connection_state .description = AAZStrType ()
365+ private_link_service_connection_state .status = AAZStrType ()
366+
367+ sku = cls ._schema_on_200_201 .properties .sku
368+ sku .capacity = AAZIntType ()
369+ sku .name = AAZStrType (
370+ flags = {"required" : True },
371+ )
372+ sku .redundancy_state = AAZStrType (
373+ serialized_name = "redundancyState" ,
374+ flags = {"read_only" : True },
322375 )
323376
324377 tags = cls ._schema_on_200_201 .tags
@@ -330,5 +383,49 @@ def _build_schema_on_200_201(cls):
330383class _CreateHelper :
331384 """Helper class for Create"""
332385
386+ _schema_system_data_read = None
387+
388+ @classmethod
389+ def _build_schema_system_data_read (cls , _schema ):
390+ if cls ._schema_system_data_read is not None :
391+ _schema .created_at = cls ._schema_system_data_read .created_at
392+ _schema .created_by = cls ._schema_system_data_read .created_by
393+ _schema .created_by_type = cls ._schema_system_data_read .created_by_type
394+ _schema .last_modified_at = cls ._schema_system_data_read .last_modified_at
395+ _schema .last_modified_by = cls ._schema_system_data_read .last_modified_by
396+ _schema .last_modified_by_type = cls ._schema_system_data_read .last_modified_by_type
397+ return
398+
399+ cls ._schema_system_data_read = _schema_system_data_read = AAZObjectType (
400+ flags = {"read_only" : True }
401+ )
402+
403+ system_data_read = _schema_system_data_read
404+ system_data_read .created_at = AAZStrType (
405+ serialized_name = "createdAt" ,
406+ )
407+ system_data_read .created_by = AAZStrType (
408+ serialized_name = "createdBy" ,
409+ )
410+ system_data_read .created_by_type = AAZStrType (
411+ serialized_name = "createdByType" ,
412+ )
413+ system_data_read .last_modified_at = AAZStrType (
414+ serialized_name = "lastModifiedAt" ,
415+ )
416+ system_data_read .last_modified_by = AAZStrType (
417+ serialized_name = "lastModifiedBy" ,
418+ )
419+ system_data_read .last_modified_by_type = AAZStrType (
420+ serialized_name = "lastModifiedByType" ,
421+ )
422+
423+ _schema .created_at = cls ._schema_system_data_read .created_at
424+ _schema .created_by = cls ._schema_system_data_read .created_by
425+ _schema .created_by_type = cls ._schema_system_data_read .created_by_type
426+ _schema .last_modified_at = cls ._schema_system_data_read .last_modified_at
427+ _schema .last_modified_by = cls ._schema_system_data_read .last_modified_by
428+ _schema .last_modified_by_type = cls ._schema_system_data_read .last_modified_by_type
429+
333430
334431__all__ = ["Create" ]
0 commit comments