diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs
index b3816a506daf..1829bd2a0b85 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs
@@ -474,6 +474,506 @@ internal DiskRestorePointOperations(ComputeManagementClient client)
return _result;
}
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> GrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginGrantAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task RevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginRevokeAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginGrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (restorePointCollectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "restorePointCollectionName");
+ }
+ if (vmRestorePointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vmRestorePointName");
+ }
+ if (diskRestorePointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "diskRestorePointName");
+ }
+ if (grantAccessData == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "grantAccessData");
+ }
+ if (grantAccessData != null)
+ {
+ grantAccessData.Validate();
+ }
+ string apiVersion = "2020-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("restorePointCollectionName", restorePointCollectionName);
+ tracingParameters.Add("vmRestorePointName", vmRestorePointName);
+ tracingParameters.Add("diskRestorePointName", diskRestorePointName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("grantAccessData", grantAccessData);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginGrantAccess", 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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{restorePointCollectionName}", System.Uri.EscapeDataString(restorePointCollectionName));
+ _url = _url.Replace("{vmRestorePointName}", System.Uri.EscapeDataString(vmRestorePointName));
+ _url = _url.Replace("{diskRestorePointName}", System.Uri.EscapeDataString(diskRestorePointName));
+ 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("POST");
+ _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(grantAccessData != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(grantAccessData, 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);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// 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 BeginRevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (restorePointCollectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "restorePointCollectionName");
+ }
+ if (vmRestorePointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vmRestorePointName");
+ }
+ if (diskRestorePointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "diskRestorePointName");
+ }
+ string apiVersion = "2020-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("restorePointCollectionName", restorePointCollectionName);
+ tracingParameters.Add("vmRestorePointName", vmRestorePointName);
+ tracingParameters.Add("diskRestorePointName", diskRestorePointName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginRevokeAccess", 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.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{restorePointCollectionName}", System.Uri.EscapeDataString(restorePointCollectionName));
+ _url = _url.Replace("{vmRestorePointName}", System.Uri.EscapeDataString(vmRestorePointName));
+ _url = _url.Replace("{diskRestorePointName}", System.Uri.EscapeDataString(diskRestorePointName));
+ 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("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Lists diskRestorePoints under a vmRestorePoint.
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs
index 1ce2e70ac2c2..6ea1d754cdab 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs
@@ -137,6 +137,260 @@ public static IPage ListByRestorePoint(this IDiskRestorePointO
}
}
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access operation.
+ ///
+ public static AccessUri GrantAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData)
+ {
+ return operations.GrantAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GrantAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GrantAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ public static void RevokeAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName)
+ {
+ operations.RevokeAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RevokeAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RevokeAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access operation.
+ ///
+ public static AccessUri BeginGrantAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData)
+ {
+ return operations.BeginGrantAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginGrantAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginGrantAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ public static void BeginRevokeAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName)
+ {
+ operations.BeginRevokeAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+ /// maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point belongs.
+ /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name
+ /// length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters for the
+ /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginRevokeAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginRevokeAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Lists diskRestorePoints under a vmRestorePoint.
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs
index c385b750b237..ca3b34a2a6f7 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs
@@ -93,6 +93,156 @@ public partial interface IDiskRestorePointOperations
///
Task>> ListByRestorePointWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore
+ /// point belongs. Supported characters for the name are a-z, A-Z, 0-9
+ /// and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _.
+ /// The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters
+ /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
+ /// characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access
+ /// operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore
+ /// point belongs. Supported characters for the name are a-z, A-Z, 0-9
+ /// and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _.
+ /// The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters
+ /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
+ /// characters.
+ ///
+ ///
+ /// 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 RevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Grants access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore
+ /// point belongs. Supported characters for the name are a-z, A-Z, 0-9
+ /// and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _.
+ /// The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters
+ /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
+ /// characters.
+ ///
+ ///
+ /// Access data object supplied in the body of the get disk access
+ /// operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginGrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Revokes access to a diskRestorePoint.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the restore point collection that the disk restore
+ /// point belongs. Supported characters for the name are a-z, A-Z, 0-9
+ /// and _. The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the vm restore point that the disk disk restore point
+ /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _.
+ /// The maximum name length is 80 characters.
+ ///
+ ///
+ /// The name of the disk restore point created. Supported characters
+ /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
+ /// characters.
+ ///
+ ///
+ /// 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 BeginRevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Lists diskRestorePoints under a vmRestorePoint.
///
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs
index 7042c7d19476..ded41ccc3050 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs
@@ -31,10 +31,11 @@ public ManagedDiskParameters()
///
/// Resource Id
/// Specifies the storage account type
- /// for the managed disk. NOTE: UltraSSD_LRS can only be used with data
- /// disks, it cannot be used with OS Disk. Possible values include:
- /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS',
- /// 'Premium_ZRS', 'StandardSSD_ZRS'
+ /// for the managed disk. Managed OS disk storage account type can only
+ /// be set when you create the scale set. NOTE: UltraSSD_LRS can only
+ /// be used with data disks, it cannot be used with OS Disk. Possible
+ /// values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS',
+ /// 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS'
/// Specifies the customer managed disk
/// encryption set resource id for the managed disk.
public ManagedDiskParameters(string id = default(string), string storageAccountType = default(string), DiskEncryptionSetParameters diskEncryptionSet = default(DiskEncryptionSetParameters))
@@ -52,8 +53,9 @@ public ManagedDiskParameters()
///
/// Gets or sets specifies the storage account type for the managed
- /// disk. NOTE: UltraSSD_LRS can only be used with data disks, it
- /// cannot be used with OS Disk. Possible values include:
+ /// disk. Managed OS disk storage account type can only be set when you
+ /// create the scale set. NOTE: UltraSSD_LRS can only be used with data
+ /// disks, it cannot be used with OS Disk. Possible values include:
/// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS',
/// 'Premium_ZRS', 'StandardSSD_ZRS'
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs
index 9af937b631f9..8a3daf217a1a 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.Compute.Models
{
- using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -30,14 +29,14 @@ public PublicIPAddressSku()
///
/// Initializes a new instance of the PublicIPAddressSku class.
///
- /// Specify public IP sku name.
- /// Possible values include: 'Basic', 'Standard'
- /// Specify public IP sku tier.
- /// Possible values include: 'Regional', 'Global'
- public PublicIPAddressSku(string publicIPAddressSkuName, string publicIPAddressSkuTier = default(string))
+ /// Specify public IP sku name. Possible values
+ /// include: 'Basic', 'Standard'
+ /// Specify public IP sku tier. Possible values
+ /// include: 'Regional', 'Global'
+ public PublicIPAddressSku(string name = default(string), string tier = default(string))
{
- PublicIPAddressSkuName = publicIPAddressSkuName;
- PublicIPAddressSkuTier = publicIPAddressSkuTier;
+ Name = name;
+ Tier = tier;
CustomInit();
}
@@ -50,28 +49,15 @@ public PublicIPAddressSku()
/// Gets or sets specify public IP sku name. Possible values include:
/// 'Basic', 'Standard'
///
- [JsonProperty(PropertyName = "publicIPAddressSkuName")]
- public string PublicIPAddressSkuName { get; set; }
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
///
/// Gets or sets specify public IP sku tier. Possible values include:
/// 'Regional', 'Global'
///
- [JsonProperty(PropertyName = "publicIPAddressSkuTier")]
- public string PublicIPAddressSkuTier { get; set; }
+ [JsonProperty(PropertyName = "tier")]
+ public string Tier { get; set; }
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (PublicIPAddressSkuName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "PublicIPAddressSkuName");
- }
- }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs
index d0bed83d6e3d..573abfe35c08 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs
@@ -153,10 +153,6 @@ public virtual void Validate()
{
DnsSettings.Validate();
}
- if (Sku != null)
- {
- Sku.Validate();
- }
}
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs
index d3cadab7187d..7be218d6cda9 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs
@@ -142,10 +142,6 @@ public virtual void Validate()
{
DnsSettings.Validate();
}
- if (Sku != null)
- {
- Sku.Validate();
- }
}
}
}