diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/AgentPoolsOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/AgentPoolsOperations.cs
new file mode 100644
index 000000000000..79d313ed6155
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/AgentPoolsOperations.cs
@@ -0,0 +1,1745 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+
+ ///
+ /// AgentPoolsOperations operations.
+ ///
+ internal partial class AgentPoolsOperations : IServiceOperations, IAgentPoolsOperations
+ {
+ ///
+ /// Initializes a new instance of the AgentPoolsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal AgentPoolsOperations(ContainerRegistryManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the ContainerRegistryManagementClient
+ ///
+ public ContainerRegistryManagementClient Client { get; private set; }
+
+ ///
+ /// Gets the detailed information for a given agent pool.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (registryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "registryName");
+ }
+ if (registryName != null)
+ {
+ if (registryName.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "registryName", 50);
+ }
+ if (registryName.Length < 5)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "registryName", 5);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(registryName, "^[a-zA-Z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "registryName", "^[a-zA-Z0-9]*$");
+ }
+ }
+ if (agentPoolName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
+ }
+ if (agentPoolName != null)
+ {
+ if (agentPoolName.Length > 20)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 20);
+ }
+ if (agentPoolName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-zA-Z0-9-]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-zA-Z0-9-]*$");
+ }
+ }
+ string apiVersion = "2019-06-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("registryName", registryName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{registryName}", System.Uri.EscapeDataString(registryName));
+ _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, agentPool, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, count, tags, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (registryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "registryName");
+ }
+ if (registryName != null)
+ {
+ if (registryName.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "registryName", 50);
+ }
+ if (registryName.Length < 5)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "registryName", 5);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(registryName, "^[a-zA-Z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "registryName", "^[a-zA-Z0-9]*$");
+ }
+ }
+ string apiVersion = "2019-06-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("registryName", registryName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{registryName}", System.Uri.EscapeDataString(registryName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the count of queued runs for a given agent pool.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.Task> GetQueueStatusWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (registryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "registryName");
+ }
+ if (registryName != null)
+ {
+ if (registryName.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "registryName", 50);
+ }
+ if (registryName.Length < 5)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "registryName", 5);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(registryName, "^[a-zA-Z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "registryName", "^[a-zA-Z0-9]*$");
+ }
+ }
+ if (agentPoolName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
+ }
+ if (agentPoolName != null)
+ {
+ if (agentPoolName.Length > 20)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 20);
+ }
+ if (agentPoolName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-zA-Z0-9-]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-zA-Z0-9-]*$");
+ }
+ }
+ string apiVersion = "2019-06-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("registryName", registryName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetQueueStatus", 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.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}/listQueueStatus").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{registryName}", System.Uri.EscapeDataString(registryName));
+ _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (registryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "registryName");
+ }
+ if (registryName != null)
+ {
+ if (registryName.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "registryName", 50);
+ }
+ if (registryName.Length < 5)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "registryName", 5);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(registryName, "^[a-zA-Z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "registryName", "^[a-zA-Z0-9]*$");
+ }
+ }
+ if (agentPoolName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
+ }
+ if (agentPoolName != null)
+ {
+ if (agentPoolName.Length > 20)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 20);
+ }
+ if (agentPoolName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-zA-Z0-9-]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-zA-Z0-9-]*$");
+ }
+ }
+ if (agentPool == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPool");
+ }
+ if (agentPool != null)
+ {
+ agentPool.Validate();
+ }
+ string apiVersion = "2019-06-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("registryName", registryName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("agentPool", agentPool);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", 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.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{registryName}", System.Uri.EscapeDataString(registryName));
+ _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(agentPool != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(agentPool, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _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;
+ }
+
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (registryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "registryName");
+ }
+ if (registryName != null)
+ {
+ if (registryName.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "registryName", 50);
+ }
+ if (registryName.Length < 5)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "registryName", 5);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(registryName, "^[a-zA-Z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "registryName", "^[a-zA-Z0-9]*$");
+ }
+ }
+ if (agentPoolName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
+ }
+ if (agentPoolName != null)
+ {
+ if (agentPoolName.Length > 20)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 20);
+ }
+ if (agentPoolName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-zA-Z0-9-]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-zA-Z0-9-]*$");
+ }
+ }
+ string apiVersion = "2019-06-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("registryName", registryName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", 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.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{registryName}", System.Uri.EscapeDataString(registryName));
+ _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
+ 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("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ }
+ if (registryName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "registryName");
+ }
+ if (registryName != null)
+ {
+ if (registryName.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "registryName", 50);
+ }
+ if (registryName.Length < 5)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "registryName", 5);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(registryName, "^[a-zA-Z0-9]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "registryName", "^[a-zA-Z0-9]*$");
+ }
+ }
+ if (agentPoolName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName");
+ }
+ if (agentPoolName != null)
+ {
+ if (agentPoolName.Length > 20)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 20);
+ }
+ if (agentPoolName.Length < 3)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 3);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-zA-Z0-9-]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-zA-Z0-9-]*$");
+ }
+ }
+ string apiVersion = "2019-06-01-preview";
+ AgentPoolUpdateParameters updateParameters = new AgentPoolUpdateParameters();
+ if (count != null || tags != null)
+ {
+ updateParameters.Count = count;
+ updateParameters.Tags = tags;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("registryName", registryName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("agentPoolName", agentPoolName);
+ tracingParameters.Add("updateParameters", updateParameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{registryName}", System.Uri.EscapeDataString(registryName));
+ _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName));
+ 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("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(updateParameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateParameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _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;
+ }
+
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// 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 System.Threading.Tasks.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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/AgentPoolsOperationsExtensions.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/AgentPoolsOperationsExtensions.cs
new file mode 100644
index 000000000000..7b2c1b8dd1ca
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/AgentPoolsOperationsExtensions.cs
@@ -0,0 +1,502 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ ///
+ /// Extension methods for AgentPoolsOperations.
+ ///
+ public static partial class AgentPoolsOperationsExtensions
+ {
+ ///
+ /// Gets the detailed information for a given agent pool.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ public static AgentPool Get(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName)
+ {
+ return operations.GetAsync(resourceGroupName, registryName, agentPoolName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the detailed information for a given agent pool.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task GetAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ public static AgentPool Create(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool)
+ {
+ return operations.CreateAsync(resourceGroupName, registryName, agentPoolName, agentPool).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task CreateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, agentPool, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ public static void Delete(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName)
+ {
+ operations.DeleteAsync(resourceGroupName, registryName, agentPoolName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task DeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ public static AgentPool Update(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary))
+ {
+ return operations.UpdateAsync(resourceGroupName, registryName, agentPoolName, count, tags).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task UpdateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, count, tags, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ public static IPage List(this IAgentPoolsOperations operations, string resourceGroupName, string registryName)
+ {
+ return operations.ListAsync(resourceGroupName, registryName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, registryName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the count of queued runs for a given agent pool.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ public static AgentPoolQueueStatus GetQueueStatus(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName)
+ {
+ return operations.GetQueueStatusAsync(resourceGroupName, registryName, agentPoolName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the count of queued runs for a given agent pool.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task GetQueueStatusAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetQueueStatusWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ public static AgentPool BeginCreate(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool)
+ {
+ return operations.BeginCreateAsync(resourceGroupName, registryName, agentPoolName, agentPool).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task BeginCreateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, agentPool, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ public static void BeginDelete(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, registryName, agentPoolName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task BeginDeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ public static AgentPool BeginUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary))
+ {
+ return operations.BeginUpdateAsync(resourceGroupName, registryName, agentPoolName, count, tags).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the container registry belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task BeginUpdateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, registryName, agentPoolName, count, tags, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IAgentPoolsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async System.Threading.Tasks.Task> ListNextAsync(this IAgentPoolsOperations 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/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ContainerRegistryManagementClient.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ContainerRegistryManagementClient.cs
index b8f5a8bb5e92..bc8e78cde87d 100644
--- a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ContainerRegistryManagementClient.cs
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ContainerRegistryManagementClient.cs
@@ -76,6 +76,11 @@ public partial class ContainerRegistryManagementClient : ServiceClient
public virtual IOperations Operations { get; private set; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; }
+
///
/// Gets the IReplicationsOperations.
///
@@ -86,16 +91,36 @@ public partial class ContainerRegistryManagementClient : ServiceClient
public virtual IWebhooksOperations Webhooks { get; private set; }
+ ///
+ /// Gets the IAgentPoolsOperations.
+ ///
+ public virtual IAgentPoolsOperations AgentPools { get; private set; }
+
///
/// Gets the IRunsOperations.
///
public virtual IRunsOperations Runs { get; private set; }
+ ///
+ /// Gets the ITaskRunsOperations.
+ ///
+ public virtual ITaskRunsOperations TaskRuns { get; private set; }
+
///
/// Gets the ITasksOperations.
///
public virtual ITasksOperations Tasks { get; private set; }
+ ///
+ /// Gets the IScopeMapsOperations.
+ ///
+ public virtual IScopeMapsOperations ScopeMaps { get; private set; }
+
+ ///
+ /// Gets the ITokensOperations.
+ ///
+ public virtual ITokensOperations Tokens { get; private set; }
+
///
/// Initializes a new instance of the ContainerRegistryManagementClient class.
///
@@ -339,10 +364,15 @@ private void Initialize()
{
Registries = new RegistriesOperations(this);
Operations = new Operations(this);
+ PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
Replications = new ReplicationsOperations(this);
Webhooks = new WebhooksOperations(this);
+ AgentPools = new AgentPoolsOperations(this);
Runs = new RunsOperations(this);
+ TaskRuns = new TaskRunsOperations(this);
Tasks = new TasksOperations(this);
+ ScopeMaps = new ScopeMapsOperations(this);
+ Tokens = new TokensOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IAgentPoolsOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IAgentPoolsOperations.cs
new file mode 100644
index 000000000000..64caa4b81350
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IAgentPoolsOperations.cs
@@ -0,0 +1,320 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ ///
+ /// AgentPoolsOperations operations.
+ ///
+ public partial interface IAgentPoolsOperations
+ {
+ ///
+ /// Gets the detailed information for a given agent pool.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the count of queued runs for a given agent pool.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetQueueStatusWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates an agent pool for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The parameters of an agent pool that needs to scheduled.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, AgentPool agentPool, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a specified agent pool resource.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates an agent pool with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the agent pool.
+ ///
+ ///
+ /// The count of agent machine
+ ///
+ ///
+ /// The ARM resource tags.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string agentPoolName, int? count = default(int?), IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the agent pools for a specified container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IContainerRegistryManagementClient.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IContainerRegistryManagementClient.cs
index e245c6061829..b6c74c0ee262 100644
--- a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IContainerRegistryManagementClient.cs
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IContainerRegistryManagementClient.cs
@@ -73,6 +73,11 @@ public partial interface IContainerRegistryManagementClient : System.IDisposable
///
IOperations Operations { get; }
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
///
/// Gets the IReplicationsOperations.
///
@@ -83,15 +88,35 @@ public partial interface IContainerRegistryManagementClient : System.IDisposable
///
IWebhooksOperations Webhooks { get; }
+ ///
+ /// Gets the IAgentPoolsOperations.
+ ///
+ IAgentPoolsOperations AgentPools { get; }
+
///
/// Gets the IRunsOperations.
///
IRunsOperations Runs { get; }
+ ///
+ /// Gets the ITaskRunsOperations.
+ ///
+ ITaskRunsOperations TaskRuns { get; }
+
///
/// Gets the ITasksOperations.
///
ITasksOperations Tasks { get; }
+ ///
+ /// Gets the IScopeMapsOperations.
+ ///
+ IScopeMapsOperations ScopeMaps { get; }
+
+ ///
+ /// Gets the ITokensOperations.
+ ///
+ ITokensOperations Tokens { get; }
+
}
}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 000000000000..d5a537f49b92
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,232 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ public partial interface IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// Get the specified private endpoint connection associated with the
+ /// container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string registryName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// The resource of private endpoint.
+ ///
+ ///
+ /// A collection of information about the state of the connection
+ /// between service consumer and provider.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string privateEndpointConnectionName, PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified private endpoint connection associated with
+ /// the container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all private endpoint connections in a container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// The resource of private endpoint.
+ ///
+ ///
+ /// A collection of information about the state of the connection
+ /// between service consumer and provider.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string privateEndpointConnectionName, PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified private endpoint connection associated with
+ /// the container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the private endpoint connection.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all private endpoint connections in a container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRegistriesOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRegistriesOperations.cs
index 4c90452f8283..e7674224a5d1 100644
--- a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRegistriesOperations.cs
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRegistriesOperations.cs
@@ -310,6 +310,32 @@ public partial interface IRegistriesOperations
///
System.Threading.Tasks.Task> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Lists the private link resources for a container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Schedules a new run based on the request parameters and add it to
/// the run queue.
///
@@ -329,7 +355,7 @@ public partial interface IRegistriesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -356,7 +382,7 @@ public partial interface IRegistriesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -367,6 +393,35 @@ public partial interface IRegistriesOperations
///
System.Threading.Tasks.Task> GetBuildSourceUploadUrlWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Generate keys for a token of a specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The parameters for generating credentials.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GenerateCredentialsWithHttpMessagesAsync(string resourceGroupName, string registryName, GenerateCredentialsParameters generateCredentialsParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Copies an image to this container registry from the specified
/// container registry.
///
@@ -495,7 +550,7 @@ public partial interface IRegistriesOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -506,6 +561,35 @@ public partial interface IRegistriesOperations
///
System.Threading.Tasks.Task> BeginScheduleRunWithHttpMessagesAsync(string resourceGroupName, string registryName, RunRequest runRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Generate keys for a token of a specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The parameters for generating credentials.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginGenerateCredentialsWithHttpMessagesAsync(string resourceGroupName, string registryName, GenerateCredentialsParameters generateCredentialsParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Lists all the container registries under the specified resource
/// group.
///
@@ -551,5 +635,27 @@ public partial interface IRegistriesOperations
/// Thrown when a required parameter is null
///
System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists the private link resources for a container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListPrivateLinkResourcesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRunsOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRunsOperations.cs
index b3e05481a630..95423ec76a71 100644
--- a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRunsOperations.cs
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IRunsOperations.cs
@@ -42,7 +42,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -71,7 +71,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -103,7 +103,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -132,7 +132,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -161,7 +161,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -190,7 +190,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -219,7 +219,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -238,7 +238,7 @@ public partial interface IRunsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IScopeMapsOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IScopeMapsOperations.cs
new file mode 100644
index 000000000000..66c6295a2d43
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/IScopeMapsOperations.cs
@@ -0,0 +1,305 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ ///
+ /// ScopeMapsOperations operations.
+ ///
+ public partial interface IScopeMapsOperations
+ {
+ ///
+ /// Gets the properties of the specified scope map.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a scope map for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// The list of scoped permissions for registry artifacts.
+ /// E.g. repositories/repository-name/content/read,
+ /// repositories/repository-name/metadata/write
+ ///
+ ///
+ /// The user friendly description of the scope map.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, IList actions, string description = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a scope map from a container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a scope map with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// The user friendly description of the scope map.
+ ///
+ ///
+ /// The list of scope permissions for registry artifacts.
+ /// E.g. repositories/repository-name/pull,
+ /// repositories/repository-name/delete
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, string description = default(string), IList actions = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the scope maps for the specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a scope map for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// The list of scoped permissions for registry artifacts.
+ /// E.g. repositories/repository-name/content/read,
+ /// repositories/repository-name/metadata/write
+ ///
+ ///
+ /// The user friendly description of the scope map.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, IList actions, string description = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a scope map from a container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a scope map with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the scope map.
+ ///
+ ///
+ /// The user friendly description of the scope map.
+ ///
+ ///
+ /// The list of scope permissions for registry artifacts.
+ /// E.g. repositories/repository-name/pull,
+ /// repositories/repository-name/delete
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string scopeMapName, string description = default(string), IList actions = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the scope maps for the specified container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITaskRunsOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITaskRunsOperations.cs
new file mode 100644
index 000000000000..a0d3336155e9
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITaskRunsOperations.cs
@@ -0,0 +1,315 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ ///
+ /// TaskRunsOperations operations.
+ ///
+ public partial interface ITaskRunsOperations
+ {
+ ///
+ /// Gets the detailed information for a given task run.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The run request name.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a task run for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of task run.
+ ///
+ ///
+ /// The parameters of a run that needs to scheduled.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, TaskRun taskRun, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a specified task run resource.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The task run name.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a task run with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The task run name.
+ ///
+ ///
+ /// The parameters for updating a task run.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, TaskRunUpdateParameters updateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the detailed information for a given task run that includes
+ /// all secrets.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The run request name.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetDetailsWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the task runs for a specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a task run for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of task run.
+ ///
+ ///
+ /// The parameters of a run that needs to scheduled.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, TaskRun taskRun, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a specified task run resource.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The task run name.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a task run with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The task run name.
+ ///
+ ///
+ /// The parameters for updating a task run.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string taskRunName, TaskRunUpdateParameters updateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the task runs for a specified container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITasksOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITasksOperations.cs
index 02c631b70494..4bf08a3f1ec4 100644
--- a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITasksOperations.cs
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITasksOperations.cs
@@ -38,7 +38,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -67,7 +67,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -100,7 +100,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -129,7 +129,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -158,7 +158,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -187,7 +187,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -220,7 +220,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -249,7 +249,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -278,7 +278,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -300,7 +300,7 @@ public partial interface ITasksOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITokensOperations.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITokensOperations.cs
new file mode 100644
index 000000000000..54ea4e6b411e
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/ITokensOperations.cs
@@ -0,0 +1,285 @@
+//
+// 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.ContainerRegistry
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ ///
+ /// TokensOperations operations.
+ ///
+ public partial interface ITokensOperations
+ {
+ ///
+ /// Gets the properties of the specified token.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a token for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// The parameters for creating a token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, Token tokenCreateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a token from a container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a token with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// The parameters for updating a token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, TokenUpdateParameters tokenUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the tokens for the specified container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates a token for a container registry with the specified
+ /// parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// The parameters for creating a token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, Token tokenCreateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a token from a container registry.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a token with the specified parameters.
+ ///
+ ///
+ /// The name of the resource group to which the container registry
+ /// belongs.
+ ///
+ ///
+ /// The name of the container registry.
+ ///
+ ///
+ /// The name of the token.
+ ///
+ ///
+ /// The parameters for updating a token.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, string tokenName, TokenUpdateParameters tokenUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all the tokens for the specified container registry.
+ ///
+ ///
+ /// 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
+ ///
+ System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ActionsRequired.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ActionsRequired.cs
new file mode 100644
index 000000000000..7c0651e48be7
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ActionsRequired.cs
@@ -0,0 +1,22 @@
+//
+// 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.ContainerRegistry.Models
+{
+
+ ///
+ /// Defines values for ActionsRequired.
+ ///
+ public static class ActionsRequired
+ {
+ public const string None = "None";
+ public const string Recreate = "Recreate";
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ActiveDirectoryObject.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ActiveDirectoryObject.cs
new file mode 100644
index 000000000000..4f16bf0328d1
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ActiveDirectoryObject.cs
@@ -0,0 +1,68 @@
+//
+// 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.ContainerRegistry.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Active Directory Object that will be used for authenticating the
+ /// token of a container registry.
+ ///
+ public partial class ActiveDirectoryObject
+ {
+ ///
+ /// Initializes a new instance of the ActiveDirectoryObject class.
+ ///
+ public ActiveDirectoryObject()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ActiveDirectoryObject class.
+ ///
+ /// The user/group/application object ID for
+ /// Active Directory Object that will be used for authenticating the
+ /// token of a container registry.
+ /// The tenant ID of user/group/application
+ /// object Active Directory Object that will be used for authenticating
+ /// the token of a container registry.
+ public ActiveDirectoryObject(string objectId = default(string), string tenantId = default(string))
+ {
+ ObjectId = objectId;
+ TenantId = tenantId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the user/group/application object ID for Active
+ /// Directory Object that will be used for authenticating the token of
+ /// a container registry.
+ ///
+ [JsonProperty(PropertyName = "objectId")]
+ public string ObjectId { get; set; }
+
+ ///
+ /// Gets or sets the tenant ID of user/group/application object Active
+ /// Directory Object that will be used for authenticating the token of
+ /// a container registry.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public string TenantId { get; set; }
+
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPool.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPool.cs
new file mode 100644
index 000000000000..d75d5917e799
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPool.cs
@@ -0,0 +1,114 @@
+//
+// 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.ContainerRegistry.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The agentpool that has the ARM resource and properties.
+ /// The agentpool will have all information to create an agent pool.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class AgentPool : Resource
+ {
+ ///
+ /// Initializes a new instance of the AgentPool class.
+ ///
+ public AgentPool()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AgentPool class.
+ ///
+ /// The location of the resource. This cannot be
+ /// changed after the resource is created.
+ /// The resource ID.
+ /// The name of the resource.
+ /// The type of the resource.
+ /// The tags of the resource.
+ /// The count of agent machine
+ /// The Tier of agent machine
+ /// The OS of agent machine. Possible values include:
+ /// 'Windows', 'Linux'
+ /// The Virtual Network
+ /// Subnet Resource Id of the agent machine
+ /// The provisioning state of this
+ /// agent pool. Possible values include: 'Creating', 'Updating',
+ /// 'Deleting', 'Succeeded', 'Failed', 'Canceled'
+ public AgentPool(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), int? count = default(int?), string tier = default(string), string os = default(string), string virtualNetworkSubnetResourceId = default(string), string provisioningState = default(string))
+ : base(location, id, name, type, tags)
+ {
+ Count = count;
+ Tier = tier;
+ Os = os;
+ VirtualNetworkSubnetResourceId = virtualNetworkSubnetResourceId;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the count of agent machine
+ ///
+ [JsonProperty(PropertyName = "properties.count")]
+ public int? Count { get; set; }
+
+ ///
+ /// Gets or sets the Tier of agent machine
+ ///
+ [JsonProperty(PropertyName = "properties.tier")]
+ public string Tier { get; set; }
+
+ ///
+ /// Gets or sets the OS of agent machine. Possible values include:
+ /// 'Windows', 'Linux'
+ ///
+ [JsonProperty(PropertyName = "properties.os")]
+ public string Os { get; set; }
+
+ ///
+ /// Gets or sets the Virtual Network Subnet Resource Id of the agent
+ /// machine
+ ///
+ [JsonProperty(PropertyName = "properties.virtualNetworkSubnetResourceId")]
+ public string VirtualNetworkSubnetResourceId { get; set; }
+
+ ///
+ /// Gets the provisioning state of this agent pool. Possible values
+ /// include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed',
+ /// 'Canceled'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPoolQueueStatus.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPoolQueueStatus.cs
new file mode 100644
index 000000000000..94c78d05ef2c
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPoolQueueStatus.cs
@@ -0,0 +1,51 @@
+//
+// 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.ContainerRegistry.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The QueueStatus of Agent Pool
+ ///
+ public partial class AgentPoolQueueStatus
+ {
+ ///
+ /// Initializes a new instance of the AgentPoolQueueStatus class.
+ ///
+ public AgentPoolQueueStatus()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AgentPoolQueueStatus class.
+ ///
+ /// The number of pending runs in the queue
+ public AgentPoolQueueStatus(int? count = default(int?))
+ {
+ Count = count;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the number of pending runs in the queue
+ ///
+ [JsonProperty(PropertyName = "count")]
+ public int? Count { get; set; }
+
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPoolUpdateParameters.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPoolUpdateParameters.cs
new file mode 100644
index 000000000000..068d07eeaad1
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/AgentPoolUpdateParameters.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.ContainerRegistry.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters for updating an agent pool.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class AgentPoolUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the AgentPoolUpdateParameters class.
+ ///
+ public AgentPoolUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AgentPoolUpdateParameters class.
+ ///
+ /// The count of agent machine
+ /// The ARM resource tags.
+ public AgentPoolUpdateParameters(int? count = default(int?), IDictionary tags = default(IDictionary))
+ {
+ Count = count;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the count of agent machine
+ ///
+ [JsonProperty(PropertyName = "properties.count")]
+ public int? Count { get; set; }
+
+ ///
+ /// Gets or sets the ARM resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ConnectionStatus.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ConnectionStatus.cs
new file mode 100644
index 000000000000..224bcf4f424b
--- /dev/null
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/ConnectionStatus.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.ContainerRegistry.Models
+{
+
+ ///
+ /// Defines values for ConnectionStatus.
+ ///
+ public static class ConnectionStatus
+ {
+ public const string Approved = "Approved";
+ public const string Pending = "Pending";
+ public const string Rejected = "Rejected";
+ public const string Disconnected = "Disconnected";
+ }
+}
diff --git a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/DockerBuildRequest.cs b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/DockerBuildRequest.cs
index 5bc87940653b..95987281ab3e 100644
--- a/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/DockerBuildRequest.cs
+++ b/sdk/containerregistry/Microsoft.Azure.Management.ContainerRegistry/src/Generated/Models/DockerBuildRequest.cs
@@ -38,6 +38,8 @@ public DockerBuildRequest()
/// run has to happen.
/// The value that indicates whether
/// archiving is enabled for the run or not.
+ /// The dedicated agent pool for the
+ /// run.
/// The fully qualified image names including
/// the repository and tag.
/// The value of this property indicates
@@ -58,8 +60,8 @@ public DockerBuildRequest()
/// calling listBuildSourceUploadUrl API.
/// The properties that describes a set of
/// credentials that will be used when this run is invoked.
- public DockerBuildRequest(string dockerFilePath, PlatformProperties platform, bool? isArchiveEnabled = default(bool?), IList imageNames = default(IList), bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string target = default(string), IList