@@ -77,7 +77,8 @@ def create_storage_account(cmd, resource_group_name, account_name, sku=None, loc
7777 allow_cross_tenant_replication = None , default_share_permission = None ,
7878 enable_nfs_v3 = None , subnet = None , vnet_name = None , action = 'Allow' , enable_alw = None ,
7979 immutability_period_since_creation_in_days = None , immutability_policy_state = None ,
80- allow_protected_append_writes = None , public_network_access = None , dns_endpoint_type = None ):
80+ allow_protected_append_writes = None , public_network_access = None , dns_endpoint_type = None ,
81+ enable_smb_oauth = None ):
8182 StorageAccountCreateParameters , Kind , Sku , CustomDomain , AccessTier , Identity , Encryption , NetworkRuleSet = \
8283 cmd .get_models ('StorageAccountCreateParameters' , 'Kind' , 'Sku' , 'CustomDomain' , 'AccessTier' , 'Identity' ,
8384 'Encryption' , 'NetworkRuleSet' )
@@ -198,6 +199,14 @@ def create_storage_account(cmd, resource_group_name, account_name, sku=None, loc
198199 directory_service_options = 'None' )
199200 params .azure_files_identity_based_authentication .default_share_permission = default_share_permission
200201
202+ if enable_smb_oauth is not None :
203+ if params .azure_files_identity_based_authentication is None :
204+ params .azure_files_identity_based_authentication = AzureFilesIdentityBasedAuthentication (
205+ directory_service_options = 'None' )
206+ params .azure_files_identity_based_authentication .smb_o_auth_settings = {
207+ "is_smb_o_auth_enabled" : enable_smb_oauth
208+ }
209+
201210 if enable_large_file_share :
202211 LargeFileSharesState = cmd .get_models ('LargeFileSharesState' )
203212 params .large_file_shares_state = LargeFileSharesState ("Enabled" )
@@ -398,7 +407,7 @@ def update_storage_account(cmd, instance, sku=None, tags=None, custom_domain=Non
398407 allow_cross_tenant_replication = None , default_share_permission = None ,
399408 immutability_period_since_creation_in_days = None , immutability_policy_state = None ,
400409 allow_protected_append_writes = None , public_network_access = None , upgrade_to_storagev2 = None ,
401- yes = None ):
410+ yes = None , enable_smb_oauth = None ):
402411 StorageAccountUpdateParameters , Sku , CustomDomain , AccessTier , Identity , Encryption , NetworkRuleSet , Kind = \
403412 cmd .get_models ('StorageAccountUpdateParameters' , 'Sku' , 'CustomDomain' , 'AccessTier' , 'Identity' , 'Encryption' ,
404413 'NetworkRuleSet' , 'Kind' )
@@ -610,6 +619,15 @@ def update_storage_account(cmd, instance, sku=None, tags=None, custom_domain=Non
610619 else instance .azure_files_identity_based_authentication
611620 params .azure_files_identity_based_authentication .default_share_permission = default_share_permission
612621
622+ if enable_smb_oauth is not None :
623+ if params .azure_files_identity_based_authentication is None :
624+ params .azure_files_identity_based_authentication = AzureFilesIdentityBasedAuthentication (
625+ directory_service_options = 'None' ) if instance .azure_files_identity_based_authentication is None \
626+ else instance .azure_files_identity_based_authentication
627+ params .azure_files_identity_based_authentication .smb_o_auth_settings = {
628+ "is_smb_o_auth_enabled" : enable_smb_oauth
629+ }
630+
613631 if assign_identity :
614632 params .identity = Identity (type = 'SystemAssigned' )
615633 if enable_large_file_share :
0 commit comments