diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs
index 32083e4e98f4..b69c35c9432b 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs
@@ -62,7 +62,7 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -102,7 +102,7 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default").ToString();
_url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
@@ -170,14 +170,13 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -187,10 +186,6 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client)
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs
index fe73bc75cfda..ff217fd285fc 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs
@@ -84,7 +84,7 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginGetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginGetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (vaultName == null)
{
@@ -102,7 +102,7 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2020-07-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -217,7 +217,7 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien
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"))
@@ -230,7 +230,7 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien
_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)
{
@@ -249,9 +249,5 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien
return _result;
}
- public Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- throw new System.NotImplementedException();
- }
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs
index cc0e15fe3355..542062e61890 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs
@@ -56,13 +56,16 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
///
/// Azure region to hit Api
///
+ ///
+ /// CRR Job request
+ ///
///
/// Headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -77,7 +80,7 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string azureRegion, CrrJobRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (azureRegion == null)
{
@@ -87,6 +90,10 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
string apiVersion = "2018-12-20";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -97,12 +104,13 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("azureRegion", azureRegion);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob").ToString();
_url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
@@ -148,6 +156,12 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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)
{
@@ -170,14 +184,13 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -187,10 +200,6 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperationsExtensions.cs
index 013853a5fc6a..0813fdd5cacd 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperationsExtensions.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperationsExtensions.cs
@@ -30,9 +30,12 @@ public static partial class BackupCrrJobDetailsOperationsExtensions
///
/// Azure region to hit Api
///
- public static JobResource Get(this IBackupCrrJobDetailsOperations operations, string azureRegion)
+ ///
+ /// CRR Job request
+ ///
+ public static JobResource Get(this IBackupCrrJobDetailsOperations operations, string azureRegion, CrrJobRequest parameters)
{
- return operations.GetAsync(azureRegion).GetAwaiter().GetResult();
+ return operations.GetAsync(azureRegion, parameters).GetAwaiter().GetResult();
}
///
@@ -44,12 +47,15 @@ public static JobResource Get(this IBackupCrrJobDetailsOperations operations, st
///
/// Azure region to hit Api
///
+ ///
+ /// CRR Job request
+ ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IBackupCrrJobDetailsOperations operations, string azureRegion, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IBackupCrrJobDetailsOperations operations, string azureRegion, CrrJobRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs
index 4871cc1fa79a..496418b1e088 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -56,13 +57,22 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
///
/// Azure region to hit Api
///
+ ///
+ /// Backup CRR Job request
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// skipToken Filter.
+ ///
///
/// Headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -77,7 +87,7 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListWithHttpMessagesAsync(string azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListWithHttpMessagesAsync(string azureRegion, CrrJobRequest parameters, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (azureRegion == null)
{
@@ -87,6 +97,10 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
string apiVersion = "2018-12-20";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -95,21 +109,36 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("azureRegion", azureRegion);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("skipToken", skipToken);
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.RecoveryServices/locations/{azureRegion}/backupCrrJobs").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs").ToString();
_url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
+ if (skipToken != null)
+ {
+ _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
+ }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -148,6 +177,12 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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)
{
@@ -170,14 +205,13 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -187,10 +221,6 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
}
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);
@@ -247,7 +277,7 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -343,14 +373,13 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -360,10 +389,6 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperationsExtensions.cs
index 94ce0e56e93b..feb193b9c9d8 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperationsExtensions.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperationsExtensions.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Threading;
using System.Threading.Tasks;
@@ -30,9 +31,18 @@ public static partial class BackupCrrJobsOperationsExtensions
///
/// Azure region to hit Api
///
- public static IPage List(this IBackupCrrJobsOperations operations, string azureRegion)
+ ///
+ /// Backup CRR Job request
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// skipToken Filter.
+ ///
+ public static IPage List(this IBackupCrrJobsOperations operations, string azureRegion, CrrJobRequest parameters, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string))
{
- return operations.ListAsync(azureRegion).GetAwaiter().GetResult();
+ return operations.ListAsync(azureRegion, parameters, odataQuery, skipToken).GetAwaiter().GetResult();
}
///
@@ -44,12 +54,21 @@ public static IPage List(this IBackupCrrJobsOperations operations,
///
/// Azure region to hit Api
///
+ ///
+ /// Backup CRR Job request
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// skipToken Filter.
+ ///
///
/// The cancellation token.
///
- public static async Task> ListAsync(this IBackupCrrJobsOperations operations, string azureRegion, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListAsync(this IBackupCrrJobsOperations operations, string azureRegion, CrrJobRequest parameters, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ListWithHttpMessagesAsync(azureRegion, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ListWithHttpMessagesAsync(azureRegion, parameters, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs
index 06c770b41da0..04ca42be2e5b 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs
@@ -103,7 +103,7 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -325,7 +325,7 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "backupEngineName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs
index 9cc256295fa6..e215f7567b06 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs
@@ -102,7 +102,7 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs
index 5eda20a020c9..7672acbad23c 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs
@@ -105,7 +105,7 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs
index d34b825689b2..5636f5992eba 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs
@@ -107,7 +107,7 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs
index a738da6e2520..3f798517d82a 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs
@@ -101,7 +101,7 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs
index fd58164db011..1a6c86846ed1 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs
@@ -104,7 +104,7 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs
index c9bbf7121226..dac24d06de2a 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs
@@ -73,7 +73,7 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -120,7 +120,7 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -201,14 +201,13 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -218,10 +217,6 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
}
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);
@@ -278,7 +273,7 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -374,14 +369,13 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -391,10 +385,6 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs
index 37600d30c5d2..f22b07b5dba4 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs
@@ -102,7 +102,7 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs
index ee0f4f459218..a8b6494cb205 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs
@@ -99,7 +99,7 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs
new file mode 100644
index 000000000000..b864c1d2d5d4
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs
@@ -0,0 +1,427 @@
+//
+// 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.RecoveryServices.Backup
+{
+ 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;
+
+ ///
+ /// BackupResourceEncryptionConfigsOperations operations.
+ ///
+ internal partial class BackupResourceEncryptionConfigsOperations : IServiceOperations, IBackupResourceEncryptionConfigsOperations
+ {
+ ///
+ /// Initializes a new instance of the BackupResourceEncryptionConfigsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesBackupClient
+ ///
+ public RecoveryServicesBackupClient Client { get; private set; }
+
+ ///
+ /// Fetches Vault Encryption config.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ string apiVersion = "2020-10-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", 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.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig").ToString();
+ _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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;
+ }
+
+ ///
+ /// Updates Vault encryption config.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Vault encryption input config request
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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 UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ string apiVersion = "2020-10-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", 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.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig").ToString();
+ _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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("PUT");
+ _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;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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)
+ {
+ 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);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs
new file mode 100644
index 000000000000..305ec99c106b
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs
@@ -0,0 +1,112 @@
+//
+// 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.RecoveryServices.Backup
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for BackupResourceEncryptionConfigsOperations.
+ ///
+ public static partial class BackupResourceEncryptionConfigsOperationsExtensions
+ {
+ ///
+ /// Fetches Vault Encryption config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ public static BackupResourceEncryptionConfigResource Get(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName)
+ {
+ return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Fetches Vault Encryption config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates Vault encryption config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Vault encryption input config request
+ ///
+ public static void Update(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters)
+ {
+ operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates Vault encryption config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Vault encryption input config request
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsOperations.cs
index 0b11f5c29b3e..7a3a3186fd2d 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsOperations.cs
@@ -66,7 +66,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -95,7 +95,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2018-12-20";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -111,7 +111,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -180,14 +180,13 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -197,10 +196,6 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
}
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);
@@ -264,7 +259,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -297,7 +292,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2018-12-20";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -314,7 +309,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -389,14 +384,13 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -406,10 +400,6 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
}
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);
@@ -473,7 +463,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -503,7 +493,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2018-12-20";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -520,7 +510,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -595,14 +585,13 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
string _responseContent = null;
if ((int)_statusCode != 204)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -612,10 +601,6 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs
index 1571455e752c..9473f331672b 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs
@@ -66,7 +66,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -95,7 +95,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -111,7 +111,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -180,14 +180,13 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -197,10 +196,6 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
}
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);
@@ -264,7 +259,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -297,7 +292,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -314,7 +309,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -389,14 +384,13 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -406,10 +400,6 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
}
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);
@@ -473,7 +463,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -506,7 +496,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -523,7 +513,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -598,11 +588,11 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex.Body = _errorBody;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs
index 24c163698ea9..4ff32fb6d9a9 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs
@@ -118,7 +118,7 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "containerName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs
index 0679434dc5b9..2da77107cbb8 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs
@@ -122,7 +122,7 @@ internal BackupsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs
index 1d0cb6b6e7d5..799720e9a207 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs
@@ -66,7 +66,7 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- public async Task TriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(azureRegion, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
@@ -89,7 +89,7 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -101,7 +101,7 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (azureRegion == null)
{
@@ -131,7 +131,7 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore").ToString();
_url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
@@ -203,16 +203,15 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -222,10 +221,6 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs
index 683c9230e807..50eb086026ae 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs
@@ -34,7 +34,7 @@ public static partial class CrossRegionRestoreOperationsExtensions
///
/// resource cross region restore request
///
- public static void Trigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters)
+ public static void Trigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequest parameters)
{
operations.TriggerAsync(azureRegion, parameters).GetAwaiter().GetResult();
}
@@ -55,7 +55,7 @@ public static void Trigger(this ICrossRegionRestoreOperations operations, string
///
/// The cancellation token.
///
- public static async Task TriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task TriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.TriggerWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
@@ -73,7 +73,7 @@ public static void Trigger(this ICrossRegionRestoreOperations operations, string
///
/// resource cross region restore request
///
- public static void BeginTrigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters)
+ public static void BeginTrigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequest parameters)
{
operations.BeginTriggerAsync(azureRegion, parameters).GetAwaiter().GetResult();
}
@@ -94,7 +94,7 @@ public static void BeginTrigger(this ICrossRegionRestoreOperations operations, s
///
/// The cancellation token.
///
- public static async Task BeginTriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginTriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.BeginTriggerWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs
index bb90e8548a59..3e030d7b4384 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs
@@ -62,7 +62,7 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -104,7 +104,7 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}").ToString();
_url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId));
@@ -173,14 +173,13 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -190,10 +189,6 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client)
}
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);
@@ -220,9 +215,5 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client)
return _result;
}
- public Task GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- throw new System.NotImplementedException();
- }
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs
index d4fb30bab8bd..566e5b8bc387 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs
@@ -61,7 +61,7 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -106,7 +106,7 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}").ToString();
_url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId));
@@ -175,14 +175,13 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -192,10 +191,6 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client)
}
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);
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs
index 68bf8a28c18f..9cb7be95e1f3 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs
@@ -105,7 +105,7 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs
index cdcbca94439b..72e09b07f0d0 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs
@@ -35,7 +35,7 @@ public partial interface IAadPropertiesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBMSPrepareDataMoveOperationResultOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBMSPrepareDataMoveOperationResultOperations.cs
index aab1f1057495..597163fcedb4 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBMSPrepareDataMoveOperationResultOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBMSPrepareDataMoveOperationResultOperations.cs
@@ -50,7 +50,7 @@ public partial interface IBMSPrepareDataMoveOperationResultOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Fetches Operation Result for Prepare Data Move
///
@@ -78,6 +78,6 @@ public partial interface IBMSPrepareDataMoveOperationResultOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginGetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginGetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs
index 295d0d06cb28..eab34e0e0592 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs
@@ -29,13 +29,16 @@ public partial interface IBackupCrrJobDetailsOperations
///
/// Azure region to hit Api
///
+ ///
+ /// CRR Job request
+ ///
///
/// The headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -44,6 +47,6 @@ public partial interface IBackupCrrJobDetailsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string azureRegion, CrrJobRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs
index 5f863605342d..877d6dd9cc46 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -29,13 +30,22 @@ public partial interface IBackupCrrJobsOperations
///
/// Azure region to hit Api
///
+ ///
+ /// Backup CRR Job request
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// skipToken Filter.
+ ///
///
/// The headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -44,7 +54,7 @@ public partial interface IBackupCrrJobsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListWithHttpMessagesAsync(string azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListWithHttpMessagesAsync(string azureRegion, CrrJobRequest parameters, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the list of CRR jobs from the target region.
///
@@ -57,7 +67,7 @@ public partial interface IBackupCrrJobsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs
index 7265c495f237..f2bcaa778349 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs
@@ -47,7 +47,7 @@ public partial interface IBackupProtectedItemsCrrOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -70,7 +70,7 @@ public partial interface IBackupProtectedItemsCrrOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceEncryptionConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceEncryptionConfigsOperations.cs
new file mode 100644
index 000000000000..82b3e54592a0
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceEncryptionConfigsOperations.cs
@@ -0,0 +1,79 @@
+//
+// 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.RecoveryServices.Backup
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// BackupResourceEncryptionConfigsOperations operations.
+ ///
+ public partial interface IBackupResourceEncryptionConfigsOperations
+ {
+ ///
+ /// Fetches Vault Encryption config.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// 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> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates Vault encryption config.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Vault encryption input config request
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsOperations.cs
index b9c63dd228a7..b86eb5435ed6 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsOperations.cs
@@ -39,7 +39,7 @@ public partial interface IBackupResourceStorageConfigsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -68,7 +68,7 @@ public partial interface IBackupResourceStorageConfigsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -97,7 +97,7 @@ public partial interface IBackupResourceStorageConfigsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceVaultConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceVaultConfigsOperations.cs
index 1030abcab962..0c94ca97a9a5 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceVaultConfigsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceVaultConfigsOperations.cs
@@ -39,7 +39,7 @@ public partial interface IBackupResourceVaultConfigsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -68,7 +68,7 @@ public partial interface IBackupResourceVaultConfigsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -97,7 +97,7 @@ public partial interface IBackupResourceVaultConfigsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs
index b2a29fd928b2..2c1408296693 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs
@@ -39,13 +39,13 @@ public partial interface ICrossRegionRestoreOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
/// Thrown when a required parameter is null
///
- Task TriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task TriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Restores the specified backed up data in a different region as
/// compared to where the data is backed up.
@@ -62,12 +62,12 @@ public partial interface ICrossRegionRestoreOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
/// Thrown when a required parameter is null
///
- Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs
index ef70a4ee2313..f0b27bf7f27e 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs
@@ -34,7 +34,7 @@ public partial interface ICrrOperationResultsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -52,7 +52,7 @@ public partial interface ICrrOperationResultsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs
index a898fad373fd..0dd3bd913393 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs
@@ -34,7 +34,7 @@ public partial interface ICrrOperationStatusOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointConnectionOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointConnectionOperations.cs
index 6ed153cbf20f..3b0d0dac9ad9 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointConnectionOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointConnectionOperations.cs
@@ -42,7 +42,7 @@ public partial interface IPrivateEndpointConnectionOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointOperations.cs
new file mode 100644
index 000000000000..cd01ac1403a3
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IPrivateEndpointOperations.cs
@@ -0,0 +1,59 @@
+//
+// 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.RecoveryServices.Backup
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateEndpointOperations operations.
+ ///
+ public partial interface IPrivateEndpointOperations
+ {
+ ///
+ /// Gets the operation status for a private endpoint connection.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// Operation id
+ ///
+ ///
+ /// 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> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IProtectionPoliciesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IProtectionPoliciesOperations.cs
index 7beb939409b0..f816e1096525 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IProtectionPoliciesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IProtectionPoliciesOperations.cs
@@ -92,7 +92,8 @@ public partial interface IProtectionPoliciesOperations
///
/// Deletes specified backup policy from your Recovery Services Vault.
/// This is an asynchronous operation. Status of the
- /// operation can be fetched using GetPolicyOperationResult API.
+ /// operation can be fetched using GetProtectionPolicyOperationResult
+ /// API.
///
///
/// The name of the recovery services vault.
@@ -117,5 +118,34 @@ public partial interface IProtectionPoliciesOperations
/// Thrown when a required parameter is null
///
Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes specified backup policy from your Recovery Services Vault.
+ /// This is an asynchronous operation. Status of the
+ /// operation can be fetched using GetProtectionPolicyOperationResult
+ /// API.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Backup policy to be deleted.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs
index bb9a111ee71d..35336ea0155d 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs
@@ -52,7 +52,7 @@ public partial interface IRecoveryPointsCrrOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -74,7 +74,7 @@ public partial interface IRecoveryPointsCrrOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs
index d2aa94fe345d..424a6ba65195 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs
@@ -126,13 +126,16 @@ public partial interface IRecoveryPointsOperations
///
/// Recovery Point Id
///
+ ///
+ /// Get Access Token request
+ ///
///
/// The headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -141,7 +144,7 @@ public partial interface IRecoveryPointsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Lists the backup copies for the backed up item.
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs
index 9d30c0f9a708..b68204be989a 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs
@@ -69,9 +69,14 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable
///
- /// Gets the IBMSPrepareDataMoveOperationResultOperations.
+ /// Gets the IBackupResourceVaultConfigsOperations.
///
- IBMSPrepareDataMoveOperationResultOperations BMSPrepareDataMoveOperationResult { get; }
+ IBackupResourceVaultConfigsOperations BackupResourceVaultConfigs { get; }
+
+ ///
+ /// Gets the IBackupResourceEncryptionConfigsOperations.
+ ///
+ IBackupResourceEncryptionConfigsOperations BackupResourceEncryptionConfigs { get; }
///
/// Gets the IPrivateEndpointConnectionOperations.
@@ -79,9 +84,14 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable
IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; }
///
- /// Gets the IBackupResourceVaultConfigsOperations.
+ /// Gets the IPrivateEndpointOperations.
///
- IBackupResourceVaultConfigsOperations BackupResourceVaultConfigs { get; }
+ IPrivateEndpointOperations PrivateEndpoint { get; }
+
+ ///
+ /// Gets the IBMSPrepareDataMoveOperationResultOperations.
+ ///
+ IBMSPrepareDataMoveOperationResultOperations BMSPrepareDataMoveOperationResult { get; }
///
/// Gets the IProtectedItemsOperations.
@@ -154,154 +164,154 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable
IBackupProtectedItemsOperations BackupProtectedItems { get; }
///
- /// Gets the IAadPropertiesOperations.
+ /// Gets the IOperationOperations.
///
- IAadPropertiesOperations AadProperties { get; }
+ IOperationOperations Operation { get; }
///
- /// Gets the ICrossRegionRestoreOperations.
+ /// Gets the IBackupEnginesOperations.
///
- ICrossRegionRestoreOperations CrossRegionRestore { get; }
+ IBackupEnginesOperations BackupEngines { get; }
///
- /// Gets the IBackupCrrJobDetailsOperations.
+ /// Gets the IProtectionContainerRefreshOperationResultsOperations.
///
- IBackupCrrJobDetailsOperations BackupCrrJobDetails { get; }
+ IProtectionContainerRefreshOperationResultsOperations ProtectionContainerRefreshOperationResults { get; }
///
- /// Gets the IBackupCrrJobsOperations.
+ /// Gets the IProtectableContainersOperations.
///
- IBackupCrrJobsOperations BackupCrrJobs { get; }
+ IProtectableContainersOperations ProtectableContainers { get; }
///
- /// Gets the ICrrOperationResultsOperations.
+ /// Gets the IProtectionContainersOperations.
///
- ICrrOperationResultsOperations CrrOperationResults { get; }
+ IProtectionContainersOperations ProtectionContainers { get; }
///
- /// Gets the ICrrOperationStatusOperations.
+ /// Gets the IBackupWorkloadItemsOperations.
///
- ICrrOperationStatusOperations CrrOperationStatus { get; }
+ IBackupWorkloadItemsOperations BackupWorkloadItems { get; }
///
- /// Gets the IRecoveryPointsCrrOperations.
+ /// Gets the IProtectionContainerOperationResultsOperations.
///
- IRecoveryPointsCrrOperations RecoveryPointsCrr { get; }
+ IProtectionContainerOperationResultsOperations ProtectionContainerOperationResults { get; }
///
- /// Gets the IBackupProtectedItemsCrrOperations.
+ /// Gets the IBackupsOperations.
///
- IBackupProtectedItemsCrrOperations BackupProtectedItemsCrr { get; }
+ IBackupsOperations Backups { get; }
///
- /// Gets the IOperationOperations.
+ /// Gets the IProtectedItemOperationStatusesOperations.
///
- IOperationOperations Operation { get; }
+ IProtectedItemOperationStatusesOperations ProtectedItemOperationStatuses { get; }
///
- /// Gets the IProtectionIntentOperations.
+ /// Gets the IItemLevelRecoveryConnectionsOperations.
///
- IProtectionIntentOperations ProtectionIntent { get; }
+ IItemLevelRecoveryConnectionsOperations ItemLevelRecoveryConnections { get; }
///
- /// Gets the IBackupStatusOperations.
+ /// Gets the IBackupOperationResultsOperations.
///
- IBackupStatusOperations BackupStatus { get; }
+ IBackupOperationResultsOperations BackupOperationResults { get; }
///
- /// Gets the IFeatureSupportOperations.
+ /// Gets the IBackupOperationStatusesOperations.
///
- IFeatureSupportOperations FeatureSupport { get; }
+ IBackupOperationStatusesOperations BackupOperationStatuses { get; }
///
- /// Gets the IBackupProtectionIntentOperations.
+ /// Gets the IProtectionPolicyOperationStatusesOperations.
///
- IBackupProtectionIntentOperations BackupProtectionIntent { get; }
+ IProtectionPolicyOperationStatusesOperations ProtectionPolicyOperationStatuses { get; }
///
- /// Gets the IBackupUsageSummariesOperations.
+ /// Gets the IBackupProtectableItemsOperations.
///
- IBackupUsageSummariesOperations BackupUsageSummaries { get; }
+ IBackupProtectableItemsOperations BackupProtectableItems { get; }
///
- /// Gets the IBackupEnginesOperations.
+ /// Gets the IBackupProtectionContainersOperations.
///
- IBackupEnginesOperations BackupEngines { get; }
+ IBackupProtectionContainersOperations BackupProtectionContainers { get; }
///
- /// Gets the IProtectionContainerRefreshOperationResultsOperations.
+ /// Gets the ISecurityPINsOperations.
///
- IProtectionContainerRefreshOperationResultsOperations ProtectionContainerRefreshOperationResults { get; }
+ ISecurityPINsOperations SecurityPINs { get; }
///
- /// Gets the IProtectableContainersOperations.
+ /// Gets the IAadPropertiesOperations.
///
- IProtectableContainersOperations ProtectableContainers { get; }
+ IAadPropertiesOperations AadProperties { get; }
///
- /// Gets the IProtectionContainersOperations.
+ /// Gets the ICrossRegionRestoreOperations.
///
- IProtectionContainersOperations ProtectionContainers { get; }
+ ICrossRegionRestoreOperations CrossRegionRestore { get; }
///
- /// Gets the IBackupWorkloadItemsOperations.
+ /// Gets the IBackupCrrJobDetailsOperations.
///
- IBackupWorkloadItemsOperations BackupWorkloadItems { get; }
+ IBackupCrrJobDetailsOperations BackupCrrJobDetails { get; }
///
- /// Gets the IProtectionContainerOperationResultsOperations.
+ /// Gets the IBackupCrrJobsOperations.
///
- IProtectionContainerOperationResultsOperations ProtectionContainerOperationResults { get; }
+ IBackupCrrJobsOperations BackupCrrJobs { get; }
///
- /// Gets the IBackupsOperations.
+ /// Gets the ICrrOperationResultsOperations.
///
- IBackupsOperations Backups { get; }
+ ICrrOperationResultsOperations CrrOperationResults { get; }
///
- /// Gets the IProtectedItemOperationStatusesOperations.
+ /// Gets the ICrrOperationStatusOperations.
///
- IProtectedItemOperationStatusesOperations ProtectedItemOperationStatuses { get; }
+ ICrrOperationStatusOperations CrrOperationStatus { get; }
///
- /// Gets the IItemLevelRecoveryConnectionsOperations.
+ /// Gets the IBackupResourceStorageConfigsOperations.
///
- IItemLevelRecoveryConnectionsOperations ItemLevelRecoveryConnections { get; }
+ IBackupResourceStorageConfigsOperations BackupResourceStorageConfigs { get; }
///
- /// Gets the IBackupOperationResultsOperations.
+ /// Gets the IRecoveryPointsCrrOperations.
///
- IBackupOperationResultsOperations BackupOperationResults { get; }
+ IRecoveryPointsCrrOperations RecoveryPointsCrr { get; }
///
- /// Gets the IBackupOperationStatusesOperations.
+ /// Gets the IBackupProtectedItemsCrrOperations.
///
- IBackupOperationStatusesOperations BackupOperationStatuses { get; }
+ IBackupProtectedItemsCrrOperations BackupProtectedItemsCrr { get; }
///
- /// Gets the IProtectionPolicyOperationStatusesOperations.
+ /// Gets the IProtectionIntentOperations.
///
- IProtectionPolicyOperationStatusesOperations ProtectionPolicyOperationStatuses { get; }
+ IProtectionIntentOperations ProtectionIntent { get; }
///
- /// Gets the IBackupProtectableItemsOperations.
+ /// Gets the IBackupStatusOperations.
///
- IBackupProtectableItemsOperations BackupProtectableItems { get; }
+ IBackupStatusOperations BackupStatus { get; }
///
- /// Gets the IBackupProtectionContainersOperations.
+ /// Gets the IFeatureSupportOperations.
///
- IBackupProtectionContainersOperations BackupProtectionContainers { get; }
+ IFeatureSupportOperations FeatureSupport { get; }
///
- /// Gets the ISecurityPINsOperations.
+ /// Gets the IBackupProtectionIntentOperations.
///
- ISecurityPINsOperations SecurityPINs { get; }
+ IBackupProtectionIntentOperations BackupProtectionIntent { get; }
///
- /// Gets the IBackupResourceStorageConfigsOperations.
+ /// Gets the IBackupUsageSummariesOperations.
///
- IBackupResourceStorageConfigsOperations BackupResourceStorageConfigs { get; }
+ IBackupUsageSummariesOperations BackupUsageSummaries { get; }
///
/// Gets the IOperations.
@@ -370,30 +380,6 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable
///
Task BMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets the operation status for a private endpoint connection.
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// The name of the private endpoint connection.
- ///
- ///
- /// Operation id
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- Task> GetOperationStatus1WithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
-
///
/// Prepares source vault for Data Move operation
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs
index bc359adca9e5..100cd7abc419 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs
@@ -133,7 +133,7 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -355,7 +355,7 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli
{
throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs
index 9a5636ef7d3f..0883f42f3f5f 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs
@@ -101,7 +101,7 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "jobName");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs
index b04b2f3557ca..fc327f8312b4 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs
@@ -102,7 +102,7 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "jobName");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs
index b8e940cc224f..92d669f09060 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs
@@ -106,7 +106,7 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs
index 504e2e1aff54..1b23aa62e3cf 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs
@@ -97,7 +97,7 @@ internal JobsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs
index 7fe445796e69..8dd65c17f832 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs
@@ -79,7 +79,10 @@ public AzureFileshareProtectedItem()
/// Health details of different KPIs
/// Additional information with this backup
/// item.
- public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), IDictionary kpisHealths = default(IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo))
+ /// backups running status for this backup
+ /// item. Possible values include: 'Passed', 'ActionRequired',
+ /// 'ActionSuggested', 'Invalid'
+ public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), IDictionary kpisHealths = default(IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo), string healthStatus = default(string))
: base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate)
{
FriendlyName = friendlyName;
@@ -89,6 +92,7 @@ public AzureFileshareProtectedItem()
LastBackupTime = lastBackupTime;
KpisHealths = kpisHealths;
ExtendedInfo = extendedInfo;
+ HealthStatus = healthStatus;
CustomInit();
}
@@ -144,5 +148,13 @@ public AzureFileshareProtectedItem()
[JsonProperty(PropertyName = "extendedInfo")]
public AzureFileshareProtectedItemExtendedInfo ExtendedInfo { get; set; }
+ ///
+ /// Gets or sets backups running status for this backup item. Possible
+ /// values include: 'Passed', 'ActionRequired', 'ActionSuggested',
+ /// 'Invalid'
+ ///
+ [JsonProperty(PropertyName = "healthStatus")]
+ public string HealthStatus { get; set; }
+
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadBackupRequest.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadBackupRequest.cs
index 3e4c3e0f606a..1f6361bac454 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadBackupRequest.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadBackupRequest.cs
@@ -31,7 +31,7 @@ public AzureWorkloadBackupRequest()
///
/// Type of backup, viz. Full, Differential,
/// Log or CopyOnlyFull. Possible values include: 'Invalid', 'Full',
- /// 'Differential', 'Log', 'CopyOnlyFull'
+ /// 'Differential', 'Log', 'CopyOnlyFull', 'Incremental'
/// Bool for Compression
/// setting
/// Backup copy will expire
@@ -52,7 +52,7 @@ public AzureWorkloadBackupRequest()
///
/// Gets or sets type of backup, viz. Full, Differential, Log or
/// CopyOnlyFull. Possible values include: 'Invalid', 'Full',
- /// 'Differential', 'Log', 'CopyOnlyFull'
+ /// 'Differential', 'Log', 'CopyOnlyFull', 'Incremental'
///
[JsonProperty(PropertyName = "backupType")]
public string BackupType { get; set; }
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs
index 01128198811d..f84fe1896382 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs
@@ -36,7 +36,7 @@ public AzureWorkloadPointInTimeRecoveryPoint()
/// UTC time at which recovery
/// point was created
/// Type of restore point. Possible values include:
- /// 'Invalid', 'Full', 'Log', 'Differential'
+ /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental'
/// List of log ranges
public AzureWorkloadPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList timeRanges = default(IList))
: base(recoveryPointTimeInUTC, type)
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadRecoveryPoint.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadRecoveryPoint.cs
index 62678b6bfe1f..42685a154ae6 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadRecoveryPoint.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadRecoveryPoint.cs
@@ -33,7 +33,7 @@ public AzureWorkloadRecoveryPoint()
/// UTC time at which recovery
/// point was created
/// Type of restore point. Possible values include:
- /// 'Invalid', 'Full', 'Log', 'Differential'
+ /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental'
public AzureWorkloadRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string))
{
RecoveryPointTimeInUTC = recoveryPointTimeInUTC;
@@ -54,7 +54,7 @@ public AzureWorkloadRecoveryPoint()
///
/// Gets type of restore point. Possible values include: 'Invalid',
- /// 'Full', 'Log', 'Differential'
+ /// 'Full', 'Log', 'Differential', 'Incremental'
///
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs
index c15fb5ef8135..6eb65e572a6f 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs
@@ -35,7 +35,7 @@ public AzureWorkloadSAPHanaPointInTimeRecoveryPoint()
/// UTC time at which recovery
/// point was created
/// Type of restore point. Possible values include:
- /// 'Invalid', 'Full', 'Log', 'Differential'
+ /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental'
/// List of log ranges
public AzureWorkloadSAPHanaPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList timeRanges = default(IList))
: base(recoveryPointTimeInUTC, type, timeRanges)
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs
index 1605a263f558..58388dd32502 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs
@@ -34,7 +34,7 @@ public AzureWorkloadSAPHanaRecoveryPoint()
/// UTC time at which recovery
/// point was created
/// Type of restore point. Possible values include:
- /// 'Invalid', 'Full', 'Log', 'Differential'
+ /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental'
public AzureWorkloadSAPHanaRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string))
: base(recoveryPointTimeInUTC, type)
{
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs
index d803d2d20cad..bbfc9a7f100b 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs
@@ -36,7 +36,7 @@ public AzureWorkloadSQLPointInTimeRecoveryPoint()
/// UTC time at which recovery
/// point was created
/// Type of restore point. Possible values include:
- /// 'Invalid', 'Full', 'Log', 'Differential'
+ /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental'
/// Extended Info that provides data
/// directory details. Will be populated in two cases:
/// When a specific recovery point is accessed using GetRecoveryPoint
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs
index 275cc9bd77e2..d4d42822d980 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs
@@ -35,7 +35,7 @@ public AzureWorkloadSQLRecoveryPoint()
/// UTC time at which recovery
/// point was created
/// Type of restore point. Possible values include:
- /// 'Invalid', 'Full', 'Log', 'Differential'
+ /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental'
/// Extended Info that provides data
/// directory details. Will be populated in two cases:
/// When a specific recovery point is accessed using GetRecoveryPoint
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BMSRPQueryObject.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BMSRPQueryObject.cs
index ffa2b3845b70..1d7390150ca3 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BMSRPQueryObject.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BMSRPQueryObject.cs
@@ -35,7 +35,7 @@ public BMSRPQueryObject()
/// time.
/// RestorePoint type. Possible
/// values include: 'Invalid', 'Full', 'Log', 'Differential',
- /// 'FullAndDifferential', 'All'
+ /// 'FullAndDifferential', 'All', 'Incremental'
/// In Get Recovery Point, it tells whether
/// extended information about recovery point is asked.
public BMSRPQueryObject(System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string restorePointQueryType = default(string), bool? extendedInfo = default(bool?))
@@ -66,7 +66,8 @@ public BMSRPQueryObject()
///
/// Gets or sets restorePoint type. Possible values include: 'Invalid',
- /// 'Full', 'Log', 'Differential', 'FullAndDifferential', 'All'
+ /// 'Full', 'Log', 'Differential', 'FullAndDifferential', 'All',
+ /// 'Incremental'
///
[JsonProperty(PropertyName = "restorePointQueryType")]
public string RestorePointQueryType { get; set; }
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceConfig.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceConfig.cs
index bc38bdb16a9e..e0863b7edd33 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceConfig.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceConfig.cs
@@ -30,18 +30,23 @@ public BackupResourceConfig()
/// Initializes a new instance of the BackupResourceConfig class.
///
/// Storage type. Possible values
- /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant',
+ /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant'
/// Storage type. Possible values include:
- /// 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant',
+ /// 'ReadAccessGeoZoneRedundant'
/// Locked or Unlocked. Once a machine
/// is registered against a resource, the storageTypeState is always
/// Locked. Possible values include: 'Invalid', 'Locked',
/// 'Unlocked'
- public BackupResourceConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string))
+ /// Opt in details of Cross Region
+ /// Restore feature.
+ public BackupResourceConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), bool? crossRegionRestoreFlag = default(bool?))
{
StorageModelType = storageModelType;
StorageType = storageType;
StorageTypeState = storageTypeState;
+ CrossRegionRestoreFlag = crossRegionRestoreFlag;
CustomInit();
}
@@ -52,14 +57,16 @@ public BackupResourceConfig()
///
/// Gets or sets storage type. Possible values include: 'Invalid',
- /// 'GeoRedundant', 'LocallyRedundant'
+ /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant',
+ /// 'ReadAccessGeoZoneRedundant'
///
[JsonProperty(PropertyName = "storageModelType")]
public string StorageModelType { get; set; }
///
/// Gets or sets storage type. Possible values include: 'Invalid',
- /// 'GeoRedundant', 'LocallyRedundant'
+ /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant',
+ /// 'ReadAccessGeoZoneRedundant'
///
[JsonProperty(PropertyName = "storageType")]
public string StorageType { get; set; }
@@ -72,5 +79,11 @@ public BackupResourceConfig()
[JsonProperty(PropertyName = "storageTypeState")]
public string StorageTypeState { get; set; }
+ ///
+ /// Gets or sets opt in details of Cross Region Restore feature.
+ ///
+ [JsonProperty(PropertyName = "crossRegionRestoreFlag")]
+ public bool? CrossRegionRestoreFlag { get; set; }
+
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceEncryptionConfig.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceEncryptionConfig.cs
new file mode 100644
index 000000000000..af6f9d24d6cb
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceEncryptionConfig.cs
@@ -0,0 +1,90 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class BackupResourceEncryptionConfig
+ {
+ ///
+ /// Initializes a new instance of the BackupResourceEncryptionConfig
+ /// class.
+ ///
+ public BackupResourceEncryptionConfig()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BackupResourceEncryptionConfig
+ /// class.
+ ///
+ /// Encryption At Rest Type.
+ /// Possible values include: 'Invalid', 'MicrosoftManaged',
+ /// 'CustomerManaged'
+ /// Key Vault Key URI
+ /// Key Vault Subscription Id
+ /// Possible values include: 'Invalid',
+ /// 'NotEnabled', 'PartiallySucceeded', 'PartiallyFailed', 'Failed',
+ /// 'Succeeded'
+ /// Possible values
+ /// include: 'Invalid', 'Disabled', 'Enabled'
+ public BackupResourceEncryptionConfig(string encryptionAtRestType = default(string), string keyUri = default(string), string subscriptionId = default(string), string lastUpdateStatus = default(string), string infrastructureEncryptionState = default(string))
+ {
+ EncryptionAtRestType = encryptionAtRestType;
+ KeyUri = keyUri;
+ SubscriptionId = subscriptionId;
+ LastUpdateStatus = lastUpdateStatus;
+ InfrastructureEncryptionState = infrastructureEncryptionState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets encryption At Rest Type. Possible values include:
+ /// 'Invalid', 'MicrosoftManaged', 'CustomerManaged'
+ ///
+ [JsonProperty(PropertyName = "encryptionAtRestType")]
+ public string EncryptionAtRestType { get; set; }
+
+ ///
+ /// Gets or sets key Vault Key URI
+ ///
+ [JsonProperty(PropertyName = "keyUri")]
+ public string KeyUri { get; set; }
+
+ ///
+ /// Gets or sets key Vault Subscription Id
+ ///
+ [JsonProperty(PropertyName = "subscriptionId")]
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'Invalid', 'NotEnabled',
+ /// 'PartiallySucceeded', 'PartiallyFailed', 'Failed', 'Succeeded'
+ ///
+ [JsonProperty(PropertyName = "lastUpdateStatus")]
+ public string LastUpdateStatus { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'Invalid', 'Disabled',
+ /// 'Enabled'
+ ///
+ [JsonProperty(PropertyName = "infrastructureEncryptionState")]
+ public string InfrastructureEncryptionState { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceEncryptionConfigResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceEncryptionConfigResource.cs
new file mode 100644
index 000000000000..01891ae7d091
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceEncryptionConfigResource.cs
@@ -0,0 +1,63 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class BackupResourceEncryptionConfigResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the
+ /// BackupResourceEncryptionConfigResource class.
+ ///
+ public BackupResourceEncryptionConfigResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// BackupResourceEncryptionConfigResource class.
+ ///
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Resource location.
+ /// Resource tags.
+ /// Optional ETag.
+ /// BackupResourceEncryptionConfigResource
+ /// properties
+ public BackupResourceEncryptionConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupResourceEncryptionConfig properties = default(BackupResourceEncryptionConfig))
+ : base(id, name, type, location, tags, eTag)
+ {
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets backupResourceEncryptionConfigResource properties
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public BackupResourceEncryptionConfig Properties { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs
index d184d106d479..f4716f6dfc0d 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs
@@ -30,9 +30,11 @@ public BackupResourceVaultConfig()
/// Initializes a new instance of the BackupResourceVaultConfig class.
///
/// Storage type. Possible values
- /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant',
+ /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant'
/// Storage type. Possible values include:
- /// 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant',
+ /// 'ReadAccessGeoZoneRedundant'
/// Locked or Unlocked. Once a machine
/// is registered against a resource, the storageTypeState is always
/// Locked. Possible values include: 'Invalid', 'Locked',
@@ -58,14 +60,16 @@ public BackupResourceVaultConfig()
///
/// Gets or sets storage type. Possible values include: 'Invalid',
- /// 'GeoRedundant', 'LocallyRedundant'
+ /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant',
+ /// 'ReadAccessGeoZoneRedundant'
///
[JsonProperty(PropertyName = "storageModelType")]
public string StorageModelType { get; set; }
///
/// Gets or sets storage type. Possible values include: 'Invalid',
- /// 'GeoRedundant', 'LocallyRedundant'
+ /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant',
+ /// 'ReadAccessGeoZoneRedundant'
///
[JsonProperty(PropertyName = "storageType")]
public string StorageType { get; set; }
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupType.cs
index f9a0f94e8110..f7cfbbbbe983 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupType.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupType.cs
@@ -21,5 +21,6 @@ public static class BackupType
public const string Differential = "Differential";
public const string Log = "Log";
public const string CopyOnlyFull = "CopyOnlyFull";
+ public const string Incremental = "Incremental";
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs
index 2a74c37d196b..5c480ac8a0ff 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs
@@ -11,11 +11,10 @@
namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
{
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
- ///
- /// Container level access token for CRR
- ///
public partial class CrrAccessToken
{
///
@@ -38,6 +37,8 @@ public CrrAccessToken()
/// Resource Name of the source
/// vault
/// Resource Id of the source vault
+ /// Protected item container
+ /// id
/// Recovery Point Id
/// Recovery Point Time
/// Container Unique name
@@ -58,13 +59,24 @@ public CrrAccessToken()
/// to be used by BCM in restore call
/// Extended Information about
/// the token like FileSpec etc.
- public CrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string))
+ /// Recovery point Tier
+ /// Information
+ /// Recovery point information:
+ /// Original SA option
+ /// Recovery point information:
+ /// Managed virtual machine
+ /// Recovery point information: VM
+ /// size description
+ /// Active region name of BMS
+ /// Stamp
+ public CrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), long? protectionContainerId = default(long?), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string), IDictionary rpTierInformation = default(IDictionary), bool? rpOriginalSAOption = default(bool?), bool? rpIsManagedVirtualMachine = default(bool?), string rpVMSizeDescription = default(string), string bMSActiveRegion = default(string))
{
AccessTokenString = accessTokenString;
SubscriptionId = subscriptionId;
ResourceGroupName = resourceGroupName;
ResourceName = resourceName;
ResourceId = resourceId;
+ ProtectionContainerId = protectionContainerId;
RecoveryPointId = recoveryPointId;
RecoveryPointTime = recoveryPointTime;
ContainerName = containerName;
@@ -79,6 +91,11 @@ public CrrAccessToken()
ProtectionServiceStampId = protectionServiceStampId;
ProtectionServiceStampUri = protectionServiceStampUri;
TokenExtendedInformation = tokenExtendedInformation;
+ RpTierInformation = rpTierInformation;
+ RpOriginalSAOption = rpOriginalSAOption;
+ RpIsManagedVirtualMachine = rpIsManagedVirtualMachine;
+ RpVMSizeDescription = rpVMSizeDescription;
+ BMSActiveRegion = bMSActiveRegion;
CustomInit();
}
@@ -117,6 +134,12 @@ public CrrAccessToken()
[JsonProperty(PropertyName = "resourceId")]
public string ResourceId { get; set; }
+ ///
+ /// Gets or sets protected item container id
+ ///
+ [JsonProperty(PropertyName = "protectionContainerId")]
+ public long? ProtectionContainerId { get; set; }
+
///
/// Gets or sets recovery Point Id
///
@@ -206,5 +229,35 @@ public CrrAccessToken()
[JsonProperty(PropertyName = "tokenExtendedInformation")]
public string TokenExtendedInformation { get; set; }
+ ///
+ /// Gets or sets recovery point Tier Information
+ ///
+ [JsonProperty(PropertyName = "rpTierInformation")]
+ public IDictionary RpTierInformation { get; set; }
+
+ ///
+ /// Gets or sets recovery point information: Original SA option
+ ///
+ [JsonProperty(PropertyName = "rpOriginalSAOption")]
+ public bool? RpOriginalSAOption { get; set; }
+
+ ///
+ /// Gets or sets recovery point information: Managed virtual machine
+ ///
+ [JsonProperty(PropertyName = "rpIsManagedVirtualMachine")]
+ public bool? RpIsManagedVirtualMachine { get; set; }
+
+ ///
+ /// Gets or sets recovery point information: VM size description
+ ///
+ [JsonProperty(PropertyName = "rpVMSizeDescription")]
+ public string RpVMSizeDescription { get; set; }
+
+ ///
+ /// Gets or sets active region name of BMS Stamp
+ ///
+ [JsonProperty(PropertyName = "bMSActiveRegion")]
+ public string BMSActiveRegion { get; set; }
+
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs
index b8b7429d8030..ce5022c623a7 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs
@@ -15,9 +15,6 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
using System.Collections.Generic;
using System.Linq;
- ///
- /// Container level access token for CRR
- ///
public partial class CrrAccessTokenResource : Resource
{
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrJobRequest.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrJobRequest.cs
new file mode 100644
index 000000000000..4667f8dce228
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrJobRequest.cs
@@ -0,0 +1,60 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Request object for fetching CRR jobs.
+ ///
+ public partial class CrrJobRequest
+ {
+ ///
+ /// Initializes a new instance of the CrrJobRequest class.
+ ///
+ public CrrJobRequest()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CrrJobRequest class.
+ ///
+ /// Entire ARM resource id of the
+ /// resource
+ /// Job Name of the job to be fetched
+ public CrrJobRequest(string resourceId = default(string), string jobName = default(string))
+ {
+ ResourceId = resourceId;
+ JobName = jobName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets entire ARM resource id of the resource
+ ///
+ [JsonProperty(PropertyName = "resourceId")]
+ public string ResourceId { get; set; }
+
+ ///
+ /// Gets or sets job Name of the job to be fetched
+ ///
+ [JsonProperty(PropertyName = "jobName")]
+ public string JobName { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrJobRequestResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrJobRequestResource.cs
new file mode 100644
index 000000000000..8d92d0df75da
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrJobRequestResource.cs
@@ -0,0 +1,63 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Request object for fetching CRR jobs.
+ ///
+ public partial class CrrJobRequestResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the CrrJobRequestResource class.
+ ///
+ public CrrJobRequestResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CrrJobRequestResource class.
+ ///
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Resource location.
+ /// Resource tags.
+ /// Optional ETag.
+ /// CrrJobRequestResource properties
+ public CrrJobRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), CrrJobRequest properties = default(CrrJobRequest))
+ : base(id, name, type, location, tags, eTag)
+ {
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets crrJobRequestResource properties
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public CrrJobRequest Properties { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/EncryptionAtRestType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/EncryptionAtRestType.cs
new file mode 100644
index 000000000000..cf638c2e2f8c
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/EncryptionAtRestType.cs
@@ -0,0 +1,23 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+
+ ///
+ /// Defines values for EncryptionAtRestType.
+ ///
+ public static class EncryptionAtRestType
+ {
+ public const string Invalid = "Invalid";
+ public const string MicrosoftManaged = "MicrosoftManaged";
+ public const string CustomerManaged = "CustomerManaged";
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ErrorResponse.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ErrorResponse.cs
index fa75cf104bb3..838e8f530486 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ErrorResponse.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ErrorResponse.cs
@@ -16,8 +16,13 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
using System.Linq;
///
- /// The resource management error response.
+ /// Error Response
///
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return
+ /// error details for failed operations. (This also follows the OData error
+ /// response format.)
+ ///
public partial class ErrorResponse
{
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/IaasVMRestoreRequest.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/IaasVMRestoreRequest.cs
index e2fcedfe0852..eab7c0be40e6 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/IaasVMRestoreRequest.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/IaasVMRestoreRequest.cs
@@ -75,7 +75,12 @@ public IaasVMRestoreRequest()
/// encrypted at the time of backup.
/// List of Disk LUNs for partial
/// restore
- public IaasVMRestoreRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), IList restoreDiskLunList = default(IList))
+ /// Flag to denote of an
+ /// Unmanaged disk VM should be restored with Managed disks.
+ /// DiskEncryptionSet's ID - needed
+ /// if the VM needs to be encrypted at rest during restore with
+ /// customer managed key.
+ public IaasVMRestoreRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), IList restoreDiskLunList = default(IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string))
{
RecoveryPointId = recoveryPointId;
RecoveryType = recoveryType;
@@ -92,6 +97,8 @@ public IaasVMRestoreRequest()
OriginalStorageAccountOption = originalStorageAccountOption;
EncryptionDetails = encryptionDetails;
RestoreDiskLunList = restoreDiskLunList;
+ RestoreWithManagedDisks = restoreWithManagedDisks;
+ DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}
@@ -212,5 +219,19 @@ public IaasVMRestoreRequest()
[JsonProperty(PropertyName = "restoreDiskLunList")]
public IList RestoreDiskLunList { get; set; }
+ ///
+ /// Gets or sets flag to denote of an Unmanaged disk VM should be
+ /// restored with Managed disks.
+ ///
+ [JsonProperty(PropertyName = "restoreWithManagedDisks")]
+ public bool? RestoreWithManagedDisks { get; set; }
+
+ ///
+ /// Gets or sets diskEncryptionSet's ID - needed if the VM needs to be
+ /// encrypted at rest during restore with customer managed key.
+ ///
+ [JsonProperty(PropertyName = "diskEncryptionSetId")]
+ public string DiskEncryptionSetId { get; set; }
+
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/InfrastructureEncryptionState.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/InfrastructureEncryptionState.cs
new file mode 100644
index 000000000000..c065ffe67036
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/InfrastructureEncryptionState.cs
@@ -0,0 +1,23 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+
+ ///
+ /// Defines values for InfrastructureEncryptionState.
+ ///
+ public static class InfrastructureEncryptionState
+ {
+ public const string Invalid = "Invalid";
+ public const string Disabled = "Disabled";
+ public const string Enabled = "Enabled";
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobOperationType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobOperationType.cs
index 962d5718cb12..cb0a15cc5ee0 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobOperationType.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobOperationType.cs
@@ -26,5 +26,6 @@ public static class JobOperationType
public const string DeleteBackupData = "DeleteBackupData";
public const string CrossRegionRestore = "CrossRegionRestore";
public const string Undelete = "Undelete";
+ public const string UpdateCustomerManagedKey = "UpdateCustomerManagedKey";
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobQueryObject.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobQueryObject.cs
index 7d1d44fca061..e37e367742dd 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobQueryObject.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/JobQueryObject.cs
@@ -39,7 +39,8 @@ public JobQueryObject()
/// Type of operation. Possible values include:
/// 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup',
/// 'Restore', 'DisableBackup', 'DeleteBackupData',
- /// 'CrossRegionRestore', 'Undelete'
+ /// 'CrossRegionRestore', 'Undelete',
+ /// 'UpdateCustomerManagedKey'
/// JobID represents the job uniquely.
/// Job has started at this time. Value is in
/// UTC.
@@ -82,7 +83,7 @@ public JobQueryObject()
/// Gets or sets type of operation. Possible values include: 'Invalid',
/// 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore',
/// 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore',
- /// 'Undelete'
+ /// 'Undelete', 'UpdateCustomerManagedKey'
///
[JsonProperty(PropertyName = "operation")]
public string Operation { get; set; }
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/LastUpdateStatus.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/LastUpdateStatus.cs
new file mode 100644
index 000000000000..e40ea735eef2
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/LastUpdateStatus.cs
@@ -0,0 +1,26 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+
+ ///
+ /// Defines values for LastUpdateStatus.
+ ///
+ public static class LastUpdateStatus
+ {
+ public const string Invalid = "Invalid";
+ public const string NotEnabled = "NotEnabled";
+ public const string PartiallySucceeded = "PartiallySucceeded";
+ public const string PartiallyFailed = "PartiallyFailed";
+ public const string Failed = "Failed";
+ public const string Succeeded = "Succeeded";
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PolicyType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PolicyType.cs
index d496716e54b4..e3135724a356 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PolicyType.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PolicyType.cs
@@ -21,5 +21,6 @@ public static class PolicyType
public const string Differential = "Differential";
public const string Log = "Log";
public const string CopyOnlyFull = "CopyOnlyFull";
+ public const string Incremental = "Incremental";
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointQueryType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointQueryType.cs
index 8d780e6b5ab5..ccbc6286ec78 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointQueryType.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointQueryType.cs
@@ -22,5 +22,6 @@ public static class RestorePointQueryType
public const string Differential = "Differential";
public const string FullAndDifferential = "FullAndDifferential";
public const string All = "All";
+ public const string Incremental = "Incremental";
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointType.cs
index f08831973e5b..f1cbe18d8dcf 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointType.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/RestorePointType.cs
@@ -20,5 +20,6 @@ public static class RestorePointType
public const string Full = "Full";
public const string Log = "Log";
public const string Differential = "Differential";
+ public const string Incremental = "Incremental";
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/StorageType.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/StorageType.cs
index 52341bf01103..683d69095d54 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/StorageType.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/StorageType.cs
@@ -19,5 +19,7 @@ public static class StorageType
public const string Invalid = "Invalid";
public const string GeoRedundant = "GeoRedundant";
public const string LocallyRedundant = "LocallyRedundant";
+ public const string ZoneRedundant = "ZoneRedundant";
+ public const string ReadAccessGeoZoneRedundant = "ReadAccessGeoZoneRedundant";
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SubProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SubProtectionPolicy.cs
index 7f37446106bc..e36626009932 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SubProtectionPolicy.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SubProtectionPolicy.cs
@@ -31,7 +31,7 @@ public SubProtectionPolicy()
///
/// Type of backup policy type. Possible
/// values include: 'Invalid', 'Full', 'Differential', 'Log',
- /// 'CopyOnlyFull'
+ /// 'CopyOnlyFull', 'Incremental'
/// Backup schedule specified as part of
/// backup policy.
/// Retention policy with the details on
@@ -51,7 +51,8 @@ public SubProtectionPolicy()
///
/// Gets or sets type of backup policy type. Possible values include:
- /// 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull'
+ /// 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull',
+ /// 'Incremental'
///
[JsonProperty(PropertyName = "policyType")]
public string PolicyType { get; set; }
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJob.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJob.cs
new file mode 100644
index 000000000000..c88db6f4e5d3
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJob.cs
@@ -0,0 +1,94 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Vault level Job
+ ///
+ public partial class VaultJob : Job
+ {
+ ///
+ /// Initializes a new instance of the VaultJob class.
+ ///
+ public VaultJob()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the VaultJob class.
+ ///
+ /// Friendly name of the entity on
+ /// which the current job is executing.
+ /// Backup management type to
+ /// execute the current job. Possible values include: 'Invalid',
+ /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql',
+ /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup'
+ /// The operation name.
+ /// Job status.
+ /// The start time.
+ /// The end time.
+ /// ActivityId of job.
+ /// Time elapsed during the execution of this
+ /// job.
+ /// Gets or sets the state/actions applicable
+ /// on this job like cancel/retry.
+ /// Error details on execution of this
+ /// job.
+ /// Additional information about the
+ /// job.
+ public VaultJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), VaultJobExtendedInfo extendedInfo = default(VaultJobExtendedInfo))
+ : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId)
+ {
+ Duration = duration;
+ ActionsInfo = actionsInfo;
+ ErrorDetails = errorDetails;
+ ExtendedInfo = extendedInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets time elapsed during the execution of this job.
+ ///
+ [JsonProperty(PropertyName = "duration")]
+ public System.TimeSpan? Duration { get; set; }
+
+ ///
+ /// Gets or sets the state/actions applicable on this job like
+ /// cancel/retry.
+ ///
+ [JsonProperty(PropertyName = "actionsInfo")]
+ public IList ActionsInfo { get; set; }
+
+ ///
+ /// Gets or sets error details on execution of this job.
+ ///
+ [JsonProperty(PropertyName = "errorDetails")]
+ public IList ErrorDetails { get; set; }
+
+ ///
+ /// Gets or sets additional information about the job.
+ ///
+ [JsonProperty(PropertyName = "extendedInfo")]
+ public VaultJobExtendedInfo ExtendedInfo { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJobErrorInfo.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJobErrorInfo.cs
new file mode 100644
index 000000000000..07e5c8a0f16f
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJobErrorInfo.cs
@@ -0,0 +1,71 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Vault Job specific error information
+ ///
+ public partial class VaultJobErrorInfo
+ {
+ ///
+ /// Initializes a new instance of the VaultJobErrorInfo class.
+ ///
+ public VaultJobErrorInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the VaultJobErrorInfo class.
+ ///
+ /// Error code.
+ /// Localized error string.
+ /// List of localized recommendations for
+ /// above error code.
+ public VaultJobErrorInfo(int? errorCode = default(int?), string errorString = default(string), IList recommendations = default(IList))
+ {
+ ErrorCode = errorCode;
+ ErrorString = errorString;
+ Recommendations = recommendations;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code.
+ ///
+ [JsonProperty(PropertyName = "errorCode")]
+ public int? ErrorCode { get; set; }
+
+ ///
+ /// Gets or sets localized error string.
+ ///
+ [JsonProperty(PropertyName = "errorString")]
+ public string ErrorString { get; set; }
+
+ ///
+ /// Gets or sets list of localized recommendations for above error
+ /// code.
+ ///
+ [JsonProperty(PropertyName = "recommendations")]
+ public IList Recommendations { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJobExtendedInfo.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJobExtendedInfo.cs
new file mode 100644
index 000000000000..12a3c06154d3
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultJobExtendedInfo.cs
@@ -0,0 +1,53 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Vault Job for CMK - has CMK specific info.
+ ///
+ public partial class VaultJobExtendedInfo
+ {
+ ///
+ /// Initializes a new instance of the VaultJobExtendedInfo class.
+ ///
+ public VaultJobExtendedInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the VaultJobExtendedInfo class.
+ ///
+ /// Job properties.
+ public VaultJobExtendedInfo(IDictionary propertyBag = default(IDictionary))
+ {
+ PropertyBag = propertyBag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets job properties.
+ ///
+ [JsonProperty(PropertyName = "propertyBag")]
+ public IDictionary PropertyBag { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/WorkloadCrrAccessToken.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/WorkloadCrrAccessToken.cs
new file mode 100644
index 000000000000..cc3a386d6909
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/WorkloadCrrAccessToken.cs
@@ -0,0 +1,144 @@
+//
+// 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.RecoveryServices.Backup.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class WorkloadCrrAccessToken : CrrAccessToken
+ {
+ ///
+ /// Initializes a new instance of the WorkloadCrrAccessToken class.
+ ///
+ public WorkloadCrrAccessToken()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the WorkloadCrrAccessToken class.
+ ///
+ /// Access token used for
+ /// authentication
+ /// Subscription Id of the source
+ /// vault
+ /// Resource Group name of the source
+ /// vault
+ /// Resource Name of the source
+ /// vault
+ /// Resource Id of the source vault
+ /// Protected item container
+ /// id
+ /// Recovery Point Id
+ /// Recovery Point Time
+ /// Container Unique name
+ /// Container Type
+ /// Backup Management Type
+ /// Datasource Type
+ /// Datasource Friendly Name
+ /// Datasource Id
+ /// Datasource Container Unique
+ /// Name
+ /// CoordinatorServiceStampId
+ /// to be used by BCM in restore call
+ /// CoordinatorServiceStampUri
+ /// to be used by BCM in restore call
+ /// ProtectionServiceStampId to
+ /// be used by BCM in restore call
+ /// ProtectionServiceStampUri
+ /// to be used by BCM in restore call
+ /// Extended Information about
+ /// the token like FileSpec etc.
+ /// Recovery point Tier
+ /// Information
+ /// Recovery point information:
+ /// Original SA option
+ /// Recovery point information:
+ /// Managed virtual machine
+ /// Recovery point information: VM
+ /// size description
+ /// Active region name of BMS
+ /// Stamp
+ /// Container Id
+ /// Policy Name
+ /// Policy Id
+ public WorkloadCrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), long? protectionContainerId = default(long?), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string), IDictionary rpTierInformation = default(IDictionary), bool? rpOriginalSAOption = default(bool?), bool? rpIsManagedVirtualMachine = default(bool?), string rpVMSizeDescription = default(string), string bMSActiveRegion = default(string), string protectableObjectUniqueName = default(string), string protectableObjectFriendlyName = default(string), string protectableObjectWorkloadType = default(string), string protectableObjectProtectionState = default(string), string protectableObjectContainerHostOsName = default(string), string protectableObjectParentLogicalContainerName = default(string), string containerId = default(string), string policyName = default(string), string policyId = default(string))
+ : base(accessTokenString, subscriptionId, resourceGroupName, resourceName, resourceId, protectionContainerId, recoveryPointId, recoveryPointTime, containerName, containerType, backupManagementType, datasourceType, datasourceName, datasourceId, datasourceContainerName, coordinatorServiceStampId, coordinatorServiceStampUri, protectionServiceStampId, protectionServiceStampUri, tokenExtendedInformation, rpTierInformation, rpOriginalSAOption, rpIsManagedVirtualMachine, rpVMSizeDescription, bMSActiveRegion)
+ {
+ ProtectableObjectUniqueName = protectableObjectUniqueName;
+ ProtectableObjectFriendlyName = protectableObjectFriendlyName;
+ ProtectableObjectWorkloadType = protectableObjectWorkloadType;
+ ProtectableObjectProtectionState = protectableObjectProtectionState;
+ ProtectableObjectContainerHostOsName = protectableObjectContainerHostOsName;
+ ProtectableObjectParentLogicalContainerName = protectableObjectParentLogicalContainerName;
+ ContainerId = containerId;
+ PolicyName = policyName;
+ PolicyId = policyId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "protectableObjectUniqueName")]
+ public string ProtectableObjectUniqueName { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "protectableObjectFriendlyName")]
+ public string ProtectableObjectFriendlyName { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "protectableObjectWorkloadType")]
+ public string ProtectableObjectWorkloadType { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "protectableObjectProtectionState")]
+ public string ProtectableObjectProtectionState { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "protectableObjectContainerHostOsName")]
+ public string ProtectableObjectContainerHostOsName { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "protectableObjectParentLogicalContainerName")]
+ public string ProtectableObjectParentLogicalContainerName { get; set; }
+
+ ///
+ /// Gets or sets container Id
+ ///
+ [JsonProperty(PropertyName = "containerId")]
+ public string ContainerId { get; set; }
+
+ ///
+ /// Gets or sets policy Name
+ ///
+ [JsonProperty(PropertyName = "policyName")]
+ public string PolicyName { get; set; }
+
+ ///
+ /// Gets or sets policy Id
+ ///
+ [JsonProperty(PropertyName = "policyId")]
+ public string PolicyId { get; set; }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs
index 1ef9fa671438..bbc6ec8ddcea 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs
@@ -103,7 +103,7 @@ internal OperationOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs
index be4b56484fa2..a2eb2bb561df 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs
@@ -69,7 +69,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -102,7 +102,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
}
- string apiVersion = "2020-02-02";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -189,11 +189,11 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex.Body = _errorBody;
@@ -365,7 +365,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2020-02-02";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -591,7 +591,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client
{
throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
}
- string apiVersion = "2020-02-02";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs
new file mode 100644
index 000000000000..a3f5a16ed22b
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs
@@ -0,0 +1,262 @@
+//
+// 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.RecoveryServices.Backup
+{
+ 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;
+
+ ///
+ /// PrivateEndpointOperations operations.
+ ///
+ internal partial class PrivateEndpointOperations : IServiceOperations, IPrivateEndpointOperations
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal PrivateEndpointOperations(RecoveryServicesBackupClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesBackupClient
+ ///
+ public RecoveryServicesBackupClient Client { get; private set; }
+
+ ///
+ /// Gets the operation status for a private endpoint connection.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// Operation id
+ ///
+ ///
+ /// 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> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (privateEndpointConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName");
+ }
+ if (operationId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
+ }
+ string apiVersion = "2020-10-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName);
+ tracingParameters.Add("operationId", operationId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", 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.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}").ToString();
+ _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName));
+ _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperationsExtensions.cs
new file mode 100644
index 000000000000..42f4bfcfd9bc
--- /dev/null
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperationsExtensions.cs
@@ -0,0 +1,79 @@
+//
+// 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.RecoveryServices.Backup
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for PrivateEndpointOperations.
+ ///
+ public static partial class PrivateEndpointOperationsExtensions
+ {
+ ///
+ /// Gets the operation status for a private endpoint connection.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// Operation id
+ ///
+ public static OperationStatus GetOperationStatus(this IPrivateEndpointOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId)
+ {
+ return operations.GetOperationStatusAsync(vaultName, resourceGroupName, privateEndpointConnectionName, operationId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the operation status for a private endpoint connection.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// Operation id
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetOperationStatusAsync(this IPrivateEndpointOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, operationId, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs
index 6160b61a1a55..d782d94ea36f 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs
@@ -105,7 +105,7 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "fabricName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs
index 5e5fe26dc4d3..1da3fb1e923a 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs
@@ -124,7 +124,7 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs
index c5c20fd65d1d..3886077a90b4 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs
@@ -128,7 +128,7 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs
index 07c3627aae54..be4867c43f31 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs
@@ -122,7 +122,7 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -363,7 +363,7 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -591,7 +591,7 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs
index 77fa5be8895b..eb57b521028a 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs
@@ -117,7 +117,7 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs
index 2e29e39a6d64..689fb002a92d 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs
@@ -108,7 +108,7 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs
index 8dde69d3eeb5..3a50e2705fbd 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs
@@ -111,7 +111,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "containerName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -334,7 +334,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -555,7 +555,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "containerName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -754,7 +754,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "containerName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -954,7 +954,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "fabricName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs
index 5865cfa2bd2a..5c290f52ed1e 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs
@@ -105,7 +105,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "policyName");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -318,7 +318,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -480,7 +480,35 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client)
///
/// Deletes specified backup policy from your Recovery Services Vault. This is
/// an asynchronous operation. Status of the
- /// operation can be fetched using GetPolicyOperationResult API.
+ /// operation can be fetched using GetProtectionPolicyOperationResult API.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Backup policy to be deleted.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes specified backup policy from your Recovery Services Vault. This is
+ /// an asynchronous operation. Status of the
+ /// operation can be fetched using GetProtectionPolicyOperationResult API.
///
///
/// The name of the recovery services vault.
@@ -510,7 +538,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (vaultName == null)
{
@@ -528,7 +556,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "policyName");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -541,7 +569,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("policyName", policyName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperationsExtensions.cs
index 476b57819aa5..4f5a9387d7b3 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperationsExtensions.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperationsExtensions.cs
@@ -136,7 +136,7 @@ public static ProtectionPolicyResource CreateOrUpdate(this IProtectionPoliciesOp
///
/// Deletes specified backup policy from your Recovery Services Vault. This is
/// an asynchronous operation. Status of the
- /// operation can be fetched using GetPolicyOperationResult API.
+ /// operation can be fetched using GetProtectionPolicyOperationResult API.
///
///
/// The operations group for this extension method.
@@ -159,7 +159,7 @@ public static void Delete(this IProtectionPoliciesOperations operations, string
///
/// Deletes specified backup policy from your Recovery Services Vault. This is
/// an asynchronous operation. Status of the
- /// operation can be fetched using GetPolicyOperationResult API.
+ /// operation can be fetched using GetProtectionPolicyOperationResult API.
///
///
/// The operations group for this extension method.
@@ -182,5 +182,54 @@ public static void Delete(this IProtectionPoliciesOperations operations, string
(await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Deletes specified backup policy from your Recovery Services Vault. This is
+ /// an asynchronous operation. Status of the
+ /// operation can be fetched using GetProtectionPolicyOperationResult API.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Backup policy to be deleted.
+ ///
+ public static void BeginDelete(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName)
+ {
+ operations.BeginDeleteAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes specified backup policy from your Recovery Services Vault. This is
+ /// an asynchronous operation. Status of the
+ /// operation can be fetched using GetProtectionPolicyOperationResult API.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Backup policy to be deleted.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs
index c09dfebee824..1466ae794c44 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs
@@ -110,7 +110,7 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2019-06-15";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs
index 788d9ffb80a6..83310c0b9409 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs
@@ -115,7 +115,7 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien
{
throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
- string apiVersion = "2016-12-01";
+ string apiVersion = "2020-10-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs
index 7ecbb8c5298a..52010229e202 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs
@@ -79,7 +79,7 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -140,7 +140,7 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client)
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -220,14 +220,13 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new NewErrorResponseException(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);
+ NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -237,10 +236,6 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client)
}
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);
@@ -297,7 +292,7 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client)
///