diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperations.cs
index 0828097c4c9b3..6ae6e51797a34 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperations.cs
@@ -80,7 +80,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -223,7 +223,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -236,7 +236,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -715,7 +715,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -1154,7 +1154,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -1215,7 +1215,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}
}
// Deserialize Response
- if ((int)_statusCode == 201)
+ if ((int)_statusCode == 202)
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
@@ -1239,5 +1239,181 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
return _result;
}
+ ///
+ /// Describe all NetApp Accounts in a resource group
+ ///
+ ///
+ /// List and describe all NetApp accounts in the resource group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ 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/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperationsExtensions.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperationsExtensions.cs
index 7e833a215b010..b8d0557052be4 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperationsExtensions.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AccountsOperationsExtensions.cs
@@ -13,8 +13,6 @@ namespace Microsoft.Azure.Management.NetApp
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
- using System.Collections;
- using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -35,7 +33,7 @@ public static partial class AccountsOperationsExtensions
///
/// The name of the resource group.
///
- public static IEnumerable List(this IAccountsOperations operations, string resourceGroupName)
+ public static IPage List(this IAccountsOperations operations, string resourceGroupName)
{
return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult();
}
@@ -55,7 +53,7 @@ public static IEnumerable List(this IAccountsOperations operation
///
/// The cancellation token.
///
- public static async Task> ListAsync(this IAccountsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListAsync(this IAccountsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
@@ -403,5 +401,45 @@ public static NetAppAccount BeginUpdate(this IAccountsOperations operations, Net
}
}
+ ///
+ /// Describe all NetApp Accounts in a resource group
+ ///
+ ///
+ /// List and describe all NetApp accounts in the resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IAccountsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Describe all NetApp Accounts in a resource group
+ ///
+ ///
+ /// List and describe all NetApp accounts in the resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs
index 5b5a8b951dbdf..1892e0e5c6d34 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs
@@ -384,7 +384,7 @@ private void Initialize()
BackupPolicies = new BackupPoliciesOperations(this);
Vaults = new VaultsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2020-09-01";
+ ApiVersion = "2020-11-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/BackupPoliciesOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/BackupPoliciesOperations.cs
index 839fdc0a8bf4e..b24200e5350e2 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/BackupPoliciesOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/BackupPoliciesOperations.cs
@@ -688,7 +688,7 @@ internal BackupPoliciesOperations(AzureNetAppFilesManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -748,6 +748,24 @@ internal BackupPoliciesOperations(AzureNetAppFilesManagementClient client)
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _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);
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAccountsOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAccountsOperations.cs
index d8b139aeea02a..5d603460b3ed1 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAccountsOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAccountsOperations.cs
@@ -47,7 +47,7 @@ public partial interface IAccountsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Describe a NetApp Account
///
@@ -252,5 +252,30 @@ public partial interface IAccountsOperations
/// Thrown when a required parameter is null
///
Task> BeginUpdateWithHttpMessagesAsync(NetAppAccountPatch body, string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Describe all NetApp Accounts in a resource group
+ ///
+ ///
+ /// List and describe all NetApp accounts in the resource group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IPoolsOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IPoolsOperations.cs
index 7b85a24e95cfa..660c693b9e402 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IPoolsOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IPoolsOperations.cs
@@ -50,7 +50,7 @@ public partial interface IPoolsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Describe a Capacity Pool
///
@@ -276,5 +276,30 @@ public partial interface IPoolsOperations
/// Thrown when a required parameter is null
///
Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string poolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Describe all Capacity Pools
+ ///
+ ///
+ /// List all capacity pools in the NetApp Account
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/ISnapshotPoliciesOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/ISnapshotPoliciesOperations.cs
index 1a4642aa24440..548391655b5b0 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/ISnapshotPoliciesOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/ISnapshotPoliciesOperations.cs
@@ -195,6 +195,37 @@ public partial interface ISnapshotPoliciesOperations
///
Task> ListVolumesWithHttpMessagesAsync(string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Patch a snapshot policy
+ ///
+ ///
+ /// Snapshot policy object supplied in the body of the operation.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the NetApp account
+ ///
+ ///
+ /// The name of the snapshot policy target
+ ///
+ ///
+ /// 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> BeginUpdateWithHttpMessagesAsync(SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Delete snapshot policy
///
///
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/AccountEncryption.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/AccountEncryption.cs
new file mode 100644
index 0000000000000..1611dc0283194
--- /dev/null
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/AccountEncryption.cs
@@ -0,0 +1,54 @@
+//
+// 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.NetApp.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Encryption settings
+ ///
+ public partial class AccountEncryption
+ {
+ ///
+ /// Initializes a new instance of the AccountEncryption class.
+ ///
+ public AccountEncryption()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AccountEncryption class.
+ ///
+ /// Encryption Key Source. Possible values are:
+ /// 'Microsoft.NetApp'. Possible values include:
+ /// 'Microsoft.NetApp'
+ public AccountEncryption(string keySource = default(string))
+ {
+ KeySource = keySource;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets encryption Key Source. Possible values are:
+ /// 'Microsoft.NetApp'. Possible values include: 'Microsoft.NetApp'
+ ///
+ [JsonProperty(PropertyName = "keySource")]
+ public string KeySource { get; set; }
+
+ }
+}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs
index 9729d0158ea36..0536fee1c54dd 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs
@@ -74,7 +74,9 @@ public ActiveDirectory()
/// directory to be given SeSecurityPrivilege privilege (Needed for SMB
/// Continuously available shares for SQL). A list of unique usernames
/// without domain specifier
- public ActiveDirectory(string activeDirectoryId = default(string), string username = default(string), string password = default(string), string domain = default(string), string dns = default(string), string status = default(string), string statusDetails = default(string), string smbServerName = default(string), string organizationalUnit = default(string), string site = default(string), IList backupOperators = default(IList), string kdcIP = default(string), string adName = default(string), string serverRootCACertificate = default(string), bool? aesEncryption = default(bool?), bool? ldapSigning = default(bool?), IList securityOperators = default(IList))
+ /// Specifies whether or not the LDAP traffic
+ /// needs to be secured via TLS.
+ public ActiveDirectory(string activeDirectoryId = default(string), string username = default(string), string password = default(string), string domain = default(string), string dns = default(string), string status = default(string), string statusDetails = default(string), string smbServerName = default(string), string organizationalUnit = default(string), string site = default(string), IList backupOperators = default(IList), string kdcIP = default(string), string adName = default(string), string serverRootCACertificate = default(string), bool? aesEncryption = default(bool?), bool? ldapSigning = default(bool?), IList securityOperators = default(IList), bool? ldapOverTLS = default(bool?))
{
ActiveDirectoryId = activeDirectoryId;
Username = username;
@@ -93,6 +95,7 @@ public ActiveDirectory()
AesEncryption = aesEncryption;
LdapSigning = ldapSigning;
SecurityOperators = securityOperators;
+ LdapOverTLS = ldapOverTLS;
CustomInit();
}
@@ -223,6 +226,13 @@ public ActiveDirectory()
[JsonProperty(PropertyName = "securityOperators")]
public IList SecurityOperators { get; set; }
+ ///
+ /// Gets or sets specifies whether or not the LDAP traffic needs to be
+ /// secured via TLS.
+ ///
+ [JsonProperty(PropertyName = "ldapOverTLS")]
+ public bool? LdapOverTLS { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs
index 937a7c346896b..403f4d95671c7 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Backup.cs
@@ -43,7 +43,8 @@ public Backup()
/// Size of backup
/// Label for backup
/// Type of backup adhoc or scheduled
- public Backup(string location, string id = default(string), string name = default(string), string type = default(string), string backupId = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string))
+ /// Failure reason
+ public Backup(string location, string id = default(string), string name = default(string), string type = default(string), string backupId = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string), string failureReason = default(string))
{
Location = location;
Id = id;
@@ -55,6 +56,7 @@ public Backup()
Size = size;
Label = label;
BackupType = backupType;
+ FailureReason = failureReason;
CustomInit();
}
@@ -129,6 +131,12 @@ public Backup()
[JsonProperty(PropertyName = "properties.backupType")]
public string BackupType { get; private set; }
+ ///
+ /// Gets failure reason
+ ///
+ [JsonProperty(PropertyName = "properties.failureReason")]
+ public string FailureReason { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs
index 6dd59b8f57476..435a003d7d119 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/BackupPatch.cs
@@ -42,7 +42,8 @@ public BackupPatch()
/// Size of backup
/// Label for backup
/// Type of backup adhoc or scheduled
- public BackupPatch(IDictionary tags = default(IDictionary), string backupId = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string))
+ /// Failure reason
+ public BackupPatch(IDictionary tags = default(IDictionary), string backupId = default(string), System.DateTime? creationDate = default(System.DateTime?), string provisioningState = default(string), long? size = default(long?), string label = default(string), string backupType = default(string), string failureReason = default(string))
{
Tags = tags;
BackupId = backupId;
@@ -51,6 +52,7 @@ public BackupPatch()
Size = size;
Label = label;
BackupType = backupType;
+ FailureReason = failureReason;
CustomInit();
}
@@ -107,6 +109,12 @@ public BackupPatch()
[JsonProperty(PropertyName = "properties.backupType")]
public string BackupType { get; private set; }
+ ///
+ /// Gets failure reason
+ ///
+ [JsonProperty(PropertyName = "properties.failureReason")]
+ public string FailureReason { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CreatedByType.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 0000000000000..310b432cb7f3c
--- /dev/null
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CreatedByType.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.NetApp.Models
+{
+
+ ///
+ /// Defines values for CreatedByType.
+ ///
+ public static class CreatedByType
+ {
+ public const string User = "User";
+ public const string Application = "Application";
+ public const string ManagedIdentity = "ManagedIdentity";
+ public const string Key = "Key";
+ }
+}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/KeySource.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/KeySource.cs
new file mode 100644
index 0000000000000..cb0bb6fc12422
--- /dev/null
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/KeySource.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.NetApp.Models
+{
+
+ ///
+ /// Defines values for KeySource.
+ ///
+ public static class KeySource
+ {
+ ///
+ /// The service manages the keys.
+ ///
+ public const string MicrosoftNetApp = "Microsoft.NetApp";
+ }
+}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs
index 983ab192e03fc..5288875ffe445 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs
@@ -42,7 +42,10 @@ public NetAppAccount()
/// Resource tags
/// Azure lifecycle management
/// Active Directories
- public NetAppAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), IList activeDirectories = default(IList))
+ /// Encryption settings
+ /// The system meta data relating to this
+ /// resource.
+ public NetAppAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), IList activeDirectories = default(IList), AccountEncryption encryption = default(AccountEncryption), SystemData systemData = default(SystemData))
{
Location = location;
Id = id;
@@ -51,6 +54,8 @@ public NetAppAccount()
Tags = tags;
ProvisioningState = provisioningState;
ActiveDirectories = activeDirectories;
+ Encryption = encryption;
+ SystemData = systemData;
CustomInit();
}
@@ -101,6 +106,18 @@ public NetAppAccount()
[JsonProperty(PropertyName = "properties.activeDirectories")]
public IList ActiveDirectories { get; set; }
+ ///
+ /// Gets or sets encryption settings
+ ///
+ [JsonProperty(PropertyName = "properties.encryption")]
+ public AccountEncryption Encryption { get; set; }
+
+ ///
+ /// Gets the system meta data relating to this resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs
index 679bb2d01b7b5..ed422267b3854 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs
@@ -42,7 +42,8 @@ public NetAppAccountPatch()
/// Resource tags
/// Azure lifecycle management
/// Active Directories
- public NetAppAccountPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), IList activeDirectories = default(IList))
+ /// Encryption settings
+ public NetAppAccountPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), IList activeDirectories = default(IList), AccountEncryption encryption = default(AccountEncryption))
{
Location = location;
Id = id;
@@ -51,6 +52,7 @@ public NetAppAccountPatch()
Tags = tags;
ProvisioningState = provisioningState;
ActiveDirectories = activeDirectories;
+ Encryption = encryption;
CustomInit();
}
@@ -101,5 +103,11 @@ public NetAppAccountPatch()
[JsonProperty(PropertyName = "properties.activeDirectories")]
public IList ActiveDirectories { get; set; }
+ ///
+ /// Gets or sets encryption settings
+ ///
+ [JsonProperty(PropertyName = "properties.encryption")]
+ public AccountEncryption Encryption { get; set; }
+
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SystemData.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SystemData.cs
new file mode 100644
index 0000000000000..591fab09e5ab7
--- /dev/null
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SystemData.cs
@@ -0,0 +1,103 @@
+//
+// 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.NetApp.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Metadata pertaining to creation and last modification of the resource.
+ ///
+ public partial class SystemData
+ {
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ public SystemData()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SystemData class.
+ ///
+ /// The identity that created the
+ /// resource.
+ /// The type of identity that created the
+ /// resource. Possible values include: 'User', 'Application',
+ /// 'ManagedIdentity', 'Key'
+ /// The timestamp of resource creation
+ /// (UTC).
+ /// The identity that last modified the
+ /// resource.
+ /// The type of identity that last
+ /// modified the resource. Possible values include: 'User',
+ /// 'Application', 'ManagedIdentity', 'Key'
+ /// The type of identity that last
+ /// modified the resource.
+ public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?))
+ {
+ CreatedBy = createdBy;
+ CreatedByType = createdByType;
+ CreatedAt = createdAt;
+ LastModifiedBy = lastModifiedBy;
+ LastModifiedByType = lastModifiedByType;
+ LastModifiedAt = lastModifiedAt;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the identity that created the resource.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that created the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "createdByType")]
+ public string CreatedByType { get; set; }
+
+ ///
+ /// Gets or sets the timestamp of resource creation (UTC).
+ ///
+ [JsonProperty(PropertyName = "createdAt")]
+ public System.DateTime? CreatedAt { get; set; }
+
+ ///
+ /// Gets or sets the identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedBy")]
+ public string LastModifiedBy { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ /// Possible values include: 'User', 'Application', 'ManagedIdentity',
+ /// 'Key'
+ ///
+ [JsonProperty(PropertyName = "lastModifiedByType")]
+ public string LastModifiedByType { get; set; }
+
+ ///
+ /// Gets or sets the type of identity that last modified the resource.
+ ///
+ [JsonProperty(PropertyName = "lastModifiedAt")]
+ public System.DateTime? LastModifiedAt { get; set; }
+
+ }
+}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs
index a3485123b8a80..ee356bcf1160f 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs
@@ -45,6 +45,7 @@ public Volume()
/// Resource type
/// Resource tags
/// FileSystem ID
+ /// Resource name
/// serviceLevel
/// exportPolicy
/// protocolTypes
@@ -57,12 +58,13 @@ public Volume()
/// DataProtection
/// Restoring
/// If enabled (true) the volume
- /// will contain a read-only .snapshot directory which provides access
+ /// will contain a read-only snapshot directory which provides access
/// to each of the volume's snapshots (default to true).
/// Describe if a volume is
/// KerberosEnabled. To be use with swagger version 2020-05-01 or
/// later
- /// The security style of volume. Possible
+ /// The security style of volume, default
+ /// unix, defaults to ntfs for dual protocol or CIFS protocol. Possible
/// values include: 'ntfs', 'unix'
/// Enables encryption for in-flight smb3
/// data. Only applicable for SMB/DualProtocol volume. To be used with
@@ -72,7 +74,9 @@ public Volume()
/// volume
/// Maximum throughput in Mibps that can
/// be achieved by this volume
- public Volume(string location, string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string fileSystemId = default(string), string serviceLevel = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), IList protocolTypes = default(IList), string provisioningState = default(string), string snapshotId = default(string), string backupId = default(string), string baremetalTenantId = default(string), IList mountTargets = default(IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), string securityStyle = default(string), bool? smbEncryption = default(bool?), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?))
+ /// Encryption Key Source. Possible
+ /// values are: 'Microsoft.NetApp'
+ public Volume(string location, string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string fileSystemId = default(string), string name1 = default(string), string serviceLevel = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), IList protocolTypes = default(IList), string provisioningState = default(string), string snapshotId = default(string), string backupId = default(string), string baremetalTenantId = default(string), IList mountTargets = default(IList), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection), bool? isRestoring = default(bool?), bool? snapshotDirectoryVisible = default(bool?), bool? kerberosEnabled = default(bool?), string securityStyle = default(string), bool? smbEncryption = default(bool?), bool? smbContinuouslyAvailable = default(bool?), double? throughputMibps = default(double?), string encryptionKeySource = default(string))
{
Location = location;
Id = id;
@@ -80,6 +84,7 @@ public Volume()
Type = type;
Tags = tags;
FileSystemId = fileSystemId;
+ Name1 = name1;
CreationToken = creationToken;
ServiceLevel = serviceLevel;
UsageThreshold = usageThreshold;
@@ -100,6 +105,7 @@ public Volume()
SmbEncryption = smbEncryption;
SmbContinuouslyAvailable = smbContinuouslyAvailable;
ThroughputMibps = throughputMibps;
+ EncryptionKeySource = encryptionKeySource;
CustomInit();
}
@@ -147,6 +153,12 @@ public Volume()
[JsonProperty(PropertyName = "properties.fileSystemId")]
public string FileSystemId { get; private set; }
+ ///
+ /// Gets resource name
+ ///
+ [JsonProperty(PropertyName = "properties.name")]
+ public string Name1 { get; private set; }
+
///
/// Gets or sets creation Token or File Path
///
@@ -190,7 +202,7 @@ public Volume()
/// Gets or sets protocolTypes
///
///
- /// Set of protocol types
+ /// Set of protocol types, default NFSv3, CIFS fro SMB protocol
///
[JsonProperty(PropertyName = "properties.protocolTypes")]
public IList ProtocolTypes { get; set; }
@@ -236,13 +248,13 @@ public Volume()
public string SubnetId { get; set; }
///
- /// Gets or sets mountTargets
+ /// Gets mountTargets
///
///
/// List of mount targets
///
[JsonProperty(PropertyName = "properties.mountTargets")]
- public IList MountTargets { get; set; }
+ public IList MountTargets { get; private set; }
///
/// Gets or sets what type of volume is this
@@ -268,7 +280,7 @@ public Volume()
///
/// Gets or sets if enabled (true) the volume will contain a read-only
- /// .snapshot directory which provides access to each of the volume's
+ /// snapshot directory which provides access to each of the volume's
/// snapshots (default to true).
///
[JsonProperty(PropertyName = "properties.snapshotDirectoryVisible")]
@@ -282,8 +294,9 @@ public Volume()
public bool? KerberosEnabled { get; set; }
///
- /// Gets or sets the security style of volume. Possible values include:
- /// 'ntfs', 'unix'
+ /// Gets or sets the security style of volume, default unix, defaults
+ /// to ntfs for dual protocol or CIFS protocol. Possible values
+ /// include: 'ntfs', 'unix'
///
[JsonProperty(PropertyName = "properties.securityStyle")]
public string SecurityStyle { get; set; }
@@ -310,6 +323,13 @@ public Volume()
[JsonProperty(PropertyName = "properties.throughputMibps")]
public double? ThroughputMibps { get; set; }
+ ///
+ /// Gets or sets encryption Key Source. Possible values are:
+ /// 'Microsoft.NetApp'
+ ///
+ [JsonProperty(PropertyName = "properties.encryptionKeySource")]
+ public string EncryptionKeySource { get; set; }
+
///
/// Validate the object.
///
@@ -412,20 +432,17 @@ public virtual void Validate()
{
DataProtection.Validate();
}
- if (ThroughputMibps != null)
+ if (ThroughputMibps > 4500)
{
- if (ThroughputMibps > 4500)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "ThroughputMibps", 4500);
- }
- if (ThroughputMibps < 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "ThroughputMibps", 1);
- }
- if (ThroughputMibps % 0.001 != 0)
- {
- throw new ValidationException(ValidationRules.MultipleOf, "ThroughputMibps", 0.001);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "ThroughputMibps", 4500);
+ }
+ if (ThroughputMibps < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "ThroughputMibps", 0);
+ }
+ if (ThroughputMibps % 0.001 != 0)
+ {
+ throw new ValidationException(ValidationRules.MultipleOf, "ThroughputMibps", 0.001);
}
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs
index 543337bb8bec4..36aa82bfa9e0b 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs
@@ -159,20 +159,17 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "UsageThreshold", 107374182400);
}
- if (ThroughputMibps != null)
+ if (ThroughputMibps > 4500)
{
- if (ThroughputMibps > 4500)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "ThroughputMibps", 4500);
- }
- if (ThroughputMibps < 1)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "ThroughputMibps", 1);
- }
- if (ThroughputMibps % 0.001 != 0)
- {
- throw new ValidationException(ValidationRules.MultipleOf, "ThroughputMibps", 0.001);
- }
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "ThroughputMibps", 4500);
+ }
+ if (ThroughputMibps < 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "ThroughputMibps", 1);
+ }
+ if (ThroughputMibps % 0.001 != 0)
+ {
+ throw new ValidationException(ValidationRules.MultipleOf, "ThroughputMibps", 0.001);
}
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperations.cs
index 10ea029884c3f..443e654599548 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperations.cs
@@ -83,7 +83,7 @@ internal PoolsOperations(AzureNetAppFilesManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -232,7 +232,7 @@ internal PoolsOperations(AzureNetAppFilesManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -245,7 +245,7 @@ internal PoolsOperations(AzureNetAppFilesManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -781,7 +781,7 @@ internal PoolsOperations(AzureNetAppFilesManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -1335,5 +1335,181 @@ internal PoolsOperations(AzureNetAppFilesManagementClient client)
return _result;
}
+ ///
+ /// Describe all Capacity Pools
+ ///
+ ///
+ /// List all capacity pools in the NetApp Account
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ 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/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperationsExtensions.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperationsExtensions.cs
index 9f61c5dcd2cda..ec057cef5cad7 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperationsExtensions.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/PoolsOperationsExtensions.cs
@@ -13,8 +13,6 @@ namespace Microsoft.Azure.Management.NetApp
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
- using System.Collections;
- using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -38,7 +36,7 @@ public static partial class PoolsOperationsExtensions
///
/// The name of the NetApp account
///
- public static IEnumerable List(this IPoolsOperations operations, string resourceGroupName, string accountName)
+ public static IPage List(this IPoolsOperations operations, string resourceGroupName, string accountName)
{
return operations.ListAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
}
@@ -61,7 +59,7 @@ public static IEnumerable List(this IPoolsOperations operations, s
///
/// The cancellation token.
///
- public static async Task> ListAsync(this IPoolsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListAsync(this IPoolsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
{
@@ -451,5 +449,45 @@ public static void BeginDelete(this IPoolsOperations operations, string resource
(await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, poolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Describe all Capacity Pools
+ ///
+ ///
+ /// List all capacity pools in the NetApp Account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IPoolsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Describe all Capacity Pools
+ ///
+ ///
+ /// List all capacity pools in the NetApp Account
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IPoolsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs
index b26f633d54a52..1709f5000795f 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs
@@ -19,30 +19,19 @@ public static IEnumerable> ApiInfo_NetAppManagemen
{
return new Tuple[]
{
- new Tuple("NetApp", "AccountBackups", "2020-09-01"),
- new Tuple("NetApp", "Accounts", "2020-09-01"),
- new Tuple("NetApp", "BackupPolicies", "2020-09-01"),
- new Tuple("NetApp", "Backups", "2020-09-01"),
- new Tuple("NetApp", "NetAppResource", "2020-09-01"),
- new Tuple("NetApp", "Operations", "2020-09-01"),
- new Tuple("NetApp", "Pools", "2020-09-01"),
- new Tuple("NetApp", "SnapshotPolicies", "2020-09-01"),
- new Tuple("NetApp", "Snapshots", "2020-09-01"),
- new Tuple("NetApp", "Vaults", "2020-09-01"),
- new Tuple("NetApp", "Volumes", "2020-09-01"),
+ new Tuple("NetApp", "AccountBackups", "2020-11-01"),
+ new Tuple("NetApp", "Accounts", "2020-11-01"),
+ new Tuple("NetApp", "BackupPolicies", "2020-11-01"),
+ new Tuple("NetApp", "Backups", "2020-11-01"),
+ new Tuple("NetApp", "NetAppResource", "2020-11-01"),
+ new Tuple("NetApp", "Operations", "2020-11-01"),
+ new Tuple("NetApp", "Pools", "2020-11-01"),
+ new Tuple("NetApp", "SnapshotPolicies", "2020-11-01"),
+ new Tuple("NetApp", "Snapshots", "2020-11-01"),
+ new Tuple("NetApp", "Vaults", "2020-11-01"),
+ new Tuple("NetApp", "Volumes", "2020-11-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@1.9.1";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/netapp/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\audunn\\Source\\repos\\azure\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "a96054b960956791d58bd186ebe72ebabbe73410";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperations.cs
index e1afb4fdaefc6..ffe6d8088a2ab 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperations.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperations.cs
@@ -753,6 +753,59 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
/// The name of the snapshot policy target
///
///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(body, resourceGroupName, accountName, snapshotPolicyName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete snapshot policy
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the NetApp account
+ ///
+ ///
+ /// The name of the snapshot policy target
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, snapshotPolicyName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get volumes for snapshot policy
+ ///
+ ///
+ /// Get volumes associated with snapshot policy
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the NetApp account
+ ///
+ ///
+ /// The name of the snapshot policy target
+ ///
+ ///
/// Headers that will be added to request.
///
///
@@ -773,12 +826,8 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> UpdateWithHttpMessagesAsync(SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListVolumesWithHttpMessagesAsync(string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (body == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "body");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -821,16 +870,15 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("body", body);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("snapshotPolicyName", snapshotPolicyName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListVolumes", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
@@ -847,7 +895,7 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -878,12 +926,6 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
// Serialize Request
string _requestContent = null;
- if(body != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -939,7 +981,7 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -952,7 +994,7 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -972,36 +1014,11 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
}
///
- /// Delete snapshot policy
+ /// Patch a snapshot policy
///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the NetApp account
- ///
- ///
- /// The name of the snapshot policy target
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
+ ///
+ /// Snapshot policy object supplied in the body of the operation.
///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, snapshotPolicyName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Get volumes for snapshot policy
- ///
- ///
- /// Get volumes associated with snapshot policy
- ///
///
/// The name of the resource group.
///
@@ -1032,8 +1049,12 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListVolumesWithHttpMessagesAsync(string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateWithHttpMessagesAsync(SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (body == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "body");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1076,15 +1097,16 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("body", body);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("accountName", accountName);
tracingParameters.Add("snapshotPolicyName", snapshotPolicyName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListVolumes", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/listVolumes").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName));
@@ -1101,7 +1123,7 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1132,6 +1154,12 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(body != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -1152,7 +1180,7 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -1187,7 +1215,7 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1200,7 +1228,25 @@ internal SnapshotPoliciesOperations(AzureNetAppFilesManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _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);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 202)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperationsExtensions.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperationsExtensions.cs
index 9f7963971506d..9424eb40c9f38 100644
--- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperationsExtensions.cs
+++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SnapshotPoliciesOperationsExtensions.cs
@@ -308,6 +308,58 @@ public static SnapshotPolicyVolumeList ListVolumes(this ISnapshotPoliciesOperati
}
}
+ ///
+ /// Patch a snapshot policy
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Snapshot policy object supplied in the body of the operation.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the NetApp account
+ ///
+ ///
+ /// The name of the snapshot policy target
+ ///
+ public static SnapshotPolicy BeginUpdate(this ISnapshotPoliciesOperations operations, SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName)
+ {
+ return operations.BeginUpdateAsync(body, resourceGroupName, accountName, snapshotPolicyName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Patch a snapshot policy
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Snapshot policy object supplied in the body of the operation.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the NetApp account
+ ///
+ ///
+ /// The name of the snapshot policy target
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginUpdateAsync(this ISnapshotPoliciesOperations operations, SnapshotPolicyPatch body, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(body, resourceGroupName, accountName, snapshotPolicyName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Delete snapshot policy
///