diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs
index 8d392ca78997..0355a2e192b3 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperations.cs
@@ -302,9 +302,14 @@ internal FileServicesOperations(StorageManagementClient client)
/// Storage account names must be between 3 and 24 characters in length and use
/// numbers and lower-case letters only.
///
- ///
- /// The properties of file services in storage accounts, including CORS
- /// (Cross-Origin Resource Sharing) rules.
+ ///
+ /// Specifies CORS rules for the File service. You can include up to five
+ /// CorsRule elements in the request. If no CorsRule elements are included in
+ /// the request body, all CORS rules will be deleted, and CORS will be disabled
+ /// for the File service.
+ ///
+ ///
+ /// The file service properties for share soft delete.
///
///
/// Headers that will be added to request.
@@ -327,7 +332,7 @@ internal FileServicesOperations(StorageManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, FileServiceProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), DeleteRetentionPolicy shareDeleteRetentionPolicy = default(DeleteRetentionPolicy), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -385,15 +390,17 @@ internal FileServicesOperations(StorageManagementClient client)
throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
}
}
- if (parameters == null)
+ if (shareDeleteRetentionPolicy != null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ shareDeleteRetentionPolicy.Validate();
}
- if (parameters != null)
+ string fileServicesName = "default";
+ FileServiceProperties parameters = new FileServiceProperties();
+ if (cors != null || shareDeleteRetentionPolicy != null)
{
- parameters.Validate();
+ parameters.Cors = cors;
+ parameters.ShareDeleteRetentionPolicy = shareDeleteRetentionPolicy;
}
- string fileServicesName = "default";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs
index e2bfc67583a6..0a5f74d13bd2 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/FileServicesOperationsExtensions.cs
@@ -83,13 +83,18 @@ public static FileServiceItems List(this IFileServicesOperations operations, str
/// Storage account names must be between 3 and 24 characters in length and use
/// numbers and lower-case letters only.
///
- ///
- /// The properties of file services in storage accounts, including CORS
- /// (Cross-Origin Resource Sharing) rules.
+ ///
+ /// Specifies CORS rules for the File service. You can include up to five
+ /// CorsRule elements in the request. If no CorsRule elements are included in
+ /// the request body, all CORS rules will be deleted, and CORS will be disabled
+ /// for the File service.
+ ///
+ ///
+ /// The file service properties for share soft delete.
///
- public static FileServiceProperties SetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName, FileServiceProperties parameters)
+ public static FileServiceProperties SetServiceProperties(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), DeleteRetentionPolicy shareDeleteRetentionPolicy = default(DeleteRetentionPolicy))
{
- return operations.SetServicePropertiesAsync(resourceGroupName, accountName, parameters).GetAwaiter().GetResult();
+ return operations.SetServicePropertiesAsync(resourceGroupName, accountName, cors, shareDeleteRetentionPolicy).GetAwaiter().GetResult();
}
///
@@ -108,16 +113,21 @@ public static FileServiceProperties SetServiceProperties(this IFileServicesOpera
/// Storage account names must be between 3 and 24 characters in length and use
/// numbers and lower-case letters only.
///
- ///
- /// The properties of file services in storage accounts, including CORS
- /// (Cross-Origin Resource Sharing) rules.
+ ///
+ /// Specifies CORS rules for the File service. You can include up to five
+ /// CorsRule elements in the request. If no CorsRule elements are included in
+ /// the request body, all CORS rules will be deleted, and CORS will be disabled
+ /// for the File service.
+ ///
+ ///
+ /// The file service properties for share soft delete.
///
///
/// The cancellation token.
///
- public static async Task SetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, FileServiceProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task SetServicePropertiesAsync(this IFileServicesOperations operations, string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), DeleteRetentionPolicy shareDeleteRetentionPolicy = default(DeleteRetentionPolicy), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.SetServicePropertiesWithHttpMessagesAsync(resourceGroupName, accountName, cors, shareDeleteRetentionPolicy, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs
index 3a293a166317..ea32df99524a 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IFileServicesOperations.cs
@@ -64,9 +64,14 @@ public partial interface IFileServicesOperations
/// group. Storage account names must be between 3 and 24 characters in
/// length and use numbers and lower-case letters only.
///
- ///
- /// The properties of file services in storage accounts, including CORS
- /// (Cross-Origin Resource Sharing) rules.
+ ///
+ /// Specifies CORS rules for the File service. You can include up to
+ /// five CorsRule elements in the request. If no CorsRule elements are
+ /// included in the request body, all CORS rules will be deleted, and
+ /// CORS will be disabled for the File service.
+ ///
+ ///
+ /// The file service properties for share soft delete.
///
///
/// The headers that will be added to request.
@@ -83,7 +88,7 @@ public partial interface IFileServicesOperations
///
/// Thrown when a required parameter is null
///
- Task> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, FileServiceProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> SetServicePropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, CorsRules cors = default(CorsRules), DeleteRetentionPolicy shareDeleteRetentionPolicy = default(DeleteRetentionPolicy), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the properties of file services in storage accounts, including
/// CORS (Cross-Origin Resource Sharing) rules.
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs
new file mode 100644
index 000000000000..75ae3cbba22e
--- /dev/null
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/ISkusOperations.cs
@@ -0,0 +1,47 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Storage
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SkusOperations operations.
+ ///
+ public partial interface ISkusOperations
+ {
+ ///
+ /// Lists the available SKUs supported by Microsoft.Storage for given
+ /// subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs
index 2a294e860c70..6b88c061b45a 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/IStorageManagementClient.cs
@@ -84,11 +84,6 @@ public partial interface IStorageManagementClient : System.IDisposable
///
IStorageAccountsOperations StorageAccounts { get; }
- ///
- /// Gets the IDeletedAccountsOperations.
- ///
- IDeletedAccountsOperations DeletedAccounts { get; }
-
///
/// Gets the IUsagesOperations.
///
@@ -99,11 +94,6 @@ public partial interface IStorageManagementClient : System.IDisposable
///
IManagementPoliciesOperations ManagementPolicies { get; }
- ///
- /// Gets the IBlobInventoryPoliciesOperations.
- ///
- IBlobInventoryPoliciesOperations BlobInventoryPolicies { get; }
-
///
/// Gets the IPrivateEndpointConnectionsOperations.
///
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs
index 625a789c34ef..660a9cb0f0c5 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/BlobServiceProperties.cs
@@ -59,11 +59,8 @@ public BlobServiceProperties()
/// restore policy.
/// The blob service
/// properties for container soft delete.
- /// The blob service
- /// property to configure last access time based tracking
- /// policy.
/// Sku name and tier.
- public BlobServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules), string defaultServiceVersion = default(string), DeleteRetentionPolicy deleteRetentionPolicy = default(DeleteRetentionPolicy), bool? isVersioningEnabled = default(bool?), bool? automaticSnapshotPolicyEnabled = default(bool?), ChangeFeed changeFeed = default(ChangeFeed), RestorePolicyProperties restorePolicy = default(RestorePolicyProperties), DeleteRetentionPolicy containerDeleteRetentionPolicy = default(DeleteRetentionPolicy), LastAccessTimeTrackingPolicy lastAccessTimeTrackingPolicy = default(LastAccessTimeTrackingPolicy), Sku sku = default(Sku))
+ public BlobServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules), string defaultServiceVersion = default(string), DeleteRetentionPolicy deleteRetentionPolicy = default(DeleteRetentionPolicy), bool? isVersioningEnabled = default(bool?), bool? automaticSnapshotPolicyEnabled = default(bool?), ChangeFeed changeFeed = default(ChangeFeed), RestorePolicyProperties restorePolicy = default(RestorePolicyProperties), DeleteRetentionPolicy containerDeleteRetentionPolicy = default(DeleteRetentionPolicy), Sku sku = default(Sku))
: base(id, name, type)
{
Cors = cors;
@@ -74,7 +71,6 @@ public BlobServiceProperties()
ChangeFeed = changeFeed;
RestorePolicy = restorePolicy;
ContainerDeleteRetentionPolicy = containerDeleteRetentionPolicy;
- LastAccessTimeTrackingPolicy = lastAccessTimeTrackingPolicy;
Sku = sku;
CustomInit();
}
@@ -138,13 +134,6 @@ public BlobServiceProperties()
[JsonProperty(PropertyName = "properties.containerDeleteRetentionPolicy")]
public DeleteRetentionPolicy ContainerDeleteRetentionPolicy { get; set; }
- ///
- /// Gets or sets the blob service property to configure last access
- /// time based tracking policy.
- ///
- [JsonProperty(PropertyName = "properties.lastAccessTimeTrackingPolicy")]
- public LastAccessTimeTrackingPolicy LastAccessTimeTrackingPolicy { get; set; }
-
///
/// Gets sku name and tier.
///
@@ -171,10 +160,6 @@ public virtual void Validate()
{
ContainerDeleteRetentionPolicy.Validate();
}
- if (LastAccessTimeTrackingPolicy != null)
- {
- LastAccessTimeTrackingPolicy.Validate();
- }
if (Sku != null)
{
Sku.Validate();
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs
index 4826c632c9e8..82129b959d57 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DateAfterModification.cs
@@ -32,13 +32,9 @@ public DateAfterModification()
///
/// Value indicating the
/// age in days after last modification
- /// Value indicating
- /// the age in days after last blob access. This property can only be
- /// used in conjunction with last access time tracking policy
- public DateAfterModification(double? daysAfterModificationGreaterThan = default(double?), double? daysAfterLastAccessTimeGreaterThan = default(double?))
+ public DateAfterModification(double daysAfterModificationGreaterThan)
{
DaysAfterModificationGreaterThan = daysAfterModificationGreaterThan;
- DaysAfterLastAccessTimeGreaterThan = daysAfterLastAccessTimeGreaterThan;
CustomInit();
}
@@ -52,15 +48,7 @@ public DateAfterModification()
/// modification
///
[JsonProperty(PropertyName = "daysAfterModificationGreaterThan")]
- public double? DaysAfterModificationGreaterThan { get; set; }
-
- ///
- /// Gets or sets value indicating the age in days after last blob
- /// access. This property can only be used in conjunction with last
- /// access time tracking policy
- ///
- [JsonProperty(PropertyName = "daysAfterLastAccessTimeGreaterThan")]
- public double? DaysAfterLastAccessTimeGreaterThan { get; set; }
+ public double DaysAfterModificationGreaterThan { get; set; }
///
/// Validate the object.
@@ -70,27 +58,13 @@ public DateAfterModification()
///
public virtual void Validate()
{
- if (DaysAfterModificationGreaterThan != null)
+ if (DaysAfterModificationGreaterThan < 0)
{
- if (DaysAfterModificationGreaterThan < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterModificationGreaterThan", 0);
- }
- if (DaysAfterModificationGreaterThan % 1 != 0)
- {
- throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterModificationGreaterThan", 1);
- }
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterModificationGreaterThan", 0);
}
- if (DaysAfterLastAccessTimeGreaterThan != null)
+ if (DaysAfterModificationGreaterThan % 1 != 0)
{
- if (DaysAfterLastAccessTimeGreaterThan < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "DaysAfterLastAccessTimeGreaterThan", 0);
- }
- if (DaysAfterLastAccessTimeGreaterThan % 1 != 0)
- {
- throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterLastAccessTimeGreaterThan", 1);
- }
+ throw new ValidationException(ValidationRules.MultipleOf, "DaysAfterModificationGreaterThan", 1);
}
}
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs
index 26e5d6dc8208..b5f1c7ccb8c4 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/DeleteRetentionPolicy.cs
@@ -69,16 +69,13 @@ public DeleteRetentionPolicy()
///
public virtual void Validate()
{
- if (Days != null)
+ if (Days > 365)
{
- if (Days > 365)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365);
- }
- if (Days < 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365);
+ }
+ if (Days < 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1);
}
}
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ErrorResponse.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ErrorResponse.cs
index ca76cd7d53df..edfd44dfac6a 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ErrorResponse.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ErrorResponse.cs
@@ -29,11 +29,14 @@ public ErrorResponse()
///
/// Initializes a new instance of the ErrorResponse class.
///
- /// Azure Storage Resource Provider error response
- /// body.
- public ErrorResponse(ErrorResponseBody error = default(ErrorResponseBody))
+ /// An identifier for the error. Codes are invariant
+ /// and are intended to be consumed programmatically.
+ /// A message describing the error, intended to
+ /// be suitable for display in a user interface.
+ public ErrorResponse(string code = default(string), string message = default(string))
{
- Error = error;
+ Code = code;
+ Message = message;
CustomInit();
}
@@ -43,10 +46,18 @@ public ErrorResponse()
partial void CustomInit();
///
- /// Gets or sets azure Storage Resource Provider error response body.
+ /// Gets or sets an identifier for the error. Codes are invariant and
+ /// are intended to be consumed programmatically.
///
- [JsonProperty(PropertyName = "error")]
- public ErrorResponseBody Error { get; set; }
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets a message describing the error, intended to be
+ /// suitable for display in a user interface.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
}
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs
index 5fcfff6f79c4..0a826e11050b 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileServiceProperties.cs
@@ -45,15 +45,12 @@ public FileServiceProperties()
/// service.
/// The file service
/// properties for share soft delete.
- /// Protocol settings for file
- /// service
/// Sku name and tier.
- public FileServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules), DeleteRetentionPolicy shareDeleteRetentionPolicy = default(DeleteRetentionPolicy), ProtocolSettings protocolSettings = default(ProtocolSettings), Sku sku = default(Sku))
+ public FileServiceProperties(string id = default(string), string name = default(string), string type = default(string), CorsRules cors = default(CorsRules), DeleteRetentionPolicy shareDeleteRetentionPolicy = default(DeleteRetentionPolicy), Sku sku = default(Sku))
: base(id, name, type)
{
Cors = cors;
ShareDeleteRetentionPolicy = shareDeleteRetentionPolicy;
- ProtocolSettings = protocolSettings;
Sku = sku;
CustomInit();
}
@@ -78,12 +75,6 @@ public FileServiceProperties()
[JsonProperty(PropertyName = "properties.shareDeleteRetentionPolicy")]
public DeleteRetentionPolicy ShareDeleteRetentionPolicy { get; set; }
- ///
- /// Gets or sets protocol settings for file service
- ///
- [JsonProperty(PropertyName = "properties.protocolSettings")]
- public ProtocolSettings ProtocolSettings { get; set; }
-
///
/// Gets sku name and tier.
///
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs
index 3b60c08465b2..a6bc9685641b 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShare.cs
@@ -195,16 +195,13 @@ public FileShare()
///
public virtual void Validate()
{
- if (ShareQuota != null)
+ if (ShareQuota > 102400)
{
- if (ShareQuota > 102400)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400);
- }
- if (ShareQuota < 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400);
+ }
+ if (ShareQuota < 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1);
}
}
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs
index 1c900fe1caa0..eb0cd4a987c5 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/FileShareItem.cs
@@ -194,16 +194,13 @@ public FileShareItem()
///
public virtual void Validate()
{
- if (ShareQuota != null)
+ if (ShareQuota > 102400)
{
- if (ShareQuota > 102400)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400);
- }
- if (ShareQuota < 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "ShareQuota", 102400);
+ }
+ if (ShareQuota < 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "ShareQuota", 1);
}
}
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs
new file mode 100644
index 000000000000..a9476975d9fb
--- /dev/null
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/IPRule.cs
@@ -0,0 +1,77 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Storage.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// IP rule with specific IP or IP range in CIDR format.
+ ///
+ public partial class IPRule
+ {
+ ///
+ /// Initializes a new instance of the IPRule class.
+ ///
+ public IPRule()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the IPRule class.
+ ///
+ /// Specifies the IP or IP range in CIDR
+ /// format. Only IPV4 address is allowed.
+ /// The action of IP ACL rule. Possible values
+ /// include: 'Allow'
+ public IPRule(string iPAddressOrRange, Action? action = default(Action?))
+ {
+ IPAddressOrRange = iPAddressOrRange;
+ Action = action;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets specifies the IP or IP range in CIDR format. Only IPV4
+ /// address is allowed.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public string IPAddressOrRange { get; set; }
+
+ ///
+ /// Gets or sets the action of IP ACL rule. Possible values include:
+ /// 'Allow'
+ ///
+ [JsonProperty(PropertyName = "action")]
+ public Action? Action { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (IPAddressOrRange == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "IPAddressOrRange");
+ }
+ }
+ }
+}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs
index 26ffafe82985..eb236e99b007 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/ManagementPolicyBaseBlob.cs
@@ -34,16 +34,11 @@ public ManagementPolicyBaseBlob()
/// The function to tier blobs to archive
/// storage. Support blobs currently at Hot or Cool tier
/// The function to delete the blob
- /// This property enables
- /// auto tiering of a blob from cool to hot on a blob access. This
- /// property requires
- /// tierToCool.daysAfterLastAccessTimeGreaterThan.
- public ManagementPolicyBaseBlob(DateAfterModification tierToCool = default(DateAfterModification), DateAfterModification tierToArchive = default(DateAfterModification), DateAfterModification delete = default(DateAfterModification), bool? enableAutoTierToHotFromCool = default(bool?))
+ public ManagementPolicyBaseBlob(DateAfterModification tierToCool = default(DateAfterModification), DateAfterModification tierToArchive = default(DateAfterModification), DateAfterModification delete = default(DateAfterModification))
{
TierToCool = tierToCool;
TierToArchive = tierToArchive;
Delete = delete;
- EnableAutoTierToHotFromCool = enableAutoTierToHotFromCool;
CustomInit();
}
@@ -72,14 +67,6 @@ public ManagementPolicyBaseBlob()
[JsonProperty(PropertyName = "delete")]
public DateAfterModification Delete { get; set; }
- ///
- /// Gets or sets this property enables auto tiering of a blob from cool
- /// to hot on a blob access. This property requires
- /// tierToCool.daysAfterLastAccessTimeGreaterThan.
- ///
- [JsonProperty(PropertyName = "enableAutoTierToHotFromCool")]
- public bool? EnableAutoTierToHotFromCool { get; set; }
-
///
/// Validate the object.
///
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/NetworkRuleSet.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/NetworkRuleSet.cs
index 375c84dad2ef..591263f534a3 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/NetworkRuleSet.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/NetworkRuleSet.cs
@@ -42,10 +42,9 @@ public NetworkRuleSet()
/// Sets the virtual network
/// rules
/// Sets the IP ACL rules
- public NetworkRuleSet(DefaultAction defaultAction, string bypass = default(string), IList resourceAccessRules = default(IList), IList virtualNetworkRules = default(IList), IList ipRules = default(IList))
+ public NetworkRuleSet(DefaultAction defaultAction, string bypass = default(string), IList virtualNetworkRules = default(IList), IList ipRules = default(IList))
{
Bypass = bypass;
- ResourceAccessRules = resourceAccessRules;
VirtualNetworkRules = virtualNetworkRules;
IpRules = ipRules;
DefaultAction = defaultAction;
@@ -67,11 +66,6 @@ public NetworkRuleSet()
[JsonProperty(PropertyName = "bypass")]
public string Bypass { get; set; }
- ///
- ///
- [JsonProperty(PropertyName = "resourceAccessRules")]
- public IList ResourceAccessRules { get; set; }
-
///
/// Gets or sets sets the virtual network rules
///
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs
index 8f6eef161321..55a39da16715 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/RestorePolicyProperties.cs
@@ -86,16 +86,13 @@ public RestorePolicyProperties()
///
public virtual void Validate()
{
- if (Days != null)
+ if (Days > 365)
{
- if (Days > 365)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365);
- }
- if (Days < 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "Days", 365);
+ }
+ if (Days < 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "Days", 1);
}
}
}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs
new file mode 100644
index 000000000000..a4bb9ebc3fde
--- /dev/null
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/SignedResource.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Storage.Models
+{
+
+ ///
+ /// Defines values for SignedResource.
+ ///
+ public static class SignedResource
+ {
+ public const string B = "b";
+ public const string C = "c";
+ public const string F = "f";
+ public const string S = "s";
+ }
+}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs
index fb6134fc77a8..7afd5a2444a7 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs
@@ -48,8 +48,6 @@ public StorageAccount()
/// 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage',
/// 'BlockBlobStorage'
/// The identity of the resource.
- /// The extendedLocation of the
- /// resource.
/// Gets the status of the storage
/// account at the time the operation was called. Possible values
/// include: 'Creating', 'ResolvingDNS', 'Succeeded'
@@ -114,13 +112,12 @@ public StorageAccount()
/// permitted on requests to storage. The default interpretation is TLS
/// 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1',
/// 'TLS1_2'
- public StorageAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string kind = default(string), Identity identity = default(Identity), ExtendedLocation extendedLocation = default(ExtendedLocation), ProvisioningState? provisioningState = default(ProvisioningState?), Endpoints primaryEndpoints = default(Endpoints), string primaryLocation = default(string), AccountStatus? statusOfPrimary = default(AccountStatus?), System.DateTime? lastGeoFailoverTime = default(System.DateTime?), string secondaryLocation = default(string), AccountStatus? statusOfSecondary = default(AccountStatus?), System.DateTime? creationTime = default(System.DateTime?), CustomDomain customDomain = default(CustomDomain), Endpoints secondaryEndpoints = default(Endpoints), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default(AzureFilesIdentityBasedAuthentication), bool? enableHttpsTrafficOnly = default(bool?), NetworkRuleSet networkRuleSet = default(NetworkRuleSet), bool? isHnsEnabled = default(bool?), GeoReplicationStats geoReplicationStats = default(GeoReplicationStats), bool? failoverInProgress = default(bool?), string largeFileSharesState = default(string), IList privateEndpointConnections = default(IList), RoutingPreference routingPreference = default(RoutingPreference), BlobRestoreStatus blobRestoreStatus = default(BlobRestoreStatus), bool? allowBlobPublicAccess = default(bool?), string minimumTlsVersion = default(string))
+ public StorageAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string kind = default(string), Identity identity = default(Identity), ProvisioningState? provisioningState = default(ProvisioningState?), Endpoints primaryEndpoints = default(Endpoints), string primaryLocation = default(string), AccountStatus? statusOfPrimary = default(AccountStatus?), System.DateTime? lastGeoFailoverTime = default(System.DateTime?), string secondaryLocation = default(string), AccountStatus? statusOfSecondary = default(AccountStatus?), System.DateTime? creationTime = default(System.DateTime?), CustomDomain customDomain = default(CustomDomain), Endpoints secondaryEndpoints = default(Endpoints), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default(AzureFilesIdentityBasedAuthentication), bool? enableHttpsTrafficOnly = default(bool?), NetworkRuleSet networkRuleSet = default(NetworkRuleSet), bool? isHnsEnabled = default(bool?), GeoReplicationStats geoReplicationStats = default(GeoReplicationStats), bool? failoverInProgress = default(bool?), string largeFileSharesState = default(string), IList privateEndpointConnections = default(IList), RoutingPreference routingPreference = default(RoutingPreference), BlobRestoreStatus blobRestoreStatus = default(BlobRestoreStatus), bool? allowBlobPublicAccess = default(bool?), string minimumTlsVersion = default(string))
: base(location, id, name, type, tags)
{
Sku = sku;
Kind = kind;
Identity = identity;
- ExtendedLocation = extendedLocation;
ProvisioningState = provisioningState;
PrimaryEndpoints = primaryEndpoints;
PrimaryLocation = primaryLocation;
@@ -172,12 +169,6 @@ public StorageAccount()
[JsonProperty(PropertyName = "identity")]
public Identity Identity { get; set; }
- ///
- /// Gets or sets the extendedLocation of the resource.
- ///
- [JsonProperty(PropertyName = "extendedLocation")]
- public ExtendedLocation ExtendedLocation { get; set; }
-
///
/// Gets the status of the storage account at the time the operation
/// was called. Possible values include: 'Creating', 'ResolvingDNS',
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccountCreateParameters.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccountCreateParameters.cs
index b799ead480a4..623f537b28b6 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccountCreateParameters.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccountCreateParameters.cs
@@ -46,10 +46,6 @@ public StorageAccountCreateParameters()
/// region of a resource cannot be changed once it is created, but if
/// an identical geo region is specified on update, the request will
/// succeed.
- /// Optional. Set the extended location
- /// of the resource. If not set, the storage account will be created in
- /// Azure main region. Otherwise it will be created in the specified
- /// extended location
/// Gets or sets a list of key value pairs that
/// describe the resource. These tags can be used for viewing and
/// grouping this resource (across resource groups). A maximum of 15
@@ -87,12 +83,11 @@ public StorageAccountCreateParameters()
/// permitted on requests to storage. The default interpretation is TLS
/// 1.0 for this property. Possible values include: 'TLS1_0', 'TLS1_1',
/// 'TLS1_2'
- public StorageAccountCreateParameters(Sku sku, string kind, string location, ExtendedLocation extendedLocation = default(ExtendedLocation), IDictionary tags = default(IDictionary), Identity identity = default(Identity), CustomDomain customDomain = default(CustomDomain), Encryption encryption = default(Encryption), NetworkRuleSet networkRuleSet = default(NetworkRuleSet), AccessTier? accessTier = default(AccessTier?), AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default(AzureFilesIdentityBasedAuthentication), bool? enableHttpsTrafficOnly = default(bool?), bool? isHnsEnabled = default(bool?), string largeFileSharesState = default(string), RoutingPreference routingPreference = default(RoutingPreference), bool? allowBlobPublicAccess = default(bool?), string minimumTlsVersion = default(string))
+ public StorageAccountCreateParameters(Sku sku, string kind, string location, IDictionary tags = default(IDictionary), Identity identity = default(Identity), CustomDomain customDomain = default(CustomDomain), Encryption encryption = default(Encryption), NetworkRuleSet networkRuleSet = default(NetworkRuleSet), AccessTier? accessTier = default(AccessTier?), AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default(AzureFilesIdentityBasedAuthentication), bool? enableHttpsTrafficOnly = default(bool?), bool? isHnsEnabled = default(bool?), string largeFileSharesState = default(string), RoutingPreference routingPreference = default(RoutingPreference), bool? allowBlobPublicAccess = default(bool?), string minimumTlsVersion = default(string))
{
Sku = sku;
Kind = kind;
Location = location;
- ExtendedLocation = extendedLocation;
Tags = tags;
Identity = identity;
CustomDomain = customDomain;
@@ -138,15 +133,6 @@ public StorageAccountCreateParameters()
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }
- ///
- /// Gets or sets optional. Set the extended location of the resource.
- /// If not set, the storage account will be created in Azure main
- /// region. Otherwise it will be created in the specified extended
- /// location
- ///
- [JsonProperty(PropertyName = "extendedLocation")]
- public ExtendedLocation ExtendedLocation { get; set; }
-
///
/// Gets or sets a list of key value pairs that describe the resource.
/// These tags can be used for viewing and grouping this resource
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs
index 502cf3d0aead..37b048624d8c 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs
@@ -19,38 +19,25 @@ public static IEnumerable> ApiInfo_StorageManageme
{
return new Tuple[]
{
- new Tuple("Storage", "BlobContainers", "2020-08-01-preview"),
- new Tuple("Storage", "BlobInventoryPolicies", "2020-08-01-preview"),
- new Tuple("Storage", "BlobServices", "2020-08-01-preview"),
- new Tuple("Storage", "DeletedAccounts", "2020-08-01-preview"),
- new Tuple("Storage", "EncryptionScopes", "2020-08-01-preview"),
- new Tuple("Storage", "FileServices", "2020-08-01-preview"),
- new Tuple("Storage", "FileShares", "2020-08-01-preview"),
- new Tuple("Storage", "ManagementPolicies", "2020-08-01-preview"),
- new Tuple("Storage", "ObjectReplicationPolicies", "2020-08-01-preview"),
- new Tuple("Storage", "Operations", "2020-08-01-preview"),
- new Tuple("Storage", "PrivateEndpointConnections", "2020-08-01-preview"),
- new Tuple("Storage", "PrivateLinkResources", "2020-08-01-preview"),
- new Tuple("Storage", "Queue", "2020-08-01-preview"),
- new Tuple("Storage", "QueueServices", "2020-08-01-preview"),
- new Tuple("Storage", "Skus", "2020-08-01-preview"),
- new Tuple("Storage", "StorageAccounts", "2020-08-01-preview"),
- new Tuple("Storage", "Table", "2020-08-01-preview"),
- new Tuple("Storage", "TableServices", "2020-08-01-preview"),
- new Tuple("Storage", "Usages", "2020-08-01-preview"),
+ new Tuple("Storage", "BlobContainers", "2019-06-01"),
+ new Tuple("Storage", "BlobServices", "2019-06-01"),
+ new Tuple("Storage", "EncryptionScopes", "2019-06-01"),
+ new Tuple("Storage", "FileServices", "2019-06-01"),
+ new Tuple("Storage", "FileShares", "2019-06-01"),
+ new Tuple("Storage", "ManagementPolicies", "2019-06-01"),
+ new Tuple("Storage", "ObjectReplicationPolicies", "2019-06-01"),
+ new Tuple("Storage", "Operations", "2019-06-01"),
+ new Tuple("Storage", "PrivateEndpointConnections", "2019-06-01"),
+ new Tuple("Storage", "PrivateLinkResources", "2019-06-01"),
+ new Tuple("Storage", "Queue", "2019-06-01"),
+ new Tuple("Storage", "QueueServices", "2019-06-01"),
+ new Tuple("Storage", "Skus", "2019-06-01"),
+ new Tuple("Storage", "StorageAccounts", "2019-06-01"),
+ new Tuple("Storage", "Table", "2019-06-01"),
+ new Tuple("Storage", "TableServices", "2019-06-01"),
+ new Tuple("Storage", "Usages", "2019-06-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-08-preview --csharp.output-folder=C:\\code\\srpsdk\\sdk\\storage\\Microsoft.Azure.Management.Storage\\src\\Generated";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "f11c7e7c36e28ca3b0d575cc4241c1e2a4099caa";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs
new file mode 100644
index 000000000000..5801c756c9aa
--- /dev/null
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperations.cs
@@ -0,0 +1,247 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Storage
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SkusOperations operations.
+ ///
+ internal partial class SkusOperations : IServiceOperations, ISkusOperations
+ {
+ ///
+ /// Initializes a new instance of the SkusOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal SkusOperations(StorageManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the StorageManagementClient
+ ///
+ public StorageManagementClient Client { get; private set; }
+
+ ///
+ /// Lists the available SKUs supported by Microsoft.Storage for given
+ /// subscription.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs
new file mode 100644
index 000000000000..dd57fc389b59
--- /dev/null
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SkusOperationsExtensions.cs
@@ -0,0 +1,57 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Storage
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for SkusOperations.
+ ///
+ public static partial class SkusOperationsExtensions
+ {
+ ///
+ /// Lists the available SKUs supported by Microsoft.Storage for given
+ /// subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IEnumerable List(this ISkusOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists the available SKUs supported by Microsoft.Storage for given
+ /// subscription.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ISkusOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs
index bd1d93c50e91..281fdd676830 100644
--- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs
+++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/StorageManagementClient.cs
@@ -89,11 +89,6 @@ public partial class StorageManagementClient : ServiceClient
public virtual IStorageAccountsOperations StorageAccounts { get; private set; }
- ///
- /// Gets the IDeletedAccountsOperations.
- ///
- public virtual IDeletedAccountsOperations DeletedAccounts { get; private set; }
-
///
/// Gets the IUsagesOperations.
///
@@ -104,11 +99,6 @@ public partial class StorageManagementClient : ServiceClient
public virtual IManagementPoliciesOperations ManagementPolicies { get; private set; }
- ///
- /// Gets the IBlobInventoryPoliciesOperations.
- ///
- public virtual IBlobInventoryPoliciesOperations BlobInventoryPolicies { get; private set; }
-
///
/// Gets the IPrivateEndpointConnectionsOperations.
///
@@ -413,10 +403,8 @@ private void Initialize()
Operations = new Operations(this);
Skus = new SkusOperations(this);
StorageAccounts = new StorageAccountsOperations(this);
- DeletedAccounts = new DeletedAccountsOperations(this);
Usages = new UsagesOperations(this);
ManagementPolicies = new ManagementPoliciesOperations(this);
- BlobInventoryPolicies = new BlobInventoryPoliciesOperations(this);
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
ObjectReplicationPolicies = new ObjectReplicationPoliciesOperations(this);
@@ -430,7 +418,7 @@ private void Initialize()
TableServices = new TableServicesOperations(this);
Table = new TableOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2020-08-01-preview";
+ ApiVersion = "2019-06-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;