7373 ManagedClusterIdentity ,
7474 ManagedClusterAPIServerAccessProfile ,
7575 ManagedClusterSKU ,
76- ManagedClusterIdentityUserAssignedIdentitiesValue ,
76+ Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties ,
7777 ManagedClusterAutoUpgradeProfile ,
7878 KubeletConfig ,
7979 LinuxOSConfig ,
8383 ManagedClusterPodIdentityException ,
8484 UserAssignedIdentity ,
8585 RunCommandRequest ,
86- ManagedClusterPropertiesIdentityProfileValue )
86+ ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties )
8787from ._client_factory import cf_resource_groups
8888from ._client_factory import get_auth_management_client
8989from ._client_factory import get_graph_rbac_management_client
@@ -1293,7 +1293,8 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
12931293 aad_profile = ManagedClusterAADProfile (
12941294 managed = True ,
12951295 enable_azure_rbac = enable_azure_rbac ,
1296- admin_group_object_ids = _parse_comma_separated_list (
1296+ # ids -> i_ds due to track 2 naming issue
1297+ admin_group_object_i_ds = _parse_comma_separated_list (
12971298 aad_admin_group_object_ids ),
12981299 tenant_id = aad_tenant_id
12991300 )
@@ -1334,7 +1335,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
13341335 )
13351336 elif enable_managed_identity and assign_identity :
13361337 user_assigned_identity = {
1337- assign_identity : ManagedClusterIdentityUserAssignedIdentitiesValue ()
1338+ assign_identity : Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties ()
13381339 }
13391340 identity = ManagedClusterIdentity (
13401341 type = "UserAssigned" ,
@@ -1347,7 +1348,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
13471348 raise CLIError ('--assign-kubelet-identity can only be specified when --assign-identity is specified' )
13481349 kubelet_identity = _get_user_assigned_identity (cmd .cli_ctx , assign_kubelet_identity )
13491350 identity_profile = {
1350- 'kubeletidentity' : ManagedClusterPropertiesIdentityProfileValue (
1351+ 'kubeletidentity' : ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties (
13511352 resource_id = assign_kubelet_identity ,
13521353 client_id = kubelet_identity .client_id ,
13531354 object_id = kubelet_identity .principal_id
@@ -1733,7 +1734,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches,
17331734 if aad_tenant_id is not None :
17341735 instance .aad_profile .tenant_id = aad_tenant_id
17351736 if aad_admin_group_object_ids is not None :
1736- instance .aad_profile .admin_group_object_ids = _parse_comma_separated_list (
1737+ # ids -> i_ds due to track 2 naming issue
1738+ instance .aad_profile .admin_group_object_i_ds = _parse_comma_separated_list (
17371739 aad_admin_group_object_ids )
17381740 if enable_azure_rbac and disable_azure_rbac :
17391741 raise CLIError (
@@ -1807,7 +1809,7 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches,
18071809 )
18081810 elif goal_identity_type == "userassigned" :
18091811 user_assigned_identity = {
1810- assign_identity : ManagedClusterIdentityUserAssignedIdentitiesValue ()
1812+ assign_identity : Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties ()
18111813 }
18121814 instance .identity = ManagedClusterIdentity (
18131815 type = "UserAssigned" ,
@@ -2171,7 +2173,7 @@ def aks_scale(cmd, # pylint: disable=unused-argument
21712173 # null out the SP and AAD profile because otherwise validation complains
21722174 instance .service_principal_profile = None
21732175 instance .aad_profile = None
2174- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , name , instance )
2176+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , name , instance )
21752177 raise CLIError ('The nodepool "{}" was not found.' .format (nodepool_name ))
21762178
21772179
@@ -2263,7 +2265,7 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state
22632265
22642266 headers = get_aks_custom_headers (aks_custom_headers )
22652267
2266- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , name , instance , custom_headers = headers )
2268+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , name , instance , headers = headers )
22672269
22682270
22692271def aks_runcommand (cmd , client , resource_group_name , name , command_string = "" , command_files = None ):
@@ -2280,8 +2282,8 @@ def aks_runcommand(cmd, client, resource_group_name, name, command_string="", co
22802282 request_payload .cluster_token = _get_dataplane_aad_token (
22812283 cmd .cli_ctx , "6dae42f8-4368-4678-94ff-3960e28e3630" )
22822284
2283- commandResultFuture = client .run_command (
2284- resource_group_name , name , request_payload , long_running_operation_timeout = 5 , retry_total = 0 )
2285+ commandResultFuture = client .begin_run_command (
2286+ resource_group_name , name , request_payload , polling_interval = 5 , retry_total = 0 )
22852287
22862288 return _print_command_result (cmd .cli_ctx , commandResultFuture .result (300 ))
22872289
@@ -2376,7 +2378,7 @@ def _get_dataplane_aad_token(cli_ctx, serverAppId):
23762378
23772379
23782380def _upgrade_single_nodepool_image_version (no_wait , client , resource_group_name , cluster_name , nodepool_name ):
2379- return sdk_no_wait (no_wait , client .upgrade_node_image_version , resource_group_name , cluster_name , nodepool_name )
2381+ return sdk_no_wait (no_wait , client .begin_upgrade_node_image_version , resource_group_name , cluster_name , nodepool_name )
23802382
23812383
23822384def _handle_addons_args (cmd , # pylint: disable=too-many-statements
@@ -3098,7 +3100,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
30983100 agent_pool .linux_os_config = _get_linux_os_config (linux_os_config )
30993101
31003102 headers = get_aks_custom_headers (aks_custom_headers )
3101- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , nodepool_name , agent_pool , custom_headers = headers )
3103+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , nodepool_name , agent_pool , headers = headers )
31023104
31033105
31043106def aks_agentpool_scale (cmd , # pylint: disable=unused-argument
@@ -3116,7 +3118,7 @@ def aks_agentpool_scale(cmd, # pylint: disable=unused-argument
31163118 raise CLIError (
31173119 "The new node count is the same as the current node count." )
31183120 instance .count = new_node_count # pylint: disable=no-member
3119- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , nodepool_name , instance )
3121+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , nodepool_name , instance )
31203122
31213123
31223124def aks_agentpool_upgrade (cmd , # pylint: disable=unused-argument
@@ -3148,7 +3150,7 @@ def aks_agentpool_upgrade(cmd, # pylint: disable=unused-argument
31483150 if max_surge :
31493151 instance .upgrade_settings .max_surge = max_surge
31503152
3151- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , nodepool_name , instance )
3153+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , nodepool_name , instance )
31523154
31533155
31543156def aks_agentpool_get_upgrade_profile (cmd , # pylint: disable=unused-argument
@@ -3230,7 +3232,7 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument
32303232 if mode is not None :
32313233 instance .mode = mode
32323234
3233- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , nodepool_name , instance )
3235+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , nodepool_name , instance )
32343236
32353237
32363238def aks_agentpool_delete (cmd , # pylint: disable=unused-argument
@@ -3250,7 +3252,7 @@ def aks_agentpool_delete(cmd, # pylint: disable=unused-argument
32503252 raise CLIError ("Node pool {} doesnt exist, "
32513253 "use 'aks nodepool list' to get current node pool list" .format (nodepool_name ))
32523254
3253- return sdk_no_wait (no_wait , client .delete , resource_group_name , cluster_name , nodepool_name )
3255+ return sdk_no_wait (no_wait , client .begin_delete , resource_group_name , cluster_name , nodepool_name )
32543256
32553257
32563258def aks_disable_addons (cmd , client , resource_group_name , name , addons , no_wait = False ):
@@ -3269,7 +3271,7 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F
32693271 )
32703272
32713273 # send the managed cluster representation to update the addon profiles
3272- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , name , instance )
3274+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , name , instance )
32733275
32743276
32753277def aks_enable_addons (cmd , client , resource_group_name , name , addons , workspace_resource_id = None ,
@@ -3300,7 +3302,7 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_
33003302 if need_post_creation_role_assignment :
33013303 # adding a wait here since we rely on the result for role assignment
33023304 result = LongRunningOperation (cmd .cli_ctx )(
3303- client .create_or_update (resource_group_name , name , instance ))
3305+ client .begin_create_or_update (resource_group_name , name , instance ))
33043306 cloud_name = cmd .cli_ctx .cloud .name
33053307 # mdm metrics supported only in Azure Public cloud so add the role assignment only in this cloud
33063308 if monitoring and cloud_name .lower () == 'azurecloud' :
@@ -3325,13 +3327,13 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_
33253327 # we don't need to handle it in client side in this case.
33263328
33273329 else :
3328- result = sdk_no_wait (no_wait , client .create_or_update ,
3330+ result = sdk_no_wait (no_wait , client .begin_create_or_update ,
33293331 resource_group_name , name , instance )
33303332 return result
33313333
33323334
33333335def aks_rotate_certs (cmd , client , resource_group_name , name , no_wait = True ): # pylint: disable=unused-argument
3334- return sdk_no_wait (no_wait , client .rotate_cluster_certificates , resource_group_name , name )
3336+ return sdk_no_wait (no_wait , client .begin_rotate_cluster_certificates , resource_group_name , name )
33353337
33363338
33373339def _update_addons (cmd , # pylint: disable=too-many-branches,too-many-statements
@@ -3797,11 +3799,11 @@ def _put_managed_cluster_ensuring_permission(
37973799 need_grant_vnet_permission_to_cluster_identity )
37983800 if need_post_creation_role_assignment :
37993801 # adding a wait here since we rely on the result for role assignment
3800- cluster = LongRunningOperation (cmd .cli_ctx )(client .create_or_update (
3802+ cluster = LongRunningOperation (cmd .cli_ctx )(client .begin_create_or_update (
38013803 resource_group_name = resource_group_name ,
38023804 resource_name = name ,
38033805 parameters = managed_cluster ,
3804- custom_headers = headers ))
3806+ headers = headers ))
38053807 cloud_name = cmd .cli_ctx .cloud .name
38063808 # add cluster spn/msi Monitoring Metrics Publisher role assignment to publish metrics to MDM
38073809 # mdm metrics is supported only in azure public cloud, so add the role assignment only in this cloud
@@ -3840,11 +3842,11 @@ def _put_managed_cluster_ensuring_permission(
38403842 acr_name_or_id = attach_acr ,
38413843 subscription_id = subscription_id )
38423844 else :
3843- cluster = sdk_no_wait (no_wait , client .create_or_update ,
3845+ cluster = sdk_no_wait (no_wait , client .begin_create_or_update ,
38443846 resource_group_name = resource_group_name ,
38453847 resource_name = name ,
38463848 parameters = managed_cluster ,
3847- custom_headers = headers )
3849+ headers = headers )
38483850
38493851 return cluster
38503852
@@ -4083,7 +4085,7 @@ def aks_pod_identity_add(cmd, client, resource_group_name, cluster_name,
40834085 )
40844086
40854087 # send the managed cluster represeentation to update the pod identity addon
4086- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , instance )
4088+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , instance )
40874089
40884090
40894091def aks_pod_identity_delete (cmd , client , resource_group_name , cluster_name ,
@@ -4107,7 +4109,7 @@ def aks_pod_identity_delete(cmd, client, resource_group_name, cluster_name,
41074109 )
41084110
41094111 # send the managed cluster represeentation to update the pod identity addon
4110- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , instance )
4112+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , instance )
41114113
41124114
41134115def aks_pod_identity_list (cmd , client , resource_group_name , cluster_name ): # pylint: disable=unused-argument
@@ -4134,7 +4136,7 @@ def aks_pod_identity_exception_add(cmd, client, resource_group_name, cluster_nam
41344136 )
41354137
41364138 # send the managed cluster represeentation to update the pod identity addon
4137- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , instance )
4139+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , instance )
41384140
41394141
41404142def aks_pod_identity_exception_delete (cmd , client , resource_group_name , cluster_name ,
@@ -4157,7 +4159,7 @@ def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_
41574159 )
41584160
41594161 # send the managed cluster represeentation to update the pod identity addon
4160- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , instance )
4162+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , instance )
41614163
41624164
41634165def aks_pod_identity_exception_update (cmd , client , resource_group_name , cluster_name ,
@@ -4188,7 +4190,7 @@ def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_
41884190 )
41894191
41904192 # send the managed cluster represeentation to update the pod identity addon
4191- return sdk_no_wait (no_wait , client .create_or_update , resource_group_name , cluster_name , instance )
4193+ return sdk_no_wait (no_wait , client .begin_create_or_update , resource_group_name , cluster_name , instance )
41924194
41934195
41944196def aks_pod_identity_exception_list (cmd , client , resource_group_name , cluster_name ):
0 commit comments