diff --git a/sdk/network/Microsoft.Azure.Management.Network/AzSdk.RP.props b/sdk/network/Microsoft.Azure.Management.Network/AzSdk.RP.props index aa61939876003..079dbabeea43f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/AzSdk.RP.props +++ b/sdk/network/Microsoft.Azure.Management.Network/AzSdk.RP.props @@ -1,7 +1,7 @@ - Compute_2017-03-30;Network_2019-04-01; + Compute_2017-03-30;Network_2019-06-01; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs index f695568ffb61b..b196178a180cf 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs @@ -116,7 +116,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -353,7 +353,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -531,7 +531,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -808,7 +808,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -979,7 +979,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1150,7 +1150,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1321,7 +1321,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1497,7 +1497,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1673,7 +1673,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1856,7 +1856,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "predefinedPolicyName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2045,7 +2045,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2232,7 +2232,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2458,7 +2458,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2656,7 +2656,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2829,7 +2829,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3010,7 +3010,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3221,7 +3221,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "probeRequest"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs index ceaac63f0acd7..fd6b1efa24e4b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs @@ -116,7 +116,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -347,7 +347,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -530,7 +530,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -719,7 +719,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -903,7 +903,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1129,7 +1129,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs index 5720328c25c74..8aecf73161904 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs @@ -88,7 +88,7 @@ internal AvailableDelegationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs index a97eb47262aa7..4bc38b6874d91 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs @@ -87,7 +87,7 @@ internal AvailableEndpointServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs index d7e9d3acccde9..e9e6faab82f1f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs @@ -55,7 +55,7 @@ internal AvailablePrivateEndpointTypesOperations(NetworkManagementClient client) /// in this subscription in this region. /// /// - /// the location of the domain name. + /// The location of the domain name. /// /// /// Headers that will be added to request. @@ -88,7 +88,7 @@ internal AvailablePrivateEndpointTypesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -236,6 +236,201 @@ internal AvailablePrivateEndpointTypesOperations(NetworkManagementClient client) return _result; } + /// + /// Returns all of the resource types that can be linked to a Private Endpoint + /// in this subscription in this region. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// 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>> ListByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", 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.Network/locations/{location}/availablePrivateEndpointTypes").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Returns all of the resource types that can be linked to a Private Endpoint /// in this subscription in this region. @@ -410,5 +605,179 @@ internal AvailablePrivateEndpointTypesOperations(NetworkManagementClient client) return _result; } + /// + /// Returns all of the resource types that can be linked to a Private Endpoint + /// in this subscription in this region. + /// + /// + /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(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, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperationsExtensions.cs index 8409989001140..e4d8966ccd639 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperationsExtensions.cs @@ -29,7 +29,7 @@ public static partial class AvailablePrivateEndpointTypesOperationsExtensions /// The operations group for this extension method. /// /// - /// the location of the domain name. + /// The location of the domain name. /// public static IPage List(this IAvailablePrivateEndpointTypesOperations operations, string location) { @@ -44,7 +44,7 @@ public static IPage List(this IAvailablePrivateEnd /// The operations group for this extension method. /// /// - /// the location of the domain name. + /// The location of the domain name. /// /// /// The cancellation token. @@ -57,6 +57,48 @@ public static IPage List(this IAvailablePrivateEnd } } + /// + /// Returns all of the resource types that can be linked to a Private Endpoint + /// in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + public static IPage ListByResourceGroup(this IAvailablePrivateEndpointTypesOperations operations, string location, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(location, resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Returns all of the resource types that can be linked to a Private Endpoint + /// in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IAvailablePrivateEndpointTypesOperations operations, string location, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(location, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Returns all of the resource types that can be linked to a Private Endpoint /// in this subscription in this region. @@ -93,5 +135,41 @@ public static IPage ListNext(this IAvailablePrivat } } + /// + /// Returns all of the resource types that can be linked to a Private Endpoint + /// in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IAvailablePrivateEndpointTypesOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns all of the resource types that can be linked to a Private Endpoint + /// in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IAvailablePrivateEndpointTypesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs index e404c0b02b5f2..39e4cf5605674 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs @@ -95,7 +95,7 @@ internal AvailableResourceGroupDelegationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupPrivateEndpointTypesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupPrivateEndpointTypesOperationsExtensions.cs deleted file mode 100644 index 273f006561a4d..0000000000000 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupPrivateEndpointTypesOperationsExtensions.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// 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.Network -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for AvailableResourceGroupPrivateEndpointTypesOperations. - /// - public static partial class AvailableResourceGroupPrivateEndpointTypesOperationsExtensions - { - /// - /// Returns all of the resource types that can be linked to a Private Endpoint - /// in this subscription in this region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The location of the domain name. - /// - /// - /// The name of the resource group. - /// - public static IPage List(this IAvailableResourceGroupPrivateEndpointTypesOperations operations, string location, string resourceGroupName) - { - return operations.ListAsync(location, resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Returns all of the resource types that can be linked to a Private Endpoint - /// in this subscription in this region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The location of the domain name. - /// - /// - /// The name of the resource group. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IAvailableResourceGroupPrivateEndpointTypesOperations operations, string location, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(location, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all of the resource types that can be linked to a Private Endpoint - /// in this subscription in this region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IAvailableResourceGroupPrivateEndpointTypesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns all of the resource types that can be linked to a Private Endpoint - /// in this subscription in this region. - /// - /// - /// 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 IAvailableResourceGroupPrivateEndpointTypesOperations 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/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs index 111d75f603a91..45bb1e5f97ee6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs @@ -80,7 +80,7 @@ internal AzureFirewallFqdnTagsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs index 8b63423515acd..80535559f843f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs @@ -116,7 +116,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -291,6 +291,214 @@ internal AzureFirewallsOperations(NetworkManagementClient client) return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Updates tags for an Azure Firewall resource. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Azure Firewall. + /// + /// + /// Parameters supplied to the create or update Azure Firewall 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string azureFirewallName, AzureFirewall parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (azureFirewallName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "azureFirewallName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("azureFirewallName", azureFirewallName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", 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.Network/azureFirewalls/{azureFirewallName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{azureFirewallName}", System.Uri.EscapeDataString(azureFirewallName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + 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; + } + /// /// Lists all Azure Firewalls in a resource group. /// @@ -328,7 +536,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -506,7 +714,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -693,7 +901,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -876,7 +1084,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperationsExtensions.cs index 28c708ff930ab..818f7fed4ff8f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperationsExtensions.cs @@ -144,6 +144,52 @@ public static AzureFirewall CreateOrUpdate(this IAzureFirewallsOperations operat } } + /// + /// Updates tags for an Azure Firewall resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Azure Firewall. + /// + /// + /// Parameters supplied to the create or update Azure Firewall operation. + /// + public static AzureFirewall UpdateTags(this IAzureFirewallsOperations operations, string resourceGroupName, string azureFirewallName, AzureFirewall parameters) + { + return operations.UpdateTagsAsync(resourceGroupName, azureFirewallName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates tags for an Azure Firewall resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Azure Firewall. + /// + /// + /// Parameters supplied to the create or update Azure Firewall operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateTagsAsync(this IAzureFirewallsOperations operations, string resourceGroupName, string azureFirewallName, AzureFirewall parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, azureFirewallName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Lists all Azure Firewalls in a resource group. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs index 46a17e26faf19..232445cd99747 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs @@ -116,7 +116,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +321,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -693,7 +693,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -876,7 +876,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs index 99c9612300086..4fb1728afa234 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs @@ -80,7 +80,7 @@ internal BgpServiceCommunitiesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs index fabc6433fec50..681f5ac7d52ec 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs @@ -129,7 +129,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -420,7 +420,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -627,7 +627,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -847,7 +847,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1024,7 +1024,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1201,7 +1201,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1381,7 +1381,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs index fabafde1b259b..664d74ac820ab 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs @@ -116,7 +116,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -357,7 +357,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -540,7 +540,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -766,7 +766,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs index 5961319c5dec4..8a21207232ec4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs @@ -116,7 +116,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -529,7 +529,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -718,7 +718,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -901,7 +901,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1127,7 +1127,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs index e6a6dbc30c90e..a0163643a2820 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs @@ -94,7 +94,7 @@ internal DefaultSecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal DefaultSecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs index 8c34c42433063..ea06c014af69e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs @@ -127,7 +127,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -352,7 +352,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -744,7 +744,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs index 5a62462bae0dc..0cb019d66e947 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs @@ -138,7 +138,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -377,7 +377,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -585,7 +585,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -788,7 +788,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs index 122431d9d2eaa..d6acc07727582 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs @@ -126,7 +126,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs index b5e4e5c75090b..03079e4eadb78 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs @@ -116,7 +116,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -448,7 +448,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -649,7 +649,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -838,7 +838,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1016,7 +1016,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1203,7 +1203,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1387,7 +1387,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1613,7 +1613,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1829,7 +1829,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2042,7 +2042,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2255,7 +2255,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs index d79a09e6f8325..0a10280c10b56 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs @@ -130,7 +130,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -564,7 +564,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -789,7 +789,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs index 2d94eab7e8d0d..88eda1bcb968a 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs @@ -94,7 +94,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -320,7 +320,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs index 1b4f16b931e4c..46be45ce0a3b8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs @@ -80,7 +80,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -263,7 +263,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -455,7 +455,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -793,7 +793,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1001,7 +1001,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1217,7 +1217,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1430,7 +1430,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1643,7 +1643,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs index 2f1224d0fff56..e3d0c5cb95571 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs @@ -80,7 +80,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -263,7 +263,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -480,7 +480,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -709,7 +709,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -927,7 +927,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs index 92dc0861c63dd..dae5f36bff1df 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs @@ -101,7 +101,7 @@ internal ExpressRouteLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "linkName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -298,7 +298,7 @@ internal ExpressRouteLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs index 441f3c95a63a8..8726e8a28b05f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs @@ -82,7 +82,7 @@ internal ExpressRoutePortsLocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -266,7 +266,7 @@ internal ExpressRoutePortsLocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "locationName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs index b2422afac5e66..1111c94ddb980 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs @@ -116,7 +116,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -353,7 +353,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -531,7 +531,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -718,7 +718,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -901,7 +901,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1127,7 +1127,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs index 9841a807e4019..8ea24194525c8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs @@ -80,7 +80,7 @@ internal ExpressRouteServiceProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs index eb056f05c5a7f..068d6361ec9c2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs @@ -101,7 +101,7 @@ internal HubVirtualNetworkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -292,7 +292,7 @@ internal HubVirtualNetworkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailablePrivateEndpointTypesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailablePrivateEndpointTypesOperations.cs index 429659ac0d426..e0660ec3ed00f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailablePrivateEndpointTypesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailablePrivateEndpointTypesOperations.cs @@ -28,7 +28,7 @@ public partial interface IAvailablePrivateEndpointTypesOperations /// Endpoint in this subscription in this region. /// /// - /// the location of the domain name. + /// The location of the domain name. /// /// /// The headers that will be added to request. @@ -50,6 +50,32 @@ public partial interface IAvailablePrivateEndpointTypesOperations /// Returns all of the resource types that can be linked to a Private /// Endpoint in this subscription in this region. /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// 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>> ListByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns all of the resource types that can be linked to a Private + /// Endpoint in this subscription in this region. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -69,5 +95,28 @@ public partial interface IAvailablePrivateEndpointTypesOperations /// Thrown when a required parameter is null /// Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns all of the resource types that can be linked to a Private + /// Endpoint in this subscription in this region. + /// + /// + /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAzureFirewallsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAzureFirewallsOperations.cs index 65614088e09f5..8ba7e62def1f6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAzureFirewallsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAzureFirewallsOperations.cs @@ -100,6 +100,35 @@ public partial interface IAzureFirewallsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string azureFirewallName, AzureFirewall parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates tags for an Azure Firewall resource. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Azure Firewall. + /// + /// + /// Parameters supplied to the create or update Azure Firewall + /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string azureFirewallName, AzureFirewall parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Lists all Azure Firewalls in a resource group. /// /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs index 7dc36bd5acd3a..db4a4794f2138 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs @@ -95,16 +95,6 @@ public partial interface INetworkManagementClient : System.IDisposable /// IAvailableResourceGroupDelegationsOperations AvailableResourceGroupDelegations { get; } - /// - /// Gets the IAvailablePrivateEndpointTypesOperations. - /// - IAvailablePrivateEndpointTypesOperations AvailablePrivateEndpointTypes { get; } - - /// - /// Gets the IAvailableResourceGroupPrivateEndpointTypesOperations. - /// - IAvailableResourceGroupPrivateEndpointTypesOperations AvailableResourceGroupPrivateEndpointTypes { get; } - /// /// Gets the IAzureFirewallsOperations. /// @@ -200,16 +190,6 @@ public partial interface INetworkManagementClient : System.IDisposable /// IExpressRouteLinksOperations ExpressRouteLinks { get; } - /// - /// Gets the IPrivateEndpointsOperations. - /// - IPrivateEndpointsOperations PrivateEndpoints { get; } - - /// - /// Gets the IPrivateLinkServicesOperations. - /// - IPrivateLinkServicesOperations PrivateLinkServices { get; } - /// /// Gets the ILoadBalancersOperations. /// @@ -315,6 +295,21 @@ public partial interface INetworkManagementClient : System.IDisposable /// IOperations Operations { get; } + /// + /// Gets the IPrivateEndpointsOperations. + /// + IPrivateEndpointsOperations PrivateEndpoints { get; } + + /// + /// Gets the IAvailablePrivateEndpointTypesOperations. + /// + IAvailablePrivateEndpointTypesOperations AvailablePrivateEndpointTypes { get; } + + /// + /// Gets the IPrivateLinkServicesOperations. + /// + IPrivateLinkServicesOperations PrivateLinkServices { get; } + /// /// Gets the IPublicIPAddressesOperations. /// @@ -425,6 +420,11 @@ public partial interface INetworkManagementClient : System.IDisposable /// IVpnSitesOperations VpnSites { get; } + /// + /// Gets the IVpnSiteLinksOperations. + /// + IVpnSiteLinksOperations VpnSiteLinks { get; } + /// /// Gets the IVpnSitesConfigurationOperations. /// @@ -450,6 +450,16 @@ public partial interface INetworkManagementClient : System.IDisposable /// IVpnConnectionsOperations VpnConnections { get; } + /// + /// Gets the IVpnSiteLinkConnectionsOperations. + /// + IVpnSiteLinkConnectionsOperations VpnSiteLinkConnections { get; } + + /// + /// Gets the IVpnLinkConnectionsOperations. + /// + IVpnLinkConnectionsOperations VpnLinkConnections { get; } + /// /// Gets the IP2sVpnServerConfigurationsOperations. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkProfilesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkProfilesOperations.cs index 1468b20acec2a..70a0deb996f56 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkProfilesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkProfilesOperations.cs @@ -172,6 +172,28 @@ public partial interface INetworkProfilesOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Deletes the specified network profile. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the NetworkProfile. + /// + /// + /// 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 networkProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets all the network profiles in a subscription. /// /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkWatchersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkWatchersOperations.cs index 5f36d2d6e0c7b..670ce4bd785ff 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkWatchersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkWatchersOperations.cs @@ -341,8 +341,8 @@ public partial interface INetworkWatchersOperations /// Task> GetTroubleshootingResultWithHttpMessagesAsync(string resourceGroupName, string networkWatcherName, QueryTroubleshootingParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Configures flow log and traffic analytics (optional) on a - /// specified resource. + /// Configures flow log and traffic analytics (optional) on a specified + /// resource. /// /// /// The name of the network watcher resource group. @@ -381,7 +381,7 @@ public partial interface INetworkWatchersOperations /// /// /// Parameters that define a resource to query flow log and traffic - /// analytics (optional) status. + /// analytics (optional) status. /// /// /// The headers that will be added to request. @@ -683,8 +683,8 @@ public partial interface INetworkWatchersOperations /// Task> BeginGetTroubleshootingResultWithHttpMessagesAsync(string resourceGroupName, string networkWatcherName, QueryTroubleshootingParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Configures flow log and traffic analytics (optional) on a - /// specified resource. + /// Configures flow log and traffic analytics (optional) on a specified + /// resource. /// /// /// The name of the network watcher resource group. @@ -723,7 +723,7 @@ public partial interface INetworkWatchersOperations /// /// /// Parameters that define a resource to query flow log and traffic - /// analytics (optional) status. + /// analytics (optional) status. /// /// /// The headers that will be added to request. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateEndpointsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateEndpointsOperations.cs index b8fbf9ecf5651..6701ab96f7f2b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateEndpointsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateEndpointsOperations.cs @@ -85,7 +85,7 @@ public partial interface IPrivateEndpointsOperations /// /// /// Parameters supplied to the create or update private endpoint - /// operation + /// operation. /// /// /// The headers that will be added to request. @@ -178,7 +178,7 @@ public partial interface IPrivateEndpointsOperations /// /// /// Parameters supplied to the create or update private endpoint - /// operation + /// operation. /// /// /// The headers that will be added to request. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs index a1de7af464f44..1b9c9b86fcce2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs @@ -85,7 +85,7 @@ public partial interface IPrivateLinkServicesOperations /// /// /// Parameters supplied to the create or update private link service - /// operation + /// operation. /// /// /// The headers that will be added to request. @@ -170,10 +170,13 @@ public partial interface IPrivateLinkServicesOperations /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// - Task UpdatePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdatePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete private end point connection for a private link service in a /// subscription. @@ -201,6 +204,110 @@ public partial interface IPrivateLinkServicesOperations /// Task DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Checks the subscription is visible to private link service + /// + /// + /// The location of the domain name. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + /// + /// 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> CheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(string location, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + /// + /// 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> CheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns all of the private link service ids that can be linked to a + /// Private Endpoint with auto approved in this subscription in this + /// region. + /// + /// + /// The location of the domain name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListAutoApprovedPrivateLinkServicesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns all of the private link service ids that can be linked to a + /// Private Endpoint with auto approved in this subscription in this + /// region. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// 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>> ListAutoApprovedPrivateLinkServicesByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Deletes the specified private link service. /// /// @@ -234,7 +341,7 @@ public partial interface IPrivateLinkServicesOperations /// /// /// Parameters supplied to the create or update private link service - /// operation + /// operation. /// /// /// The headers that will be added to request. @@ -322,5 +429,53 @@ public partial interface IPrivateLinkServicesOperations /// Thrown when a required parameter is null /// Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns all of the private link service ids that can be linked to a + /// Private Endpoint with auto approved in this subscription in this + /// region. + /// + /// + /// 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>> ListAutoApprovedPrivateLinkServicesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns all of the private link service ids that can be linked to a + /// Private Endpoint with auto approved in this subscription in this + /// region. + /// + /// + /// 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>> ListAutoApprovedPrivateLinkServicesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualNetworkGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualNetworkGatewaysOperations.cs index d0cee8a54b231..3e87bacfaa8e9 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualNetworkGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualNetworkGatewaysOperations.cs @@ -675,6 +675,67 @@ public partial interface IVirtualNetworkGatewaysOperations /// Task BeginResetVpnClientSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Generates VPN client package for P2S client of the virtual network + /// gateway in the specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN + /// client package 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> BeginGeneratevpnclientpackageWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Generates VPN profile for P2S client of the virtual network gateway + /// in the specified resource group. Used for IKEV2 and radius based + /// authentication. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN + /// client package 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> BeginGenerateVpnProfileWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets pre-generated VPN profile for P2S client of the virtual /// network gateway in the specified resource group. The profile needs /// to be generated first using generateVpnProfile. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailableResourceGroupPrivateEndpointTypesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs similarity index 64% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailableResourceGroupPrivateEndpointTypesOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs index a13a8bd10ccf6..4a1ddba73c038 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IAvailableResourceGroupPrivateEndpointTypesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs @@ -19,19 +19,22 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; /// - /// AvailableResourceGroupPrivateEndpointTypesOperations operations. + /// VpnLinkConnectionsOperations operations. /// - public partial interface IAvailableResourceGroupPrivateEndpointTypesOperations + public partial interface IVpnLinkConnectionsOperations { /// - /// Returns all of the resource types that can be linked to a Private - /// Endpoint in this subscription in this region. + /// Retrieves all vpn site link connections for a particular virtual + /// wan vpn gateway vpn connection. /// - /// - /// The location of the domain name. - /// /// - /// The name of the resource group. + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. /// /// /// The headers that will be added to request. @@ -39,7 +42,7 @@ public partial interface IAvailableResourceGroupPrivateEndpointTypesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -48,10 +51,10 @@ public partial interface IAvailableResourceGroupPrivateEndpointTypesOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByVpnConnectionWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns all of the resource types that can be linked to a Private - /// Endpoint in this subscription in this region. + /// Retrieves all vpn site link connections for a particular virtual + /// wan vpn gateway vpn connection. /// /// /// The NextLink from the previous successful call to List operation. @@ -62,7 +65,7 @@ public partial interface IAvailableResourceGroupPrivateEndpointTypesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -71,6 +74,6 @@ public partial interface IAvailableResourceGroupPrivateEndpointTypesOperations /// /// Thrown when a required parameter is null /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByVpnConnectionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnSiteLinkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnSiteLinkConnectionsOperations.cs new file mode 100644 index 0000000000000..b21f5579e7329 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnSiteLinkConnectionsOperations.cs @@ -0,0 +1,58 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// VpnSiteLinkConnectionsOperations operations. + /// + public partial interface IVpnSiteLinkConnectionsOperations + { + /// + /// Retrieves the details of a vpn site link connection. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnSiteLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnSiteLinksOperations.cs new file mode 100644 index 0000000000000..51137958fd22c --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnSiteLinksOperations.cs @@ -0,0 +1,102 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// VpnSiteLinksOperations operations. + /// + public partial interface IVpnSiteLinksOperations + { + /// + /// Retrieves the details of a VPN site link. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// The name of the VpnSiteLink being retrieved. + /// + /// + /// 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 vpnSiteName, string vpnSiteLinkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// 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>> ListByVpnSiteWithHttpMessagesAsync(string resourceGroupName, string vpnSiteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// 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>> ListByVpnSiteNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs index 54bc3ffe1bd5d..a7d395b57904f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs @@ -94,7 +94,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -323,7 +323,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -556,7 +556,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -748,7 +748,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs index a2742c9ae56b2..dcc63594f8b11 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerBackendAddressPoolsOperations(NetworkManagementClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerBackendAddressPoolsOperations(NetworkManagementClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs index ee3f4793373a3..7551db43b5bcc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerFrontendIPConfigurationsOperations(NetworkManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerFrontendIPConfigurationsOperations(NetworkManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs index 6950199cc2e0f..fcc10c0f63b67 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerLoadBalancingRulesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerLoadBalancingRulesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs index f4ed3a0a95b24..3378b6f7ea4a2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerNetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs index b722c7505a036..41d22a6808c17 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerOutboundRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerOutboundRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs index fbe2db1d97417..034634a8dacb8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerProbesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerProbesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs index ff5b887f29855..1b3b839490932 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs @@ -119,7 +119,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -726,7 +726,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1135,7 +1135,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs index a9fc8514f119a..b012ab7f3dda3 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs @@ -127,7 +127,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -361,7 +361,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -568,7 +568,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -791,7 +791,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -981,7 +981,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewaySslCipherSuite.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewaySslCipherSuite.cs index f0d69eac6eb8d..ad5f17e82f61d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewaySslCipherSuite.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewaySslCipherSuite.cs @@ -41,5 +41,8 @@ public static class ApplicationGatewaySslCipherSuite public const string TLSDHEDSSWITHAES256CBCSHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"; public const string TLSDHEDSSWITHAES128CBCSHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"; public const string TLSRSAWITH3DESEDECBCSHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA"; + public const string TLSDHEDSSWITH3DESEDECBCSHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"; + public const string TLSECDHERSAWITHAES128GCMSHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"; + public const string TLSECDHERSAWITHAES256GCMSHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AutoApprovedPrivateLinkService.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AutoApprovedPrivateLinkService.cs new file mode 100644 index 0000000000000..6b61f6161c02b --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AutoApprovedPrivateLinkService.cs @@ -0,0 +1,54 @@ +// +// 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.Network.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The information of an AutoApprovedPrivateLinkService. + /// + public partial class AutoApprovedPrivateLinkService + { + /// + /// Initializes a new instance of the AutoApprovedPrivateLinkService + /// class. + /// + public AutoApprovedPrivateLinkService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AutoApprovedPrivateLinkService + /// class. + /// + /// The id of the private link service + /// resource. + public AutoApprovedPrivateLinkService(string privateLinkService = default(string)) + { + PrivateLinkService = privateLinkService; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the id of the private link service resource. + /// + [JsonProperty(PropertyName = "privateLinkService")] + public string PrivateLinkService { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AvailablePrivateEndpointType.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AvailablePrivateEndpointType.cs index 271152761b55a..690d337cd533b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AvailablePrivateEndpointType.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/AvailablePrivateEndpointType.cs @@ -31,16 +31,18 @@ public AvailablePrivateEndpointType() /// Initializes a new instance of the AvailablePrivateEndpointType /// class. /// + /// The name of the service and resource. /// A unique identifier of the /// AvailablePrivateEndpoint Type resource. /// Resource type. - /// The name of the service and resource - /// - public AvailablePrivateEndpointType(string id = default(string), string type = default(string), string serviceName = default(string)) + /// The name of the service and + /// resource. + public AvailablePrivateEndpointType(string name = default(string), string id = default(string), string type = default(string), string resourceName = default(string)) { + Name = name; Id = id; Type = type; - ServiceName = serviceName; + ResourceName = resourceName; CustomInit(); } @@ -49,6 +51,12 @@ public AvailablePrivateEndpointType() /// partial void CustomInit(); + /// + /// Gets or sets the name of the service and resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + /// /// Gets or sets a unique identifier of the AvailablePrivateEndpoint /// Type resource. @@ -63,10 +71,10 @@ public AvailablePrivateEndpointType() public string Type { get; set; } /// - /// Gets or sets the name of the service and resource + /// Gets or sets the name of the service and resource. /// - [JsonProperty(PropertyName = "serviceName")] - public string ServiceName { get; set; } + [JsonProperty(PropertyName = "resourceName")] + public string ResourceName { get; set; } } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs index 575e25e063cfb..dd11e7a4bc891 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs @@ -41,23 +41,28 @@ public BackendAddressPool() /// this backend address pool. /// Gets outbound rules that use this /// backend address pool. + /// Gets outbound rules that use this + /// backend address pool. /// Get provisioning state of the /// public IP resource. Possible values are: 'Updating', 'Deleting', /// and 'Failed'. /// Gets name of the resource that is unique within - /// a resource group. This name can be used to access the - /// resource. + /// the set of backend address pools used by the load balancer. This + /// name can be used to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. - public BackendAddressPool(string id = default(string), IList backendIPConfigurations = default(IList), IList loadBalancingRules = default(IList), SubResource outboundRule = default(SubResource), string provisioningState = default(string), string name = default(string), string etag = default(string)) + /// Type of the resource. + public BackendAddressPool(string id = default(string), IList backendIPConfigurations = default(IList), IList loadBalancingRules = default(IList), SubResource outboundRule = default(SubResource), IList outboundRules = default(IList), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { BackendIPConfigurations = backendIPConfigurations; LoadBalancingRules = loadBalancingRules; OutboundRule = outboundRule; + OutboundRules = outboundRules; ProvisioningState = provisioningState; Name = name; Etag = etag; + Type = type; CustomInit(); } @@ -85,6 +90,12 @@ public BackendAddressPool() [JsonProperty(PropertyName = "properties.outboundRule")] public SubResource OutboundRule { get; private set; } + /// + /// Gets outbound rules that use this backend address pool. + /// + [JsonProperty(PropertyName = "properties.outboundRules")] + public IList OutboundRules { get; private set; } + /// /// Gets or sets get provisioning state of the public IP resource. /// Possible values are: 'Updating', 'Deleting', and 'Failed'. @@ -93,8 +104,9 @@ public BackendAddressPool() public string ProvisioningState { get; set; } /// - /// Gets name of the resource that is unique within a resource group. - /// This name can be used to access the resource. + /// Gets name of the resource that is unique within the set of backend + /// address pools used by the load balancer. This name can be used to + /// access the resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -106,5 +118,11 @@ public BackendAddressPool() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BastionHostIPConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BastionHostIPConfiguration.cs index b2b600c8921a9..7534bb728e8f8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BastionHostIPConfiguration.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BastionHostIPConfiguration.cs @@ -92,11 +92,11 @@ public BastionHostIPConfiguration() public string PrivateIPAllocationMethod { get; set; } /// - /// Gets name of the resource that is unique within a resource group. - /// This name can be used to access the resource. + /// Gets or sets name of the resource that is unique within a resource + /// group. This name can be used to access the resource. /// [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + public string Name { get; set; } /// /// Gets a unique read-only string that changes whenever the resource diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.cs new file mode 100644 index 0000000000000..10d1b67b8554d --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.cs @@ -0,0 +1,54 @@ +// +// 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.Network.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body of the CheckPrivateLinkServiceVisibility API service call. + /// + public partial class CheckPrivateLinkServiceVisibilityRequest + { + /// + /// Initializes a new instance of the + /// CheckPrivateLinkServiceVisibilityRequest class. + /// + public CheckPrivateLinkServiceVisibilityRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CheckPrivateLinkServiceVisibilityRequest class. + /// + /// The alias of the private link + /// service. + public CheckPrivateLinkServiceVisibilityRequest(string privateLinkServiceAlias = default(string)) + { + PrivateLinkServiceAlias = privateLinkServiceAlias; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the alias of the private link service. + /// + [JsonProperty(PropertyName = "privateLinkServiceAlias")] + public string PrivateLinkServiceAlias { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs index 5a483550318df..758aeb42e3871 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs @@ -86,13 +86,13 @@ public ExpressRouteCrossConnection() partial void CustomInit(); /// - /// Gets the name of the primary port. + /// Gets the name of the primary port. /// [JsonProperty(PropertyName = "properties.primaryAzurePort")] public string PrimaryAzurePort { get; private set; } /// - /// Gets the name of the secondary port. + /// Gets the name of the secondary port. /// [JsonProperty(PropertyName = "properties.secondaryAzurePort")] public string SecondaryAzurePort { get; private set; } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs index d64ebe604ed9e..8fd1e612268a2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs @@ -47,6 +47,9 @@ public FrontendIPConfiguration() /// configuration. /// The Private IP allocation /// method. Possible values include: 'Static', 'Dynamic' + /// It represents whether the + /// specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. + /// Possible values include: 'IPv4', 'IPv6' /// The reference of the subnet resource. /// The reference of the Public IP /// resource. @@ -55,14 +58,15 @@ public FrontendIPConfiguration() /// Gets the provisioning state of the /// public IP resource. Possible values are: 'Updating', 'Deleting', /// and 'Failed'. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. + /// The name of the resource that is unique within + /// the set of frontend IP configurations used by the load balancer. + /// This name can be used to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. + /// Type of the resource. /// A list of availability zones denoting the IP /// allocated for the resource needs to come from. - public FrontendIPConfiguration(string id = default(string), IList inboundNatRules = default(IList), IList inboundNatPools = default(IList), IList outboundRules = default(IList), IList loadBalancingRules = default(IList), string privateIPAddress = default(string), string privateIPAllocationMethod = default(string), Subnet subnet = default(Subnet), PublicIPAddress publicIPAddress = default(PublicIPAddress), SubResource publicIPPrefix = default(SubResource), string provisioningState = default(string), string name = default(string), string etag = default(string), IList zones = default(IList)) + public FrontendIPConfiguration(string id = default(string), IList inboundNatRules = default(IList), IList inboundNatPools = default(IList), IList outboundRules = default(IList), IList loadBalancingRules = default(IList), string privateIPAddress = default(string), string privateIPAllocationMethod = default(string), string privateIPAddressVersion = default(string), Subnet subnet = default(Subnet), PublicIPAddress publicIPAddress = default(PublicIPAddress), SubResource publicIPPrefix = default(SubResource), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string), IList zones = default(IList)) : base(id) { InboundNatRules = inboundNatRules; @@ -71,12 +75,14 @@ public FrontendIPConfiguration() LoadBalancingRules = loadBalancingRules; PrivateIPAddress = privateIPAddress; PrivateIPAllocationMethod = privateIPAllocationMethod; + PrivateIPAddressVersion = privateIPAddressVersion; Subnet = subnet; PublicIPAddress = publicIPAddress; PublicIPPrefix = publicIPPrefix; ProvisioningState = provisioningState; Name = name; Etag = etag; + Type = type; Zones = zones; CustomInit(); } @@ -123,6 +129,14 @@ public FrontendIPConfiguration() [JsonProperty(PropertyName = "properties.privateIPAllocationMethod")] public string PrivateIPAllocationMethod { get; set; } + /// + /// Gets or sets it represents whether the specific ipconfiguration is + /// IPv4 or IPv6. Default is taken as IPv4. Possible values include: + /// 'IPv4', 'IPv6' + /// + [JsonProperty(PropertyName = "properties.privateIPAddressVersion")] + public string PrivateIPAddressVersion { get; set; } + /// /// Gets or sets the reference of the subnet resource. /// @@ -149,8 +163,9 @@ public FrontendIPConfiguration() public string ProvisioningState { get; set; } /// - /// Gets or sets the name of the resource that is unique within a - /// resource group. This name can be used to access the resource. + /// Gets or sets the name of the resource that is unique within the set + /// of frontend IP configurations used by the load balancer. This name + /// can be used to access the resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -162,6 +177,12 @@ public FrontendIPConfiguration() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + /// /// Gets or sets a list of availability zones denoting the IP allocated /// for the resource needs to come from. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatPool.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatPool.cs index 39ef479a67eba..7c2d80d9e1ee3 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatPool.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatPool.cs @@ -63,12 +63,13 @@ public InboundNatPool() /// Gets the provisioning state of the /// PublicIP resource. Possible values are: 'Updating', 'Deleting', and /// 'Failed'. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. + /// The name of the resource that is unique within + /// the set of inbound NAT pools used by the load balancer. This name + /// can be used to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. - public InboundNatPool(string protocol, int frontendPortRangeStart, int frontendPortRangeEnd, int backendPort, string id = default(string), SubResource frontendIPConfiguration = default(SubResource), int? idleTimeoutInMinutes = default(int?), bool? enableFloatingIP = default(bool?), bool? enableTcpReset = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string)) + /// Type of the resource. + public InboundNatPool(string protocol, int frontendPortRangeStart, int frontendPortRangeEnd, int backendPort, string id = default(string), SubResource frontendIPConfiguration = default(SubResource), int? idleTimeoutInMinutes = default(int?), bool? enableFloatingIP = default(bool?), bool? enableTcpReset = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { FrontendIPConfiguration = frontendIPConfiguration; @@ -82,6 +83,7 @@ public InboundNatPool() ProvisioningState = provisioningState; Name = name; Etag = etag; + Type = type; CustomInit(); } @@ -160,8 +162,9 @@ public InboundNatPool() public string ProvisioningState { get; set; } /// - /// Gets or sets the name of the resource that is unique within a - /// resource group. This name can be used to access the resource. + /// Gets or sets the name of the resource that is unique within the set + /// of inbound NAT pools used by the load balancer. This name can be + /// used to access the resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -173,6 +176,12 @@ public InboundNatPool() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatRule.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatRule.cs index cd67a59422297..c90ae64d176a9 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatRule.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/InboundNatRule.cs @@ -63,11 +63,12 @@ public InboundNatRule() /// public IP resource. Possible values are: 'Updating', 'Deleting', /// and 'Failed'. /// Gets name of the resource that is unique within - /// a resource group. This name can be used to access the - /// resource. + /// the set of inbound NAT rules used by the load balancer. This name + /// can be used to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. - public InboundNatRule(string id = default(string), SubResource frontendIPConfiguration = default(SubResource), NetworkInterfaceIPConfiguration backendIPConfiguration = default(NetworkInterfaceIPConfiguration), string protocol = default(string), int? frontendPort = default(int?), int? backendPort = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableFloatingIP = default(bool?), bool? enableTcpReset = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string)) + /// Type of the resource. + public InboundNatRule(string id = default(string), SubResource frontendIPConfiguration = default(SubResource), NetworkInterfaceIPConfiguration backendIPConfiguration = default(NetworkInterfaceIPConfiguration), string protocol = default(string), int? frontendPort = default(int?), int? backendPort = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableFloatingIP = default(bool?), bool? enableTcpReset = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { FrontendIPConfiguration = frontendIPConfiguration; @@ -81,6 +82,7 @@ public InboundNatRule() ProvisioningState = provisioningState; Name = name; Etag = etag; + Type = type; CustomInit(); } @@ -159,8 +161,9 @@ public InboundNatRule() public string ProvisioningState { get; set; } /// - /// Gets name of the resource that is unique within a resource group. - /// This name can be used to access the resource. + /// Gets name of the resource that is unique within the set of inbound + /// NAT rules used by the load balancer. This name can be used to + /// access the resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -172,5 +175,11 @@ public InboundNatRule() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/LoadBalancingRule.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/LoadBalancingRule.cs index 2608c82fbf38d..55505bbb8c088 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/LoadBalancingRule.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/LoadBalancingRule.cs @@ -38,7 +38,7 @@ public LoadBalancingRule() /// The port for the external endpoint. Port /// numbers for each rule must be unique within the Load Balancer. /// Acceptable values are between 0 and 65534. Note that value 0 - /// enables "Any Port" + /// enables "Any Port". /// Resource ID. /// A reference to frontend IP /// addresses. @@ -52,7 +52,7 @@ public LoadBalancingRule() /// 'SourceIPProtocol' /// The port used for internal connections on /// the endpoint. Acceptable values are between 0 and 65535. Note that - /// value 0 enables "Any Port" + /// value 0 enables "Any Port". /// The timeout for the TCP idle /// connection. The value can be set between 4 and 30 minutes. The /// default value is 4 minutes. This element is only used when the @@ -71,12 +71,13 @@ public LoadBalancingRule() /// Gets the provisioning state of the /// PublicIP resource. Possible values are: 'Updating', 'Deleting', and /// 'Failed'. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. + /// The name of the resource that is unique within + /// the set of load balancing rules used by the load balancer. This + /// name can be used to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. - public LoadBalancingRule(string protocol, int frontendPort, string id = default(string), SubResource frontendIPConfiguration = default(SubResource), SubResource backendAddressPool = default(SubResource), SubResource probe = default(SubResource), string loadDistribution = default(string), int? backendPort = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableFloatingIP = default(bool?), bool? enableTcpReset = default(bool?), bool? disableOutboundSnat = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string)) + /// Type of the resource. + public LoadBalancingRule(string protocol, int frontendPort, string id = default(string), SubResource frontendIPConfiguration = default(SubResource), SubResource backendAddressPool = default(SubResource), SubResource probe = default(SubResource), string loadDistribution = default(string), int? backendPort = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableFloatingIP = default(bool?), bool? enableTcpReset = default(bool?), bool? disableOutboundSnat = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { FrontendIPConfiguration = frontendIPConfiguration; @@ -93,6 +94,7 @@ public LoadBalancingRule() ProvisioningState = provisioningState; Name = name; Etag = etag; + Type = type; CustomInit(); } @@ -139,7 +141,7 @@ public LoadBalancingRule() /// Gets or sets the port for the external endpoint. Port numbers for /// each rule must be unique within the Load Balancer. Acceptable /// values are between 0 and 65534. Note that value 0 enables "Any - /// Port" + /// Port". /// [JsonProperty(PropertyName = "properties.frontendPort")] public int FrontendPort { get; set; } @@ -147,7 +149,7 @@ public LoadBalancingRule() /// /// Gets or sets the port used for internal connections on the /// endpoint. Acceptable values are between 0 and 65535. Note that - /// value 0 enables "Any Port" + /// value 0 enables "Any Port". /// [JsonProperty(PropertyName = "properties.backendPort")] public int? BackendPort { get; set; } @@ -194,8 +196,9 @@ public LoadBalancingRule() public string ProvisioningState { get; set; } /// - /// Gets or sets the name of the resource that is unique within a - /// resource group. This name can be used to access the resource. + /// Gets or sets the name of the resource that is unique within the set + /// of load balancing rules used by the load balancer. This name can be + /// used to access the resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -207,6 +210,12 @@ public LoadBalancingRule() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OutboundRule.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OutboundRule.cs index 49dadd4e9b6b4..debd21d539aec 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OutboundRule.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OutboundRule.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Linq; /// - /// Outbound pool of the load balancer. + /// Outbound rule of the load balancer. /// [Rest.Serialization.JsonTransformation] public partial class OutboundRule : SubResource @@ -52,12 +52,13 @@ public OutboundRule() /// element is only used when the protocol is set to TCP. /// The timeout for the TCP idle /// connection. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. + /// The name of the resource that is unique within + /// the set of outbound rules used by the load balancer. This name can + /// be used to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. - public OutboundRule(IList frontendIPConfigurations, SubResource backendAddressPool, string protocol, string id = default(string), int? allocatedOutboundPorts = default(int?), string provisioningState = default(string), bool? enableTcpReset = default(bool?), int? idleTimeoutInMinutes = default(int?), string name = default(string), string etag = default(string)) + /// Type of the resource. + public OutboundRule(IList frontendIPConfigurations, SubResource backendAddressPool, string protocol, string id = default(string), int? allocatedOutboundPorts = default(int?), string provisioningState = default(string), bool? enableTcpReset = default(bool?), int? idleTimeoutInMinutes = default(int?), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { AllocatedOutboundPorts = allocatedOutboundPorts; @@ -69,6 +70,7 @@ public OutboundRule() IdleTimeoutInMinutes = idleTimeoutInMinutes; Name = name; Etag = etag; + Type = type; CustomInit(); } @@ -125,8 +127,9 @@ public OutboundRule() public int? IdleTimeoutInMinutes { get; set; } /// - /// Gets or sets the name of the resource that is unique within a - /// resource group. This name can be used to access the resource. + /// Gets or sets the name of the resource that is unique within the set + /// of outbound rules used by the load balancer. This name can be used + /// to access the resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -138,6 +141,12 @@ public OutboundRule() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs index bee74ab66db3c..15bb8dbdd486f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs @@ -32,7 +32,7 @@ public PolicySettings() /// Describes if the policy is in enabled /// state or disabled state. Possible values include: 'Disabled', /// 'Enabled' - /// Describes if it is in detection mode or + /// Describes if it is in detection mode or /// prevention mode at policy level. Possible values include: /// 'Prevention', 'Detection' public PolicySettings(string enabledState = default(string), string mode = default(string)) @@ -55,7 +55,7 @@ public PolicySettings() public string EnabledState { get; set; } /// - /// Gets or sets describes if it is in detection mode or prevention + /// Gets or sets describes if it is in detection mode or prevention /// mode at policy level. Possible values include: 'Prevention', /// 'Detection' /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrepareNetworkPoliciesRequest.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrepareNetworkPoliciesRequest.cs index 658c4ee2e595f..03049ba46c119 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrepareNetworkPoliciesRequest.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrepareNetworkPoliciesRequest.cs @@ -35,14 +35,11 @@ public PrepareNetworkPoliciesRequest() /// /// The name of the service for which subnet /// is being prepared for. - /// The name of the resource group - /// where the Network Intent Policy will be stored. /// A list of /// NetworkIntentPolicyConfiguration. - public PrepareNetworkPoliciesRequest(string serviceName = default(string), string resourceGroupName = default(string), IList networkIntentPolicyConfigurations = default(IList)) + public PrepareNetworkPoliciesRequest(string serviceName = default(string), IList networkIntentPolicyConfigurations = default(IList)) { ServiceName = serviceName; - ResourceGroupName = resourceGroupName; NetworkIntentPolicyConfigurations = networkIntentPolicyConfigurations; CustomInit(); } @@ -59,13 +56,6 @@ public PrepareNetworkPoliciesRequest() [JsonProperty(PropertyName = "serviceName")] public string ServiceName { get; set; } - /// - /// Gets or sets the name of the resource group where the Network - /// Intent Policy will be stored. - /// - [JsonProperty(PropertyName = "resourceGroupName")] - public string ResourceGroupName { get; set; } - /// /// Gets or sets a list of NetworkIntentPolicyConfiguration. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkService.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkService.cs index ac99de184ef08..a10cd7f2b0529 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkService.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkService.cs @@ -39,7 +39,7 @@ public PrivateLinkService() /// Resource type. /// Resource location. /// Resource tags. - /// An array of + /// An array of /// references to the load balancer IP configurations. /// An array of references to the /// private link service IP configuration. @@ -58,10 +58,10 @@ public PrivateLinkService() /// The alias of the private link service. /// Gets a unique read-only string that changes /// whenever the resource is updated. - public PrivateLinkService(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), IList loadBalancerFrontendIPConfigurations = default(IList), IList ipConfigurations = default(IList), IList networkInterfaces = default(IList), string provisioningState = default(string), IList privateEndpointConnections = default(IList), PrivateLinkServicePropertiesVisibility visibility = default(PrivateLinkServicePropertiesVisibility), PrivateLinkServicePropertiesAutoApproval autoApproval = default(PrivateLinkServicePropertiesAutoApproval), IList fqdns = default(IList), string alias = default(string), string etag = default(string)) + public PrivateLinkService(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), IList loadBalancerFrontendIpConfigurations = default(IList), IList ipConfigurations = default(IList), IList networkInterfaces = default(IList), string provisioningState = default(string), IList privateEndpointConnections = default(IList), PrivateLinkServicePropertiesVisibility visibility = default(PrivateLinkServicePropertiesVisibility), PrivateLinkServicePropertiesAutoApproval autoApproval = default(PrivateLinkServicePropertiesAutoApproval), IList fqdns = default(IList), string alias = default(string), string etag = default(string)) : base(id, name, type, location, tags) { - LoadBalancerFrontendIPConfigurations = loadBalancerFrontendIPConfigurations; + LoadBalancerFrontendIpConfigurations = loadBalancerFrontendIpConfigurations; IpConfigurations = ipConfigurations; NetworkInterfaces = networkInterfaces; ProvisioningState = provisioningState; @@ -83,8 +83,8 @@ public PrivateLinkService() /// Gets or sets an array of references to the load balancer IP /// configurations. /// - [JsonProperty(PropertyName = "properties.loadBalancerFrontendIPConfigurations")] - public IList LoadBalancerFrontendIPConfigurations { get; set; } + [JsonProperty(PropertyName = "properties.loadBalancerFrontendIpConfigurations")] + public IList LoadBalancerFrontendIpConfigurations { get; set; } /// /// Gets or sets an array of references to the private link service IP diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkServiceVisibility.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkServiceVisibility.cs new file mode 100644 index 0000000000000..d0f0d8cd2b76c --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PrivateLinkServiceVisibility.cs @@ -0,0 +1,54 @@ +// +// 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.Network.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response for the CheckPrivateLinkServiceVisibility API service call. + /// + public partial class PrivateLinkServiceVisibility + { + /// + /// Initializes a new instance of the PrivateLinkServiceVisibility + /// class. + /// + public PrivateLinkServiceVisibility() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkServiceVisibility + /// class. + /// + /// Private Link Service Visibility + /// (True/False). + public PrivateLinkServiceVisibility(bool? visible = default(bool?)) + { + Visible = visible; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets private Link Service Visibility (True/False). + /// + [JsonProperty(PropertyName = "visible")] + public bool? Visible { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Probe.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Probe.cs index 98cd66ed277fe..f5b40ff69f2fc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Probe.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Probe.cs @@ -62,11 +62,12 @@ public Probe() /// public IP resource. Possible values are: 'Updating', 'Deleting', /// and 'Failed'. /// Gets name of the resource that is unique within - /// a resource group. This name can be used to access the - /// resource. + /// the set of probes used by the load balancer. This name can be used + /// to access the resource. /// A unique read-only string that changes whenever /// the resource is updated. - public Probe(string protocol, int port, string id = default(string), IList loadBalancingRules = default(IList), int? intervalInSeconds = default(int?), int? numberOfProbes = default(int?), string requestPath = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string)) + /// Type of the resource. + public Probe(string protocol, int port, string id = default(string), IList loadBalancingRules = default(IList), int? intervalInSeconds = default(int?), int? numberOfProbes = default(int?), string requestPath = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { LoadBalancingRules = loadBalancingRules; @@ -78,6 +79,7 @@ public Probe() ProvisioningState = provisioningState; Name = name; Etag = etag; + Type = type; CustomInit(); } @@ -144,8 +146,9 @@ public Probe() public string ProvisioningState { get; set; } /// - /// Gets name of the resource that is unique within a resource group. - /// This name can be used to access the resource. + /// Gets name of the resource that is unique within the set of probes + /// used by the load balancer. This name can be used to access the + /// resource. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } @@ -157,6 +160,12 @@ public Probe() [JsonProperty(PropertyName = "etag")] public string Etag { get; set; } + /// + /// Gets type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ResourceNavigationLink.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ResourceNavigationLink.cs index 1599981af6fef..b09b432b786f7 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ResourceNavigationLink.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ResourceNavigationLink.cs @@ -43,7 +43,7 @@ public ResourceNavigationLink() /// resource. /// A unique read-only string that changes whenever /// the resource is updated. - /// Resource type + /// Resource type. public ResourceNavigationLink(string id = default(string), string linkedResourceType = default(string), string link = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { @@ -94,7 +94,7 @@ public ResourceNavigationLink() public string Etag { get; private set; } /// - /// Gets resource type + /// Gets resource type. /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ServiceAssociationLink.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ServiceAssociationLink.cs index edc6501c15ece..0eec610bd3f2a 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ServiceAssociationLink.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ServiceAssociationLink.cs @@ -48,7 +48,7 @@ public ServiceAssociationLink() /// resource. /// A unique read-only string that changes whenever /// the resource is updated. - /// Resource type + /// Resource type. public ServiceAssociationLink(string id = default(string), string linkedResourceType = default(string), string link = default(string), string provisioningState = default(string), bool? allowDelete = default(bool?), IList locations = default(IList), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { @@ -113,7 +113,7 @@ public ServiceAssociationLink() public string Etag { get; private set; } /// - /// Gets or sets resource type + /// Gets or sets resource type. /// [JsonProperty(PropertyName = "type")] public string Type { get; set; } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Subnet.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Subnet.cs index 60cd1ef40a326..32dd0848cb59e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Subnet.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/Subnet.cs @@ -37,7 +37,7 @@ public Subnet() /// Resource ID. /// The address prefix for the /// subnet. - /// List of address prefixes for the + /// List of address prefixes for the /// subnet. /// The reference of the /// NetworkSecurityGroup resource. @@ -50,7 +50,7 @@ public Subnet() /// An array of service endpoint /// policies. /// An array of references to private - /// endpoints + /// endpoints. /// Gets an array of references to the /// network interface IP configurations using subnet. /// Array of IP configuration @@ -66,12 +66,17 @@ public Subnet() /// properties. /// The provisioning state of the /// resource. + /// Enable or Disable + /// apply network policies on private end point in the subnet. + /// Enable or Disable + /// apply network policies on private link service in the + /// subnet. /// The name of the resource that is unique within a /// resource group. This name can be used to access the /// resource. /// A unique read-only string that changes whenever /// the resource is updated. - public Subnet(string id = default(string), string addressPrefix = default(string), IList addressPrefixes = default(IList), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), RouteTable routeTable = default(RouteTable), SubResource natGateway = default(SubResource), IList serviceEndpoints = default(IList), IList serviceEndpointPolicies = default(IList), IList privateEndpoints = default(IList), IList ipConfigurations = default(IList), IList ipConfigurationProfiles = default(IList), IList resourceNavigationLinks = default(IList), IList serviceAssociationLinks = default(IList), IList delegations = default(IList), string purpose = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string)) + public Subnet(string id = default(string), string addressPrefix = default(string), IList addressPrefixes = default(IList), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), RouteTable routeTable = default(RouteTable), SubResource natGateway = default(SubResource), IList serviceEndpoints = default(IList), IList serviceEndpointPolicies = default(IList), IList privateEndpoints = default(IList), IList ipConfigurations = default(IList), IList ipConfigurationProfiles = default(IList), IList resourceNavigationLinks = default(IList), IList serviceAssociationLinks = default(IList), IList delegations = default(IList), string purpose = default(string), string provisioningState = default(string), string privateEndpointNetworkPolicies = default(string), string privateLinkServiceNetworkPolicies = default(string), string name = default(string), string etag = default(string)) : base(id) { AddressPrefix = addressPrefix; @@ -89,6 +94,8 @@ public Subnet() Delegations = delegations; Purpose = purpose; ProvisioningState = provisioningState; + PrivateEndpointNetworkPolicies = privateEndpointNetworkPolicies; + PrivateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies; Name = name; Etag = etag; CustomInit(); @@ -106,7 +113,7 @@ public Subnet() public string AddressPrefix { get; set; } /// - /// Gets or sets list of address prefixes for the subnet. + /// Gets or sets list of address prefixes for the subnet. /// [JsonProperty(PropertyName = "properties.addressPrefixes")] public IList AddressPrefixes { get; set; } @@ -142,7 +149,7 @@ public Subnet() public IList ServiceEndpointPolicies { get; set; } /// - /// Gets an array of references to private endpoints + /// Gets an array of references to private endpoints. /// [JsonProperty(PropertyName = "properties.privateEndpoints")] public IList PrivateEndpoints { get; private set; } @@ -192,6 +199,20 @@ public Subnet() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; set; } + /// + /// Gets or sets enable or Disable apply network policies on private + /// end point in the subnet. + /// + [JsonProperty(PropertyName = "properties.privateEndpointNetworkPolicies")] + public string PrivateEndpointNetworkPolicies { get; set; } + + /// + /// Gets or sets enable or Disable apply network policies on private + /// link service in the subnet. + /// + [JsonProperty(PropertyName = "properties.privateLinkServiceNetworkPolicies")] + public string PrivateLinkServiceNetworkPolicies { get; set; } + /// /// Gets or sets the name of the resource that is unique within a /// resource group. This name can be used to access the resource. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGateway.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGateway.cs index 366b307cc1300..dc9a918e5fd77 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGateway.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGateway.cs @@ -62,8 +62,7 @@ public VirtualNetworkGateway() /// settings. /// The reference of the address space /// resource which represents the custom routes address space specified - /// by the the customer for virtual network gateway and - /// VpnClient. + /// by the customer for virtual network gateway and VpnClient. /// The resource GUID property of the /// VirtualNetworkGateway resource. /// The provisioning state of the @@ -158,7 +157,7 @@ public VirtualNetworkGateway() /// /// Gets or sets the reference of the address space resource which - /// represents the custom routes address space specified by the the + /// represents the custom routes address space specified by the /// customer for virtual network gateway and VpnClient. /// [JsonProperty(PropertyName = "properties.customRoutes")] diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs index c228c56af0e78..54d6010d6cf24 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs @@ -64,12 +64,14 @@ public VpnConnection() /// The provisioning state of the /// resource. Possible values include: 'Succeeded', 'Updating', /// 'Deleting', 'Failed' + /// List of all vpn site link + /// connections to the gateway. /// The name of the resource that is unique within a /// resource group. This name can be used to access the /// resource. /// Gets a unique read-only string that changes /// whenever the resource is updated. - public VpnConnection(string id = default(string), SubResource remoteVpnSite = default(SubResource), int? routingWeight = default(int?), string connectionStatus = default(string), string vpnConnectionProtocolType = default(string), long? ingressBytesTransferred = default(long?), long? egressBytesTransferred = default(long?), int? connectionBandwidth = default(int?), string sharedKey = default(string), bool? enableBgp = default(bool?), bool? usePolicyBasedTrafficSelectors = default(bool?), IList ipsecPolicies = default(IList), bool? enableRateLimiting = default(bool?), bool? enableInternetSecurity = default(bool?), bool? useLocalAzureIpAddress = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string)) + public VpnConnection(string id = default(string), SubResource remoteVpnSite = default(SubResource), int? routingWeight = default(int?), string connectionStatus = default(string), string vpnConnectionProtocolType = default(string), long? ingressBytesTransferred = default(long?), long? egressBytesTransferred = default(long?), int? connectionBandwidth = default(int?), string sharedKey = default(string), bool? enableBgp = default(bool?), bool? usePolicyBasedTrafficSelectors = default(bool?), IList ipsecPolicies = default(IList), bool? enableRateLimiting = default(bool?), bool? enableInternetSecurity = default(bool?), bool? useLocalAzureIpAddress = default(bool?), string provisioningState = default(string), IList vpnLinkConnections = default(IList), string name = default(string), string etag = default(string)) : base(id) { RemoteVpnSite = remoteVpnSite; @@ -87,6 +89,7 @@ public VpnConnection() EnableInternetSecurity = enableInternetSecurity; UseLocalAzureIpAddress = useLocalAzureIpAddress; ProvisioningState = provisioningState; + VpnLinkConnections = vpnLinkConnections; Name = name; Etag = etag; CustomInit(); @@ -191,6 +194,12 @@ public VpnConnection() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; set; } + /// + /// Gets or sets list of all vpn site link connections to the gateway. + /// + [JsonProperty(PropertyName = "properties.vpnLinkConnections")] + public IList VpnLinkConnections { get; set; } + /// /// Gets or sets the name of the resource that is unique within a /// resource group. This name can be used to access the resource. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnLinkBgpSettings.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnLinkBgpSettings.cs new file mode 100644 index 0000000000000..7fc16bde0d2bf --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnLinkBgpSettings.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Network.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// BGP settings details for a link. + /// + public partial class VpnLinkBgpSettings + { + /// + /// Initializes a new instance of the VpnLinkBgpSettings class. + /// + public VpnLinkBgpSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VpnLinkBgpSettings class. + /// + /// The BGP speaker's ASN. + /// The BGP peering address and BGP + /// identifier of this BGP speaker. + public VpnLinkBgpSettings(long? asn = default(long?), string bgpPeeringAddress = default(string)) + { + Asn = asn; + BgpPeeringAddress = bgpPeeringAddress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the BGP speaker's ASN. + /// + [JsonProperty(PropertyName = "asn")] + public long? Asn { get; set; } + + /// + /// Gets or sets the BGP peering address and BGP identifier of this BGP + /// speaker. + /// + [JsonProperty(PropertyName = "bgpPeeringAddress")] + public string BgpPeeringAddress { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnLinkProviderProperties.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnLinkProviderProperties.cs new file mode 100644 index 0000000000000..dd703d25c5372 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnLinkProviderProperties.cs @@ -0,0 +1,59 @@ +// +// 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.Network.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// List of properties of a link provider. + /// + public partial class VpnLinkProviderProperties + { + /// + /// Initializes a new instance of the VpnLinkProviderProperties class. + /// + public VpnLinkProviderProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VpnLinkProviderProperties class. + /// + /// Name of the link provider. + /// Link speed. + public VpnLinkProviderProperties(string linkProviderName = default(string), int? linkSpeedInMbps = default(int?)) + { + LinkProviderName = linkProviderName; + LinkSpeedInMbps = linkSpeedInMbps; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the link provider. + /// + [JsonProperty(PropertyName = "linkProviderName")] + public string LinkProviderName { get; set; } + + /// + /// Gets or sets link speed. + /// + [JsonProperty(PropertyName = "linkSpeedInMbps")] + public int? LinkSpeedInMbps { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs index 6f5a12021d8ad..9d3f7104df136 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs @@ -52,9 +52,10 @@ public VpnSite() /// resource. Possible values include: 'Succeeded', 'Updating', /// 'Deleting', 'Failed' /// IsSecuritySite flag. + /// List of all vpn site links /// Gets a unique read-only string that changes /// whenever the resource is updated. - public VpnSite(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualWan = default(SubResource), DeviceProperties deviceProperties = default(DeviceProperties), string ipAddress = default(string), string siteKey = default(string), AddressSpace addressSpace = default(AddressSpace), BgpSettings bgpProperties = default(BgpSettings), string provisioningState = default(string), bool? isSecuritySite = default(bool?), string etag = default(string)) + public VpnSite(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualWan = default(SubResource), DeviceProperties deviceProperties = default(DeviceProperties), string ipAddress = default(string), string siteKey = default(string), AddressSpace addressSpace = default(AddressSpace), BgpSettings bgpProperties = default(BgpSettings), string provisioningState = default(string), bool? isSecuritySite = default(bool?), IList vpnSiteLinks = default(IList), string etag = default(string)) : base(id, name, type, location, tags) { VirtualWan = virtualWan; @@ -65,6 +66,7 @@ public VpnSite() BgpProperties = bgpProperties; ProvisioningState = provisioningState; IsSecuritySite = isSecuritySite; + VpnSiteLinks = vpnSiteLinks; Etag = etag; CustomInit(); } @@ -124,6 +126,12 @@ public VpnSite() [JsonProperty(PropertyName = "properties.isSecuritySite")] public bool? IsSecuritySite { get; set; } + /// + /// Gets or sets list of all vpn site links + /// + [JsonProperty(PropertyName = "properties.vpnSiteLinks")] + public IList VpnSiteLinks { get; set; } + /// /// Gets a unique read-only string that changes whenever the resource /// is updated. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSiteLink.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSiteLink.cs new file mode 100644 index 0000000000000..1969530412f16 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSiteLink.cs @@ -0,0 +1,113 @@ +// +// 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.Network.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// VpnSiteLink Resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class VpnSiteLink : SubResource + { + /// + /// Initializes a new instance of the VpnSiteLink class. + /// + public VpnSiteLink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VpnSiteLink class. + /// + /// Resource ID. + /// The link provider properties. + /// The ip-address for the + /// vpn-site-link. + /// The set of bgp properties. + /// The provisioning state of the + /// resource. Possible values include: 'Succeeded', 'Updating', + /// 'Deleting', 'Failed' + /// Gets a unique read-only string that changes + /// whenever the resource is updated. + /// The name of the resource that is unique within a + /// resource group. This name can be used to access the + /// resource. + /// Resource type. + public VpnSiteLink(string id = default(string), VpnLinkProviderProperties linkProperties = default(VpnLinkProviderProperties), string ipAddress = default(string), VpnLinkBgpSettings bgpProperties = default(VpnLinkBgpSettings), string provisioningState = default(string), string etag = default(string), string name = default(string), string type = default(string)) + : base(id) + { + LinkProperties = linkProperties; + IpAddress = ipAddress; + BgpProperties = bgpProperties; + ProvisioningState = provisioningState; + Etag = etag; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the link provider properties. + /// + [JsonProperty(PropertyName = "properties.linkProperties")] + public VpnLinkProviderProperties LinkProperties { get; set; } + + /// + /// Gets or sets the ip-address for the vpn-site-link. + /// + [JsonProperty(PropertyName = "properties.ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the set of bgp properties. + /// + [JsonProperty(PropertyName = "properties.bgpProperties")] + public VpnLinkBgpSettings BgpProperties { get; set; } + + /// + /// Gets or sets the provisioning state of the resource. Possible + /// values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets a unique read-only string that changes whenever the resource + /// is updated. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + /// + /// Gets or sets the name of the resource that is unique within a + /// resource group. This name can be used to access the resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSiteLinkConnection.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSiteLinkConnection.cs new file mode 100644 index 0000000000000..f3ce393d7a97d --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSiteLinkConnection.cs @@ -0,0 +1,209 @@ +// +// 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.Network.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VpnSiteLinkConnection Resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class VpnSiteLinkConnection : SubResource + { + /// + /// Initializes a new instance of the VpnSiteLinkConnection class. + /// + public VpnSiteLinkConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VpnSiteLinkConnection class. + /// + /// Resource ID. + /// Id of the connected vpn site + /// link. + /// Routing weight for vpn + /// connection. + /// The connection status. Possible + /// values include: 'Unknown', 'Connecting', 'Connected', + /// 'NotConnected' + /// Connection protocol used + /// for this connection. Possible values include: 'IKEv2', + /// 'IKEv1' + /// Ingress bytes + /// transferred. + /// Egress bytes + /// transferred. + /// Expected bandwidth in + /// MBPS. + /// SharedKey for the vpn connection. + /// EnableBgp flag. + /// Enable policy-based + /// traffic selectors. + /// The IPSec Policies to be considered by + /// this connection. + /// EnableBgp flag. + /// Use local azure ip to initiate + /// connection. + /// The provisioning state of the + /// resource. Possible values include: 'Succeeded', 'Updating', + /// 'Deleting', 'Failed' + /// The name of the resource that is unique within a + /// resource group. This name can be used to access the + /// resource. + /// Gets a unique read-only string that changes + /// whenever the resource is updated. + /// Resource type. + public VpnSiteLinkConnection(string id = default(string), SubResource vpnSiteLink = default(SubResource), int? routingWeight = default(int?), string connectionStatus = default(string), string vpnConnectionProtocolType = default(string), long? ingressBytesTransferred = default(long?), long? egressBytesTransferred = default(long?), int? connectionBandwidth = default(int?), string sharedKey = default(string), bool? enableBgp = default(bool?), bool? usePolicyBasedTrafficSelectors = default(bool?), IList ipsecPolicies = default(IList), bool? enableRateLimiting = default(bool?), bool? useLocalAzureIpAddress = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) + : base(id) + { + VpnSiteLink = vpnSiteLink; + RoutingWeight = routingWeight; + ConnectionStatus = connectionStatus; + VpnConnectionProtocolType = vpnConnectionProtocolType; + IngressBytesTransferred = ingressBytesTransferred; + EgressBytesTransferred = egressBytesTransferred; + ConnectionBandwidth = connectionBandwidth; + SharedKey = sharedKey; + EnableBgp = enableBgp; + UsePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors; + IpsecPolicies = ipsecPolicies; + EnableRateLimiting = enableRateLimiting; + UseLocalAzureIpAddress = useLocalAzureIpAddress; + ProvisioningState = provisioningState; + Name = name; + Etag = etag; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets id of the connected vpn site link. + /// + [JsonProperty(PropertyName = "properties.vpnSiteLink")] + public SubResource VpnSiteLink { get; set; } + + /// + /// Gets or sets routing weight for vpn connection. + /// + [JsonProperty(PropertyName = "properties.routingWeight")] + public int? RoutingWeight { get; set; } + + /// + /// Gets or sets the connection status. Possible values include: + /// 'Unknown', 'Connecting', 'Connected', 'NotConnected' + /// + [JsonProperty(PropertyName = "properties.connectionStatus")] + public string ConnectionStatus { get; set; } + + /// + /// Gets or sets connection protocol used for this connection. Possible + /// values include: 'IKEv2', 'IKEv1' + /// + [JsonProperty(PropertyName = "properties.vpnConnectionProtocolType")] + public string VpnConnectionProtocolType { get; set; } + + /// + /// Gets ingress bytes transferred. + /// + [JsonProperty(PropertyName = "properties.ingressBytesTransferred")] + public long? IngressBytesTransferred { get; private set; } + + /// + /// Gets egress bytes transferred. + /// + [JsonProperty(PropertyName = "properties.egressBytesTransferred")] + public long? EgressBytesTransferred { get; private set; } + + /// + /// Gets or sets expected bandwidth in MBPS. + /// + [JsonProperty(PropertyName = "properties.connectionBandwidth")] + public int? ConnectionBandwidth { get; set; } + + /// + /// Gets or sets sharedKey for the vpn connection. + /// + [JsonProperty(PropertyName = "properties.sharedKey")] + public string SharedKey { get; set; } + + /// + /// Gets or sets enableBgp flag. + /// + [JsonProperty(PropertyName = "properties.enableBgp")] + public bool? EnableBgp { get; set; } + + /// + /// Gets or sets enable policy-based traffic selectors. + /// + [JsonProperty(PropertyName = "properties.usePolicyBasedTrafficSelectors")] + public bool? UsePolicyBasedTrafficSelectors { get; set; } + + /// + /// Gets or sets the IPSec Policies to be considered by this + /// connection. + /// + [JsonProperty(PropertyName = "properties.ipsecPolicies")] + public IList IpsecPolicies { get; set; } + + /// + /// Gets or sets enableBgp flag. + /// + [JsonProperty(PropertyName = "properties.enableRateLimiting")] + public bool? EnableRateLimiting { get; set; } + + /// + /// Gets or sets use local azure ip to initiate connection. + /// + [JsonProperty(PropertyName = "properties.useLocalAzureIpAddress")] + public bool? UseLocalAzureIpAddress { get; set; } + + /// + /// Gets or sets the provisioning state of the resource. Possible + /// values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; set; } + + /// + /// Gets or sets the name of the resource that is unique within a + /// resource group. This name can be used to access the resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets a unique read-only string that changes whenever the resource + /// is updated. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + /// + /// Gets resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs index 6671780a0e901..a1ea107b33a09 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs @@ -41,7 +41,7 @@ public WebApplicationFirewallPolicy() /// Resource type. /// Resource location. /// Resource tags. - /// Describes policySettings for + /// Describes policySettings for /// policy. /// Describes custom rules inside the /// policy. @@ -70,7 +70,7 @@ public WebApplicationFirewallPolicy() partial void CustomInit(); /// - /// Gets or sets describes policySettings for policy. + /// Gets or sets describes policySettings for policy. /// [JsonProperty(PropertyName = "properties.policySettings")] public PolicySettings PolicySettings { get; set; } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs index d2d87a5e49fef..a0aef4de232aa 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs @@ -119,7 +119,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs index d41d7fdd6ff9e..e399f935f5969 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs @@ -94,7 +94,7 @@ internal NetworkInterfaceIPConfigurationsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal NetworkInterfaceIPConfigurationsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs index 218d571ecdc52..85edfcbf58c12 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs @@ -94,7 +94,7 @@ internal NetworkInterfaceLoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs index 6a717cdd0f084..23af40772652e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs @@ -126,7 +126,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -548,7 +548,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -740,7 +740,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs index 369e03e4cb3bc..7d13feeee9683 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs @@ -119,7 +119,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1839,7 +1839,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2022,7 +2022,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2248,7 +2248,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2449,7 +2449,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2643,7 +2643,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs index 5dd1a95f2172e..963252593e60f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs @@ -98,16 +98,6 @@ public partial class NetworkManagementClient : ServiceClient public virtual IAvailableResourceGroupDelegationsOperations AvailableResourceGroupDelegations { get; private set; } - /// - /// Gets the IAvailablePrivateEndpointTypesOperations. - /// - public virtual IAvailablePrivateEndpointTypesOperations AvailablePrivateEndpointTypes { get; private set; } - - /// - /// Gets the IAvailableResourceGroupPrivateEndpointTypesOperations. - /// - public virtual IAvailableResourceGroupPrivateEndpointTypesOperations AvailableResourceGroupPrivateEndpointTypes { get; private set; } - /// /// Gets the IAzureFirewallsOperations. /// @@ -203,16 +193,6 @@ public partial class NetworkManagementClient : ServiceClient public virtual IExpressRouteLinksOperations ExpressRouteLinks { get; private set; } - /// - /// Gets the IPrivateEndpointsOperations. - /// - public virtual IPrivateEndpointsOperations PrivateEndpoints { get; private set; } - - /// - /// Gets the IPrivateLinkServicesOperations. - /// - public virtual IPrivateLinkServicesOperations PrivateLinkServices { get; private set; } - /// /// Gets the ILoadBalancersOperations. /// @@ -318,6 +298,21 @@ public partial class NetworkManagementClient : ServiceClient public virtual IOperations Operations { get; private set; } + /// + /// Gets the IPrivateEndpointsOperations. + /// + public virtual IPrivateEndpointsOperations PrivateEndpoints { get; private set; } + + /// + /// Gets the IAvailablePrivateEndpointTypesOperations. + /// + public virtual IAvailablePrivateEndpointTypesOperations AvailablePrivateEndpointTypes { get; private set; } + + /// + /// Gets the IPrivateLinkServicesOperations. + /// + public virtual IPrivateLinkServicesOperations PrivateLinkServices { get; private set; } + /// /// Gets the IPublicIPAddressesOperations. /// @@ -428,6 +423,11 @@ public partial class NetworkManagementClient : ServiceClient public virtual IVpnSitesOperations VpnSites { get; private set; } + /// + /// Gets the IVpnSiteLinksOperations. + /// + public virtual IVpnSiteLinksOperations VpnSiteLinks { get; private set; } + /// /// Gets the IVpnSitesConfigurationOperations. /// @@ -453,6 +453,16 @@ public partial class NetworkManagementClient : ServiceClient public virtual IVpnConnectionsOperations VpnConnections { get; private set; } + /// + /// Gets the IVpnSiteLinkConnectionsOperations. + /// + public virtual IVpnSiteLinkConnectionsOperations VpnSiteLinkConnections { get; private set; } + + /// + /// Gets the IVpnLinkConnectionsOperations. + /// + public virtual IVpnLinkConnectionsOperations VpnLinkConnections { get; private set; } + /// /// Gets the IP2sVpnServerConfigurationsOperations. /// @@ -713,8 +723,6 @@ private void Initialize() ApplicationSecurityGroups = new ApplicationSecurityGroupsOperations(this); AvailableDelegations = new AvailableDelegationsOperations(this); AvailableResourceGroupDelegations = new AvailableResourceGroupDelegationsOperations(this); - AvailablePrivateEndpointTypes = new AvailablePrivateEndpointTypesOperations(this); - AvailableResourceGroupPrivateEndpointTypes = new AvailableResourceGroupPrivateEndpointTypesOperations(this); AzureFirewalls = new AzureFirewallsOperations(this); AzureFirewallFqdnTags = new AzureFirewallFqdnTagsOperations(this); BastionHosts = new BastionHostsOperations(this); @@ -734,8 +742,6 @@ private void Initialize() ExpressRoutePortsLocations = new ExpressRoutePortsLocationsOperations(this); ExpressRoutePorts = new ExpressRoutePortsOperations(this); ExpressRouteLinks = new ExpressRouteLinksOperations(this); - PrivateEndpoints = new PrivateEndpointsOperations(this); - PrivateLinkServices = new PrivateLinkServicesOperations(this); LoadBalancers = new LoadBalancersOperations(this); LoadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsOperations(this); LoadBalancerFrontendIPConfigurations = new LoadBalancerFrontendIPConfigurationsOperations(this); @@ -757,6 +763,9 @@ private void Initialize() PacketCaptures = new PacketCapturesOperations(this); ConnectionMonitors = new ConnectionMonitorsOperations(this); Operations = new Operations(this); + PrivateEndpoints = new PrivateEndpointsOperations(this); + AvailablePrivateEndpointTypes = new AvailablePrivateEndpointTypesOperations(this); + PrivateLinkServices = new PrivateLinkServicesOperations(this); PublicIPAddresses = new PublicIPAddressesOperations(this); PublicIPPrefixes = new PublicIPPrefixesOperations(this); RouteFilters = new RouteFiltersOperations(this); @@ -779,11 +788,14 @@ private void Initialize() VirtualNetworkTaps = new VirtualNetworkTapsOperations(this); VirtualWans = new VirtualWansOperations(this); VpnSites = new VpnSitesOperations(this); + VpnSiteLinks = new VpnSiteLinksOperations(this); VpnSitesConfiguration = new VpnSitesConfigurationOperations(this); VirtualHubs = new VirtualHubsOperations(this); HubVirtualNetworkConnections = new HubVirtualNetworkConnectionsOperations(this); VpnGateways = new VpnGatewaysOperations(this); VpnConnections = new VpnConnectionsOperations(this); + VpnSiteLinkConnections = new VpnSiteLinkConnectionsOperations(this); + VpnLinkConnections = new VpnLinkConnectionsOperations(this); P2sVpnServerConfigurations = new P2sVpnServerConfigurationsOperations(this); P2sVpnGateways = new P2sVpnGatewaysOperations(this); WebApplicationFirewallPolicies = new WebApplicationFirewallPoliciesOperations(this); @@ -867,7 +879,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1065,7 +1077,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "virtualWANName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs index 7cb629bbfc582..07cd9de43ab15 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs @@ -60,6 +60,31 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// The name of the NetworkProfile. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, networkProfileName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the specified network profile in a specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the public IP prefix. + /// + /// + /// Expands referenced resources. + /// + /// /// Headers that will be added to request. /// /// @@ -68,6 +93,9 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -77,7 +105,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -91,7 +119,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -102,8 +130,9 @@ internal NetworkProfilesOperations(NetworkManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("networkProfileName", networkProfileName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("expand", expand); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -116,6 +145,10 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -123,7 +156,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -174,7 +207,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -209,13 +242,31 @@ internal NetworkProfilesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -224,16 +275,16 @@ internal NetworkProfilesOperations(NetworkManagementClient client) } /// - /// Gets the specified network profile in a specified resource group. + /// Creates or updates a network profile. /// /// /// The name of the resource group. /// /// - /// The name of the public IP prefix. + /// The name of the network profile. /// - /// - /// Expands referenced resources. + /// + /// Parameters supplied to the create or update network profile operation. /// /// /// Headers that will be added to request. @@ -256,7 +307,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, NetworkProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -266,11 +317,15 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "networkProfileName"); } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -280,10 +335,10 @@ internal NetworkProfilesOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("networkProfileName", networkProfileName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("expand", expand); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -296,10 +351,6 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } - if (expand != null) - { - _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -307,7 +358,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -338,6 +389,12 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -358,7 +415,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -418,6 +475,24 @@ internal NetworkProfilesOperations(NetworkManagementClient client) 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); @@ -426,7 +501,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) } /// - /// Creates or updates a network profile. + /// Updates network profile tags. /// /// /// The name of the resource group. @@ -435,7 +510,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// The name of the network profile. /// /// - /// Parameters supplied to the create or update network profile operation. + /// Parameters supplied to update network profile tags. /// /// /// Headers that will be added to request. @@ -458,7 +533,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, NetworkProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -476,7 +551,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -489,7 +564,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -509,7 +584,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -566,7 +641,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -626,24 +701,6 @@ internal NetworkProfilesOperations(NetworkManagementClient client) 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); @@ -652,17 +709,8 @@ internal NetworkProfilesOperations(NetworkManagementClient client) } /// - /// Updates network profile tags. + /// Gets all the network profiles in a subscription. /// - /// - /// The name of the resource group. - /// - /// - /// The name of the network profile. - /// - /// - /// Parameters supplied to update network profile tags. - /// /// /// Headers that will be added to request. /// @@ -684,25 +732,13 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (networkProfileName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "networkProfileName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -710,18 +746,13 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("networkProfileName", networkProfileName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListAll", 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.Network/networkProfiles/{networkProfileName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{networkProfileName}", System.Uri.EscapeDataString(networkProfileName)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -735,7 +766,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -766,12 +797,6 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -827,7 +852,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -840,7 +865,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -860,8 +885,11 @@ internal NetworkProfilesOperations(NetworkManagementClient client) } /// - /// Gets all the network profiles in a subscription. + /// Gets all network profiles in a resource group. /// + /// + /// The name of the resource group. + /// /// /// Headers that will be added to request. /// @@ -883,13 +911,17 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -897,13 +929,15 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAll", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -1036,11 +1070,14 @@ internal NetworkProfilesOperations(NetworkManagementClient client) } /// - /// Gets all network profiles in a resource group. + /// Deletes the specified network profile. /// /// /// The name of the resource group. /// + /// + /// The name of the NetworkProfile. + /// /// /// Headers that will be added to request. /// @@ -1050,9 +1087,6 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -1062,17 +1096,21 @@ internal NetworkProfilesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string networkProfileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } + if (networkProfileName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkProfileName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1081,14 +1119,16 @@ internal NetworkProfilesOperations(NetworkManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("networkProfileName", networkProfileName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + 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.Network/networkProfiles").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{networkProfileName}", System.Uri.EscapeDataString(networkProfileName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -1102,7 +1142,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1153,7 +1193,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + 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 @@ -1188,31 +1228,13 @@ internal NetworkProfilesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + 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); diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperationsExtensions.cs index 2141589bf6fcc..be79eeddbeb55 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperationsExtensions.cs @@ -258,6 +258,43 @@ public static IPage List(this INetworkProfilesOperations operati } } + /// + /// Deletes the specified network profile. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the NetworkProfile. + /// + public static void BeginDelete(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName) + { + operations.BeginDeleteAsync(resourceGroupName, networkProfileName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified network profile. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the NetworkProfile. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this INetworkProfilesOperations operations, string resourceGroupName, string networkProfileName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, networkProfileName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Gets all the network profiles in a subscription. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs index 1e528688cfbc1..08abe7dd757b4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs @@ -119,7 +119,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -356,7 +356,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -539,7 +539,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -728,7 +728,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -913,7 +913,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1139,7 +1139,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs index 963c2bec134db..18cacdfb3852b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs @@ -101,7 +101,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -315,7 +315,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -533,7 +533,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -722,7 +722,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -895,7 +895,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1087,7 +1087,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1366,7 +1366,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) } /// - /// Configures flow log and traffic analytics (optional) on a specified + /// Configures flow log and traffic analytics (optional) on a specified /// resource. /// /// @@ -1403,7 +1403,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) /// /// /// Parameters that define a resource to query flow log and traffic analytics - /// (optional) status. + /// (optional) status. /// /// /// The headers that will be added to request. @@ -1563,7 +1563,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1746,7 +1746,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1971,7 +1971,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2196,7 +2196,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2421,7 +2421,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2646,7 +2646,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2817,7 +2817,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) } /// - /// Configures flow log and traffic analytics (optional) on a specified + /// Configures flow log and traffic analytics (optional) on a specified /// resource. /// /// @@ -2872,7 +2872,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3054,7 +3054,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) /// /// /// Parameters that define a resource to query flow log and traffic analytics - /// (optional) status. + /// (optional) status. /// /// /// Headers that will be added to request. @@ -3099,7 +3099,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3326,7 +3326,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3552,7 +3552,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3774,7 +3774,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3999,7 +3999,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperationsExtensions.cs index a005580e39390..5d4cd2020f9ca 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperationsExtensions.cs @@ -533,7 +533,7 @@ public static TroubleshootingResult GetTroubleshootingResult(this INetworkWatche } /// - /// Configures flow log and traffic analytics (optional) on a specified + /// Configures flow log and traffic analytics (optional) on a specified /// resource. /// /// @@ -554,7 +554,7 @@ public static FlowLogInformation SetFlowLogConfiguration(this INetworkWatchersOp } /// - /// Configures flow log and traffic analytics (optional) on a specified + /// Configures flow log and traffic analytics (optional) on a specified /// resource. /// /// @@ -595,7 +595,7 @@ public static FlowLogInformation SetFlowLogConfiguration(this INetworkWatchersOp /// /// /// Parameters that define a resource to query flow log and traffic analytics - /// (optional) status. + /// (optional) status. /// public static FlowLogInformation GetFlowLogStatus(this INetworkWatchersOperations operations, string resourceGroupName, string networkWatcherName, FlowLogStatusParameters parameters) { @@ -617,7 +617,7 @@ public static FlowLogInformation GetFlowLogStatus(this INetworkWatchersOperation /// /// /// Parameters that define a resource to query flow log and traffic analytics - /// (optional) status. + /// (optional) status. /// /// /// The cancellation token. @@ -1092,7 +1092,7 @@ public static TroubleshootingResult BeginGetTroubleshootingResult(this INetworkW } /// - /// Configures flow log and traffic analytics (optional) on a specified + /// Configures flow log and traffic analytics (optional) on a specified /// resource. /// /// @@ -1113,7 +1113,7 @@ public static FlowLogInformation BeginSetFlowLogConfiguration(this INetworkWatch } /// - /// Configures flow log and traffic analytics (optional) on a specified + /// Configures flow log and traffic analytics (optional) on a specified /// resource. /// /// @@ -1154,7 +1154,7 @@ public static FlowLogInformation BeginSetFlowLogConfiguration(this INetworkWatch /// /// /// Parameters that define a resource to query flow log and traffic analytics - /// (optional) status. + /// (optional) status. /// public static FlowLogInformation BeginGetFlowLogStatus(this INetworkWatchersOperations operations, string resourceGroupName, string networkWatcherName, FlowLogStatusParameters parameters) { @@ -1176,7 +1176,7 @@ public static FlowLogInformation BeginGetFlowLogStatus(this INetworkWatchersOper /// /// /// Parameters that define a resource to query flow log and traffic analytics - /// (optional) status. + /// (optional) status. /// /// /// The cancellation token. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs index d2958ac90cdbc..4661cc56c58d0 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(NetworkManagementClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs index b0a407b4f6eff..3855606fc6135 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs @@ -94,7 +94,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -349,7 +349,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -522,7 +522,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -765,7 +765,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnGatewayParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -986,7 +986,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnGatewayParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1197,7 +1197,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1377,7 +1377,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1579,7 +1579,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnServerConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnServerConfigurationsOperations.cs index 8f41a3998a1f3..7d6ec161d29a3 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnServerConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnServerConfigurationsOperations.cs @@ -101,7 +101,7 @@ internal P2sVpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnServerConfigurationName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal P2sVpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualWanName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -550,7 +550,7 @@ internal P2sVpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnServerConfigurationParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -770,7 +770,7 @@ internal P2sVpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnServerConfigurationName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs index 4938be821d3b5..1e347d51bfa86 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs @@ -129,7 +129,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -395,7 +395,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -602,7 +602,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -804,7 +804,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -981,7 +981,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1161,7 +1161,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs index 23b3195131fbb..d846e4ed5a601 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs @@ -109,7 +109,7 @@ internal PeerExpressRouteCircuitConnectionsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -315,7 +315,7 @@ internal PeerExpressRouteCircuitConnectionsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs index 14fa0b01be961..f70287164c63e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs @@ -119,7 +119,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -279,7 +279,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) /// The name of the private endpoint. /// /// - /// Parameters supplied to the create or update private endpoint operation + /// Parameters supplied to the create or update private endpoint operation. /// /// /// The headers that will be added to request. @@ -331,7 +331,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -686,7 +686,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -823,7 +823,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) /// The name of the private endpoint. /// /// - /// Parameters supplied to the create or update private endpoint operation + /// Parameters supplied to the create or update private endpoint operation. /// /// /// Headers that will be added to request. @@ -864,7 +864,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperationsExtensions.cs index 6b4f459d12daa..ceb8c5a557366 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperationsExtensions.cs @@ -117,7 +117,7 @@ public static void Delete(this IPrivateEndpointsOperations operations, string re /// The name of the private endpoint. /// /// - /// Parameters supplied to the create or update private endpoint operation + /// Parameters supplied to the create or update private endpoint operation. /// public static PrivateEndpoint CreateOrUpdate(this IPrivateEndpointsOperations operations, string resourceGroupName, string privateEndpointName, PrivateEndpoint parameters) { @@ -137,7 +137,7 @@ public static PrivateEndpoint CreateOrUpdate(this IPrivateEndpointsOperations op /// The name of the private endpoint. /// /// - /// Parameters supplied to the create or update private endpoint operation + /// Parameters supplied to the create or update private endpoint operation. /// /// /// The cancellation token. @@ -262,7 +262,7 @@ public static void BeginDelete(this IPrivateEndpointsOperations operations, stri /// The name of the private endpoint. /// /// - /// Parameters supplied to the create or update private endpoint operation + /// Parameters supplied to the create or update private endpoint operation. /// public static PrivateEndpoint BeginCreateOrUpdate(this IPrivateEndpointsOperations operations, string resourceGroupName, string privateEndpointName, PrivateEndpoint parameters) { @@ -282,7 +282,7 @@ public static PrivateEndpoint BeginCreateOrUpdate(this IPrivateEndpointsOperatio /// The name of the private endpoint. /// /// - /// Parameters supplied to the create or update private endpoint operation + /// Parameters supplied to the create or update private endpoint operation. /// /// /// The cancellation token. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs index 1de332c3516ae..b9f4945467f3d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs @@ -119,7 +119,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -279,7 +279,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// The name of the private link service. /// /// - /// Parameters supplied to the create or update private link service operation + /// Parameters supplied to the create or update private link service operation. /// /// /// The headers that will be added to request. @@ -331,7 +331,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -670,6 +670,9 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -679,7 +682,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task UpdatePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdatePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -701,7 +704,1194 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("peConnectionName", peConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdatePrivateEndpointConnection", 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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{peConnectionName}", System.Uri.EscapeDataString(peConnectionName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete private end point connection for a private link service in a + /// subscription. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the private link service. + /// + /// + /// The name of the private end point connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, serviceName, peConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The location of the domain name. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + /// + /// 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> CheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(string location, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckPrivateLinkServiceVisibility", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + 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; + } + + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + /// + /// 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> CheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckPrivateLinkServiceVisibilityByResourceGroup", 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.Network/locations/{location}/checkPrivateLinkServiceVisibility").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + 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; + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The location of the domain name. + /// + /// + /// 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>> ListAutoApprovedPrivateLinkServicesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServices", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// 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>> ListAutoApprovedPrivateLinkServicesByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServicesByResourceGroup", 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.Network/locations/{location}/autoApprovedPrivateLinkServices").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes the specified private link service. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the private link service. + /// + /// + /// 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 serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("apiVersion", apiVersion); + 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.Network/privateLinkServices/{serviceName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates an private link service in the specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the private link service. + /// + /// + /// Parameters supplied to the create or update private link service 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, PrivateLinkService parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (serviceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -711,18 +1901,16 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serviceName", serviceName); - tracingParameters.Add("peConnectionName", peConnectionName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePrivateEndpointConnection", tracingParameters); + 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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); - _url = _url.Replace("{peConnectionName}", System.Uri.EscapeDataString(peConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -793,7 +1981,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -823,13 +2011,49 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -851,28 +2075,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// The name of the private end point connection. /// /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, serviceName, peConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the specified private link service. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the private link service. - /// - /// /// Headers that will be added to request. /// /// @@ -890,7 +2092,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -900,11 +2102,15 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); } + if (peConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "peConnectionName"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -914,15 +2120,17 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serviceName", serviceName); + tracingParameters.Add("peConnectionName", peConnectionName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", 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.Network/privateLinkServices/{serviceName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); + _url = _url.Replace("{peConnectionName}", System.Uri.EscapeDataString(peConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -1032,16 +2240,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) } /// - /// Creates or updates an private link service in the specified resource group. + /// Gets all private link services in a resource group. /// - /// - /// The name of the resource group. - /// - /// - /// The name of the private link service. - /// - /// - /// Parameters supplied to the create or update private link service operation + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -1064,25 +2266,12 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, PrivateLinkService parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (serviceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.SubscriptionId == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } - string apiVersion = "2019-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1090,24 +2279,14 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serviceName", serviceName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", 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.Network/privateLinkServices/{serviceName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1115,7 +2294,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1146,12 +2325,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -1172,7 +2345,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1202,7 +2375,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1215,25 +2388,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) _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); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1253,17 +2408,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) } /// - /// Delete private end point connection for a private link service in a - /// subscription. + /// Gets all private link service in a subscription. /// - /// - /// The name of the resource group. - /// - /// - /// The name of the private link service. - /// - /// - /// The name of the private end point connection. + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -1274,6 +2422,9 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1283,25 +2434,12 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (serviceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "serviceName"); - } - if (peConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "peConnectionName"); - } - if (Client.SubscriptionId == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } - string apiVersion = "2019-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1309,25 +2447,14 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("serviceName", serviceName); - tracingParameters.Add("peConnectionName", peConnectionName); - tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", 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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName)); - _url = _url.Replace("{peConnectionName}", System.Uri.EscapeDataString(peConnectionName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1335,7 +2462,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1386,7 +2513,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200) { var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1416,13 +2543,31 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -1431,7 +2576,8 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) } /// - /// Gets all private link services in a resource group. + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. /// /// /// The NextLink from the previous successful call to List operation. @@ -1442,7 +2588,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1457,7 +2603,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAutoApprovedPrivateLinkServicesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1472,7 +2618,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServicesNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1538,13 +2684,14 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1554,6 +2701,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) } 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); @@ -1566,7 +2717,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1579,7 +2730,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -1599,7 +2750,8 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) } /// - /// Gets all private link service in a subscription. + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. /// /// /// The NextLink from the previous successful call to List operation. @@ -1610,7 +2762,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1625,7 +2777,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAutoApprovedPrivateLinkServicesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -1640,7 +2792,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServicesByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1706,13 +2858,14 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { + ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1722,6 +2875,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) } 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); @@ -1734,7 +2891,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1747,7 +2904,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs index 19dbd4d5a58ca..587c207af0027 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs @@ -117,7 +117,7 @@ public static void Delete(this IPrivateLinkServicesOperations operations, string /// The name of the private link service. /// /// - /// Parameters supplied to the create or update private link service operation + /// Parameters supplied to the create or update private link service operation. /// public static PrivateLinkService CreateOrUpdate(this IPrivateLinkServicesOperations operations, string resourceGroupName, string serviceName, PrivateLinkService parameters) { @@ -137,7 +137,7 @@ public static PrivateLinkService CreateOrUpdate(this IPrivateLinkServicesOperati /// The name of the private link service. /// /// - /// Parameters supplied to the create or update private link service operation + /// Parameters supplied to the create or update private link service operation. /// /// /// The cancellation token. @@ -231,9 +231,9 @@ public static IPage ListBySubscription(this IPrivateLinkServ /// /// Parameters supplied to approve or reject the private end point connection. /// - public static void UpdatePrivateEndpointConnection(this IPrivateLinkServicesOperations operations, string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters) + public static PrivateEndpointConnection UpdatePrivateEndpointConnection(this IPrivateLinkServicesOperations operations, string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters) { - operations.UpdatePrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName, parameters).GetAwaiter().GetResult(); + return operations.UpdatePrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName, parameters).GetAwaiter().GetResult(); } /// @@ -258,9 +258,12 @@ public static void UpdatePrivateEndpointConnection(this IPrivateLinkServicesOper /// /// The cancellation token. /// - public static async Task UpdatePrivateEndpointConnectionAsync(this IPrivateLinkServicesOperations operations, string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdatePrivateEndpointConnectionAsync(this IPrivateLinkServicesOperations operations, string resourceGroupName, string serviceName, string peConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.UpdatePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, serviceName, peConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.UpdatePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, serviceName, peConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// @@ -308,6 +311,170 @@ public static void DeletePrivateEndpointConnection(this IPrivateLinkServicesOper (await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, serviceName, peConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + public static PrivateLinkServiceVisibility CheckPrivateLinkServiceVisibility(this IPrivateLinkServicesOperations operations, string location, CheckPrivateLinkServiceVisibilityRequest parameters) + { + return operations.CheckPrivateLinkServiceVisibilityAsync(location, parameters).GetAwaiter().GetResult(); + } + + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + /// + /// The cancellation token. + /// + public static async Task CheckPrivateLinkServiceVisibilityAsync(this IPrivateLinkServicesOperations operations, string location, CheckPrivateLinkServiceVisibilityRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(location, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + public static PrivateLinkServiceVisibility CheckPrivateLinkServiceVisibilityByResourceGroup(this IPrivateLinkServicesOperations operations, string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters) + { + return operations.CheckPrivateLinkServiceVisibilityByResourceGroupAsync(location, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Checks the subscription is visible to private link service + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// The request body of CheckPrivateLinkService API call. + /// + /// + /// The cancellation token. + /// + public static async Task CheckPrivateLinkServiceVisibilityByResourceGroupAsync(this IPrivateLinkServicesOperations operations, string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(location, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + public static IPage ListAutoApprovedPrivateLinkServices(this IPrivateLinkServicesOperations operations, string location) + { + return operations.ListAutoApprovedPrivateLinkServicesAsync(location).GetAwaiter().GetResult(); + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAutoApprovedPrivateLinkServicesAsync(this IPrivateLinkServicesOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAutoApprovedPrivateLinkServicesWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + public static IPage ListAutoApprovedPrivateLinkServicesByResourceGroup(this IPrivateLinkServicesOperations operations, string location, string resourceGroupName) + { + return operations.ListAutoApprovedPrivateLinkServicesByResourceGroupAsync(location, resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location of the domain name. + /// + /// + /// The name of the resource group. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAutoApprovedPrivateLinkServicesByResourceGroupAsync(this IPrivateLinkServicesOperations operations, string location, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAutoApprovedPrivateLinkServicesByResourceGroupWithHttpMessagesAsync(location, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Deletes the specified private link service. /// @@ -358,7 +525,7 @@ public static void BeginDelete(this IPrivateLinkServicesOperations operations, s /// The name of the private link service. /// /// - /// Parameters supplied to the create or update private link service operation + /// Parameters supplied to the create or update private link service operation. /// public static PrivateLinkService BeginCreateOrUpdate(this IPrivateLinkServicesOperations operations, string resourceGroupName, string serviceName, PrivateLinkService parameters) { @@ -378,7 +545,7 @@ public static PrivateLinkService BeginCreateOrUpdate(this IPrivateLinkServicesOp /// The name of the private link service. /// /// - /// Parameters supplied to the create or update private link service operation + /// Parameters supplied to the create or update private link service operation. /// /// /// The cancellation token. @@ -504,5 +671,77 @@ public static IPage ListBySubscriptionNext(this IPrivateLink } } + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAutoApprovedPrivateLinkServicesNext(this IPrivateLinkServicesOperations operations, string nextPageLink) + { + return operations.ListAutoApprovedPrivateLinkServicesNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAutoApprovedPrivateLinkServicesNextAsync(this IPrivateLinkServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAutoApprovedPrivateLinkServicesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAutoApprovedPrivateLinkServicesByResourceGroupNext(this IPrivateLinkServicesOperations operations, string nextPageLink) + { + return operations.ListAutoApprovedPrivateLinkServicesByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns all of the private link service ids that can be linked to a Private + /// Endpoint with auto approved in this subscription in this region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAutoApprovedPrivateLinkServicesByResourceGroupNextAsync(this IPrivateLinkServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAutoApprovedPrivateLinkServicesByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs index c07bf7e27e65e..2ba5dac289f9b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs @@ -119,7 +119,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -726,7 +726,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1135,7 +1135,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs index 694217830a1ba..c1cc2dd89e2be 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs @@ -119,7 +119,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1381,7 +1381,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1564,7 +1564,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1790,7 +1790,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs index b1988ce0bec8d..eae3692763bf4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs @@ -101,7 +101,7 @@ internal ResourceNavigationLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs index 605c37fd3675a..c82872309fbca 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs @@ -126,7 +126,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -378,7 +378,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -576,7 +576,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -772,7 +772,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1007,7 +1007,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs index b4ca85c0d062b..3599b050dfce7 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs @@ -119,7 +119,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -361,7 +361,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -539,7 +539,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -726,7 +726,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1135,7 +1135,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs index 7d8d8932bd0fb..6d547bf284f09 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs @@ -119,7 +119,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -361,7 +361,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -539,7 +539,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -726,7 +726,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1135,7 +1135,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs index a0a9f3e64156b..2dbe0e8140a52 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs @@ -126,7 +126,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -548,7 +548,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -744,7 +744,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs index 88f081b5e92c5..c541ae2b9728f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs @@ -21,99 +21,90 @@ public static IEnumerable> ApiInfo_NetworkManageme { new Tuple("Compute", "NetworkInterfaces", "2017-03-30"), new Tuple("Compute", "PublicIPAddresses", "2017-03-30"), - new Tuple("Network", "ApplicationGateways", "2019-04-01"), - new Tuple("Network", "ApplicationSecurityGroups", "2019-04-01"), - new Tuple("Network", "AvailableDelegations", "2019-04-01"), - new Tuple("Network", "AvailableEndpointServices", "2019-04-01"), - new Tuple("Network", "AvailablePrivateEndpointTypes", "2019-04-01"), - new Tuple("Network", "AvailableResourceGroupDelegations", "2019-04-01"), - new Tuple("Network", "AvailableResourceGroupPrivateEndpointTypes", "2019-04-01"), - new Tuple("Network", "AzureFirewallFqdnTags", "2019-04-01"), - new Tuple("Network", "AzureFirewalls", "2019-04-01"), - new Tuple("Network", "BastionHosts", "2019-04-01"), - new Tuple("Network", "BgpServiceCommunities", "2019-04-01"), - new Tuple("Network", "CheckDnsNameAvailability", "2019-04-01"), - new Tuple("Network", "ConnectionMonitors", "2019-04-01"), - new Tuple("Network", "DdosCustomPolicies", "2019-04-01"), - new Tuple("Network", "DdosProtectionPlans", "2019-04-01"), - new Tuple("Network", "DefaultSecurityRules", "2019-04-01"), - new Tuple("Network", "ExpressRouteCircuitAuthorizations", "2019-04-01"), - new Tuple("Network", "ExpressRouteCircuitConnections", "2019-04-01"), - new Tuple("Network", "ExpressRouteCircuitPeerings", "2019-04-01"), - new Tuple("Network", "ExpressRouteCircuits", "2019-04-01"), - new Tuple("Network", "ExpressRouteConnections", "2019-04-01"), - new Tuple("Network", "ExpressRouteCrossConnectionPeerings", "2019-04-01"), - new Tuple("Network", "ExpressRouteCrossConnections", "2019-04-01"), - new Tuple("Network", "ExpressRouteGateways", "2019-04-01"), - new Tuple("Network", "ExpressRouteLinks", "2019-04-01"), - new Tuple("Network", "ExpressRoutePorts", "2019-04-01"), - new Tuple("Network", "ExpressRoutePortsLocations", "2019-04-01"), - new Tuple("Network", "ExpressRouteServiceProviders", "2019-04-01"), - new Tuple("Network", "HubVirtualNetworkConnections", "2019-04-01"), - new Tuple("Network", "InboundNatRules", "2019-04-01"), - new Tuple("Network", "LoadBalancerBackendAddressPools", "2019-04-01"), - new Tuple("Network", "LoadBalancerFrontendIPConfigurations", "2019-04-01"), - new Tuple("Network", "LoadBalancerLoadBalancingRules", "2019-04-01"), - new Tuple("Network", "LoadBalancerNetworkInterfaces", "2019-04-01"), - new Tuple("Network", "LoadBalancerOutboundRules", "2019-04-01"), - new Tuple("Network", "LoadBalancerProbes", "2019-04-01"), - new Tuple("Network", "LoadBalancers", "2019-04-01"), - new Tuple("Network", "LocalNetworkGateways", "2019-04-01"), - new Tuple("Network", "NatGateways", "2019-04-01"), - new Tuple("Network", "NetworkInterfaceIPConfigurations", "2019-04-01"), - new Tuple("Network", "NetworkInterfaceLoadBalancers", "2019-04-01"), - new Tuple("Network", "NetworkInterfaceTapConfigurations", "2019-04-01"), - new Tuple("Network", "NetworkInterfaces", "2019-04-01"), - new Tuple("Network", "NetworkProfiles", "2019-04-01"), - new Tuple("Network", "NetworkSecurityGroups", "2019-04-01"), - new Tuple("Network", "NetworkWatchers", "2019-04-01"), - new Tuple("Network", "Operations", "2019-04-01"), - new Tuple("Network", "P2sVpnGateways", "2019-04-01"), - new Tuple("Network", "P2sVpnServerConfigurations", "2019-04-01"), - new Tuple("Network", "PacketCaptures", "2019-04-01"), - new Tuple("Network", "PeerExpressRouteCircuitConnections", "2019-04-01"), - new Tuple("Network", "PrivateEndpoints", "2019-04-01"), - new Tuple("Network", "PrivateLinkServices", "2019-04-01"), - new Tuple("Network", "PublicIPAddresses", "2019-04-01"), - new Tuple("Network", "PublicIPPrefixes", "2019-04-01"), - new Tuple("Network", "ResourceNavigationLinks", "2019-04-01"), - new Tuple("Network", "RouteFilterRules", "2019-04-01"), - new Tuple("Network", "RouteFilters", "2019-04-01"), - new Tuple("Network", "RouteTables", "2019-04-01"), - new Tuple("Network", "Routes", "2019-04-01"), - new Tuple("Network", "SecurityRules", "2019-04-01"), - new Tuple("Network", "ServiceAssociationLinks", "2019-04-01"), - new Tuple("Network", "ServiceEndpointPolicies", "2019-04-01"), - new Tuple("Network", "ServiceEndpointPolicyDefinitions", "2019-04-01"), - new Tuple("Network", "ServiceTags", "2019-04-01"), - new Tuple("Network", "Subnets", "2019-04-01"), - new Tuple("Network", "SupportedSecurityProviders", "2019-04-01"), - new Tuple("Network", "Usages", "2019-04-01"), - new Tuple("Network", "VirtualHubs", "2019-04-01"), - new Tuple("Network", "VirtualNetworkGatewayConnections", "2019-04-01"), - new Tuple("Network", "VirtualNetworkGateways", "2019-04-01"), - new Tuple("Network", "VirtualNetworkPeerings", "2019-04-01"), - new Tuple("Network", "VirtualNetworkTaps", "2019-04-01"), - new Tuple("Network", "VirtualNetworks", "2019-04-01"), - new Tuple("Network", "VirtualWans", "2019-04-01"), - new Tuple("Network", "VpnConnections", "2019-04-01"), - new Tuple("Network", "VpnGateways", "2019-04-01"), - new Tuple("Network", "VpnSites", "2019-04-01"), - new Tuple("Network", "VpnSitesConfiguration", "2019-04-01"), - new Tuple("Network", "WebApplicationFirewallPolicies", "2019-04-01"), + new Tuple("Network", "ApplicationGateways", "2019-06-01"), + new Tuple("Network", "ApplicationSecurityGroups", "2019-06-01"), + new Tuple("Network", "AvailableDelegations", "2019-06-01"), + new Tuple("Network", "AvailableEndpointServices", "2019-06-01"), + new Tuple("Network", "AvailablePrivateEndpointTypes", "2019-06-01"), + new Tuple("Network", "AvailableResourceGroupDelegations", "2019-06-01"), + new Tuple("Network", "AzureFirewallFqdnTags", "2019-06-01"), + new Tuple("Network", "AzureFirewalls", "2019-06-01"), + new Tuple("Network", "BastionHosts", "2019-06-01"), + new Tuple("Network", "BgpServiceCommunities", "2019-06-01"), + new Tuple("Network", "CheckDnsNameAvailability", "2019-06-01"), + new Tuple("Network", "ConnectionMonitors", "2019-06-01"), + new Tuple("Network", "DdosCustomPolicies", "2019-06-01"), + new Tuple("Network", "DdosProtectionPlans", "2019-06-01"), + new Tuple("Network", "DefaultSecurityRules", "2019-06-01"), + new Tuple("Network", "ExpressRouteCircuitAuthorizations", "2019-06-01"), + new Tuple("Network", "ExpressRouteCircuitConnections", "2019-06-01"), + new Tuple("Network", "ExpressRouteCircuitPeerings", "2019-06-01"), + new Tuple("Network", "ExpressRouteCircuits", "2019-06-01"), + new Tuple("Network", "ExpressRouteConnections", "2019-06-01"), + new Tuple("Network", "ExpressRouteCrossConnectionPeerings", "2019-06-01"), + new Tuple("Network", "ExpressRouteCrossConnections", "2019-06-01"), + new Tuple("Network", "ExpressRouteGateways", "2019-06-01"), + new Tuple("Network", "ExpressRouteLinks", "2019-06-01"), + new Tuple("Network", "ExpressRoutePorts", "2019-06-01"), + new Tuple("Network", "ExpressRoutePortsLocations", "2019-06-01"), + new Tuple("Network", "ExpressRouteServiceProviders", "2019-06-01"), + new Tuple("Network", "HubVirtualNetworkConnections", "2019-06-01"), + new Tuple("Network", "InboundNatRules", "2019-06-01"), + new Tuple("Network", "LoadBalancerBackendAddressPools", "2019-06-01"), + new Tuple("Network", "LoadBalancerFrontendIPConfigurations", "2019-06-01"), + new Tuple("Network", "LoadBalancerLoadBalancingRules", "2019-06-01"), + new Tuple("Network", "LoadBalancerNetworkInterfaces", "2019-06-01"), + new Tuple("Network", "LoadBalancerOutboundRules", "2019-06-01"), + new Tuple("Network", "LoadBalancerProbes", "2019-06-01"), + new Tuple("Network", "LoadBalancers", "2019-06-01"), + new Tuple("Network", "LocalNetworkGateways", "2019-06-01"), + new Tuple("Network", "NatGateways", "2019-06-01"), + new Tuple("Network", "NetworkInterfaceIPConfigurations", "2019-06-01"), + new Tuple("Network", "NetworkInterfaceLoadBalancers", "2019-06-01"), + new Tuple("Network", "NetworkInterfaceTapConfigurations", "2019-06-01"), + new Tuple("Network", "NetworkInterfaces", "2019-06-01"), + new Tuple("Network", "NetworkProfiles", "2019-06-01"), + new Tuple("Network", "NetworkSecurityGroups", "2019-06-01"), + new Tuple("Network", "NetworkWatchers", "2019-06-01"), + new Tuple("Network", "Operations", "2019-06-01"), + new Tuple("Network", "P2sVpnGateways", "2019-06-01"), + new Tuple("Network", "P2sVpnServerConfigurations", "2019-06-01"), + new Tuple("Network", "PacketCaptures", "2019-06-01"), + new Tuple("Network", "PeerExpressRouteCircuitConnections", "2019-06-01"), + new Tuple("Network", "PrivateEndpoints", "2019-06-01"), + new Tuple("Network", "PrivateLinkServices", "2019-06-01"), + new Tuple("Network", "PublicIPAddresses", "2019-06-01"), + new Tuple("Network", "PublicIPPrefixes", "2019-06-01"), + new Tuple("Network", "ResourceNavigationLinks", "2019-06-01"), + new Tuple("Network", "RouteFilterRules", "2019-06-01"), + new Tuple("Network", "RouteFilters", "2019-06-01"), + new Tuple("Network", "RouteTables", "2019-06-01"), + new Tuple("Network", "Routes", "2019-06-01"), + new Tuple("Network", "SecurityRules", "2019-06-01"), + new Tuple("Network", "ServiceAssociationLinks", "2019-06-01"), + new Tuple("Network", "ServiceEndpointPolicies", "2019-06-01"), + new Tuple("Network", "ServiceEndpointPolicyDefinitions", "2019-06-01"), + new Tuple("Network", "ServiceTags", "2019-06-01"), + new Tuple("Network", "Subnets", "2019-06-01"), + new Tuple("Network", "SupportedSecurityProviders", "2019-06-01"), + new Tuple("Network", "Usages", "2019-06-01"), + new Tuple("Network", "VirtualHubs", "2019-06-01"), + new Tuple("Network", "VirtualNetworkGatewayConnections", "2019-06-01"), + new Tuple("Network", "VirtualNetworkGateways", "2019-06-01"), + new Tuple("Network", "VirtualNetworkPeerings", "2019-06-01"), + new Tuple("Network", "VirtualNetworkTaps", "2019-06-01"), + new Tuple("Network", "VirtualNetworks", "2019-06-01"), + new Tuple("Network", "VirtualWans", "2019-06-01"), + new Tuple("Network", "VpnConnections", "2019-06-01"), + new Tuple("Network", "VpnGateways", "2019-06-01"), + new Tuple("Network", "VpnLinkConnections", "2019-06-01"), + new Tuple("Network", "VpnSiteLinkConnections", "2019-06-01"), + new Tuple("Network", "VpnSiteLinks", "2019-06-01"), + new Tuple("Network", "VpnSites", "2019-06-01"), + new Tuple("Network", "VpnSitesConfiguration", "2019-06-01"), + new Tuple("Network", "WebApplicationFirewallPolicies", "2019-06-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\private\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "b98c145cd4ca14f747c944261a9625cf3a56ff37"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs index 6e6f6db8af791..1adc1ef24f321 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs @@ -126,7 +126,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs index 6c623cb875bd6..195e79a0ef3cd 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs @@ -101,7 +101,7 @@ internal ServiceAssociationLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs index e475a684007aa..0fb80b8d4fa51 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs @@ -119,7 +119,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -355,7 +355,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -538,7 +538,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -727,7 +727,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -911,7 +911,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1137,7 +1137,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs index 31d32fb907f9f..fb56364fde3e2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs @@ -127,7 +127,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -353,7 +353,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -745,7 +745,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs index 0fec3539db8a8..6addc5e6580d9 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs @@ -87,7 +87,7 @@ internal ServiceTagsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs index af3f9fb8ec211..f4058762ffbb5 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs @@ -129,7 +129,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -386,7 +386,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -584,7 +584,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -776,7 +776,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1008,7 +1008,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs index 02605febdf7b8..3fc693e769472 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs @@ -94,7 +94,7 @@ internal UsagesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs index d8c4d72853093..a78a36e27399d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs @@ -94,7 +94,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -349,7 +349,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -522,7 +522,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -936,7 +936,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1147,7 +1147,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs index e7435920ac83d..2a076374d44e8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs @@ -121,7 +121,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -393,7 +393,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -581,7 +581,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -815,7 +815,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1031,7 +1031,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1214,7 +1214,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1430,7 +1430,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1664,7 +1664,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs index 81ef389f869ae..05167bd0592a2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs @@ -120,7 +120,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -546,7 +546,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -761,6 +761,104 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// package operation. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GeneratevpnclientpackageWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGeneratevpnclientpackageWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Generates VPN profile for P2S client of the virtual network gateway in the + /// specified resource group. Used for IKEV2 and radius based authentication. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GenerateVpnProfileWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGenerateVpnProfileWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets pre-generated VPN profile for P2S client of the virtual network + /// gateway in the specified resource group. The profile needs to be generated + /// first using generateVpnProfile. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GetVpnProfilePackageUrlWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGetVpnProfilePackageUrlWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The GetBgpPeerStatus operation retrieves the status of all BGP peers. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The IP address of the peer to retrieve the status of. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GetBgpPeerStatusWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peer = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGetBgpPeerStatusWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peer, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a xml format representation for supported vpn devices. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// /// Headers that will be added to request. /// /// @@ -781,7 +879,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GeneratevpnclientpackageWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> SupportedVpnDevicesWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -791,15 +889,11 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -809,14 +903,13 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Generatevpnclientpackage", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "SupportedVpnDevices", 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -863,12 +956,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -889,7 +976,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -957,8 +1044,58 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Generates VPN profile for P2S client of the virtual network gateway in the - /// specified resource group. Used for IKEV2 and radius based authentication. + /// This operation retrieves a list of routes the virtual network gateway has + /// learned, including routes learned from BGP peers. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GetLearnedRoutesWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGetLearnedRoutesWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation retrieves a list of routes the virtual network gateway is + /// advertising to the specified peer. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The IP address of the peer. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GetAdvertisedRoutesWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peer, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGetAdvertisedRoutesWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peer, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + /// for P2S client of virtual network gateway in the specified resource group + /// through Network resource provider. /// /// /// The name of the resource group. @@ -966,9 +1103,59 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// + /// + /// Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual + /// Network Gateway P2S client operation through Network resource provider. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> SetVpnclientIpsecParametersWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientIPsecParameters vpnclientIpsecParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSetVpnclientIpsecParametersWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The Get VpnclientIpsecParameters operation retrieves information about the + /// vpnclient ipsec policy for P2S client of virtual network gateway in the + /// specified resource group through Network resource provider. + /// + /// + /// The name of the resource group. + /// + /// + /// The virtual network gateway name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GetVpnclientIpsecParametersWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGetVpnclientIpsecParametersWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a xml format representation for vpn device configuration script. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway connection for which the + /// configuration script is generated. + /// /// - /// Parameters supplied to the generate virtual network gateway VPN client - /// package operation. + /// Parameters supplied to the generate vpn device script operation. /// /// /// Headers that will be added to request. @@ -991,15 +1178,15 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GenerateVpnProfileWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> VpnDeviceConfigurationScriptWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (virtualNetworkGatewayName == null) + if (virtualNetworkGatewayConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); + throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayConnectionName"); } if (parameters == null) { @@ -1009,7 +1196,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1018,17 +1205,17 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("virtualNetworkGatewayConnectionName", virtualNetworkGatewayConnectionName); tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateVpnProfile", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "VpnDeviceConfigurationScript", 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); + _url = _url.Replace("{virtualNetworkGatewayConnectionName}", System.Uri.EscapeDataString(virtualNetworkGatewayConnectionName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -1099,7 +1286,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1167,9 +1354,8 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Gets pre-generated VPN profile for P2S client of the virtual network - /// gateway in the specified resource group. The profile needs to be generated - /// first using generateVpnProfile. + /// Get VPN client connection health detail per P2S client connection of the + /// virtual network gateway in the specified resource group. /// /// /// The name of the resource group. @@ -1183,15 +1369,16 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The cancellation token. /// - public async Task> GetVpnProfilePackageUrlWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetVpnclientConnectionHealthWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginGetVpnProfilePackageUrlWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginGetVpnclientConnectionHealthWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// The GetBgpPeerStatus operation retrieves the status of all BGP peers. + /// Creates or updates a virtual network gateway in the specified resource + /// group. /// /// /// The name of the resource group. @@ -1199,30 +1386,8 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// - /// - /// The IP address of the peer to retrieve the status of. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> GetBgpPeerStatusWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peer = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginGetBgpPeerStatusWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peer, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a xml format representation for supported vpn devices. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual network gateway. + /// + /// Parameters supplied to create or update virtual network gateway operation. /// /// /// Headers that will be added to request. @@ -1245,7 +1410,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> SupportedVpnDevicesWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1255,11 +1420,15 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1269,13 +1438,14 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SupportedVpnDevices", tracingParameters); + 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -1291,7 +1461,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1322,6 +1492,12 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -1342,7 +1518,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 201) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1377,7 +1553,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1390,7 +1566,25 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _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) { @@ -1410,58 +1604,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// This operation retrieves a list of routes the virtual network gateway has - /// learned, including routes learned from BGP peers. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual network gateway. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> GetLearnedRoutesWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginGetLearnedRoutesWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// This operation retrieves a list of routes the virtual network gateway is - /// advertising to the specified peer. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual network gateway. - /// - /// - /// The IP address of the peer. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> GetAdvertisedRoutesWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peer, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginGetAdvertisedRoutesWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peer, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy - /// for P2S client of virtual network gateway in the specified resource group - /// through Network resource provider. + /// Deletes the specified virtual network gateway. /// /// /// The name of the resource group. @@ -1469,60 +1612,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// - /// - /// Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual - /// Network Gateway P2S client operation through Network resource provider. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> SetVpnclientIpsecParametersWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientIPsecParameters vpnclientIpsecParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSetVpnclientIpsecParametersWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The Get VpnclientIpsecParameters operation retrieves information about the - /// vpnclient ipsec policy for P2S client of virtual network gateway in the - /// specified resource group through Network resource provider. - /// - /// - /// The name of the resource group. - /// - /// - /// The virtual network gateway name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> GetVpnclientIpsecParametersWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginGetVpnclientIpsecParametersWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a xml format representation for vpn device configuration script. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual network gateway connection for which the - /// configuration script is generated. - /// - /// - /// Parameters supplied to the generate vpn device script operation. - /// /// /// Headers that will be added to request. /// @@ -1532,9 +1621,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -1544,25 +1630,21 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> VpnDeviceConfigurationScriptWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (virtualNetworkGatewayConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayConnectionName"); - } - if (parameters == null) + if (virtualNetworkGatewayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1571,17 +1653,16 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("virtualNetworkGatewayConnectionName", virtualNetworkGatewayConnectionName); - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "VpnDeviceConfigurationScript", tracingParameters); + 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.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{virtualNetworkGatewayConnectionName}", System.Uri.EscapeDataString(virtualNetworkGatewayConnectionName)); + _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) @@ -1595,7 +1676,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.Method = new HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1620,18 +1701,12 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { _httpRequest.Headers.Remove(_header.Key); } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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"); + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } } + + // Serialize Request + string _requestContent = null; // Set Credentials if (Client.Credentials != null) { @@ -1652,7 +1727,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + 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 @@ -1687,31 +1762,13 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -1720,31 +1777,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Get VPN client connection health detail per P2S client connection of the - /// virtual network gateway in the specified resource group. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual network gateway. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> GetVpnclientConnectionHealthWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginGetVpnclientConnectionHealthWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates or updates a virtual network gateway in the specified resource - /// group. + /// Updates a virtual network gateway tags. /// /// /// The name of the resource group. @@ -1753,7 +1786,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// The name of the virtual network gateway. /// /// - /// Parameters supplied to create or update virtual network gateway operation. + /// Parameters supplied to update virtual network gateway tags. /// /// /// Headers that will be added to request. @@ -1776,7 +1809,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1794,7 +1827,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1807,7 +1840,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -1827,7 +1860,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1884,7 +1917,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1944,24 +1977,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) 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); @@ -1970,7 +1985,8 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Deletes the specified virtual network gateway. + /// Resets the primary of the virtual network gateway in the specified resource + /// group. /// /// /// The name of the resource group. @@ -1978,6 +1994,10 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// + /// + /// Virtual network gateway vip address supplied to the begin reset of the + /// active-active feature enabled gateway. + /// /// /// Headers that will be added to request. /// @@ -1987,6 +2007,9 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1996,7 +2019,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string gatewayVip = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2010,7 +2033,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2020,17 +2043,22 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("gatewayVip", gatewayVip); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginReset", 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (gatewayVip != null) + { + _queryParameters.Add(string.Format("gatewayVip={0}", System.Uri.EscapeDataString(gatewayVip))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2042,7 +2070,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2093,7 +2121,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2128,13 +2156,31 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -2143,7 +2189,8 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Updates a virtual network gateway tags. + /// Resets the VPN client shared key of the virtual network gateway in the + /// specified resource group. /// /// /// The name of the resource group. @@ -2151,9 +2198,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// - /// - /// Parameters supplied to update virtual network gateway tags. - /// /// /// Headers that will be added to request. /// @@ -2163,9 +2207,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -2175,7 +2216,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginResetVpnClientSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2185,15 +2226,11 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2203,14 +2240,13 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginResetVpnClientSharedKey", 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -2226,7 +2262,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -2257,12 +2293,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -2283,7 +2313,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2318,31 +2348,13 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -2351,8 +2363,8 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Resets the primary of the virtual network gateway in the specified resource - /// group. + /// Generates VPN client package for P2S client of the virtual network gateway + /// in the specified resource group. /// /// /// The name of the resource group. @@ -2360,9 +2372,9 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// - /// - /// Virtual network gateway vip address supplied to the begin reset of the - /// active-active feature enabled gateway. + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. /// /// /// Headers that will be added to request. @@ -2385,7 +2397,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string gatewayVip = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginGeneratevpnclientpackageWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2395,11 +2407,15 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2409,22 +2425,18 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); - tracingParameters.Add("gatewayVip", gatewayVip); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginReset", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginGeneratevpnclientpackage", 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (gatewayVip != null) - { - _queryParameters.Add(string.Format("gatewayVip={0}", System.Uri.EscapeDataString(gatewayVip))); - } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2467,6 +2479,12 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -2522,7 +2540,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -2535,7 +2553,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -2555,8 +2573,8 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) } /// - /// Resets the VPN client shared key of the virtual network gateway in the - /// specified resource group. + /// Generates VPN profile for P2S client of the virtual network gateway in the + /// specified resource group. Used for IKEV2 and radius based authentication. /// /// /// The name of the resource group. @@ -2564,6 +2582,10 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// The name of the virtual network gateway. /// + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. + /// /// /// Headers that will be added to request. /// @@ -2573,6 +2595,9 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -2582,7 +2607,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginResetVpnClientSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginGenerateVpnProfileWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2592,11 +2617,15 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2606,13 +2635,14 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResetVpnClientSharedKey", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginGenerateVpnProfile", 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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -2659,6 +2689,12 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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) { @@ -2714,13 +2750,31 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + 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); @@ -2774,7 +2828,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2971,7 +3025,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3171,7 +3225,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3373,7 +3427,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3586,7 +3640,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3789,7 +3843,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3984,7 +4038,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperationsExtensions.cs index 06999ee3c8826..0d46e929179ed 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperationsExtensions.cs @@ -1081,6 +1081,106 @@ public static void BeginResetVpnClientSharedKey(this IVirtualNetworkGatewaysOper (await operations.BeginResetVpnClientSharedKeyWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Generates VPN client package for P2S client of the virtual network gateway + /// in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. + /// + public static string BeginGeneratevpnclientpackage(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters) + { + return operations.BeginGeneratevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Generates VPN client package for P2S client of the virtual network gateway + /// in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginGeneratevpnclientpackageAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginGeneratevpnclientpackageWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Generates VPN profile for P2S client of the virtual network gateway in the + /// specified resource group. Used for IKEV2 and radius based authentication. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. + /// + public static string BeginGenerateVpnProfile(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters) + { + return operations.BeginGenerateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Generates VPN profile for P2S client of the virtual network gateway in the + /// specified resource group. Used for IKEV2 and radius based authentication. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Parameters supplied to the generate virtual network gateway VPN client + /// package operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginGenerateVpnProfileAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, VpnClientParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginGenerateVpnProfileWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets pre-generated VPN profile for P2S client of the virtual network /// gateway in the specified resource group. The profile needs to be generated diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs index 669d0425cfd7c..cb13c91dacfc8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs @@ -126,7 +126,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -742,7 +742,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs index bd9108bd0d73c..8ab729734100c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs @@ -116,7 +116,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -529,7 +529,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -718,7 +718,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -901,7 +901,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1127,7 +1127,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs index 2cbf58a69de85..0be4518e46571 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs @@ -119,7 +119,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -736,7 +736,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -935,7 +935,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1126,7 +1126,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1309,7 +1309,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1535,7 +1535,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs index cb1effc244d3c..e73ea313b2c25 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs @@ -94,7 +94,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -349,7 +349,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -522,7 +522,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "wANParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -936,7 +936,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "wANParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1147,7 +1147,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualWANName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs index b087f9ba46556..d5854de9c1c58 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs @@ -101,7 +101,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -550,7 +550,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnConnectionParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -770,7 +770,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs index 7d53bdac59574..3c86761d9ae6a 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs @@ -94,7 +94,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -371,7 +371,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -544,7 +544,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -737,7 +737,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnGatewayParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -958,7 +958,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnGatewayParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1169,7 +1169,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1340,7 +1340,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupPrivateEndpointTypesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs similarity index 82% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupPrivateEndpointTypesOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs index 321f3a674ed47..3643fe2d2ad02 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupPrivateEndpointTypesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs @@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; /// - /// AvailableResourceGroupPrivateEndpointTypesOperations operations. + /// VpnLinkConnectionsOperations operations. /// - internal partial class AvailableResourceGroupPrivateEndpointTypesOperations : IServiceOperations, IAvailableResourceGroupPrivateEndpointTypesOperations + internal partial class VpnLinkConnectionsOperations : IServiceOperations, IVpnLinkConnectionsOperations { /// - /// Initializes a new instance of the AvailableResourceGroupPrivateEndpointTypesOperations class. + /// Initializes a new instance of the VpnLinkConnectionsOperations class. /// /// /// Reference to the service client. @@ -36,7 +36,7 @@ internal partial class AvailableResourceGroupPrivateEndpointTypesOperations : IS /// /// Thrown when a required parameter is null /// - internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementClient client) + internal VpnLinkConnectionsOperations(NetworkManagementClient client) { if (client == null) { @@ -51,14 +51,17 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC public NetworkManagementClient Client { get; private set; } /// - /// Returns all of the resource types that can be linked to a Private Endpoint - /// in this subscription in this region. + /// Retrieves all vpn site link connections for a particular virtual wan vpn + /// gateway vpn connection. /// - /// - /// The location of the domain name. - /// /// - /// The name of the resource group. + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. /// /// /// Headers that will be added to request. @@ -66,7 +69,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -81,21 +84,25 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByVpnConnectionWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (location == null) + if (Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + if (gatewayName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2019-04-01"; + if (connectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); + } + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -103,18 +110,20 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("location", location); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionName", connectionName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByVpnConnection", 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.Network/locations/{location}/availablePrivateEndpointTypes").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{connectionName}", System.Uri.EscapeDataString(connectionName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -180,14 +189,13 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorException(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); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -197,10 +205,6 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC } 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); @@ -213,7 +217,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -226,7 +230,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -246,8 +250,8 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC } /// - /// Returns all of the resource types that can be linked to a Private Endpoint - /// in this subscription in this region. + /// Retrieves all vpn site link connections for a particular virtual wan vpn + /// gateway vpn connection. /// /// /// The NextLink from the previous successful call to List operation. @@ -258,7 +262,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -273,7 +277,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByVpnConnectionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextPageLink == null) { @@ -288,7 +292,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "ListByVpnConnectionNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -354,14 +358,13 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorException(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); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -371,10 +374,6 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC } 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); @@ -387,7 +386,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -400,7 +399,7 @@ internal AvailableResourceGroupPrivateEndpointTypesOperations(NetworkManagementC _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs new file mode 100644 index 0000000000000..112f6855f45bc --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs @@ -0,0 +1,109 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for VpnLinkConnectionsOperations. + /// + public static partial class VpnLinkConnectionsOperationsExtensions + { + /// + /// Retrieves all vpn site link connections for a particular virtual wan vpn + /// gateway vpn connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + public static IPage ListByVpnConnection(this IVpnLinkConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName) + { + return operations.ListByVpnConnectionAsync(resourceGroupName, gatewayName, connectionName).GetAwaiter().GetResult(); + } + + /// + /// Retrieves all vpn site link connections for a particular virtual wan vpn + /// gateway vpn connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByVpnConnectionAsync(this IVpnLinkConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByVpnConnectionWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieves all vpn site link connections for a particular virtual wan vpn + /// gateway vpn connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByVpnConnectionNext(this IVpnLinkConnectionsOperations operations, string nextPageLink) + { + return operations.ListByVpnConnectionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Retrieves all vpn site link connections for a particular virtual wan vpn + /// gateway vpn connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByVpnConnectionNextAsync(this IVpnLinkConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByVpnConnectionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs new file mode 100644 index 0000000000000..922803cc97f53 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs @@ -0,0 +1,261 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// VpnSiteLinkConnectionsOperations operations. + /// + internal partial class VpnSiteLinkConnectionsOperations : IServiceOperations, IVpnSiteLinkConnectionsOperations + { + /// + /// Initializes a new instance of the VpnSiteLinkConnectionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal VpnSiteLinkConnectionsOperations(NetworkManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the NetworkManagementClient + /// + public NetworkManagementClient Client { get; private set; } + + /// + /// Retrieves the details of a vpn site link connection. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The name of the vpn connection. + /// + /// + /// 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 gatewayName, string connectionName, string linkConnectionName, 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 (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (connectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); + } + if (linkConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkConnectionName"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("connectionName", connectionName); + tracingParameters.Add("linkConnectionName", linkConnectionName); + tracingParameters.Add("apiVersion", apiVersion); + 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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{connectionName}", System.Uri.EscapeDataString(connectionName)); + _url = _url.Replace("{linkConnectionName}", System.Uri.EscapeDataString(linkConnectionName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperationsExtensions.cs new file mode 100644 index 0000000000000..834fd986c4ab0 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperationsExtensions.cs @@ -0,0 +1,77 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for VpnSiteLinkConnectionsOperations. + /// + public static partial class VpnSiteLinkConnectionsOperationsExtensions + { + /// + /// Retrieves the details of a vpn site link connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The name of the vpn connection. + /// + public static VpnSiteLinkConnection Get(this IVpnSiteLinkConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName) + { + return operations.GetAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Retrieves the details of a vpn site link connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The name of the vpn connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IVpnSiteLinkConnectionsOperations operations, string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs new file mode 100644 index 0000000000000..eda0cb4cbd1f6 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs @@ -0,0 +1,609 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// VpnSiteLinksOperations operations. + /// + internal partial class VpnSiteLinksOperations : IServiceOperations, IVpnSiteLinksOperations + { + /// + /// Initializes a new instance of the VpnSiteLinksOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal VpnSiteLinksOperations(NetworkManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the NetworkManagementClient + /// + public NetworkManagementClient Client { get; private set; } + + /// + /// Retrieves the details of a VPN site link. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// The name of the VpnSiteLink being retrieved. + /// + /// + /// 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 vpnSiteName, string vpnSiteLinkName, 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 (vpnSiteName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); + } + if (vpnSiteLinkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteLinkName"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vpnSiteName", vpnSiteName); + tracingParameters.Add("vpnSiteLinkName", vpnSiteLinkName); + tracingParameters.Add("apiVersion", apiVersion); + 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.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vpnSiteName}", System.Uri.EscapeDataString(vpnSiteName)); + _url = _url.Replace("{vpnSiteLinkName}", System.Uri.EscapeDataString(vpnSiteLinkName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// 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>> ListByVpnSiteWithHttpMessagesAsync(string resourceGroupName, string vpnSiteName, 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 (vpnSiteName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); + } + string apiVersion = "2019-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vpnSiteName", vpnSiteName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByVpnSite", 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.Network/vpnSites/{vpnSiteName}/vpnSiteLinks").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vpnSiteName}", System.Uri.EscapeDataString(vpnSiteName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// 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>> ListByVpnSiteNextWithHttpMessagesAsync(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, "ListByVpnSiteNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperationsExtensions.cs new file mode 100644 index 0000000000000..cdb09422514f5 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperationsExtensions.cs @@ -0,0 +1,145 @@ +// +// 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.Network +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for VpnSiteLinksOperations. + /// + public static partial class VpnSiteLinksOperationsExtensions + { + /// + /// Retrieves the details of a VPN site link. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// The name of the VpnSiteLink being retrieved. + /// + public static VpnSiteLink Get(this IVpnSiteLinksOperations operations, string resourceGroupName, string vpnSiteName, string vpnSiteLinkName) + { + return operations.GetAsync(resourceGroupName, vpnSiteName, vpnSiteLinkName).GetAwaiter().GetResult(); + } + + /// + /// Retrieves the details of a VPN site link. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// The name of the VpnSiteLink being retrieved. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IVpnSiteLinksOperations operations, string resourceGroupName, string vpnSiteName, string vpnSiteLinkName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vpnSiteName, vpnSiteLinkName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + public static IPage ListByVpnSite(this IVpnSiteLinksOperations operations, string resourceGroupName, string vpnSiteName) + { + return operations.ListByVpnSiteAsync(resourceGroupName, vpnSiteName).GetAwaiter().GetResult(); + } + + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnSite. + /// + /// + /// The name of the VpnSite. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByVpnSiteAsync(this IVpnSiteLinksOperations operations, string resourceGroupName, string vpnSiteName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByVpnSiteWithHttpMessagesAsync(resourceGroupName, vpnSiteName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByVpnSiteNext(this IVpnSiteLinksOperations operations, string nextPageLink) + { + return operations.ListByVpnSiteNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all the vpnSiteLinks in a resource group for a vpn site. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByVpnSiteNextAsync(this IVpnSiteLinksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByVpnSiteNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs index 43d7ab8b06ed1..7d8fce4a55cbf 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs @@ -131,7 +131,7 @@ internal VpnSitesConfigurationOperations(NetworkManagementClient client) { request.Validate(); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs index d0035b9da9111..852618142ed8f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs @@ -94,7 +94,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -349,7 +349,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -522,7 +522,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -936,7 +936,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteParameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1147,7 +1147,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs index 58c415bd6178f..2df997a6e3d26 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs @@ -87,7 +87,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -265,7 +265,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -462,7 +462,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -671,7 +671,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -916,7 +916,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-04-01"; + string apiVersion = "2019-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Microsoft.Azure.Management.Network.csproj b/sdk/network/Microsoft.Azure.Management.Network/src/Microsoft.Azure.Management.Network.csproj index 09c6b7cba84e4..28171ec20b98b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Microsoft.Azure.Management.Network.csproj +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Microsoft.Azure.Management.Network.csproj @@ -7,15 +7,13 @@ Microsoft.Azure.Management.Network Provides management capabilities for Network services. Microsoft.Azure.Management.Network - 19.12.0-preview + 19.13.0-preview Microsoft Azure Network management;Network;Network management; @@ -25,4 +23,4 @@ - \ No newline at end of file + diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Properties/AssemblyInfo.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Properties/AssemblyInfo.cs index 99889dad031f6..8be0898f1ccc4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Properties/AssemblyInfo.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyDescription("Provides Microsoft Azure Network management functions for managing the Microsoft Azure Network service.")] [assembly: AssemblyVersion("19.5.0.0")] -[assembly: AssemblyFileVersion("19.12.0.0")] +[assembly: AssemblyFileVersion("19.13.0.0")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Microsoft Azure .NET SDK")]