diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperations.cs
index ec387a5bacf8..bb30f0f0b756 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperations.cs
@@ -281,10 +281,7 @@ internal ArmTemplatesOperations(DevTestLabsClient client)
/// The name of the artifact source.
///
///
- /// The name of the azure Resource Manager template.
- ///
- ///
- /// Specify the $expand query. Example: 'properties($select=displayName)'
+ /// The name of the azure resource manager template.
///
///
/// Headers that will be added to request.
@@ -307,7 +304,7 @@ internal ArmTemplatesOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -344,7 +341,6 @@ internal ArmTemplatesOperations(DevTestLabsClient client)
tracingParameters.Add("labName", labName);
tracingParameters.Add("artifactSourceName", artifactSourceName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -357,10 +353,6 @@ internal ArmTemplatesOperations(DevTestLabsClient client)
_url = _url.Replace("{artifactSourceName}", System.Uri.EscapeDataString(artifactSourceName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperationsExtensions.cs
index afc94bbbd57a..f9025c69087f 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArmTemplatesOperationsExtensions.cs
@@ -90,14 +90,11 @@ public static partial class ArmTemplatesOperationsExtensions
/// The name of the artifact source.
///
///
- /// The name of the azure Resource Manager template.
+ /// The name of the azure resource manager template.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=displayName)'
- ///
- public static ArmTemplate Get(this IArmTemplatesOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string))
+ public static ArmTemplate Get(this IArmTemplatesOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, artifactSourceName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, artifactSourceName, name).GetAwaiter().GetResult();
}
///
@@ -116,17 +113,14 @@ public static partial class ArmTemplatesOperationsExtensions
/// The name of the artifact source.
///
///
- /// The name of the azure Resource Manager template.
- ///
- ///
- /// Specify the $expand query. Example: 'properties($select=displayName)'
+ /// The name of the azure resource manager template.
///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IArmTemplatesOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IArmTemplatesOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperations.cs
index 63061ca56f84..302f46012632 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperations.cs
@@ -271,9 +271,6 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
///
/// The name of the artifact source.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=displayName)'
- ///
///
/// Headers that will be added to request.
///
@@ -295,7 +292,7 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -327,7 +324,6 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("labName", labName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -339,10 +335,6 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
_url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -530,6 +522,10 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "artifactSource");
}
+ if (artifactSource != null)
+ {
+ artifactSource.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -894,7 +890,8 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
}
///
- /// Modify properties of artifact sources.
+ /// Allows modifying tags of artifact sources. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -906,7 +903,8 @@ internal ArtifactSourcesOperations(DevTestLabsClient client)
/// The name of the artifact source.
///
///
- /// Properties of an artifact source.
+ /// Allows modifying tags of artifact sources. All other properties will be
+ /// ignored.
///
///
/// Headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperationsExtensions.cs
index fe37b564812f..6bec2f941e77 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactSourcesOperationsExtensions.cs
@@ -83,12 +83,9 @@ public static partial class ArtifactSourcesOperationsExtensions
///
/// The name of the artifact source.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=displayName)'
- ///
- public static ArtifactSource Get(this IArtifactSourcesOperations operations, string resourceGroupName, string labName, string name, string expand = default(string))
+ public static ArtifactSource Get(this IArtifactSourcesOperations operations, string resourceGroupName, string labName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
}
///
@@ -106,15 +103,12 @@ public static partial class ArtifactSourcesOperationsExtensions
///
/// The name of the artifact source.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=displayName)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IArtifactSourcesOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IArtifactSourcesOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -216,7 +210,8 @@ public static void Delete(this IArtifactSourcesOperations operations, string res
}
///
- /// Modify properties of artifact sources.
+ /// Allows modifying tags of artifact sources. All other properties will be
+ /// ignored.
///
///
/// The operations group for this extension method.
@@ -231,7 +226,8 @@ public static void Delete(this IArtifactSourcesOperations operations, string res
/// The name of the artifact source.
///
///
- /// Properties of an artifact source.
+ /// Allows modifying tags of artifact sources. All other properties will be
+ /// ignored.
///
public static ArtifactSource Update(this IArtifactSourcesOperations operations, string resourceGroupName, string labName, string name, ArtifactSourceFragment artifactSource)
{
@@ -239,7 +235,8 @@ public static ArtifactSource Update(this IArtifactSourcesOperations operations,
}
///
- /// Modify properties of artifact sources.
+ /// Allows modifying tags of artifact sources. All other properties will be
+ /// ignored.
///
///
/// The operations group for this extension method.
@@ -254,7 +251,8 @@ public static ArtifactSource Update(this IArtifactSourcesOperations operations,
/// The name of the artifact source.
///
///
- /// Properties of an artifact source.
+ /// Allows modifying tags of artifact sources. All other properties will be
+ /// ignored.
///
///
/// The cancellation token.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperations.cs
index ab7a2811546d..2e266f625e0e 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperations.cs
@@ -283,9 +283,6 @@ internal ArtifactsOperations(DevTestLabsClient client)
///
/// The name of the artifact.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=title)'
- ///
///
/// Headers that will be added to request.
///
@@ -307,7 +304,7 @@ internal ArtifactsOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -344,7 +341,6 @@ internal ArtifactsOperations(DevTestLabsClient client)
tracingParameters.Add("labName", labName);
tracingParameters.Add("artifactSourceName", artifactSourceName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -357,10 +353,6 @@ internal ArtifactsOperations(DevTestLabsClient client)
_url = _url.Replace("{artifactSourceName}", System.Uri.EscapeDataString(artifactSourceName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperationsExtensions.cs
index 207fbb2fe011..343958489b80 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ArtifactsOperationsExtensions.cs
@@ -92,12 +92,9 @@ public static partial class ArtifactsOperationsExtensions
///
/// The name of the artifact.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=title)'
- ///
- public static Artifact Get(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string))
+ public static Artifact Get(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, artifactSourceName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, artifactSourceName, name).GetAwaiter().GetResult();
}
///
@@ -118,15 +115,12 @@ public static partial class ArtifactsOperationsExtensions
///
/// The name of the artifact.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=title)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/BastionHostsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/BastionHostsOperations.cs
new file mode 100644
index 000000000000..e50881c83f21
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/BastionHostsOperations.cs
@@ -0,0 +1,1393 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// BastionHostsOperations operations.
+ ///
+ internal partial class BastionHostsOperations : IServiceOperations, IBastionHostsOperations
+ {
+ ///
+ /// Initializes a new instance of the BastionHostsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal BastionHostsOperations(DevTestLabsClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DevTestLabsClient
+ ///
+ public DevTestLabsClient Client { get; private set; }
+
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, ODataQuery odataQuery = default(ODataQuery), 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (virtualNetworkName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("virtualNetworkName", virtualNetworkName);
+ 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.DevTestLab/labs/{labName}/virtualnetworks/{virtualNetworkName}/bastionhosts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{virtualNetworkName}", System.Uri.EscapeDataString(virtualNetworkName));
+ List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Get bastionhost.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (virtualNetworkName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("virtualNetworkName", virtualNetworkName);
+ tracingParameters.Add("name", name);
+ 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.DevTestLab/labs/{labName}/virtualnetworks/{virtualNetworkName}/bastionhosts/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{virtualNetworkName}", System.Uri.EscapeDataString(virtualNetworkName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or replace an existing bastionHost. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHostFragment bastionHost, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (virtualNetworkName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (bastionHost == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "bastionHost");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("virtualNetworkName", virtualNetworkName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("bastionHost", bastionHost);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{virtualNetworkName}/bastionhosts/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{virtualNetworkName}", System.Uri.EscapeDataString(virtualNetworkName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(bastionHost != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(bastionHost, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or replace an existing bastionHost. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (virtualNetworkName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (bastionHost == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "bastionHost");
+ }
+ if (bastionHost != null)
+ {
+ bastionHost.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("virtualNetworkName", virtualNetworkName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("bastionHost", bastionHost);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.DevTestLab/labs/{labName}/virtualnetworks/{virtualNetworkName}/bastionhosts/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{virtualNetworkName}", System.Uri.EscapeDataString(virtualNetworkName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(bastionHost != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(bastionHost, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // 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;
+ }
+
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (virtualNetworkName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("virtualNetworkName", virtualNetworkName);
+ tracingParameters.Add("name", name);
+ 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.DevTestLab/labs/{labName}/virtualnetworks/{virtualNetworkName}/bastionhosts/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{virtualNetworkName}", System.Uri.EscapeDataString(virtualNetworkName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/BastionHostsOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/BastionHostsOperationsExtensions.cs
new file mode 100644
index 000000000000..ecc4924a65f0
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/BastionHostsOperationsExtensions.cs
@@ -0,0 +1,444 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for BastionHostsOperations.
+ ///
+ public static partial class BastionHostsOperationsExtensions
+ {
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ public static IPage List(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, ODataQuery odataQuery = default(ODataQuery))
+ {
+ return operations.ListAsync(resourceGroupName, labName, virtualNetworkName, odataQuery).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, odataQuery, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get bastionhost.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ public static BastionHost Get(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name)
+ {
+ return operations.GetAsync(resourceGroupName, labName, virtualNetworkName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get bastionhost.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or replace an existing bastionHost. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ public static BastionHost CreateOrUpdate(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or replace an existing bastionHost. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ public static void Delete(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name)
+ {
+ operations.DeleteAsync(resourceGroupName, labName, virtualNetworkName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ public static BastionHost Update(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHostFragment bastionHost)
+ {
+ return operations.UpdateAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHostFragment bastionHost, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or replace an existing bastionHost. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ public static BastionHost BeginCreateOrUpdate(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or replace an existing bastionHost. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, bastionHost, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ public static void BeginDelete(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, labName, virtualNetworkName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this IBastionHostsOperations operations, string resourceGroupName, string labName, string virtualNetworkName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, labName, virtualNetworkName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IBastionHostsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IBastionHostsOperations 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/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperations.cs
index e4131f6acdc6..b828ac16228b 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperations.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.DevTestLabs
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -50,6 +51,214 @@ internal CostsOperations(DevTestLabsClient client)
///
public DevTestLabsClient Client { get; private set; }
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ 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.DevTestLab/labs/{labName}/costs").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Get cost.
///
@@ -500,5 +709,178 @@ internal CostsOperations(DevTestLabsClient client)
return _result;
}
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperationsExtensions.cs
index 499d0b1d761f..2c6b0d339669 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CostsOperationsExtensions.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.DevTestLabs
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Threading;
using System.Threading.Tasks;
@@ -21,6 +22,52 @@ namespace Microsoft.Azure.Management.DevTestLabs
///
public static partial class CostsOperationsExtensions
{
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ public static IPage List(this ICostsOperations operations, string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery))
+ {
+ return operations.ListAsync(resourceGroupName, labName, odataQuery).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ICostsOperations operations, string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, odataQuery, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Get cost.
///
@@ -125,5 +172,39 @@ public static LabCost CreateOrUpdate(this ICostsOperations operations, string re
}
}
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ICostsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ICostsOperations 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/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperations.cs
index 225a8c040b9a..4fb850654480 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperations.cs
@@ -271,9 +271,6 @@ internal CustomImagesOperations(DevTestLabsClient client)
///
/// The name of the custom image.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=vm)'
- ///
///
/// Headers that will be added to request.
///
@@ -295,7 +292,7 @@ internal CustomImagesOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -327,7 +324,6 @@ internal CustomImagesOperations(DevTestLabsClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("labName", labName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -339,10 +335,6 @@ internal CustomImagesOperations(DevTestLabsClient client)
_url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -527,7 +519,8 @@ internal CustomImagesOperations(DevTestLabsClient client)
}
///
- /// Modify properties of custom images.
+ /// Allows modifying tags of custom images. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -539,7 +532,8 @@ internal CustomImagesOperations(DevTestLabsClient client)
/// The name of the custom image.
///
///
- /// A custom image.
+ /// Allows modifying tags of custom images. All other properties will be
+ /// ignored.
///
///
/// Headers that will be added to request.
@@ -902,7 +896,7 @@ internal CustomImagesOperations(DevTestLabsClient client)
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperationsExtensions.cs
index d600fc47b4d0..159ba61be98d 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/CustomImagesOperationsExtensions.cs
@@ -83,12 +83,9 @@ public static partial class CustomImagesOperationsExtensions
///
/// The name of the custom image.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=vm)'
- ///
- public static CustomImage Get(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, string expand = default(string))
+ public static CustomImage Get(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
}
///
@@ -106,15 +103,12 @@ public static partial class CustomImagesOperationsExtensions
///
/// The name of the custom image.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=vm)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -218,7 +212,8 @@ public static void Delete(this ICustomImagesOperations operations, string resour
}
///
- /// Modify properties of custom images.
+ /// Allows modifying tags of custom images. All other properties will be
+ /// ignored.
///
///
/// The operations group for this extension method.
@@ -233,7 +228,8 @@ public static void Delete(this ICustomImagesOperations operations, string resour
/// The name of the custom image.
///
///
- /// A custom image.
+ /// Allows modifying tags of custom images. All other properties will be
+ /// ignored.
///
public static CustomImage Update(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, CustomImageFragment customImage)
{
@@ -241,7 +237,8 @@ public static CustomImage Update(this ICustomImagesOperations operations, string
}
///
- /// Modify properties of custom images.
+ /// Allows modifying tags of custom images. All other properties will be
+ /// ignored.
///
///
/// The operations group for this extension method.
@@ -256,7 +253,8 @@ public static CustomImage Update(this ICustomImagesOperations operations, string
/// The name of the custom image.
///
///
- /// A custom image.
+ /// Allows modifying tags of custom images. All other properties will be
+ /// ignored.
///
///
/// The cancellation token.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DevTestLabsClient.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DevTestLabsClient.cs
index 806b878deb1d..b52b08a6c9fc 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DevTestLabsClient.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DevTestLabsClient.cs
@@ -56,6 +56,16 @@ public partial class DevTestLabsClient : ServiceClient, IDevT
///
public string SubscriptionId { get; set; }
+ ///
+ /// The ID of the target subscription.
+ ///
+ public string SubscriptionId1 { get; set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ public string ApiVersion1 { get; set; }
+
///
/// The preferred language for the response.
///
@@ -149,11 +159,26 @@ public partial class DevTestLabsClient : ServiceClient, IDevT
///
public virtual ISchedulesOperations Schedules { get; private set; }
+ ///
+ /// Gets the ILabSecretsOperations.
+ ///
+ public virtual ILabSecretsOperations LabSecrets { get; private set; }
+
///
/// Gets the IServiceRunnersOperations.
///
public virtual IServiceRunnersOperations ServiceRunners { get; private set; }
+ ///
+ /// Gets the ISharedGalleriesOperations.
+ ///
+ public virtual ISharedGalleriesOperations SharedGalleries { get; private set; }
+
+ ///
+ /// Gets the ISharedImagesOperations.
+ ///
+ public virtual ISharedImagesOperations SharedImages { get; private set; }
+
///
/// Gets the IUsersOperations.
///
@@ -199,6 +224,11 @@ public partial class DevTestLabsClient : ServiceClient, IDevT
///
public virtual IVirtualNetworksOperations VirtualNetworks { get; private set; }
+ ///
+ /// Gets the IBastionHostsOperations.
+ ///
+ public virtual IBastionHostsOperations BastionHosts { get; private set; }
+
///
/// Initializes a new instance of the DevTestLabsClient class.
///
@@ -455,7 +485,10 @@ private void Initialize()
PolicySets = new PolicySetsOperations(this);
Policies = new PoliciesOperations(this);
Schedules = new SchedulesOperations(this);
+ LabSecrets = new LabSecretsOperations(this);
ServiceRunners = new ServiceRunnersOperations(this);
+ SharedGalleries = new SharedGalleriesOperations(this);
+ SharedImages = new SharedImagesOperations(this);
Users = new UsersOperations(this);
Disks = new DisksOperations(this);
Environments = new EnvironmentsOperations(this);
@@ -465,8 +498,9 @@ private void Initialize()
VirtualMachines = new VirtualMachinesOperations(this);
VirtualMachineSchedules = new VirtualMachineSchedulesOperations(this);
VirtualNetworks = new VirtualNetworksOperations(this);
+ BastionHosts = new BastionHostsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2018-09-15";
+ ApiVersion = "2021-09-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperations.cs
index 1f6e18917d74..6838e8e4471a 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperations.cs
@@ -283,9 +283,6 @@ internal DisksOperations(DevTestLabsClient client)
///
/// The name of the disk.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=diskType)'
- ///
///
/// Headers that will be added to request.
///
@@ -307,7 +304,7 @@ internal DisksOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -344,7 +341,6 @@ internal DisksOperations(DevTestLabsClient client)
tracingParameters.Add("labName", labName);
tracingParameters.Add("userName", userName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -357,10 +353,6 @@ internal DisksOperations(DevTestLabsClient client)
_url = _url.Replace("{userName}", System.Uri.EscapeDataString(userName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -551,7 +543,7 @@ internal DisksOperations(DevTestLabsClient client)
}
///
- /// Modify properties of disks.
+ /// Allows modifying tags of disks. All other properties will be ignored.
///
///
/// The name of the resource group.
@@ -566,7 +558,7 @@ internal DisksOperations(DevTestLabsClient client)
/// The name of the disk.
///
///
- /// A Disk.
+ /// Allows modifying tags of disks. All other properties will be ignored.
///
///
/// Headers that will be added to request.
@@ -908,6 +900,10 @@ internal DisksOperations(DevTestLabsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "disk");
}
+ if (disk != null)
+ {
+ disk.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -1004,7 +1000,7 @@ internal DisksOperations(DevTestLabsClient client)
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperationsExtensions.cs
index f2e41ff0a3ca..28e33951d591 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/DisksOperationsExtensions.cs
@@ -92,12 +92,9 @@ public static partial class DisksOperationsExtensions
///
/// The name of the disk.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=diskType)'
- ///
- public static Disk Get(this IDisksOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string))
+ public static Disk Get(this IDisksOperations operations, string resourceGroupName, string labName, string userName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, userName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, userName, name).GetAwaiter().GetResult();
}
///
@@ -118,15 +115,12 @@ public static partial class DisksOperationsExtensions
///
/// The name of the disk.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=diskType)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IDisksOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IDisksOperations operations, string resourceGroupName, string labName, string userName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -242,7 +236,7 @@ public static void Delete(this IDisksOperations operations, string resourceGroup
}
///
- /// Modify properties of disks.
+ /// Allows modifying tags of disks. All other properties will be ignored.
///
///
/// The operations group for this extension method.
@@ -260,7 +254,7 @@ public static void Delete(this IDisksOperations operations, string resourceGroup
/// The name of the disk.
///
///
- /// A Disk.
+ /// Allows modifying tags of disks. All other properties will be ignored.
///
public static Disk Update(this IDisksOperations operations, string resourceGroupName, string labName, string userName, string name, DiskFragment disk)
{
@@ -268,7 +262,7 @@ public static Disk Update(this IDisksOperations operations, string resourceGroup
}
///
- /// Modify properties of disks.
+ /// Allows modifying tags of disks. All other properties will be ignored.
///
///
/// The operations group for this extension method.
@@ -286,7 +280,7 @@ public static Disk Update(this IDisksOperations operations, string resourceGroup
/// The name of the disk.
///
///
- /// A Disk.
+ /// Allows modifying tags of disks. All other properties will be ignored.
///
///
/// The cancellation token.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperations.cs
index 3febf1fb06d9..111c08734cde 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperations.cs
@@ -283,10 +283,6 @@ internal EnvironmentsOperations(DevTestLabsClient client)
///
/// The name of the environment.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=deploymentProperties)'
- ///
///
/// Headers that will be added to request.
///
@@ -308,7 +304,7 @@ internal EnvironmentsOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -345,7 +341,6 @@ internal EnvironmentsOperations(DevTestLabsClient client)
tracingParameters.Add("labName", labName);
tracingParameters.Add("userName", userName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -358,10 +353,6 @@ internal EnvironmentsOperations(DevTestLabsClient client)
_url = _url.Replace("{userName}", System.Uri.EscapeDataString(userName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -552,7 +543,8 @@ internal EnvironmentsOperations(DevTestLabsClient client)
}
///
- /// Modify properties of environments.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -567,7 +559,8 @@ internal EnvironmentsOperations(DevTestLabsClient client)
/// The name of the environment.
///
///
- /// An environment, which is essentially an ARM template deployment.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// Headers that will be added to request.
@@ -845,6 +838,10 @@ internal EnvironmentsOperations(DevTestLabsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "dtlEnvironment");
}
+ if (dtlEnvironment != null)
+ {
+ dtlEnvironment.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -941,7 +938,7 @@ internal EnvironmentsOperations(DevTestLabsClient client)
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperationsExtensions.cs
index 9869ea3e9494..93e4cd92ca8a 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/EnvironmentsOperationsExtensions.cs
@@ -92,13 +92,9 @@ public static partial class EnvironmentsOperationsExtensions
///
/// The name of the environment.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=deploymentProperties)'
- ///
- public static DtlEnvironment Get(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string))
+ public static DtlEnvironment Get(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, userName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, userName, name).GetAwaiter().GetResult();
}
///
@@ -119,16 +115,12 @@ public static partial class EnvironmentsOperationsExtensions
///
/// The name of the environment.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=deploymentProperties)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -244,7 +236,8 @@ public static void Delete(this IEnvironmentsOperations operations, string resour
}
///
- /// Modify properties of environments.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// The operations group for this extension method.
@@ -262,7 +255,8 @@ public static void Delete(this IEnvironmentsOperations operations, string resour
/// The name of the environment.
///
///
- /// An environment, which is essentially an ARM template deployment.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
public static DtlEnvironment Update(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, DtlEnvironmentFragment dtlEnvironment)
{
@@ -270,7 +264,8 @@ public static DtlEnvironment Update(this IEnvironmentsOperations operations, str
}
///
- /// Modify properties of environments.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// The operations group for this extension method.
@@ -288,7 +283,8 @@ public static DtlEnvironment Update(this IEnvironmentsOperations operations, str
/// The name of the environment.
///
///
- /// An environment, which is essentially an ARM template deployment.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// The cancellation token.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperations.cs
index 71ca5c312cf1..0aeb496e82e1 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperations.cs
@@ -271,9 +271,6 @@ internal FormulasOperations(DevTestLabsClient client)
///
/// The name of the formula.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=description)'
- ///
///
/// Headers that will be added to request.
///
@@ -295,7 +292,7 @@ internal FormulasOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -327,7 +324,6 @@ internal FormulasOperations(DevTestLabsClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("labName", labName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -339,10 +335,6 @@ internal FormulasOperations(DevTestLabsClient client)
_url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -686,7 +678,7 @@ internal FormulasOperations(DevTestLabsClient client)
}
///
- /// Modify properties of formulas.
+ /// Allows modifying tags of formulas. All other properties will be ignored.
///
///
/// The name of the resource group.
@@ -698,7 +690,7 @@ internal FormulasOperations(DevTestLabsClient client)
/// The name of the formula.
///
///
- /// A formula for creating a VM, specifying an image base and other parameters
+ /// Allows modifying tags of formulas. All other properties will be ignored.
///
///
/// Headers that will be added to request.
@@ -963,6 +955,10 @@ internal FormulasOperations(DevTestLabsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "formula");
}
+ if (formula != null)
+ {
+ formula.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -1057,7 +1053,7 @@ internal FormulasOperations(DevTestLabsClient client)
System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperationsExtensions.cs
index ff69f07d4986..7052dc623113 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/FormulasOperationsExtensions.cs
@@ -83,12 +83,9 @@ public static partial class FormulasOperationsExtensions
///
/// The name of the formula.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=description)'
- ///
- public static Formula Get(this IFormulasOperations operations, string resourceGroupName, string labName, string name, string expand = default(string))
+ public static Formula Get(this IFormulasOperations operations, string resourceGroupName, string labName, string name)
{
- return operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
}
///
@@ -106,15 +103,12 @@ public static partial class FormulasOperationsExtensions
///
/// The name of the formula.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=description)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -218,7 +212,7 @@ public static void Delete(this IFormulasOperations operations, string resourceGr
}
///
- /// Modify properties of formulas.
+ /// Allows modifying tags of formulas. All other properties will be ignored.
///
///
/// The operations group for this extension method.
@@ -233,7 +227,7 @@ public static void Delete(this IFormulasOperations operations, string resourceGr
/// The name of the formula.
///
///
- /// A formula for creating a VM, specifying an image base and other parameters
+ /// Allows modifying tags of formulas. All other properties will be ignored.
///
public static Formula Update(this IFormulasOperations operations, string resourceGroupName, string labName, string name, FormulaFragment formula)
{
@@ -241,7 +235,7 @@ public static Formula Update(this IFormulasOperations operations, string resourc
}
///
- /// Modify properties of formulas.
+ /// Allows modifying tags of formulas. All other properties will be ignored.
///
///
/// The operations group for this extension method.
@@ -256,7 +250,7 @@ public static Formula Update(this IFormulasOperations operations, string resourc
/// The name of the formula.
///
///
- /// A formula for creating a VM, specifying an image base and other parameters
+ /// Allows modifying tags of formulas. All other properties will be ignored.
///
///
/// The cancellation token.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperations.cs
index 3f528983dcb4..4663bfb4c693 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperations.cs
@@ -259,6 +259,211 @@ internal GalleryImagesOperations(DevTestLabsClient client)
return _result;
}
+ ///
+ /// Get gallery image.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the gallery image.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("name", name);
+ 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.DevTestLab/labs/{labName}/galleryimages/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// List gallery images in a given lab.
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperationsExtensions.cs
index 85502f30dd75..d8c4b91af415 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GalleryImagesOperationsExtensions.cs
@@ -68,6 +68,52 @@ public static partial class GalleryImagesOperationsExtensions
}
}
+ ///
+ /// Get gallery image.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the gallery image.
+ ///
+ public static GalleryImage Get(this IGalleryImagesOperations operations, string resourceGroupName, string labName, string name)
+ {
+ return operations.GetAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get gallery image.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the gallery image.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IGalleryImagesOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// List gallery images in a given lab.
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperations.cs
index 809227bb70c6..fc3677237085 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperations.cs
@@ -449,9 +449,6 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
///
/// Headers that will be added to request.
///
@@ -473,7 +470,7 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -500,7 +497,6 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -511,10 +507,6 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
- if (expand != null)
- {
- _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
- }
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
@@ -695,6 +687,10 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "schedule");
}
+ if (schedule != null)
+ {
+ schedule.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -1048,7 +1044,7 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
}
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be ignored.
///
///
/// The name of the resource group.
@@ -1057,7 +1053,7 @@ internal GlobalSchedulesOperations(DevTestLabsClient client)
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be ignored.
///
///
/// Headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperationsExtensions.cs
index 789917f7b6dd..433011fb10e3 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperationsExtensions.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/GlobalSchedulesOperationsExtensions.cs
@@ -108,12 +108,9 @@ public static partial class GlobalSchedulesOperationsExtensions
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
- public static Schedule Get(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, string expand = default(string))
+ public static Schedule Get(this IGlobalSchedulesOperations operations, string resourceGroupName, string name)
{
- return operations.GetAsync(resourceGroupName, name, expand).GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult();
}
///
@@ -128,15 +125,12 @@ public static partial class GlobalSchedulesOperationsExtensions
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, expand, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -226,7 +220,7 @@ public static void Delete(this IGlobalSchedulesOperations operations, string res
}
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be ignored.
///
///
/// The operations group for this extension method.
@@ -238,7 +232,7 @@ public static void Delete(this IGlobalSchedulesOperations operations, string res
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be ignored.
///
public static Schedule Update(this IGlobalSchedulesOperations operations, string resourceGroupName, string name, ScheduleFragment schedule)
{
@@ -246,7 +240,7 @@ public static Schedule Update(this IGlobalSchedulesOperations operations, string
}
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be ignored.
///
///
/// The operations group for this extension method.
@@ -258,7 +252,7 @@ public static Schedule Update(this IGlobalSchedulesOperations operations, string
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be ignored.
///
///
/// The cancellation token.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArmTemplatesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArmTemplatesOperations.cs
index 824bc0c14050..3e4e71bcb300 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArmTemplatesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArmTemplatesOperations.cs
@@ -68,11 +68,7 @@ public partial interface IArmTemplatesOperations
/// The name of the artifact source.
///
///
- /// The name of the azure Resource Manager template.
- ///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=displayName)'
+ /// The name of the azure resource manager template.
///
///
/// The headers that will be added to request.
@@ -89,7 +85,7 @@ public partial interface IArmTemplatesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// List azure resource manager templates in a given artifact source.
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactSourcesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactSourcesOperations.cs
index 466cb9703b0f..91508c44519d 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactSourcesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactSourcesOperations.cs
@@ -64,10 +64,6 @@ public partial interface IArtifactSourcesOperations
///
/// The name of the artifact source.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=displayName)'
- ///
///
/// The headers that will be added to request.
///
@@ -83,7 +79,7 @@ public partial interface IArtifactSourcesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing artifact source.
///
@@ -141,7 +137,8 @@ public partial interface IArtifactSourcesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of artifact sources.
+ /// Allows modifying tags of artifact sources. All other properties
+ /// will be ignored.
///
///
/// The name of the resource group.
@@ -153,7 +150,8 @@ public partial interface IArtifactSourcesOperations
/// The name of the artifact source.
///
///
- /// Properties of an artifact source.
+ /// Allows modifying tags of artifact sources. All other properties
+ /// will be ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactsOperations.cs
index c32e03633389..f4b6f0248828 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IArtifactsOperations.cs
@@ -70,9 +70,6 @@ public partial interface IArtifactsOperations
///
/// The name of the artifact.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=title)'
- ///
///
/// The headers that will be added to request.
///
@@ -88,7 +85,7 @@ public partial interface IArtifactsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string artifactSourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Generates an ARM template for the given artifact, uploads the
/// required files to a storage account, and validates the generated
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IBastionHostsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IBastionHostsOperations.cs
new file mode 100644
index 000000000000..33000e5ac51f
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IBastionHostsOperations.cs
@@ -0,0 +1,274 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// BastionHostsOperations operations.
+ ///
+ public partial interface IBastionHostsOperations
+ {
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get bastionhost.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace an existing bastionHost. This operation can take
+ /// a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Allows modifying tags of bastionhosts. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHostFragment bastionHost, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace an existing bastionHost. This operation can take
+ /// a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// Profile of a Bastion Host
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, BastionHost bastionHost, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete bastionhost. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual network.
+ ///
+ ///
+ /// The name of the bastionhost.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualNetworkName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List bastionhosts in a given virtual network.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICostsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICostsOperations.cs
index ba5361f47180..c9fef662c15f 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICostsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICostsOperations.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.DevTestLabs
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -23,6 +24,34 @@ namespace Microsoft.Azure.Management.DevTestLabs
///
public partial interface ICostsOperations
{
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get cost.
///
@@ -86,5 +115,27 @@ public partial interface ICostsOperations
/// Thrown when a required parameter is null
///
Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, LabCost labCost, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List costs in a given lab.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICustomImagesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICustomImagesOperations.cs
index fb56f74f7a86..6ca7544ebfa9 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICustomImagesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ICustomImagesOperations.cs
@@ -64,9 +64,6 @@ public partial interface ICustomImagesOperations
///
/// The name of the custom image.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=vm)'
- ///
///
/// The headers that will be added to request.
///
@@ -82,7 +79,7 @@ public partial interface ICustomImagesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing custom image. This operation can take
/// a while to complete.
@@ -141,7 +138,8 @@ public partial interface ICustomImagesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of custom images.
+ /// Allows modifying tags of custom images. All other properties will
+ /// be ignored.
///
///
/// The name of the resource group.
@@ -153,7 +151,8 @@ public partial interface ICustomImagesOperations
/// The name of the custom image.
///
///
- /// A custom image.
+ /// Allows modifying tags of custom images. All other properties will
+ /// be ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDevTestLabsClient.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDevTestLabsClient.cs
index ae1ff0889dc8..769faf879f57 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDevTestLabsClient.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDevTestLabsClient.cs
@@ -50,6 +50,16 @@ public partial interface IDevTestLabsClient : System.IDisposable
///
string SubscriptionId { get; set; }
+ ///
+ /// The ID of the target subscription.
+ ///
+ string SubscriptionId1 { get; set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion1 { get; set; }
+
///
/// The preferred language for the response.
///
@@ -144,11 +154,26 @@ public partial interface IDevTestLabsClient : System.IDisposable
///
ISchedulesOperations Schedules { get; }
+ ///
+ /// Gets the ILabSecretsOperations.
+ ///
+ ILabSecretsOperations LabSecrets { get; }
+
///
/// Gets the IServiceRunnersOperations.
///
IServiceRunnersOperations ServiceRunners { get; }
+ ///
+ /// Gets the ISharedGalleriesOperations.
+ ///
+ ISharedGalleriesOperations SharedGalleries { get; }
+
+ ///
+ /// Gets the ISharedImagesOperations.
+ ///
+ ISharedImagesOperations SharedImages { get; }
+
///
/// Gets the IUsersOperations.
///
@@ -194,5 +219,10 @@ public partial interface IDevTestLabsClient : System.IDisposable
///
IVirtualNetworksOperations VirtualNetworks { get; }
+ ///
+ /// Gets the IBastionHostsOperations.
+ ///
+ IBastionHostsOperations BastionHosts { get; }
+
}
}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDisksOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDisksOperations.cs
index 52f70aa1a237..9d5c034b8050 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDisksOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IDisksOperations.cs
@@ -70,9 +70,6 @@ public partial interface IDisksOperations
///
/// The name of the disk.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=diskType)'
- ///
///
/// The headers that will be added to request.
///
@@ -88,7 +85,7 @@ public partial interface IDisksOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing disk. This operation can take a while
/// to complete.
@@ -153,7 +150,8 @@ public partial interface IDisksOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of disks.
+ /// Allows modifying tags of disks. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -168,7 +166,8 @@ public partial interface IDisksOperations
/// The name of the disk.
///
///
- /// A Disk.
+ /// Allows modifying tags of disks. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IEnvironmentsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IEnvironmentsOperations.cs
index 28d2384aa0bb..2de56eb9eb2b 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IEnvironmentsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IEnvironmentsOperations.cs
@@ -70,10 +70,6 @@ public partial interface IEnvironmentsOperations
///
/// The name of the environment.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=deploymentProperties)'
- ///
///
/// The headers that will be added to request.
///
@@ -89,7 +85,7 @@ public partial interface IEnvironmentsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing environment. This operation can take
/// a while to complete.
@@ -154,7 +150,8 @@ public partial interface IEnvironmentsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of environments.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -169,7 +166,8 @@ public partial interface IEnvironmentsOperations
/// The name of the environment.
///
///
- /// An environment, which is essentially an ARM template deployment.
+ /// Allows modifying tags of environments. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IFormulasOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IFormulasOperations.cs
index 48864015c4dd..58d95aba85a1 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IFormulasOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IFormulasOperations.cs
@@ -64,10 +64,6 @@ public partial interface IFormulasOperations
///
/// The name of the formula.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=description)'
- ///
///
/// The headers that will be added to request.
///
@@ -83,7 +79,7 @@ public partial interface IFormulasOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing Formula. This operation can take a
/// while to complete.
@@ -143,7 +139,8 @@ public partial interface IFormulasOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of formulas.
+ /// Allows modifying tags of formulas. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -155,8 +152,8 @@ public partial interface IFormulasOperations
/// The name of the formula.
///
///
- /// A formula for creating a VM, specifying an image base and other
- /// parameters
+ /// Allows modifying tags of formulas. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGalleryImagesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGalleryImagesOperations.cs
index aaf883380f59..fa1f206ebcb9 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGalleryImagesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGalleryImagesOperations.cs
@@ -53,6 +53,34 @@ public partial interface IGalleryImagesOperations
///
Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Get gallery image.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the gallery image.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// List gallery images in a given lab.
///
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGlobalSchedulesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGlobalSchedulesOperations.cs
index dd2c73fc409b..548ea7593f84 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGlobalSchedulesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IGlobalSchedulesOperations.cs
@@ -80,9 +80,6 @@ public partial interface IGlobalSchedulesOperations
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
///
/// The headers that will be added to request.
///
@@ -98,7 +95,7 @@ public partial interface IGlobalSchedulesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing schedule.
///
@@ -150,7 +147,8 @@ public partial interface IGlobalSchedulesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -159,7 +157,8 @@ public partial interface IGlobalSchedulesOperations
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabSecretsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabSecretsOperations.cs
new file mode 100644
index 000000000000..44392d3289b1
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabSecretsOperations.cs
@@ -0,0 +1,253 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// LabSecretsOperations operations.
+ ///
+ public partial interface ILabSecretsOperations
+ {
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get lab secret.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a
+ /// while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, LabSecret labSecret, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be
+ /// ignored.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, SecretFragment secret, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a
+ /// while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, LabSecret labSecret, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabsOperations.cs
index 5caa37c63a5e..d6a82d4b0b54 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ILabsOperations.cs
@@ -80,10 +80,6 @@ public partial interface ILabsOperations
///
/// The name of the lab.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=defaultStorageAccount)'
- ///
///
/// The headers that will be added to request.
///
@@ -99,7 +95,7 @@ public partial interface ILabsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing lab. This operation can take a while
/// to complete.
@@ -152,7 +148,8 @@ public partial interface ILabsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of labs.
+ /// Allows modifying tags of labs. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -161,7 +158,8 @@ public partial interface ILabsOperations
/// The name of the lab.
///
///
- /// A lab.
+ /// Allows modifying tags of labs. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
@@ -229,6 +227,28 @@ public partial interface ILabsOperations
///
Task CreateEnvironmentWithHttpMessagesAsync(string resourceGroupName, string name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Ensure the current user has a valid profile in the lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task EnsureCurrentUserProfileWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Exports the lab resource usage into a storage account This
/// operation can take a while to complete.
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/INotificationChannelsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/INotificationChannelsOperations.cs
index b4b8dc3d17de..966858245113 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/INotificationChannelsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/INotificationChannelsOperations.cs
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.DevTestLabs
public partial interface INotificationChannelsOperations
{
///
- /// List notificationchannels in a given lab.
+ /// List notification channels in a given lab.
///
///
/// The name of the resource group.
@@ -53,7 +53,7 @@ public partial interface INotificationChannelsOperations
///
Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Get notificationchannel.
+ /// Get notification channel.
///
///
/// The name of the resource group.
@@ -62,11 +62,7 @@ public partial interface INotificationChannelsOperations
/// The name of the lab.
///
///
- /// The name of the notificationChannel.
- ///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=webHookUrl)'
+ /// The name of the notification channel.
///
///
/// The headers that will be added to request.
@@ -83,9 +79,9 @@ public partial interface INotificationChannelsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Create or replace an existing notificationChannel.
+ /// Create or replace an existing Notification Channel.
///
///
/// The name of the resource group.
@@ -94,7 +90,7 @@ public partial interface INotificationChannelsOperations
/// The name of the lab.
///
///
- /// The name of the notificationChannel.
+ /// The name of the notification channel.
///
///
/// A notification.
@@ -116,7 +112,7 @@ public partial interface INotificationChannelsOperations
///
Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, NotificationChannel notificationChannel, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Delete notificationchannel.
+ /// Delete notification channel.
///
///
/// The name of the resource group.
@@ -125,7 +121,7 @@ public partial interface INotificationChannelsOperations
/// The name of the lab.
///
///
- /// The name of the notificationChannel.
+ /// The name of the notification channel.
///
///
/// The headers that will be added to request.
@@ -141,7 +137,8 @@ public partial interface INotificationChannelsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of notificationchannels.
+ /// Allows modifying tags of notification channels. All other
+ /// properties will be ignored.
///
///
/// The name of the resource group.
@@ -150,10 +147,11 @@ public partial interface INotificationChannelsOperations
/// The name of the lab.
///
///
- /// The name of the notificationChannel.
+ /// The name of the notification channel.
///
///
- /// A notification.
+ /// Allows modifying tags of notification channels. All other
+ /// properties will be ignored.
///
///
/// The headers that will be added to request.
@@ -181,7 +179,7 @@ public partial interface INotificationChannelsOperations
/// The name of the lab.
///
///
- /// The name of the notificationChannel.
+ /// The name of the notification channel.
///
///
/// Properties for generating a Notification.
@@ -200,7 +198,7 @@ public partial interface INotificationChannelsOperations
///
Task NotifyWithHttpMessagesAsync(string resourceGroupName, string labName, string name, NotifyParameters notifyParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// List notificationchannels in a given lab.
+ /// List notification channels in a given lab.
///
///
/// The NextLink from the previous successful call to List operation.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPoliciesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPoliciesOperations.cs
index 49cc0746565d..ec5e275c9b4e 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPoliciesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPoliciesOperations.cs
@@ -70,10 +70,6 @@ public partial interface IPoliciesOperations
///
/// The name of the policy.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=description)'
- ///
///
/// The headers that will be added to request.
///
@@ -89,7 +85,7 @@ public partial interface IPoliciesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string policySetName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string policySetName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing policy.
///
@@ -153,7 +149,8 @@ public partial interface IPoliciesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string policySetName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of policies.
+ /// Allows modifying tags of policies. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -168,7 +165,8 @@ public partial interface IPoliciesOperations
/// The name of the policy.
///
///
- /// A Policy.
+ /// Allows modifying tags of policies. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPolicySetsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPolicySetsOperations.cs
index 2edc6e6b823b..3b2af77bedf2 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPolicySetsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IPolicySetsOperations.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.DevTestLabs
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -23,6 +24,34 @@ namespace Microsoft.Azure.Management.DevTestLabs
///
public partial interface IPolicySetsOperations
{
+ ///
+ /// List policy sets in a given lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Evaluates lab policy.
///
@@ -54,5 +83,27 @@ public partial interface IPolicySetsOperations
/// Thrown when a required parameter is null
///
Task> EvaluatePoliciesWithHttpMessagesAsync(string resourceGroupName, string labName, string name, EvaluatePoliciesRequest evaluatePoliciesRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List policy sets in a given lab.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISchedulesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISchedulesOperations.cs
index 00111fe801a7..41501c9a4e3a 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISchedulesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISchedulesOperations.cs
@@ -64,9 +64,6 @@ public partial interface ISchedulesOperations
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
///
/// The headers that will be added to request.
///
@@ -82,7 +79,7 @@ public partial interface ISchedulesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing schedule.
///
@@ -140,7 +137,8 @@ public partial interface ISchedulesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -152,7 +150,8 @@ public partial interface ISchedulesOperations
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISecretsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISecretsOperations.cs
index ca5de78577c7..726b7ca762c8 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISecretsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISecretsOperations.cs
@@ -70,9 +70,6 @@ public partial interface ISecretsOperations
///
/// The name of the secret.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=value)'
- ///
///
/// The headers that will be added to request.
///
@@ -88,7 +85,7 @@ public partial interface ISecretsOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing secret. This operation can take a
/// while to complete.
@@ -153,7 +150,8 @@ public partial interface ISecretsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of secrets.
+ /// Allows modifying tags of secrets. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -168,7 +166,8 @@ public partial interface ISecretsOperations
/// The name of the secret.
///
///
- /// A secret.
+ /// Allows modifying tags of secrets. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricSchedulesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricSchedulesOperations.cs
index 9f3da080eeca..8f4d31c3cac9 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricSchedulesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricSchedulesOperations.cs
@@ -37,7 +37,7 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// OData parameters to apply to the operation.
@@ -71,14 +71,11 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
///
/// The headers that will be added to request.
///
@@ -94,7 +91,7 @@ public partial interface IServiceFabricSchedulesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string serviceFabricName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string serviceFabricName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing schedule.
///
@@ -108,7 +105,7 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The name of the schedule.
@@ -145,7 +142,7 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The name of the schedule.
@@ -164,7 +161,8 @@ public partial interface IServiceFabricSchedulesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string serviceFabricName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -176,13 +174,14 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
@@ -213,7 +212,7 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The name of the schedule.
@@ -244,7 +243,7 @@ public partial interface IServiceFabricSchedulesOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The name of the schedule.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricsOperations.cs
index 01b54afaa2d9..a8266beb404b 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceFabricsOperations.cs
@@ -68,7 +68,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// Specify the $expand query. Example:
@@ -104,7 +104,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// A Service Fabric.
@@ -138,7 +138,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
@@ -154,7 +154,8 @@ public partial interface IServiceFabricsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string userName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of service fabrics.
+ /// Allows modifying tags of service fabrics. All other properties will
+ /// be ignored.
///
///
/// The name of the resource group.
@@ -166,10 +167,11 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
- /// A Service Fabric.
+ /// Allows modifying tags of service fabrics. All other properties will
+ /// be ignored.
///
///
/// The headers that will be added to request.
@@ -200,7 +202,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
@@ -232,7 +234,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
@@ -260,7 +262,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
@@ -289,7 +291,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// A Service Fabric.
@@ -323,7 +325,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
@@ -352,7 +354,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
@@ -380,7 +382,7 @@ public partial interface IServiceFabricsOperations
/// The name of the user profile.
///
///
- /// The name of the service Fabric.
+ /// The name of the service fabric.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceRunnersOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceRunnersOperations.cs
index c05412a2c44d..90597b22a791 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceRunnersOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IServiceRunnersOperations.cs
@@ -81,7 +81,8 @@ public partial interface IServiceRunnersOperations
///
Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Create or replace an existing Service runner.
+ /// Create or replace an existing Service runner. This operation can
+ /// take a while to complete.
///
///
/// The name of the resource group.
@@ -112,7 +113,7 @@ public partial interface IServiceRunnersOperations
///
Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, ServiceRunner serviceRunner, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Delete service runner.
+ /// Delete service runner. This operation can take a while to complete.
///
///
/// The name of the resource group.
@@ -137,6 +138,63 @@ public partial interface IServiceRunnersOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Create or replace an existing Service runner. This operation can
+ /// take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the service runner.
+ ///
+ ///
+ /// A container for a managed identity to execute DevTest lab services.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, ServiceRunner serviceRunner, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete service runner. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the service runner.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// List service runners in a given lab.
///
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISharedGalleriesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISharedGalleriesOperations.cs
new file mode 100644
index 000000000000..4f29199a8eb0
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISharedGalleriesOperations.cs
@@ -0,0 +1,195 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SharedGalleriesOperations operations.
+ ///
+ public partial interface ISharedGalleriesOperations
+ {
+ ///
+ /// List shared galleries in a given lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get shared gallery.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace an existing Shared Gallery.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// Properties of a shared gallery
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, SharedGallery sharedGallery, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete shared gallery.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Allows modifying tags of shared galleries. All other properties
+ /// will be ignored.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// Allows modifying tags of shared galleries. All other properties
+ /// will be ignored.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, SharedGalleryFragment sharedGallery, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List shared galleries in a given lab.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISharedImagesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISharedImagesOperations.cs
new file mode 100644
index 000000000000..cded19b74d48
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/ISharedImagesOperations.cs
@@ -0,0 +1,213 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SharedImagesOperations operations.
+ ///
+ public partial interface ISharedImagesOperations
+ {
+ ///
+ /// List shared images in a given shared gallery.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, string sharedGalleryName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get shared image.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// The name of the shared image.
+ ///
+ ///
+ /// Specify the $expand query. Example: 'properties($expand=versions)'
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string sharedGalleryName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace an existing Shared Image.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// The name of the shared image.
+ ///
+ ///
+ /// Properties of a shared image
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string sharedGalleryName, string name, SharedImage sharedImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete shared image.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// The name of the shared image.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string sharedGalleryName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Allows modifying tags of shared images. All other properties will
+ /// be ignored.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the shared gallery.
+ ///
+ ///
+ /// The name of the shared image.
+ ///
+ ///
+ /// Allows modifying tags of shared images. All other properties will
+ /// be ignored.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string sharedGalleryName, string name, SharedImageFragment sharedImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List shared images in a given shared gallery.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IUsersOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IUsersOperations.cs
index 376f9a3b7e26..9dccada8fdd9 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IUsersOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IUsersOperations.cs
@@ -64,9 +64,6 @@ public partial interface IUsersOperations
///
/// The name of the user profile.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=identity)'
- ///
///
/// The headers that will be added to request.
///
@@ -82,7 +79,7 @@ public partial interface IUsersOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing user profile. This operation can take
/// a while to complete.
@@ -141,7 +138,8 @@ public partial interface IUsersOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of user profiles.
+ /// Allows modifying tags of user profiles. All other properties will
+ /// be ignored.
///
///
/// The name of the resource group.
@@ -153,7 +151,8 @@ public partial interface IUsersOperations
/// The name of the user profile.
///
///
- /// Profile of a lab user.
+ /// Allows modifying tags of user profiles. All other properties will
+ /// be ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachineSchedulesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachineSchedulesOperations.cs
index 8976e2e36d0b..6f445e717253 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachineSchedulesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachineSchedulesOperations.cs
@@ -70,9 +70,6 @@ public partial interface IVirtualMachineSchedulesOperations
///
/// The name of the schedule.
///
- ///
- /// Specify the $expand query. Example: 'properties($select=status)'
- ///
///
/// The headers that will be added to request.
///
@@ -88,7 +85,7 @@ public partial interface IVirtualMachineSchedulesOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualMachineName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualMachineName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or replace an existing schedule.
///
@@ -152,7 +149,8 @@ public partial interface IVirtualMachineSchedulesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string virtualMachineName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of schedules.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The name of the resource group.
@@ -167,7 +165,8 @@ public partial interface IVirtualMachineSchedulesOperations
/// The name of the schedule.
///
///
- /// A schedule.
+ /// Allows modifying tags of schedules. All other properties will be
+ /// ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachinesOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachinesOperations.cs
index 495a0cbcbbe6..b36d074e0d21 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachinesOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualMachinesOperations.cs
@@ -143,7 +143,8 @@ public partial interface IVirtualMachinesOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of virtual machines.
+ /// Allows modifying tags of virtual machines. All other properties
+ /// will be ignored.
///
///
/// The name of the resource group.
@@ -155,7 +156,8 @@ public partial interface IVirtualMachinesOperations
/// The name of the virtual machine.
///
///
- /// A virtual machine.
+ /// Allows modifying tags of virtual machines. All other properties
+ /// will be ignored.
///
///
/// The headers that will be added to request.
@@ -259,6 +261,31 @@ public partial interface IVirtualMachinesOperations
///
Task ClaimWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Clears the artifact results of the virtual machine.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the virtual machine.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task ClearArtifactResultsWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Detach the specified disk from the virtual machine. This operation
/// can take a while to complete.
///
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualNetworksOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualNetworksOperations.cs
index 8a24a0dd1996..4529a1cc73e3 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualNetworksOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/IVirtualNetworksOperations.cs
@@ -143,7 +143,8 @@ public partial interface IVirtualNetworksOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Modify properties of virtual networks.
+ /// Allows modifying tags of virtual networks. All other properties
+ /// will be ignored.
///
///
/// The name of the resource group.
@@ -155,7 +156,8 @@ public partial interface IVirtualNetworksOperations
/// The name of the virtual network.
///
///
- /// A virtual network.
+ /// Allows modifying tags of virtual networks. All other properties
+ /// will be ignored.
///
///
/// The headers that will be added to request.
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabSecretsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabSecretsOperations.cs
new file mode 100644
index 000000000000..0dafb9bf81b5
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabSecretsOperations.cs
@@ -0,0 +1,1340 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// LabSecretsOperations operations.
+ ///
+ internal partial class LabSecretsOperations : IServiceOperations, ILabSecretsOperations
+ {
+ ///
+ /// Initializes a new instance of the LabSecretsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal LabSecretsOperations(DevTestLabsClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DevTestLabsClient
+ ///
+ public DevTestLabsClient Client { get; private set; }
+
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("odataQuery", odataQuery);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ 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.DevTestLab/labs/{labName}/secrets").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ List _queryParameters = new List();
+ if (odataQuery != null)
+ {
+ var _odataFilter = odataQuery.ToString();
+ if (!string.IsNullOrEmpty(_odataFilter))
+ {
+ _queryParameters.Add(_odataFilter);
+ }
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Get lab secret.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string labName, string name, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("name", name);
+ 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.DevTestLab/labs/{labName}/secrets/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, LabSecret labSecret, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, labSecret, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, labName, name, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be ignored.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be ignored.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, SecretFragment secret, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (secret == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "secret");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("secret", secret);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/secrets/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(secret != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(secret, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string labName, string name, LabSecret labSecret, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (labSecret == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labSecret");
+ }
+ if (labSecret != null)
+ {
+ labSecret.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("labSecret", labSecret);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.DevTestLab/labs/{labName}/secrets/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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(labSecret != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(labSecret, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // 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;
+ }
+
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string labName, string name, 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 (labName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "labName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("labName", labName);
+ tracingParameters.Add("name", name);
+ 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.DevTestLab/labs/{labName}/secrets/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{labName}", System.Uri.EscapeDataString(labName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("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);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabSecretsOperationsExtensions.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabSecretsOperationsExtensions.cs
new file mode 100644
index 000000000000..dd201268a056
--- /dev/null
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabSecretsOperationsExtensions.cs
@@ -0,0 +1,398 @@
+//
+// 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.DevTestLabs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for LabSecretsOperations.
+ ///
+ public static partial class LabSecretsOperationsExtensions
+ {
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ public static IPage List(this ILabSecretsOperations operations, string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery))
+ {
+ return operations.ListAsync(resourceGroupName, labName, odataQuery).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// OData parameters to apply to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, odataQuery, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get lab secret.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ public static LabSecret Get(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name)
+ {
+ return operations.GetAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get lab secret.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ public static LabSecret CreateOrUpdate(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, LabSecret labSecret)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, labName, name, labSecret).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, LabSecret labSecret, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, labSecret, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ public static void Delete(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name)
+ {
+ operations.DeleteAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be ignored.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be ignored.
+ ///
+ public static LabSecret Update(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, SecretFragment secret)
+ {
+ return operations.UpdateAsync(resourceGroupName, labName, name, secret).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be ignored.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// Allows modifying tags of lab secrets. All other properties will be ignored.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, SecretFragment secret, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, labName, name, secret, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ public static LabSecret BeginCreateOrUpdate(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, LabSecret labSecret)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, name, labSecret).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or replace an existing Lab Secret. This operation can take a while
+ /// to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// A shared secret in a lab.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, LabSecret labSecret, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, labSecret, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ public static void BeginDelete(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete lab secret. This operation can take a while to complete.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the lab.
+ ///
+ ///
+ /// The name of the lab secret.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this ILabSecretsOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ILabSecretsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List lab secrets in a given lab.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ILabSecretsOperations 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/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabsOperations.cs b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabsOperations.cs
index 6eae66d5ed00..9ee75c6fe6c4 100644
--- a/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabsOperations.cs
+++ b/sdk/devtestlabs/Microsoft.Azure.Management.DevTestLabs/src/Generated/LabsOperations.cs
@@ -449,10 +449,6 @@ internal LabsOperations(DevTestLabsClient client)
///
/// The name of the lab.
///
- ///
- /// Specify the $expand query. Example:
- /// 'properties($select=defaultStorageAccount)'
- ///
///
/// Headers that will be added to request.
///
@@ -474,7 +470,7 @@ internal LabsOperations(DevTestLabsClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -501,7 +497,6 @@ internal LabsOperations(DevTestLabsClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("name", name);
- tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
@@ -512,10 +507,6 @@ internal LabsOperations(DevTestLabsClient client)
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List