diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperations.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperations.cs
index 61652bb0bcac..2aa5712fb166 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperations.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperations.cs
@@ -1277,6 +1277,31 @@ internal ContainerGroupsOperations(ContainerInstanceManagementClient client)
return _result;
}
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task StartWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, containerGroupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Create or update container groups.
///
@@ -1691,6 +1716,184 @@ internal ContainerGroupsOperations(ContainerInstanceManagementClient client)
return _result;
}
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ ///
+ /// 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 BeginStartWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (containerGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "containerGroupName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("containerGroupName", containerGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginStart", 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.ContainerInstance/containerGroups/{containerGroupName}/start").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{containerGroupName}", System.Uri.EscapeDataString(containerGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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 != 204)
+ {
+ 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;
+ }
+
///
/// Get a list of container groups in the specified subscription.
///
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperationsExtensions.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperationsExtensions.cs
index 426e5fb573cb..83a99e4d5166 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperationsExtensions.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerGroupsOperationsExtensions.cs
@@ -405,6 +405,49 @@ public static void Stop(this IContainerGroupsOperations operations, string resou
(await operations.StopWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ public static void Start(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName)
+ {
+ operations.StartAsync(resourceGroupName, containerGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task StartAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.StartWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Create or update container groups.
///
@@ -502,6 +545,49 @@ public static void BeginRestart(this IContainerGroupsOperations operations, stri
(await operations.BeginRestartWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ public static void BeginStart(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName)
+ {
+ operations.BeginStartAsync(resourceGroupName, containerGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginStartAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Get a list of container groups in the specified subscription.
///
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClient.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClient.cs
index b8418cf16625..b10f1419f614 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClient.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClient.cs
@@ -20,6 +20,8 @@ namespace Microsoft.Azure.Management.ContainerInstance
using System.Linq;
using System.Net;
using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
public partial class ContainerInstanceManagementClient : ServiceClient, IContainerInstanceManagementClient, IAzureClient
{
@@ -379,5 +381,386 @@ private void Initialize()
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}
+ ///
+ /// Get the list of cached images.
+ ///
+ ///
+ /// Get the list of cached images on specific OS type for a subscription in a
+ /// region.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ ///
+ /// 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> ListCachedImagesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListCachedImages", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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;
+ }
+
+ ///
+ /// Get the list of capabilities of the location.
+ ///
+ ///
+ /// Get the list of CPU/memory/GPU capabilities of a region.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ ///
+ /// 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> ListCapabilitiesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListCapabilities", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClientExtensions.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClientExtensions.cs
new file mode 100644
index 000000000000..ce10e590420b
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/ContainerInstanceManagementClientExtensions.cs
@@ -0,0 +1,107 @@
+//
+// 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.ContainerInstance
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for ContainerInstanceManagementClient.
+ ///
+ public static partial class ContainerInstanceManagementClientExtensions
+ {
+ ///
+ /// Get the list of cached images.
+ ///
+ ///
+ /// Get the list of cached images on specific OS type for a subscription in a
+ /// region.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ public static CachedImagesListResult ListCachedImages(this IContainerInstanceManagementClient operations, string location)
+ {
+ return operations.ListCachedImagesAsync(location).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the list of cached images.
+ ///
+ ///
+ /// Get the list of cached images on specific OS type for a subscription in a
+ /// region.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListCachedImagesAsync(this IContainerInstanceManagementClient operations, string location, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListCachedImagesWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get the list of capabilities of the location.
+ ///
+ ///
+ /// Get the list of CPU/memory/GPU capabilities of a region.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ public static CapabilitiesListResult ListCapabilities(this IContainerInstanceManagementClient operations, string location)
+ {
+ return operations.ListCapabilitiesAsync(location).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the list of capabilities of the location.
+ ///
+ ///
+ /// Get the list of CPU/memory/GPU capabilities of a region.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListCapabilitiesAsync(this IContainerInstanceManagementClient operations, string location, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListCapabilitiesWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerGroupsOperations.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerGroupsOperations.cs
index 23454ec3edee..34cd2e84763c 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerGroupsOperations.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerGroupsOperations.cs
@@ -254,6 +254,31 @@ public partial interface IContainerGroupsOperations
///
Task StopWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ ///
+ /// 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 StartWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Create or update container groups.
///
///
@@ -311,6 +336,31 @@ public partial interface IContainerGroupsOperations
///
Task BeginRestartWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// Starts all containers in a container group.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the container group.
+ ///
+ ///
+ /// 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 BeginStartWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Get a list of container groups in the specified subscription.
///
///
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerInstanceManagementClient.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerInstanceManagementClient.cs
index 081e05ab3f3f..e19d4d7ad88a 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerInstanceManagementClient.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/IContainerInstanceManagementClient.cs
@@ -14,6 +14,10 @@ namespace Microsoft.Azure.Management.ContainerInstance
using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
///
///
@@ -95,5 +99,40 @@ public partial interface IContainerInstanceManagementClient : System.IDisposable
///
IServiceAssociationLinkOperations ServiceAssociationLink { get; }
+ ///
+ /// Get the list of cached images.
+ ///
+ ///
+ /// Get the list of cached images on specific OS type for a
+ /// subscription in a region.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task> ListCachedImagesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Get the list of capabilities of the location.
+ ///
+ ///
+ /// Get the list of CPU/memory/GPU capabilities of a region.
+ ///
+ ///
+ /// The identifier for the physical azure location.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ Task> ListCapabilitiesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+
}
}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CachedImages.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CachedImages.cs
new file mode 100644
index 000000000000..2c290ae43819
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CachedImages.cs
@@ -0,0 +1,85 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The cached image and OS type.
+ ///
+ public partial class CachedImages
+ {
+ ///
+ /// Initializes a new instance of the CachedImages class.
+ ///
+ public CachedImages()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CachedImages class.
+ ///
+ /// The OS type of the cached image.
+ /// The cached image name.
+ /// The resource Id of the cached image.
+ public CachedImages(string osType, string image, string id = default(string))
+ {
+ Id = id;
+ OsType = osType;
+ Image = image;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource Id of the cached image.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets the OS type of the cached image.
+ ///
+ [JsonProperty(PropertyName = "osType")]
+ public string OsType { get; set; }
+
+ ///
+ /// Gets or sets the cached image name.
+ ///
+ [JsonProperty(PropertyName = "image")]
+ public string Image { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (OsType == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "OsType");
+ }
+ if (Image == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Image");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CachedImagesListResult.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CachedImagesListResult.cs
new file mode 100644
index 000000000000..c017e9686006
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CachedImagesListResult.cs
@@ -0,0 +1,62 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The response containing cached images.
+ ///
+ public partial class CachedImagesListResult
+ {
+ ///
+ /// Initializes a new instance of the CachedImagesListResult class.
+ ///
+ public CachedImagesListResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CachedImagesListResult class.
+ ///
+ /// The list of cached images.
+ /// The URI to fetch the next page of cached
+ /// images.
+ public CachedImagesListResult(IList value = default(IList), string nextLink = default(string))
+ {
+ Value = value;
+ NextLink = nextLink;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the list of cached images.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ ///
+ /// Gets or sets the URI to fetch the next page of cached images.
+ ///
+ [JsonProperty(PropertyName = "nextLink")]
+ public string NextLink { get; set; }
+
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Capabilities.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Capabilities.cs
new file mode 100644
index 000000000000..fb364f732f97
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Capabilities.cs
@@ -0,0 +1,96 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The regional capabilities.
+ ///
+ public partial class Capabilities
+ {
+ ///
+ /// Initializes a new instance of the Capabilities class.
+ ///
+ public Capabilities()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Capabilities class.
+ ///
+ /// The resource type that this capability
+ /// describes.
+ /// The OS type that this capability
+ /// describes.
+ /// The resource location.
+ /// The ip address type that this
+ /// capability describes.
+ /// The GPU sku that this capability
+ /// describes.
+ /// The supported
+ /// capabilities.
+ public Capabilities(string resourceType = default(string), string osType = default(string), string location = default(string), string ipAddressType = default(string), string gpu = default(string), CapabilitiesCapabilities capabilitiesProperty = default(CapabilitiesCapabilities))
+ {
+ ResourceType = resourceType;
+ OsType = osType;
+ Location = location;
+ IpAddressType = ipAddressType;
+ Gpu = gpu;
+ CapabilitiesProperty = capabilitiesProperty;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the resource type that this capability describes.
+ ///
+ [JsonProperty(PropertyName = "resourceType")]
+ public string ResourceType { get; private set; }
+
+ ///
+ /// Gets the OS type that this capability describes.
+ ///
+ [JsonProperty(PropertyName = "osType")]
+ public string OsType { get; private set; }
+
+ ///
+ /// Gets the resource location.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; private set; }
+
+ ///
+ /// Gets the ip address type that this capability describes.
+ ///
+ [JsonProperty(PropertyName = "ipAddressType")]
+ public string IpAddressType { get; private set; }
+
+ ///
+ /// Gets the GPU sku that this capability describes.
+ ///
+ [JsonProperty(PropertyName = "gpu")]
+ public string Gpu { get; private set; }
+
+ ///
+ /// Gets the supported capabilities.
+ ///
+ [JsonProperty(PropertyName = "capabilities")]
+ public CapabilitiesCapabilities CapabilitiesProperty { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CapabilitiesCapabilities.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CapabilitiesCapabilities.cs
new file mode 100644
index 000000000000..8224c2191680
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CapabilitiesCapabilities.cs
@@ -0,0 +1,69 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The supported capabilities.
+ ///
+ public partial class CapabilitiesCapabilities
+ {
+ ///
+ /// Initializes a new instance of the CapabilitiesCapabilities class.
+ ///
+ public CapabilitiesCapabilities()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CapabilitiesCapabilities class.
+ ///
+ /// The maximum allowed memory request in
+ /// GB.
+ /// The maximum allowed CPU request in
+ /// cores.
+ /// The maximum allowed GPU count.
+ public CapabilitiesCapabilities(double? maxMemoryInGB = default(double?), double? maxCpu = default(double?), double? maxGpuCount = default(double?))
+ {
+ MaxMemoryInGB = maxMemoryInGB;
+ MaxCpu = maxCpu;
+ MaxGpuCount = maxGpuCount;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the maximum allowed memory request in GB.
+ ///
+ [JsonProperty(PropertyName = "maxMemoryInGB")]
+ public double? MaxMemoryInGB { get; private set; }
+
+ ///
+ /// Gets the maximum allowed CPU request in cores.
+ ///
+ [JsonProperty(PropertyName = "maxCpu")]
+ public double? MaxCpu { get; private set; }
+
+ ///
+ /// Gets the maximum allowed GPU count.
+ ///
+ [JsonProperty(PropertyName = "maxGpuCount")]
+ public double? MaxGpuCount { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CapabilitiesListResult.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CapabilitiesListResult.cs
new file mode 100644
index 000000000000..5e2b940c5a04
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/CapabilitiesListResult.cs
@@ -0,0 +1,62 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The response containing list of capabilities.
+ ///
+ public partial class CapabilitiesListResult
+ {
+ ///
+ /// Initializes a new instance of the CapabilitiesListResult class.
+ ///
+ public CapabilitiesListResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CapabilitiesListResult class.
+ ///
+ /// The list of capabilities.
+ /// The URI to fetch the next page of
+ /// capabilities.
+ public CapabilitiesListResult(IList value = default(IList), string nextLink = default(string))
+ {
+ Value = value;
+ NextLink = nextLink;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the list of capabilities.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ ///
+ /// Gets or sets the URI to fetch the next page of capabilities.
+ ///
+ [JsonProperty(PropertyName = "nextLink")]
+ public string NextLink { get; set; }
+
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ContainerGroup.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ContainerGroup.cs
index af652bfc5d8c..a20f0e45dfc7 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ContainerGroup.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ContainerGroup.cs
@@ -66,7 +66,9 @@ public ContainerGroup()
/// container group.
/// The network profile information for a
/// container group.
- public ContainerGroup(IList containers, string osType, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ContainerGroupIdentity identity = default(ContainerGroupIdentity), string provisioningState = default(string), IList imageRegistryCredentials = default(IList), string restartPolicy = default(string), IpAddress ipAddress = default(IpAddress), IList volumes = default(IList), ContainerGroupPropertiesInstanceView instanceView = default(ContainerGroupPropertiesInstanceView), ContainerGroupDiagnostics diagnostics = default(ContainerGroupDiagnostics), ContainerGroupNetworkProfile networkProfile = default(ContainerGroupNetworkProfile))
+ /// The DNS config information for a container
+ /// group.
+ public ContainerGroup(IList containers, string osType, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ContainerGroupIdentity identity = default(ContainerGroupIdentity), string provisioningState = default(string), IList imageRegistryCredentials = default(IList), string restartPolicy = default(string), IpAddress ipAddress = default(IpAddress), IList volumes = default(IList), ContainerGroupPropertiesInstanceView instanceView = default(ContainerGroupPropertiesInstanceView), ContainerGroupDiagnostics diagnostics = default(ContainerGroupDiagnostics), ContainerGroupNetworkProfile networkProfile = default(ContainerGroupNetworkProfile), DnsConfiguration dnsConfig = default(DnsConfiguration))
: base(id, name, type, location, tags)
{
Identity = identity;
@@ -80,6 +82,7 @@ public ContainerGroup()
InstanceView = instanceView;
Diagnostics = diagnostics;
NetworkProfile = networkProfile;
+ DnsConfig = dnsConfig;
CustomInit();
}
@@ -164,6 +167,12 @@ public ContainerGroup()
[JsonProperty(PropertyName = "properties.networkProfile")]
public ContainerGroupNetworkProfile NetworkProfile { get; set; }
+ ///
+ /// Gets or sets the DNS config information for a container group.
+ ///
+ [JsonProperty(PropertyName = "properties.dnsConfig")]
+ public DnsConfiguration DnsConfig { get; set; }
+
///
/// Validate the object.
///
@@ -222,6 +231,10 @@ public virtual void Validate()
{
NetworkProfile.Validate();
}
+ if (DnsConfig != null)
+ {
+ DnsConfig.Validate();
+ }
}
}
}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/DnsConfiguration.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/DnsConfiguration.cs
new file mode 100644
index 000000000000..6a9bc88e915b
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/DnsConfiguration.cs
@@ -0,0 +1,87 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// DNS configuration for the container group.
+ ///
+ public partial class DnsConfiguration
+ {
+ ///
+ /// Initializes a new instance of the DnsConfiguration class.
+ ///
+ public DnsConfiguration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DnsConfiguration class.
+ ///
+ /// The DNS servers for the container
+ /// group.
+ /// The DNS search domains for hostname
+ /// lookup in the container group.
+ /// The DNS options for the container
+ /// group.
+ public DnsConfiguration(IList nameServers, string searchDomains = default(string), string options = default(string))
+ {
+ NameServers = nameServers;
+ SearchDomains = searchDomains;
+ Options = options;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the DNS servers for the container group.
+ ///
+ [JsonProperty(PropertyName = "nameServers")]
+ public IList NameServers { get; set; }
+
+ ///
+ /// Gets or sets the DNS search domains for hostname lookup in the
+ /// container group.
+ ///
+ [JsonProperty(PropertyName = "searchDomains")]
+ public string SearchDomains { get; set; }
+
+ ///
+ /// Gets or sets the DNS options for the container group.
+ ///
+ [JsonProperty(PropertyName = "options")]
+ public string Options { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (NameServers == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "NameServers");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/GpuResource.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/GpuResource.cs
new file mode 100644
index 000000000000..b286aa431646
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/GpuResource.cs
@@ -0,0 +1,75 @@
+//
+// 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.ContainerInstance.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The GPU resource.
+ ///
+ public partial class GpuResource
+ {
+ ///
+ /// Initializes a new instance of the GpuResource class.
+ ///
+ public GpuResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the GpuResource class.
+ ///
+ /// The count of the GPU resource.
+ /// The SKU of the GPU resource. Possible values
+ /// include: 'K80', 'P100', 'V100'
+ public GpuResource(int count, string sku)
+ {
+ Count = count;
+ Sku = sku;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the count of the GPU resource.
+ ///
+ [JsonProperty(PropertyName = "count")]
+ public int Count { get; set; }
+
+ ///
+ /// Gets or sets the SKU of the GPU resource. Possible values include:
+ /// 'K80', 'P100', 'V100'
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public string Sku { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/GpuSku.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/GpuSku.cs
new file mode 100644
index 000000000000..974c396099f8
--- /dev/null
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/GpuSku.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.ContainerInstance.Models
+{
+
+ ///
+ /// Defines values for GpuSku.
+ ///
+ public static class GpuSku
+ {
+ public const string K80 = "K80";
+ public const string P100 = "P100";
+ public const string V100 = "V100";
+ }
+}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Operation.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Operation.cs
index 3b24e378b69c..b53bb7b852ae 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Operation.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/Operation.cs
@@ -33,12 +33,14 @@ public Operation()
/// The name of the operation.
/// The display information of the
/// operation.
+ /// The additional properties.
/// The intended executor of the operation.
/// Possible values include: 'User', 'System'
- public Operation(string name, OperationDisplay display, string origin = default(string))
+ public Operation(string name, OperationDisplay display, object properties = default(object), string origin = default(string))
{
Name = name;
Display = display;
+ Properties = properties;
Origin = origin;
CustomInit();
}
@@ -60,6 +62,12 @@ public Operation()
[JsonProperty(PropertyName = "display")]
public OperationDisplay Display { get; set; }
+ ///
+ /// Gets or sets the additional properties.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public object Properties { get; set; }
+
///
/// Gets or sets the intended executor of the operation. Possible
/// values include: 'User', 'System'
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceLimits.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceLimits.cs
index bdfcb3e38b51..052ff27da50c 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceLimits.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceLimits.cs
@@ -32,10 +32,12 @@ public ResourceLimits()
/// The memory limit in GB of this container
/// instance.
/// The CPU limit of this container instance.
- public ResourceLimits(double? memoryInGB = default(double?), double? cpu = default(double?))
+ /// The GPU limit of this container instance.
+ public ResourceLimits(double? memoryInGB = default(double?), double? cpu = default(double?), GpuResource gpu = default(GpuResource))
{
MemoryInGB = memoryInGB;
Cpu = cpu;
+ Gpu = gpu;
CustomInit();
}
@@ -56,5 +58,24 @@ public ResourceLimits()
[JsonProperty(PropertyName = "cpu")]
public double? Cpu { get; set; }
+ ///
+ /// Gets or sets the GPU limit of this container instance.
+ ///
+ [JsonProperty(PropertyName = "gpu")]
+ public GpuResource Gpu { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Gpu != null)
+ {
+ Gpu.Validate();
+ }
+ }
}
}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequests.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequests.cs
index 8c59abb2f09c..981fbf9eaaff 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequests.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequests.cs
@@ -33,10 +33,13 @@ public ResourceRequests()
/// instance.
/// The CPU request of this container
/// instance.
- public ResourceRequests(double memoryInGB, double cpu)
+ /// The GPU request of this container
+ /// instance.
+ public ResourceRequests(double memoryInGB, double cpu, GpuResource gpu = default(GpuResource))
{
MemoryInGB = memoryInGB;
Cpu = cpu;
+ Gpu = gpu;
CustomInit();
}
@@ -57,6 +60,12 @@ public ResourceRequests(double memoryInGB, double cpu)
[JsonProperty(PropertyName = "cpu")]
public double Cpu { get; set; }
+ ///
+ /// Gets or sets the GPU request of this container instance.
+ ///
+ [JsonProperty(PropertyName = "gpu")]
+ public GpuResource Gpu { get; set; }
+
///
/// Validate the object.
///
@@ -65,7 +74,10 @@ public ResourceRequests(double memoryInGB, double cpu)
///
public virtual void Validate()
{
- //Nothing to validate
+ if (Gpu != null)
+ {
+ Gpu.Validate();
+ }
}
}
}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequirements.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequirements.cs
index 2ba48425f54a..6408e289c60d 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequirements.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/Models/ResourceRequirements.cs
@@ -74,6 +74,10 @@ public virtual void Validate()
{
Requests.Validate();
}
+ if (Limits != null)
+ {
+ Limits.Validate();
+ }
}
}
}
diff --git a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/SdkInfo_ContainerInstanceManagementClient.cs b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/SdkInfo_ContainerInstanceManagementClient.cs
index 1a729a0f51ae..7d3292a27221 100644
--- a/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/SdkInfo_ContainerInstanceManagementClient.cs
+++ b/src/SDKs/ContainerInstance/Management.ContainerInstance/Generated/SdkInfo_ContainerInstanceManagementClient.cs
@@ -22,22 +22,12 @@ public static IEnumerable> ApiInfo_ContainerInstan
new Tuple("ContainerInstance", "Container", "2018-10-01"),
new Tuple("ContainerInstance", "ContainerGroupUsage", "2018-10-01"),
new Tuple("ContainerInstance", "ContainerGroups", "2018-10-01"),
+ new Tuple("ContainerInstance", "ListCachedImages", "2018-10-01"),
+ new Tuple("ContainerInstance", "ListCapabilities", "2018-10-01"),
new Tuple("ContainerInstance", "Operations", "2018-10-01"),
new Tuple("Network", "ServiceAssociationLink", "2018-10-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "latest";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/containerinstance/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\Users\\sakreter\\mainWork\\azure-sdk-for-net\\src\\SDKs";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "396d6db190fd12c5a39478d0c730327bca2cf2d6";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
-