Skip to content

Commit 23609db

Browse files
authored
[Storage] Support isSmbOauthEnabled when creating and updating storage accounts (#28573)
1 parent 055d995 commit 23609db

File tree

101 files changed

+4556
-2046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4556
-2046
lines changed

src/Storage/Storage.Management.Sdk/Generated/IManagementPoliciesOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public partial interface IManagementPoliciesOperations
5959
/// </param>
6060
/// <param name='policy'>
6161
/// The Storage Account ManagementPolicy, in JSON format. See more details in:
62-
/// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
62+
/// https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview.
6363
/// </param>
6464
/// <param name='customHeaders'>
6565
/// The headers that will be added to request.

src/Storage/Storage.Management.Sdk/Generated/IStorageAccountsOperations.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public partial interface IStorageAccountsOperations
386386
/// Failover is disaster recovery testing drills. This type of failover is
387387
/// invoked by setting FailoverType parameter to &#39;Planned&#39;. Learn more about
388388
/// the failover options here-
389-
/// https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance
389+
/// https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance
390390
/// </summary>
391391
/// <remarks>
392392
/// A failover request can be triggered for a storage account in the event a
@@ -401,7 +401,7 @@ public partial interface IStorageAccountsOperations
401401
/// Failover is disaster recovery testing drills. This type of failover is
402402
/// invoked by setting FailoverType parameter to &#39;Planned&#39;. Learn more about
403403
/// the failover options here-
404-
/// https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance
404+
/// https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance
405405
/// </remarks>
406406
/// <param name='resourceGroupName'>
407407
/// The name of the resource group within the user&#39;s subscription. The name is
@@ -668,7 +668,7 @@ public partial interface IStorageAccountsOperations
668668
/// Failover is disaster recovery testing drills. This type of failover is
669669
/// invoked by setting FailoverType parameter to &#39;Planned&#39;. Learn more about
670670
/// the failover options here-
671-
/// https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance
671+
/// https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance
672672
/// </summary>
673673
/// <remarks>
674674
/// A failover request can be triggered for a storage account in the event a
@@ -683,7 +683,7 @@ public partial interface IStorageAccountsOperations
683683
/// Failover is disaster recovery testing drills. This type of failover is
684684
/// invoked by setting FailoverType parameter to &#39;Planned&#39;. Learn more about
685685
/// the failover options here-
686-
/// https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance
686+
/// https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance
687687
/// </remarks>
688688
/// <param name='resourceGroupName'>
689689
/// The name of the resource group within the user&#39;s subscription. The name is

src/Storage/Storage.Management.Sdk/Generated/ManagementPoliciesOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ internal ManagementPoliciesOperations (StorageManagementClient client)
305305
/// </param>
306306
/// <param name='policy'>
307307
/// The Storage Account ManagementPolicy, in JSON format. See more details in:
308-
/// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
308+
/// https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview.
309309
/// </param>
310310
/// <param name='customHeaders'>
311311
/// Headers that will be added to request.

src/Storage/Storage.Management.Sdk/Generated/Models/ActiveDirectoryProperties.cs

Lines changed: 72 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,58 @@ public ActiveDirectoryProperties()
2525
/// </summary>
2626

2727
/// <param name="domainName">Specifies the primary domain that the AD DNS server is authoritative for.
28+
/// This property is required if directoryServiceOptions is set to AD (AD DS
29+
/// authentication). If directoryServiceOptions is set to AADDS (Entra DS
30+
/// authentication), providing this property is optional, as it will be
31+
/// inferred automatically if omitted. If directoryServiceOptions is set to
32+
/// AADKERB (Entra authentication), this property is optional; it is needed to
33+
/// support configuration of directory- and file-level permissions via Windows
34+
/// File Explorer, but is not required for authentication.
2835
/// </param>
2936

30-
/// <param name="netBiosDomainName">Specifies the NetBIOS domain name.
37+
/// <param name="netBiosDomainName">Specifies the NetBIOS domain name. If directoryServiceOptions is set to AD
38+
/// (AD DS authentication), this property is required. Otherwise, it can be
39+
/// omitted.
3140
/// </param>
3241

33-
/// <param name="forestName">Specifies the Active Directory forest to get.
42+
/// <param name="forestName">Specifies the Active Directory forest to get. If directoryServiceOptions is
43+
/// set to AD (AD DS authentication), this property is required. Otherwise, it
44+
/// can be omitted.
3445
/// </param>
3546

36-
/// <param name="domainGuid">Specifies the domain GUID.
47+
/// <param name="domainGuid">Specifies the domain GUID. If directoryServiceOptions is set to AD (AD DS
48+
/// authentication), this property is required. If directoryServiceOptions is
49+
/// set to AADDS (Entra DS authentication), this property can be omitted. If
50+
/// directoryServiceOptions is set to AADKERB (Entra authentication), this
51+
/// property is optional; it is needed to support configuration of directory-
52+
/// and file-level permissions via Windows File Explorer, but is not required
53+
/// for authentication.
3754
/// </param>
3855

39-
/// <param name="domainSid">Specifies the security identifier (SID).
56+
/// <param name="domainSid">Specifies the security identifier (SID) of the AD domain. If
57+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
58+
/// is required. Otherwise, it can be omitted.
4059
/// </param>
4160

42-
/// <param name="azureStorageSid">Specifies the security identifier (SID) for Azure Storage.
61+
/// <param name="azureStorageSid">Specifies the security identifier (SID) for Azure Storage. If
62+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
63+
/// is required. Otherwise, it can be omitted.
4364
/// </param>
4465

45-
/// <param name="samAccountName">Specifies the Active Directory SAMAccountName for Azure Storage.
66+
/// <param name="samAccountName">Specifies the Active Directory SAMAccountName for Azure Storage. If
67+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
68+
/// is optional. If provided, accountType should also be provided. For
69+
/// directoryServiceOptions AADDS (Entra DS authentication) or AADKERB (Entra
70+
/// authentication), this property can be omitted.
4671
/// </param>
4772

48-
/// <param name="accountType">Specifies the Active Directory account type for Azure Storage.
73+
/// <param name="accountType">Specifies the Active Directory account type for Azure Storage. If
74+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
75+
/// is optional. If provided, samAccountName should also be provided. For
76+
/// directoryServiceOptions AADDS (Entra DS authentication) or AADKERB (Entra
77+
/// authentication), this property can be omitted.
4978
/// Possible values include: &#39;User&#39;, &#39;Computer&#39;</param>
50-
public ActiveDirectoryProperties(string domainName, string domainGuid, string netBiosDomainName = default(string), string forestName = default(string), string domainSid = default(string), string azureStorageSid = default(string), string samAccountName = default(string), string accountType = default(string))
79+
public ActiveDirectoryProperties(string domainName = default(string), string netBiosDomainName = default(string), string forestName = default(string), string domainGuid = default(string), string domainSid = default(string), string azureStorageSid = default(string), string samAccountName = default(string), string accountType = default(string))
5180

5281
{
5382
this.DomainName = domainName;
@@ -69,77 +98,79 @@ public ActiveDirectoryProperties()
6998

7099
/// <summary>
71100
/// Gets or sets specifies the primary domain that the AD DNS server is
72-
/// authoritative for.
101+
/// authoritative for. This property is required if directoryServiceOptions is
102+
/// set to AD (AD DS authentication). If directoryServiceOptions is set to
103+
/// AADDS (Entra DS authentication), providing this property is optional, as it
104+
/// will be inferred automatically if omitted. If directoryServiceOptions is
105+
/// set to AADKERB (Entra authentication), this property is optional; it is
106+
/// needed to support configuration of directory- and file-level permissions
107+
/// via Windows File Explorer, but is not required for authentication.
73108
/// </summary>
74109
[Newtonsoft.Json.JsonProperty(PropertyName = "domainName")]
75110
public string DomainName {get; set; }
76111

77112
/// <summary>
78-
/// Gets or sets specifies the NetBIOS domain name.
113+
/// Gets or sets specifies the NetBIOS domain name. If directoryServiceOptions
114+
/// is set to AD (AD DS authentication), this property is required. Otherwise,
115+
/// it can be omitted.
79116
/// </summary>
80117
[Newtonsoft.Json.JsonProperty(PropertyName = "netBiosDomainName")]
81118
public string NetBiosDomainName {get; set; }
82119

83120
/// <summary>
84-
/// Gets or sets specifies the Active Directory forest to get.
121+
/// Gets or sets specifies the Active Directory forest to get. If
122+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
123+
/// is required. Otherwise, it can be omitted.
85124
/// </summary>
86125
[Newtonsoft.Json.JsonProperty(PropertyName = "forestName")]
87126
public string ForestName {get; set; }
88127

89128
/// <summary>
90-
/// Gets or sets specifies the domain GUID.
129+
/// Gets or sets specifies the domain GUID. If directoryServiceOptions is set
130+
/// to AD (AD DS authentication), this property is required. If
131+
/// directoryServiceOptions is set to AADDS (Entra DS authentication), this
132+
/// property can be omitted. If directoryServiceOptions is set to AADKERB
133+
/// (Entra authentication), this property is optional; it is needed to support
134+
/// configuration of directory- and file-level permissions via Windows File
135+
/// Explorer, but is not required for authentication.
91136
/// </summary>
92137
[Newtonsoft.Json.JsonProperty(PropertyName = "domainGuid")]
93138
public string DomainGuid {get; set; }
94139

95140
/// <summary>
96-
/// Gets or sets specifies the security identifier (SID).
141+
/// Gets or sets specifies the security identifier (SID) of the AD domain. If
142+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
143+
/// is required. Otherwise, it can be omitted.
97144
/// </summary>
98145
[Newtonsoft.Json.JsonProperty(PropertyName = "domainSid")]
99146
public string DomainSid {get; set; }
100147

101148
/// <summary>
102-
/// Gets or sets specifies the security identifier (SID) for Azure Storage.
149+
/// Gets or sets specifies the security identifier (SID) for Azure Storage. If
150+
/// directoryServiceOptions is set to AD (AD DS authentication), this property
151+
/// is required. Otherwise, it can be omitted.
103152
/// </summary>
104153
[Newtonsoft.Json.JsonProperty(PropertyName = "azureStorageSid")]
105154
public string AzureStorageSid {get; set; }
106155

107156
/// <summary>
108157
/// Gets or sets specifies the Active Directory SAMAccountName for Azure
109-
/// Storage.
158+
/// Storage. If directoryServiceOptions is set to AD (AD DS authentication),
159+
/// this property is optional. If provided, accountType should also be
160+
/// provided. For directoryServiceOptions AADDS (Entra DS authentication) or
161+
/// AADKERB (Entra authentication), this property can be omitted.
110162
/// </summary>
111163
[Newtonsoft.Json.JsonProperty(PropertyName = "samAccountName")]
112164
public string SamAccountName {get; set; }
113165

114166
/// <summary>
115-
/// Gets or sets specifies the Active Directory account type for Azure Storage. Possible values include: &#39;User&#39;, &#39;Computer&#39;
167+
/// Gets or sets specifies the Active Directory account type for Azure Storage.
168+
/// If directoryServiceOptions is set to AD (AD DS authentication), this
169+
/// property is optional. If provided, samAccountName should also be provided.
170+
/// For directoryServiceOptions AADDS (Entra DS authentication) or AADKERB
171+
/// (Entra authentication), this property can be omitted. Possible values include: &#39;User&#39;, &#39;Computer&#39;
116172
/// </summary>
117173
[Newtonsoft.Json.JsonProperty(PropertyName = "accountType")]
118174
public string AccountType {get; set; }
119-
/// <summary>
120-
/// Validate the object.
121-
/// </summary>
122-
/// <exception cref="Microsoft.Rest.ValidationException">
123-
/// Thrown if validation fails
124-
/// </exception>
125-
public virtual void Validate()
126-
{
127-
if (this.DomainName == null)
128-
{
129-
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DomainName");
130-
}
131-
if (this.DomainGuid == null)
132-
{
133-
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DomainGuid");
134-
}
135-
136-
137-
138-
139-
140-
141-
142-
143-
}
144175
}
145176
}

src/Storage/Storage.Management.Sdk/Generated/Models/AzureFilesIdentityBasedAuthentication.cs

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,27 @@ public AzureFilesIdentityBasedAuthentication()
2828
/// in the future.
2929
/// Possible values include: &#39;None&#39;, &#39;AADDS&#39;, &#39;AD&#39;, &#39;AADKERB&#39;</param>
3030

31-
/// <param name="activeDirectoryProperties">Required if directoryServiceOptions are AD, optional if they are AADKERB.
31+
/// <param name="activeDirectoryProperties">Additional information about the directory service. Required if
32+
/// directoryServiceOptions is AD (AD DS authentication). Optional for
33+
/// directoryServiceOptions AADDS (Entra DS authentication) and AADKERB (Entra
34+
/// authentication).
3235
/// </param>
3336

3437
/// <param name="defaultSharePermission">Default share permission for users using Kerberos authentication if RBAC
3538
/// role is not assigned.
3639
/// Possible values include: &#39;None&#39;, &#39;StorageFileDataSmbShareReader&#39;,
3740
/// &#39;StorageFileDataSmbShareContributor&#39;,
3841
/// &#39;StorageFileDataSmbShareElevatedContributor&#39;</param>
39-
public AzureFilesIdentityBasedAuthentication(string directoryServiceOptions, ActiveDirectoryProperties activeDirectoryProperties = default(ActiveDirectoryProperties), string defaultSharePermission = default(string))
42+
43+
/// <param name="smbOAuthSettings">Required for Managed Identities access using OAuth over SMB.
44+
/// </param>
45+
public AzureFilesIdentityBasedAuthentication(string directoryServiceOptions, ActiveDirectoryProperties activeDirectoryProperties = default(ActiveDirectoryProperties), string defaultSharePermission = default(string), SmbOAuthSettings smbOAuthSettings = default(SmbOAuthSettings))
4046

4147
{
4248
this.DirectoryServiceOptions = directoryServiceOptions;
4349
this.ActiveDirectoryProperties = activeDirectoryProperties;
4450
this.DefaultSharePermission = defaultSharePermission;
51+
this.SmbOAuthSettings = smbOAuthSettings;
4552
CustomInit();
4653
}
4754

@@ -59,8 +66,10 @@ public AzureFilesIdentityBasedAuthentication()
5966
public string DirectoryServiceOptions {get; set; }
6067

6168
/// <summary>
62-
/// Gets or sets required if directoryServiceOptions are AD, optional if they
63-
/// are AADKERB.
69+
/// Gets or sets additional information about the directory service. Required
70+
/// if directoryServiceOptions is AD (AD DS authentication). Optional for
71+
/// directoryServiceOptions AADDS (Entra DS authentication) and AADKERB (Entra
72+
/// authentication).
6473
/// </summary>
6574
[Newtonsoft.Json.JsonProperty(PropertyName = "activeDirectoryProperties")]
6675
public ActiveDirectoryProperties ActiveDirectoryProperties {get; set; }
@@ -71,6 +80,12 @@ public AzureFilesIdentityBasedAuthentication()
7180
/// </summary>
7281
[Newtonsoft.Json.JsonProperty(PropertyName = "defaultSharePermission")]
7382
public string DefaultSharePermission {get; set; }
83+
84+
/// <summary>
85+
/// Gets or sets required for Managed Identities access using OAuth over SMB.
86+
/// </summary>
87+
[Newtonsoft.Json.JsonProperty(PropertyName = "smbOAuthSettings")]
88+
public SmbOAuthSettings SmbOAuthSettings {get; set; }
7489
/// <summary>
7590
/// Validate the object.
7691
/// </summary>
@@ -84,10 +99,8 @@ public virtual void Validate()
8499
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DirectoryServiceOptions");
85100
}
86101

87-
if (this.ActiveDirectoryProperties != null)
88-
{
89-
this.ActiveDirectoryProperties.Validate();
90-
}
102+
103+
91104

92105
}
93106
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.Storage.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Dual-stack endpoint preference defines whether IPv6 endpoints are going to
12+
/// be published.
13+
/// </summary>
14+
public partial class DualStackEndpointPreference
15+
{
16+
/// <summary>
17+
/// Initializes a new instance of the DualStackEndpointPreference class.
18+
/// </summary>
19+
public DualStackEndpointPreference()
20+
{
21+
CustomInit();
22+
}
23+
24+
/// <summary>
25+
/// Initializes a new instance of the DualStackEndpointPreference class.
26+
/// </summary>
27+
28+
/// <param name="publishIpv6Endpoint">A boolean flag which indicates whether IPv6 storage endpoints are to be
29+
/// published.
30+
/// </param>
31+
public DualStackEndpointPreference(bool? publishIpv6Endpoint = default(bool?))
32+
33+
{
34+
this.PublishIpv6Endpoint = publishIpv6Endpoint;
35+
CustomInit();
36+
}
37+
38+
/// <summary>
39+
/// An initialization method that performs custom operations like setting defaults
40+
/// </summary>
41+
partial void CustomInit();
42+
43+
44+
/// <summary>
45+
/// Gets or sets a boolean flag which indicates whether IPv6 storage endpoints
46+
/// are to be published.
47+
/// </summary>
48+
[Newtonsoft.Json.JsonProperty(PropertyName = "publishIpv6Endpoint")]
49+
public bool? PublishIpv6Endpoint {get; set; }
50+
}
51+
}

0 commit comments

Comments
 (0)