@@ -64,7 +64,7 @@ def spring_cloud_create(cmd, client, resource_group, name, location=None,
6464 service_runtime_network_resource_group = None , app_network_resource_group = None ,
6565 app_insights_key = None , app_insights = None , sampling_rate = None ,
6666 disable_app_insights = None , enable_java_agent = None ,
67- sku = None , tags = None , no_wait = False ):
67+ sku = None , tags = None , zone_redundant = False , no_wait = False ):
6868 """
6969 Note: This is the command for create Spring-Cloud Standard and Basic tier. Refer tier_routing_spring_cloud.py for
7070 the command definition. And _enteprise.py for Spring-Cloud Enterprise tier creation.
@@ -85,6 +85,7 @@ def spring_cloud_create(cmd, client, resource_group, name, location=None,
8585 reserved_cidr_range = reserved_cidr_range ,
8686 service_runtime_network_resource_group = service_runtime_network_resource_group ,
8787 app_network_resource_group = app_network_resource_group ,
88+ zone_redundant = zone_redundant ,
8889 sku = sku ,
8990 tags = tags )
9091 _update_application_insights_asc_create (cmd , resource_group , name , location ,
@@ -96,21 +97,23 @@ def spring_cloud_create(cmd, client, resource_group, name, location=None,
9697def _create_service (cmd , client , resource_group , name , location = None ,
9798 service_runtime_subnet = None , app_subnet = None , reserved_cidr_range = None ,
9899 service_runtime_network_resource_group = None , app_network_resource_group = None ,
100+ zone_redundant = False ,
99101 sku = None , tags = None ):
100102 if location is None :
101103 location = _get_rg_location (cmd .cli_ctx , resource_group )
102- properties = models .ClusterResourceProperties ()
104+ properties = models_20220101preview .ClusterResourceProperties ()
103105
104106 if service_runtime_subnet or app_subnet or reserved_cidr_range :
105- properties .network_profile = models .NetworkProfile (
107+ properties .network_profile = models_20220101preview .NetworkProfile (
106108 service_runtime_subnet_id = service_runtime_subnet ,
107109 app_subnet_id = app_subnet ,
108110 service_cidr = reserved_cidr_range ,
109111 app_network_resource_group = app_network_resource_group ,
110112 service_runtime_network_resource_group = service_runtime_network_resource_group
111113 )
112114
113- resource = models .ServiceResource (location = location , sku = sku , properties = properties , tags = tags )
115+ properties .zone_redundant = zone_redundant
116+ resource = models_20220101preview .ServiceResource (location = location , sku = sku , properties = properties , tags = tags )
114117
115118 poller = client .services .begin_create_or_update (
116119 resource_group , name , resource )
@@ -148,7 +151,7 @@ def spring_cloud_update(cmd, client, resource_group, name, app_insights_key=None
148151 Will be decommissioned in future releases.
149152 :param app_insights_key: Connection string or Instrumentation key
150153 """
151- updated_resource = models .ServiceResource ()
154+ updated_resource = models_20220101preview .ServiceResource ()
152155 update_service_tags = False
153156 update_service_sku = False
154157
@@ -159,7 +162,7 @@ def spring_cloud_update(cmd, client, resource_group, name, app_insights_key=None
159162
160163 resource = client .services .get (resource_group , name )
161164 location = resource .location
162- updated_resource_properties = models .ClusterResourceProperties ()
165+ updated_resource_properties = models_20220101preview .ClusterResourceProperties ()
163166
164167 _update_application_insights_asc_update (cmd , resource_group , name , location ,
165168 app_insights_key , app_insights , disable_app_insights , no_wait )
0 commit comments