3030 cf_postgres_flexible_private_dns_zone_suffix_operations , \
3131 cf_postgres_flexible_private_endpoint_connections , \
3232 cf_postgres_flexible_tuning_options , \
33- cf_postgres_flexible_config , cf_postgres_flexible_adadmin
33+ cf_postgres_flexible_config , cf_postgres_flexible_admin
3434from ._flexible_server_util import generate_missing_parameters , resolve_poller , \
3535 generate_password , parse_maintenance_window , get_current_time , build_identity_and_data_encryption , \
3636 _is_resource_name , get_tenant_id , get_case_insensitive_key_value , get_enum_value_true_false
@@ -58,7 +58,7 @@ def flexible_server_create(cmd, client,
5858 resource_group_name = None , server_name = None ,
5959 location = None , backup_retention = None ,
6060 sku_name = None , tier = None ,
61- storage_gb = None , version = None , active_directory_auth = None , microsoft_entra_auth = None ,
61+ storage_gb = None , version = None , microsoft_entra_auth = None ,
6262 admin_name = None , admin_id = None , admin_type = None ,
6363 password_auth = None , administrator_login = None , administrator_login_password = None ,
6464 tags = None , database_name = None ,
@@ -107,7 +107,7 @@ def flexible_server_create(cmd, client,
107107 backup_byok_key = backup_byok_key ,
108108 performance_tier = performance_tier ,
109109 create_cluster = create_cluster ,
110- password_auth = password_auth , active_directory_auth = active_directory_auth , microsoft_entra_auth = microsoft_entra_auth ,
110+ password_auth = password_auth , microsoft_entra_auth = microsoft_entra_auth ,
111111 admin_name = admin_name , admin_id = admin_id , admin_type = admin_type ,)
112112
113113 cluster = None
@@ -141,8 +141,7 @@ def flexible_server_create(cmd, client,
141141 standby_availability_zone = standby_availability_zone )
142142
143143 is_password_auth_enabled = bool (password_auth is not None and password_auth .lower () == 'enabled' )
144- is_microsoft_entra_auth_enabled = bool (active_directory_auth is not None and active_directory_auth .lower () == 'enabled' ) or \
145- bool (microsoft_entra_auth is not None and microsoft_entra_auth .lower () == 'enabled' )
144+ is_microsoft_entra_auth_enabled = bool (microsoft_entra_auth is not None and microsoft_entra_auth .lower () == 'enabled' )
146145 if is_password_auth_enabled :
147146 administrator_login_password = generate_password (administrator_login_password )
148147
@@ -176,7 +175,7 @@ def flexible_server_create(cmd, client,
176175
177176 # Add Microsoft Entra Admin
178177 if is_microsoft_entra_auth_enabled and admin_name is not None or admin_id is not None :
179- server_admin_client = cf_postgres_flexible_adadmin (cmd .cli_ctx , '_' )
178+ server_admin_client = cf_postgres_flexible_admin (cmd .cli_ctx , '_' )
180179 logger .warning ("Add Microsoft Entra Admin '%s'." , admin_name )
181180 _create_admin (server_admin_client , resource_group_name , server_name , admin_name , admin_id , admin_type )
182181
@@ -313,7 +312,7 @@ def flexible_server_update_custom_func(cmd, client, instance,
313312 maintenance_window = None ,
314313 byok_identity = None , byok_key = None ,
315314 backup_byok_identity = None , backup_byok_key = None ,
316- active_directory_auth = None , microsoft_entra_auth = None , password_auth = None ,
315+ microsoft_entra_auth = None , password_auth = None ,
317316 private_dns_zone_arguments = None ,
318317 public_access = None ,
319318 tags = None ,
@@ -427,8 +426,8 @@ def flexible_server_update_custom_func(cmd, client, instance,
427426
428427 auth_config = instance .auth_config
429428 administrator_login = instance .administrator_login if instance .administrator_login else None
430- if active_directory_auth or microsoft_entra_auth :
431- auth_config .active_directory_auth = active_directory_auth if active_directory_auth else microsoft_entra_auth
429+ if microsoft_entra_auth :
430+ auth_config .active_directory_auth = microsoft_entra_auth
432431 if password_auth :
433432 administrator_login , administrator_login_password = _update_login (server_name , resource_group_name , auth_config ,
434433 password_auth , administrator_login , administrator_login_password )
@@ -1088,7 +1087,7 @@ def flexible_server_identity_show(cmd, client, resource_group_name, server_name,
10881087
10891088
10901089# Custom functions for ad-admin
1091- def flexible_server_ad_admin_set (cmd , client , resource_group_name , server_name , login , sid , principal_type = None , no_wait = False ):
1090+ def flexible_server_microsoft_entra_admin_set (cmd , client , resource_group_name , server_name , login , sid , principal_type = None , no_wait = False ):
10921091 validate_resource_group (resource_group_name )
10931092
10941093 server_operations_client = cf_postgres_flexible_servers (cmd .cli_ctx , '_' )
@@ -1112,7 +1111,7 @@ def _create_admin(client, resource_group_name, server_name, principal_name, sid,
11121111 return sdk_no_wait (no_wait , client .begin_create , resource_group_name , server_name , sid , parameters )
11131112
11141113
1115- def flexible_server_ad_admin_delete (cmd , client , resource_group_name , server_name , sid , no_wait = False ):
1114+ def flexible_server_microsoft_entra_admin_delete (cmd , client , resource_group_name , server_name , sid , no_wait = False ):
11161115 validate_resource_group (resource_group_name )
11171116
11181117 server_operations_client = cf_postgres_flexible_servers (cmd .cli_ctx , '_' )
@@ -1125,15 +1124,15 @@ def flexible_server_ad_admin_delete(cmd, client, resource_group_name, server_nam
11251124 return sdk_no_wait (no_wait , client .begin_delete , resource_group_name , server_name , sid )
11261125
11271126
1128- def flexible_server_ad_admin_list (client , resource_group_name , server_name ):
1127+ def flexible_server_microsoft_entra_admin_list (client , resource_group_name , server_name ):
11291128 validate_resource_group (resource_group_name )
11301129
11311130 return client .list_by_server (
11321131 resource_group_name = resource_group_name ,
11331132 server_name = server_name )
11341133
11351134
1136- def flexible_server_ad_admin_show (client , resource_group_name , server_name , sid ):
1135+ def flexible_server_microsoft_entra_admin_show (client , resource_group_name , server_name , sid ):
11371136 validate_resource_group (resource_group_name )
11381137
11391138 return client .get (
0 commit comments