diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleriesOperations.cs
index ac43187831e3..aca425211ae0 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleriesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleriesOperations.cs
@@ -94,7 +94,7 @@ internal CommunityGalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "publicGalleryName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperations.cs
index 7bd7b869fe9d..ae3a9012dd99 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperations.cs
@@ -111,7 +111,7 @@ internal CommunityGalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -265,5 +265,381 @@ internal CommunityGalleryImageVersionsOperations(ComputeManagementClient client)
return _result;
}
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// The name of the community gallery image definition.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string location, string publicGalleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (publicGalleryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "publicGalleryName");
+ }
+ if (galleryImageName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
+ }
+ string apiVersion = "2022-01-03";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("publicGalleryName", publicGalleryName);
+ tracingParameters.Add("galleryImageName", galleryImageName);
+ 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.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ _url = _url.Replace("{publicGalleryName}", System.Uri.EscapeDataString(publicGalleryName));
+ _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName));
+ 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);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperationsExtensions.cs
index 4cea2f7d90c2..1227052f43f6 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperationsExtensions.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImageVersionsOperationsExtensions.cs
@@ -79,5 +79,85 @@ public static CommunityGalleryImageVersion Get(this ICommunityGalleryImageVersio
}
}
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// The name of the community gallery image definition.
+ ///
+ public static IPage List(this ICommunityGalleryImageVersionsOperations operations, string location, string publicGalleryName, string galleryImageName)
+ {
+ return operations.ListAsync(location, publicGalleryName, galleryImageName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// The name of the community gallery image definition.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ICommunityGalleryImageVersionsOperations operations, string location, string publicGalleryName, string galleryImageName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(location, publicGalleryName, galleryImageName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ICommunityGalleryImageVersionsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ICommunityGalleryImageVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperations.cs
index 92b4975e26bb..45392d981068 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperations.cs
@@ -101,7 +101,7 @@ internal CommunityGalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -253,5 +253,372 @@ internal CommunityGalleryImagesOperations(ComputeManagementClient client)
return _result;
}
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string location, string publicGalleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (publicGalleryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "publicGalleryName");
+ }
+ string apiVersion = "2022-01-03";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("publicGalleryName", publicGalleryName);
+ 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.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ _url = _url.Replace("{publicGalleryName}", System.Uri.EscapeDataString(publicGalleryName));
+ 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);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperationsExtensions.cs
index a70d9b2410b0..0cb768ca6313 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperationsExtensions.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/CommunityGalleryImagesOperationsExtensions.cs
@@ -67,5 +67,79 @@ public static CommunityGalleryImage Get(this ICommunityGalleryImagesOperations o
}
}
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ public static IPage List(this ICommunityGalleryImagesOperations operations, string location, string publicGalleryName)
+ {
+ return operations.ListAsync(location, publicGalleryName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ICommunityGalleryImagesOperations operations, string location, string publicGalleryName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(location, publicGalleryName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ICommunityGalleryImagesOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ICommunityGalleryImagesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs
index 50ce40ec2d1c..f6976a3c43f1 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs
@@ -156,7 +156,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -375,7 +375,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -553,7 +553,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -756,7 +756,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
gallery.Validate();
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1002,7 +1002,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "gallery");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1200,7 +1200,7 @@ internal GalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs
index 337b365f0ad7..837474b39ecd 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs
@@ -187,7 +187,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersionName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -429,7 +429,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -656,7 +656,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client)
{
galleryApplicationVersion.Validate();
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -923,7 +923,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersion");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1141,7 +1141,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersionName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs
index 7d0ffc20747d..0fc03e143abb 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs
@@ -164,7 +164,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -387,7 +387,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -602,7 +602,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client)
{
galleryApplication.Validate();
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -858,7 +858,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplication");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1066,7 +1066,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs
index 984d0893682c..ea6728a47d11 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs
@@ -184,7 +184,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -424,7 +424,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -650,7 +650,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
galleryImageVersion.Validate();
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -916,7 +916,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersion");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1133,7 +1133,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs
index 9870d45cec98..66290d0397d5 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs
@@ -164,7 +164,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -387,7 +387,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -602,7 +602,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
galleryImage.Validate();
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -858,7 +858,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImage");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1066,7 +1066,7 @@ internal GalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs
index 094f564a407e..a85c3afeeb02 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs
@@ -130,7 +130,7 @@ internal GallerySharingProfileOperations(ComputeManagementClient client)
{
sharingUpdate.Validate();
}
- string apiVersion = "2021-10-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImageVersionsOperations.cs
index 99c4df517559..3c668bd25e85 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImageVersionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImageVersionsOperations.cs
@@ -57,5 +57,55 @@ public partial interface ICommunityGalleryImageVersionsOperations
/// Thrown when a required parameter is null
///
Task> GetWithHttpMessagesAsync(string location, string publicGalleryName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// The name of the community gallery image definition.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string publicGalleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List community gallery image versions inside an image.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImagesOperations.cs
index 993e9e375d07..38391de5f3d7 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImagesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ICommunityGalleryImagesOperations.cs
@@ -51,5 +51,52 @@ public partial interface ICommunityGalleryImagesOperations
/// Thrown when a required parameter is null
///
Task> GetWithHttpMessagesAsync(string location, string publicGalleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// Resource location.
+ ///
+ ///
+ /// The public name of the community gallery.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string location, string publicGalleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List community gallery images inside a gallery.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs
index b49166210b46..f6b9cc3eafcb 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImage.cs
@@ -56,7 +56,9 @@ public CommunityGalleryImage()
/// Virtual Machine. Applicable to OS disks only. Possible values
/// include: 'V1', 'V2'
/// A list of gallery image features.
- public CommunityGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string type = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan))
+ /// Possible values include: 'x64',
+ /// 'Arm64'
+ public CommunityGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string type = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string architecture = default(string))
: base(name, location, type, uniqueId)
{
OsType = osType;
@@ -68,6 +70,7 @@ public CommunityGalleryImage()
HyperVGeneration = hyperVGeneration;
Features = features;
PurchasePlan = purchasePlan;
+ Architecture = architecture;
CustomInit();
}
@@ -137,6 +140,12 @@ public CommunityGalleryImage()
[JsonProperty(PropertyName = "properties.purchasePlan")]
public ImagePurchasePlan PurchasePlan { get; set; }
+ ///
+ /// Gets or sets possible values include: 'x64', 'Arm64'
+ ///
+ [JsonProperty(PropertyName = "properties.architecture")]
+ public string Architecture { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageVersion.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageVersion.cs
index 9c14ff8ce3f5..0829d3a39889 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageVersion.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/CommunityGalleryImageVersion.cs
@@ -46,11 +46,18 @@ public CommunityGalleryImageVersion()
/// The end of life date of the gallery
/// image version Definition. This property can be used for
/// decommissioning purposes. This property is updatable.
- public CommunityGalleryImageVersion(string name = default(string), string location = default(string), string type = default(string), string uniqueId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?))
+ /// If set to true, Virtual Machines
+ /// deployed from the latest version of the Image Definition won't use
+ /// this Image Version.
+ /// Describes the storage profile of the
+ /// image version.
+ public CommunityGalleryImageVersion(string name = default(string), string location = default(string), string type = default(string), string uniqueId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? excludeFromLatest = default(bool?), SharedGalleryImageVersionStorageProfile storageProfile = default(SharedGalleryImageVersionStorageProfile))
: base(name, location, type, uniqueId)
{
PublishedDate = publishedDate;
EndOfLifeDate = endOfLifeDate;
+ ExcludeFromLatest = excludeFromLatest;
+ StorageProfile = storageProfile;
CustomInit();
}
@@ -75,5 +82,19 @@ public CommunityGalleryImageVersion()
[JsonProperty(PropertyName = "properties.endOfLifeDate")]
public System.DateTime? EndOfLifeDate { get; set; }
+ ///
+ /// Gets or sets if set to true, Virtual Machines deployed from the
+ /// latest version of the Image Definition won't use this Image
+ /// Version.
+ ///
+ [JsonProperty(PropertyName = "properties.excludeFromLatest")]
+ public bool? ExcludeFromLatest { get; set; }
+
+ ///
+ /// Gets or sets describes the storage profile of the image version.
+ ///
+ [JsonProperty(PropertyName = "properties.storageProfile")]
+ public SharedGalleryImageVersionStorageProfile StorageProfile { get; set; }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs
index 7af369dd5e66..600fcf59ff67 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs
@@ -65,8 +65,7 @@ public GalleryImage()
/// The current state of the gallery
/// image definition.
/// A list of gallery image features.
- /// The architecture of the image.
- /// Applicable to OS disks only. Possible values include: 'x64',
+ /// Possible values include: 'x64',
/// 'Arm64'
public GalleryImage(string location, OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string), IList features = default(IList), string architecture = default(string))
: base(location, id, name, type, tags)
@@ -192,8 +191,7 @@ public GalleryImage()
public IList Features { get; set; }
///
- /// Gets or sets the architecture of the image. Applicable to OS disks
- /// only. Possible values include: 'x64', 'Arm64'
+ /// Gets or sets possible values include: 'x64', 'Arm64'
///
[JsonProperty(PropertyName = "properties.architecture")]
public string Architecture { get; set; }
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs
index d83f87be2ce7..8c0194aa39ee 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs
@@ -64,8 +64,7 @@ public GalleryImageUpdate()
/// The current state of the gallery
/// image definition.
/// A list of gallery image features.
- /// The architecture of the image.
- /// Applicable to OS disks only. Possible values include: 'x64',
+ /// Possible values include: 'x64',
/// 'Arm64'
public GalleryImageUpdate(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string), IList features = default(IList), string architecture = default(string))
: base(id, name, type, tags)
@@ -191,8 +190,7 @@ public GalleryImageUpdate()
public IList Features { get; set; }
///
- /// Gets or sets the architecture of the image. Applicable to OS disks
- /// only. Possible values include: 'x64', 'Arm64'
+ /// Gets or sets possible values include: 'x64', 'Arm64'
///
[JsonProperty(PropertyName = "properties.architecture")]
public string Architecture { get; set; }
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs
index 22f0125b9557..ae86b1d43aa6 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs
@@ -18,5 +18,6 @@ public static class GallerySharingPermissionTypes
{
public const string Private = "Private";
public const string Groups = "Groups";
+ public const string Community = "Community";
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryDataDiskImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryDataDiskImage.cs
new file mode 100644
index 000000000000..62c2d060be59
--- /dev/null
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryDataDiskImage.cs
@@ -0,0 +1,73 @@
+//
+// 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.Compute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// This is the data disk image.
+ ///
+ public partial class SharedGalleryDataDiskImage : SharedGalleryDiskImage
+ {
+ ///
+ /// Initializes a new instance of the SharedGalleryDataDiskImage class.
+ ///
+ public SharedGalleryDataDiskImage()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SharedGalleryDataDiskImage class.
+ ///
+ /// This property specifies the logical unit number
+ /// of the data disk. This value is used to identify data disks within
+ /// the Virtual Machine and therefore must be unique for each data disk
+ /// attached to the Virtual Machine.
+ /// This property indicates the size of the
+ /// VHD to be created.
+ /// The host caching of the disk. Valid
+ /// values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values
+ /// include: 'None', 'ReadOnly', 'ReadWrite'
+ public SharedGalleryDataDiskImage(int lun, int? diskSizeGB = default(int?), string hostCaching = default(string))
+ : base(diskSizeGB, hostCaching)
+ {
+ Lun = lun;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets this property specifies the logical unit number of the
+ /// data disk. This value is used to identify data disks within the
+ /// Virtual Machine and therefore must be unique for each data disk
+ /// attached to the Virtual Machine.
+ ///
+ [JsonProperty(PropertyName = "lun")]
+ public int Lun { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ //Nothing to validate
+ }
+ }
+}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryDiskImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryDiskImage.cs
new file mode 100644
index 000000000000..590ac0462327
--- /dev/null
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryDiskImage.cs
@@ -0,0 +1,64 @@
+//
+// 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.Compute.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// This is the disk image base class.
+ ///
+ public partial class SharedGalleryDiskImage
+ {
+ ///
+ /// Initializes a new instance of the SharedGalleryDiskImage class.
+ ///
+ public SharedGalleryDiskImage()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SharedGalleryDiskImage class.
+ ///
+ /// This property indicates the size of the
+ /// VHD to be created.
+ /// The host caching of the disk. Valid
+ /// values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values
+ /// include: 'None', 'ReadOnly', 'ReadWrite'
+ public SharedGalleryDiskImage(int? diskSizeGB = default(int?), string hostCaching = default(string))
+ {
+ DiskSizeGB = diskSizeGB;
+ HostCaching = hostCaching;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets this property indicates the size of the VHD to be created.
+ ///
+ [JsonProperty(PropertyName = "diskSizeGB")]
+ public int? DiskSizeGB { get; private set; }
+
+ ///
+ /// Gets or sets the host caching of the disk. Valid values are 'None',
+ /// 'ReadOnly', and 'ReadWrite'. Possible values include: 'None',
+ /// 'ReadOnly', 'ReadWrite'
+ ///
+ [JsonProperty(PropertyName = "hostCaching")]
+ public string HostCaching { get; set; }
+
+ }
+}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryHostCaching.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryHostCaching.cs
new file mode 100644
index 000000000000..84edad26f060
--- /dev/null
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryHostCaching.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.Compute.Models
+{
+
+ ///
+ /// Defines values for SharedGalleryHostCaching.
+ ///
+ public static class SharedGalleryHostCaching
+ {
+ public const string None = "None";
+ public const string ReadOnly = "ReadOnly";
+ public const string ReadWrite = "ReadWrite";
+ }
+}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs
index e64cdf38245e..c14816321204 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs
@@ -55,7 +55,9 @@ public SharedGalleryImage()
/// Virtual Machine. Applicable to OS disks only. Possible values
/// include: 'V1', 'V2'
/// A list of gallery image features.
- public SharedGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan))
+ /// Possible values include: 'x64',
+ /// 'Arm64'
+ public SharedGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string architecture = default(string))
: base(name, location, uniqueId)
{
OsType = osType;
@@ -67,6 +69,7 @@ public SharedGalleryImage()
HyperVGeneration = hyperVGeneration;
Features = features;
PurchasePlan = purchasePlan;
+ Architecture = architecture;
CustomInit();
}
@@ -136,6 +139,12 @@ public SharedGalleryImage()
[JsonProperty(PropertyName = "properties.purchasePlan")]
public ImagePurchasePlan PurchasePlan { get; set; }
+ ///
+ /// Gets or sets possible values include: 'x64', 'Arm64'
+ ///
+ [JsonProperty(PropertyName = "properties.architecture")]
+ public string Architecture { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs
index b51fcbd0b480..c9c40cfc649c 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs
@@ -43,11 +43,18 @@ public SharedGalleryImageVersion()
/// The end of life date of the gallery
/// image version Definition. This property can be used for
/// decommissioning purposes. This property is updatable.
- public SharedGalleryImageVersion(string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?))
+ /// If set to true, Virtual Machines
+ /// deployed from the latest version of the Image Definition won't use
+ /// this Image Version.
+ /// Describes the storage profile of the
+ /// image version.
+ public SharedGalleryImageVersion(string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? excludeFromLatest = default(bool?), SharedGalleryImageVersionStorageProfile storageProfile = default(SharedGalleryImageVersionStorageProfile))
: base(name, location, uniqueId)
{
PublishedDate = publishedDate;
EndOfLifeDate = endOfLifeDate;
+ ExcludeFromLatest = excludeFromLatest;
+ StorageProfile = storageProfile;
CustomInit();
}
@@ -72,5 +79,19 @@ public SharedGalleryImageVersion()
[JsonProperty(PropertyName = "properties.endOfLifeDate")]
public System.DateTime? EndOfLifeDate { get; set; }
+ ///
+ /// Gets or sets if set to true, Virtual Machines deployed from the
+ /// latest version of the Image Definition won't use this Image
+ /// Version.
+ ///
+ [JsonProperty(PropertyName = "properties.excludeFromLatest")]
+ public bool? ExcludeFromLatest { get; set; }
+
+ ///
+ /// Gets or sets describes the storage profile of the image version.
+ ///
+ [JsonProperty(PropertyName = "properties.storageProfile")]
+ public SharedGalleryImageVersionStorageProfile StorageProfile { get; set; }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.cs
new file mode 100644
index 000000000000..0e9a4a85dd6a
--- /dev/null
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersionStorageProfile.cs
@@ -0,0 +1,61 @@
+//
+// 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.Compute.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// This is the storage profile of a Gallery Image Version.
+ ///
+ public partial class SharedGalleryImageVersionStorageProfile
+ {
+ ///
+ /// Initializes a new instance of the
+ /// SharedGalleryImageVersionStorageProfile class.
+ ///
+ public SharedGalleryImageVersionStorageProfile()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// SharedGalleryImageVersionStorageProfile class.
+ ///
+ /// A list of data disk images.
+ public SharedGalleryImageVersionStorageProfile(SharedGalleryOSDiskImage osDiskImage = default(SharedGalleryOSDiskImage), IList dataDiskImages = default(IList))
+ {
+ OsDiskImage = osDiskImage;
+ DataDiskImages = dataDiskImages;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "osDiskImage")]
+ public SharedGalleryOSDiskImage OsDiskImage { get; set; }
+
+ ///
+ /// Gets or sets a list of data disk images.
+ ///
+ [JsonProperty(PropertyName = "dataDiskImages")]
+ public IList DataDiskImages { get; set; }
+
+ }
+}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryOSDiskImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryOSDiskImage.cs
new file mode 100644
index 000000000000..a89a7a8847da
--- /dev/null
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryOSDiskImage.cs
@@ -0,0 +1,48 @@
+//
+// 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.Compute.Models
+{
+ using System.Linq;
+
+ ///
+ /// This is the OS disk image.
+ ///
+ public partial class SharedGalleryOSDiskImage : SharedGalleryDiskImage
+ {
+ ///
+ /// Initializes a new instance of the SharedGalleryOSDiskImage class.
+ ///
+ public SharedGalleryOSDiskImage()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SharedGalleryOSDiskImage class.
+ ///
+ /// This property indicates the size of the
+ /// VHD to be created.
+ /// The host caching of the disk. Valid
+ /// values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values
+ /// include: 'None', 'ReadOnly', 'ReadWrite'
+ public SharedGalleryOSDiskImage(int? diskSizeGB = default(int?), string hostCaching = default(string))
+ : base(diskSizeGB, hostCaching)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs
index 8ce538b2c6ea..3cbc4050601e 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs
@@ -34,7 +34,8 @@ public SharingProfile()
/// This property allows you to specify the
/// permission of sharing gallery. <br><br> Possible values
/// are: <br><br> **Private** <br><br>
- /// **Groups**. Possible values include: 'Private', 'Groups'
+ /// **Groups** <br><br> **Community**. Possible values
+ /// include: 'Private', 'Groups', 'Community'
/// A list of sharing profile groups.
/// Information of community gallery
/// if current gallery is shared to community.
@@ -55,8 +56,9 @@ public SharingProfile()
/// Gets or sets this property allows you to specify the permission of
/// sharing gallery. <br><br> Possible
/// values are: <br><br> **Private**
- /// <br><br> **Groups**. Possible values
- /// include: 'Private', 'Groups'
+ /// <br><br> **Groups**
+ /// <br><br> **Community**. Possible values
+ /// include: 'Private', 'Groups', 'Community'
///
[JsonProperty(PropertyName = "permissions")]
public string Permissions { get; set; }
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs
index 4e23b163f929..7a8e4df6262c 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs
@@ -34,8 +34,8 @@ public SharingProfileGroup()
/// This property allows you to specify the type of
/// sharing group. <br><br> Possible values are:
/// <br><br> **Subscriptions** <br><br>
- /// **AADTenants** <br><br> **Community**. Possible values
- /// include: 'Subscriptions', 'AADTenants', 'Community'
+ /// **AADTenants**. Possible values include: 'Subscriptions',
+ /// 'AADTenants'
/// A list of subscription/tenant ids the gallery is
/// aimed to be shared to.
public SharingProfileGroup(string type = default(string), IList ids = default(IList))
@@ -54,9 +54,8 @@ public SharingProfileGroup()
/// Gets or sets this property allows you to specify the type of
/// sharing group. <br><br> Possible values
/// are: <br><br> **Subscriptions**
- /// <br><br> **AADTenants**
- /// <br><br> **Community**. Possible values
- /// include: 'Subscriptions', 'AADTenants', 'Community'
+ /// <br><br> **AADTenants**. Possible
+ /// values include: 'Subscriptions', 'AADTenants'
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs
index a9bb49a16838..1f1724bed836 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs
@@ -18,6 +18,5 @@ public static class SharingProfileGroupTypes
{
public const string Subscriptions = "Subscriptions";
public const string AADTenants = "AADTenants";
- public const string Community = "Community";
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs
index 163acee7493a..be5f48959753 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs
@@ -27,21 +27,21 @@ public static IEnumerable> ApiInfo_ComputeManageme
new Tuple("Compute", "CloudServiceRoles", "2021-03-01"),
new Tuple("Compute", "CloudServices", "2021-03-01"),
new Tuple("Compute", "CloudServicesUpdateDomain", "2021-03-01"),
- new Tuple("Compute", "CommunityGalleries", "2021-07-01"),
- new Tuple("Compute", "CommunityGalleryImageVersions", "2021-07-01"),
- new Tuple("Compute", "CommunityGalleryImages", "2021-07-01"),
+ new Tuple("Compute", "CommunityGalleries", "2022-01-03"),
+ new Tuple("Compute", "CommunityGalleryImageVersions", "2022-01-03"),
+ new Tuple("Compute", "CommunityGalleryImages", "2022-01-03"),
new Tuple("Compute", "DedicatedHostGroups", "2021-11-01"),
new Tuple("Compute", "DedicatedHosts", "2021-11-01"),
new Tuple("Compute", "DiskAccesses", "2021-12-01"),
new Tuple("Compute", "DiskEncryptionSets", "2021-12-01"),
new Tuple("Compute", "DiskRestorePoint", "2021-12-01"),
new Tuple("Compute", "Disks", "2021-12-01"),
- new Tuple("Compute", "Galleries", "2021-10-01"),
- new Tuple("Compute", "GalleryApplicationVersions", "2021-10-01"),
- new Tuple("Compute", "GalleryApplications", "2021-10-01"),
- new Tuple("Compute", "GalleryImageVersions", "2021-10-01"),
- new Tuple("Compute", "GalleryImages", "2021-10-01"),
- new Tuple("Compute", "GallerySharingProfile", "2021-10-01"),
+ new Tuple("Compute", "Galleries", "2022-01-03"),
+ new Tuple("Compute", "GalleryApplicationVersions", "2022-01-03"),
+ new Tuple("Compute", "GalleryApplications", "2022-01-03"),
+ new Tuple("Compute", "GalleryImageVersions", "2022-01-03"),
+ new Tuple("Compute", "GalleryImages", "2022-01-03"),
+ new Tuple("Compute", "GallerySharingProfile", "2022-01-03"),
new Tuple("Compute", "Images", "2021-11-01"),
new Tuple("Compute", "LogAnalytics", "2021-11-01"),
new Tuple("Compute", "Operations", "2021-11-01"),
@@ -49,9 +49,9 @@ public static IEnumerable> ApiInfo_ComputeManageme
new Tuple("Compute", "ResourceSkus", "2021-07-01"),
new Tuple("Compute", "RestorePointCollections", "2021-11-01"),
new Tuple("Compute", "RestorePoints", "2021-11-01"),
- new Tuple("Compute", "SharedGalleries", "2021-07-01"),
- new Tuple("Compute", "SharedGalleryImageVersions", "2021-07-01"),
- new Tuple("Compute", "SharedGalleryImages", "2021-07-01"),
+ new Tuple("Compute", "SharedGalleries", "2022-01-03"),
+ new Tuple("Compute", "SharedGalleryImageVersions", "2022-01-03"),
+ new Tuple("Compute", "SharedGalleryImages", "2022-01-03"),
new Tuple("Compute", "Snapshots", "2021-12-01"),
new Tuple("Compute", "SshPublicKeys", "2021-11-01"),
new Tuple("Compute", "Usage", "2021-11-01"),
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs
index 54261348776a..7c1142a96618 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs
@@ -91,7 +91,7 @@ internal SharedGalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "location");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -288,7 +288,7 @@ internal SharedGalleriesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs
index 9ff94cb85126..abc4b12fa441 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs
@@ -106,7 +106,7 @@ internal SharedGalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -325,7 +325,7 @@ internal SharedGalleryImageVersionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs
index ac3b8a6f2e71..99a4f931acf2 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs
@@ -98,7 +98,7 @@ internal SharedGalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -305,7 +305,7 @@ internal SharedGalleryImagesOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName");
}
- string apiVersion = "2021-07-01";
+ string apiVersion = "2022-01-03";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;