From 5edc1226b722dbde06399fab3827d89bb9a32304 Mon Sep 17 00:00:00 2001 From: Vertika Gupta Date: Thu, 21 Nov 2024 18:24:08 +0530 Subject: [PATCH] Updating the swagger changes with latest API spec merge --- .../AdminRuleCollectionsOperations.cs | 16 +- .../Generated/AdminRulesOperations.cs | 16 +- ...oadBalancerLoadBalancingRulesOperations.cs | 58 + .../IVirtualNetworkGatewaysOperations.cs | 262 ++++ .../Generated/IpamPoolsOperations.cs | 52 +- ...oadBalancerLoadBalancingRulesOperations.cs | 276 +++++ ...rLoadBalancingRulesOperationsExtensions.cs | 90 ++ .../Generated/Models/AdminRule.cs | 18 +- .../Generated/Models/AdminRuleCollection.cs | 27 +- .../Generated/Models/BaseAdminRule.cs | 27 +- .../Generated/Models/BastionHost.cs | 13 +- .../Models/BastionHostIPConfiguration.cs | 5 +- ...tionHostIPConfigurationPropertiesFormat.cs | 11 +- .../Models/BastionHostPropertiesFormat.cs | 13 +- .../Generated/Models/DefaultAdminRule.cs | 18 +- ...ressRouteFailoverCircuitResourceDetails.cs | 65 + ...sRouteFailoverConnectionResourceDetails.cs | 75 ++ .../ExpressRouteFailoverRedundantRoute.cs | 55 + .../ExpressRouteFailoverSingleTestDetails.cs | 122 ++ .../ExpressRouteFailoverStopApiParameters.cs | 68 ++ .../Models/ExpressRouteFailoverTestDetails.cs | 129 ++ .../Models/FailoverConnectionDetails.cs | 67 + .../Models/FailoverConnectionStatus.cs | 19 + .../Generated/Models/FailoverTestStatus.cs | 26 + .../Models/FailoverTestStatusForSingleTest.cs | 26 + .../Generated/Models/FailoverTestType.cs | 20 + .../FirewallPolicyIdpsSignatureDirection.cs | 8 +- .../Models/LoadBalancerHealthPerRule.cs | 73 ++ ...dBalancerHealthPerRulePerBackendAddress.cs | 98 ++ ...BalancerLoadBalancingRulesHealthHeaders.cs | 45 + .../Generated/Models/NetworkInterface.cs | 12 +- .../NetworkInterfacePropertiesFormat.cs | 12 +- .../Models/SecurityAdminConfiguration.cs | 27 +- .../Generated/Models/SingleQueryResult.cs | 7 +- ...atewaysGetFailoverAllTestDetailsHeaders.cs | 45 + ...waysGetFailoverSingleTestDetailsHeaders.cs | 45 + ...pressRouteSiteFailoverSimulationHeaders.cs | 45 + ...pressRouteSiteFailoverSimulationHeaders.cs | 45 + .../NetworkManagerCommitsOperations.cs | 4 +- ...etworkManagerDeploymentStatusOperations.cs | 4 +- .../Generated/NetworkManagersOperations.cs | 16 +- .../ReachabilityAnalysisIntentsOperations.cs | 44 +- .../ReachabilityAnalysisRunsOperations.cs | 44 +- .../Generated/ScopeConnectionsOperations.cs | 16 +- .../SecurityAdminConfigurationsOperations.cs | 16 +- .../Generated/StaticCidrsOperations.cs | 44 +- .../Generated/VerifierWorkspacesOperations.cs | 36 +- .../VirtualNetworkGatewaysOperations.cs | 1081 +++++++++++++++++ ...tualNetworkGatewaysOperationsExtensions.cs | 388 ++++++ src/Network/Network.Management.Sdk/README.md | 2 +- 50 files changed, 3511 insertions(+), 220 deletions(-) create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverCircuitResourceDetails.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverConnectionResourceDetails.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverRedundantRoute.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverSingleTestDetails.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverStopApiParameters.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverTestDetails.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionDetails.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionStatus.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatus.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatusForSingleTest.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/FailoverTestType.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRule.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRulePerBackendAddress.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerLoadBalancingRulesHealthHeaders.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders.cs create mode 100644 src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders.cs diff --git a/src/Network/Network.Management.Sdk/Generated/AdminRuleCollectionsOperations.cs b/src/Network/Network.Management.Sdk/Generated/AdminRuleCollectionsOperations.cs index a74a160265aa..346e849302f8 100644 --- a/src/Network/Network.Management.Sdk/Generated/AdminRuleCollectionsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/AdminRuleCollectionsOperations.cs @@ -104,9 +104,9 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -350,9 +350,9 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -589,9 +589,9 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -880,9 +880,9 @@ internal AdminRuleCollectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) diff --git a/src/Network/Network.Management.Sdk/Generated/AdminRulesOperations.cs b/src/Network/Network.Management.Sdk/Generated/AdminRulesOperations.cs index 09992b04126d..dc26404867e7 100644 --- a/src/Network/Network.Management.Sdk/Generated/AdminRulesOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/AdminRulesOperations.cs @@ -106,9 +106,9 @@ internal AdminRulesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -362,9 +362,9 @@ internal AdminRulesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -611,9 +611,9 @@ internal AdminRulesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -915,9 +915,9 @@ internal AdminRulesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) diff --git a/src/Network/Network.Management.Sdk/Generated/ILoadBalancerLoadBalancingRulesOperations.cs b/src/Network/Network.Management.Sdk/Generated/ILoadBalancerLoadBalancingRulesOperations.cs index 382f567b8c2a..5b3216a491a2 100644 --- a/src/Network/Network.Management.Sdk/Generated/ILoadBalancerLoadBalancingRulesOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/ILoadBalancerLoadBalancingRulesOperations.cs @@ -68,6 +68,64 @@ public partial interface ILoadBalancerLoadBalancingRulesOperations /// System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, string loadBalancingRuleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get health details of a load balancing rule. + /// + /// + /// Get health details of a load balancing rule. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> HealthWithHttpMessagesAsync(string groupName, string loadBalancerName, string loadBalancingRuleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get health details of a load balancing rule. + /// + /// + /// Get health details of a load balancing rule. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> BeginHealthWithHttpMessagesAsync(string groupName, string loadBalancerName, string loadBalancingRuleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets all the load balancing rules in a load balancer. /// diff --git a/src/Network/Network.Management.Sdk/Generated/IVirtualNetworkGatewaysOperations.cs b/src/Network/Network.Management.Sdk/Generated/IVirtualNetworkGatewaysOperations.cs index 96748ae67d0c..ab8a567152e4 100644 --- a/src/Network/Network.Management.Sdk/Generated/IVirtualNetworkGatewaysOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/IVirtualNetworkGatewaysOperations.cs @@ -594,6 +594,137 @@ public partial interface IVirtualNetworkGatewaysOperations /// System.Threading.Tasks.Task> StopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnPacketCaptureStopParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + /// + /// 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 + /// + System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders>> GetFailoverAllTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + /// + /// 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 + /// + System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders>> GetFailoverSingleTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> StartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Virtual network gateway stop simulation parameters supplied to stop + /// failover simulation on gateway. + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> StopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get VPN client connection health detail per P2S client connection of the /// virtual network gateway in the specified resource group. @@ -1100,6 +1231,137 @@ public partial interface IVirtualNetworkGatewaysOperations /// System.Threading.Tasks.Task> BeginStopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VpnPacketCaptureStopParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + /// + /// 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 + /// + System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders>> BeginGetFailoverAllTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + /// + /// 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 + /// + System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders>> BeginGetFailoverSingleTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> BeginStartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Virtual network gateway stop simulation parameters supplied to stop + /// failover simulation on gateway. + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> BeginStopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get VPN client connection health detail per P2S client connection of the /// virtual network gateway in the specified resource group. diff --git a/src/Network/Network.Management.Sdk/Generated/IpamPoolsOperations.cs b/src/Network/Network.Management.Sdk/Generated/IpamPoolsOperations.cs index 82dc3ed6b07d..580688c5ffc8 100644 --- a/src/Network/Network.Management.Sdk/Generated/IpamPoolsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/IpamPoolsOperations.cs @@ -105,9 +105,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } @@ -380,9 +380,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -391,9 +391,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -614,9 +614,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -625,9 +625,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -866,9 +866,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -877,9 +877,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -1093,9 +1093,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -1104,9 +1104,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -1331,9 +1331,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -1342,9 +1342,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -1593,9 +1593,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -1604,9 +1604,9 @@ internal IpamPoolsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; diff --git a/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperations.cs b/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperations.cs index 4c291bd2ce02..3c9846764893 100644 --- a/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperations.cs @@ -467,6 +467,282 @@ internal LoadBalancerLoadBalancingRulesOperations (NetworkManagementClient clien + } + /// + /// Get health details of a load balancing rule. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> HealthWithHttpMessagesAsync(string groupName, string loadBalancerName, string loadBalancingRuleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginHealthWithHttpMessagesAsync(groupName, loadBalancerName, loadBalancingRuleName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get health details of a load balancing rule. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginHealthWithHttpMessagesAsync(string groupName, string loadBalancerName, string loadBalancingRuleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (groupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "groupName"); + } + if (groupName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(groupName, "^[a-z][a-z0-9]*$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "groupName", "^[a-z][a-z0-9]*$"); + } + } + if (loadBalancerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "loadBalancerName"); + } + if (loadBalancerName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(loadBalancerName, "^[a-z][a-z0-9]*$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "loadBalancerName", "^[a-z][a-z0-9]*$"); + } + } + if (loadBalancingRuleName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "loadBalancingRuleName"); + } + if (loadBalancingRuleName != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(loadBalancingRuleName, "^[a-z][a-z0-9]*$")) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "loadBalancingRuleName", "^[a-z][a-z0-9]*$"); + } + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + string apiVersion = "2024-05-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("groupName", groupName); + tracingParameters.Add("loadBalancerName", loadBalancerName); + tracingParameters.Add("loadBalancingRuleName", loadBalancingRuleName); + tracingParameters.Add("apiVersion", apiVersion); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginHealth", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health").ToString(); + _url = _url.Replace("{groupName}", System.Uri.EscapeDataString(groupName)); + _url = _url.Replace("{loadBalancerName}", System.Uri.EscapeDataString(loadBalancerName)); + _url = _url.Replace("{loadBalancingRuleName}", System.Uri.EscapeDataString(loadBalancingRuleName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } /// /// Gets all the load balancing rules in a load balancer. diff --git a/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperationsExtensions.cs b/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperationsExtensions.cs index b3a439047695..884368ae2f71 100644 --- a/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperationsExtensions.cs +++ b/src/Network/Network.Management.Sdk/Generated/LoadBalancerLoadBalancingRulesOperationsExtensions.cs @@ -97,6 +97,96 @@ public static LoadBalancingRule Get(this ILoadBalancerLoadBalancingRulesOperatio } } /// + /// Get health details of a load balancing rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + public static LoadBalancerHealthPerRule Health(this ILoadBalancerLoadBalancingRulesOperations operations, string groupName, string loadBalancerName, string loadBalancingRuleName) + { + return ((ILoadBalancerLoadBalancingRulesOperations)operations).HealthAsync(groupName, loadBalancerName, loadBalancingRuleName).GetAwaiter().GetResult(); + } + + /// + /// Get health details of a load balancing rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task HealthAsync(this ILoadBalancerLoadBalancingRulesOperations operations, string groupName, string loadBalancerName, string loadBalancingRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.HealthWithHttpMessagesAsync(groupName, loadBalancerName, loadBalancingRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get health details of a load balancing rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + public static LoadBalancerHealthPerRule BeginHealth(this ILoadBalancerLoadBalancingRulesOperations operations, string groupName, string loadBalancerName, string loadBalancingRuleName) + { + return ((ILoadBalancerLoadBalancingRulesOperations)operations).BeginHealthAsync(groupName, loadBalancerName, loadBalancingRuleName).GetAwaiter().GetResult(); + } + + /// + /// Get health details of a load balancing rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the load balancer. + /// + /// + /// The name of the load balancing rule. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginHealthAsync(this ILoadBalancerLoadBalancingRulesOperations operations, string groupName, string loadBalancerName, string loadBalancingRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginHealthWithHttpMessagesAsync(groupName, loadBalancerName, loadBalancingRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets all the load balancing rules in a load balancer. /// /// diff --git a/src/Network/Network.Management.Sdk/Generated/Models/AdminRule.cs b/src/Network/Network.Management.Sdk/Generated/Models/AdminRule.cs index df791593116c..a4f52172f563 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/AdminRule.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/AdminRule.cs @@ -26,19 +26,19 @@ public AdminRule() /// Initializes a new instance of the AdminRule class. /// - /// Fully qualified resource ID for the resource. E.g. - /// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// Resource ID. /// - /// The name of the resource + /// Resource name. /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" + /// Resource type. /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy - /// information. + /// A unique read-only string that changes whenever the resource is updated. + /// + + /// The system metadata related to this resource. /// /// The provisioning state of the resource. @@ -76,9 +76,9 @@ public AdminRule() /// Unique identifier for this resource. /// - public AdminRule(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), string protocol = default(string), System.Collections.Generic.IList sources = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinations = default(System.Collections.Generic.IList), System.Collections.Generic.IList sourcePortRanges = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinationPortRanges = default(System.Collections.Generic.IList), string access = default(string), int? priority = default(int?), string direction = default(string), string resourceGuid = default(string)) + public AdminRule(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), string protocol = default(string), System.Collections.Generic.IList sources = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinations = default(System.Collections.Generic.IList), System.Collections.Generic.IList sourcePortRanges = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinationPortRanges = default(System.Collections.Generic.IList), string access = default(string), int? priority = default(int?), string direction = default(string), string resourceGuid = default(string)) - : base(id, name, type, systemData) + : base(id, name, type, etag, systemData) { this.ProvisioningState = provisioningState; this.Description = description; diff --git a/src/Network/Network.Management.Sdk/Generated/Models/AdminRuleCollection.cs b/src/Network/Network.Management.Sdk/Generated/Models/AdminRuleCollection.cs index d54ec8f965e4..d833e1d2f614 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/AdminRuleCollection.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/AdminRuleCollection.cs @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Management.Network.Models /// Defines the admin rule collection. /// [Microsoft.Rest.Serialization.JsonTransformation] - public partial class AdminRuleCollection : CommonProxyResource + public partial class AdminRuleCollection : ChildResource { /// /// Initializes a new instance of the AdminRuleCollection class. @@ -25,19 +25,19 @@ public AdminRuleCollection() /// Initializes a new instance of the AdminRuleCollection class. /// - /// Fully qualified resource ID for the resource. E.g. - /// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// Resource ID. /// - /// The name of the resource + /// Resource name. /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" + /// Resource type. /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy - /// information. + /// A unique read-only string that changes whenever the resource is updated. + /// + + /// The system metadata related to this resource. /// /// The provisioning state of the resource. @@ -52,10 +52,11 @@ public AdminRuleCollection() /// Unique identifier for this resource. /// - public AdminRuleCollection(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), System.Collections.Generic.IList appliesToGroups = default(System.Collections.Generic.IList), string resourceGuid = default(string)) + public AdminRuleCollection(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), System.Collections.Generic.IList appliesToGroups = default(System.Collections.Generic.IList), string resourceGuid = default(string)) - : base(id, name, type, systemData) + : base(id, name, type, etag) { + this.SystemData = systemData; this.ProvisioningState = provisioningState; this.Description = description; this.AppliesToGroups = appliesToGroups; @@ -69,6 +70,12 @@ public AdminRuleCollection() partial void CustomInit(); + /// + /// Gets the system metadata related to this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } + /// /// Gets the provisioning state of the resource. Possible values include: 'Failed', 'Succeeded', 'Canceled', 'Creating', 'Updating', 'Deleting' /// diff --git a/src/Network/Network.Management.Sdk/Generated/Models/BaseAdminRule.cs b/src/Network/Network.Management.Sdk/Generated/Models/BaseAdminRule.cs index 2c99a031031b..dccd493808b2 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/BaseAdminRule.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/BaseAdminRule.cs @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Management.Network.Models /// Network base admin rule. /// [Newtonsoft.Json.JsonObject("BaseAdminRule")] - public partial class BaseAdminRule : CommonProxyResource + public partial class BaseAdminRule : ChildResource { /// /// Initializes a new instance of the BaseAdminRule class. @@ -25,24 +25,25 @@ public BaseAdminRule() /// Initializes a new instance of the BaseAdminRule class. /// - /// Fully qualified resource ID for the resource. E.g. - /// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// Resource ID. /// - /// The name of the resource + /// Resource name. /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" + /// Resource type. /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy - /// information. + /// A unique read-only string that changes whenever the resource is updated. /// - public BaseAdminRule(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData)) - : base(id, name, type, systemData) + /// The system metadata related to this resource. + /// + public BaseAdminRule(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), SystemData systemData = default(SystemData)) + + : base(id, name, type, etag) { + this.SystemData = systemData; CustomInit(); } @@ -51,5 +52,11 @@ public BaseAdminRule() /// partial void CustomInit(); + + /// + /// Gets the system metadata related to this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } } } \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/BastionHost.cs b/src/Network/Network.Management.Sdk/Generated/Models/BastionHost.cs index b3efbfb88fbc..a345d666eafc 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/BastionHost.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/BastionHost.cs @@ -90,7 +90,10 @@ public BastionHost() /// Enable/Disable Session Recording feature of the Bastion Host resource. /// - public BastionHost(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), string etag = default(string), Sku sku = default(Sku), string provisioningState = default(string), System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), string dnsName = default(string), SubResource virtualNetwork = default(SubResource), BastionHostPropertiesFormatNetworkAcls networkAcls = default(BastionHostPropertiesFormatNetworkAcls), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?), bool? enableSessionRecording = default(bool?)) + + /// Enable/Disable Private Only feature of the Bastion Host resource. + /// + public BastionHost(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), string etag = default(string), Sku sku = default(Sku), string provisioningState = default(string), System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), string dnsName = default(string), SubResource virtualNetwork = default(SubResource), BastionHostPropertiesFormatNetworkAcls networkAcls = default(BastionHostPropertiesFormatNetworkAcls), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?), bool? enableSessionRecording = default(bool?), bool? enablePrivateOnlyBastion = default(bool?)) : base(id, name, type, location, tags) { @@ -110,6 +113,7 @@ public BastionHost() this.EnableTunneling = enableTunneling; this.EnableKerberos = enableKerberos; this.EnableSessionRecording = enableSessionRecording; + this.EnablePrivateOnlyBastion = enablePrivateOnlyBastion; CustomInit(); } @@ -220,6 +224,13 @@ public BastionHost() /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableSessionRecording")] public bool? EnableSessionRecording {get; set; } + + /// + /// Gets or sets enable/Disable Private Only feature of the Bastion Host + /// resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enablePrivateOnlyBastion")] + public bool? EnablePrivateOnlyBastion {get; set; } /// /// Validate the object. /// diff --git a/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfiguration.cs b/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfiguration.cs index 8db254afe1b7..5970552b9c3d 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfiguration.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfiguration.cs @@ -45,7 +45,7 @@ public BastionHostIPConfiguration() /// Reference of the subnet resource. /// - /// Reference of the PublicIP resource. + /// Reference of the PublicIP resource. Null for private only bastion /// /// Private IP allocation method. @@ -103,7 +103,8 @@ public BastionHostIPConfiguration() public SubResource Subnet {get; set; } /// - /// Gets or sets reference of the PublicIP resource. + /// Gets or sets reference of the PublicIP resource. Null for private only + /// bastion /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.publicIPAddress")] public SubResource PublicIPAddress {get; set; } diff --git a/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfigurationPropertiesFormat.cs b/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfigurationPropertiesFormat.cs index 7a67d3981fe6..638c3fe4cae1 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfigurationPropertiesFormat.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/BastionHostIPConfigurationPropertiesFormat.cs @@ -27,7 +27,7 @@ public BastionHostIPConfigurationPropertiesFormat() /// Reference of the subnet resource. /// - /// Reference of the PublicIP resource. + /// Reference of the PublicIP resource. Null for private only bastion /// /// The provisioning state of the bastion host IP configuration resource. @@ -36,7 +36,7 @@ public BastionHostIPConfigurationPropertiesFormat() /// Private IP allocation method. /// Possible values include: 'Static', 'Dynamic' - public BastionHostIPConfigurationPropertiesFormat(SubResource subnet, SubResource publicIPAddress, string provisioningState = default(string), string privateIPAllocationMethod = default(string)) + public BastionHostIPConfigurationPropertiesFormat(SubResource subnet, SubResource publicIPAddress = default(SubResource), string provisioningState = default(string), string privateIPAllocationMethod = default(string)) { this.Subnet = subnet; @@ -59,7 +59,8 @@ public BastionHostIPConfigurationPropertiesFormat() public SubResource Subnet {get; set; } /// - /// Gets or sets reference of the PublicIP resource. + /// Gets or sets reference of the PublicIP resource. Null for private only + /// bastion /// [Newtonsoft.Json.JsonProperty(PropertyName = "publicIPAddress")] public SubResource PublicIPAddress {get; set; } @@ -87,10 +88,6 @@ public virtual void Validate() { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Subnet"); } - if (this.PublicIPAddress == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PublicIPAddress"); - } diff --git a/src/Network/Network.Management.Sdk/Generated/Models/BastionHostPropertiesFormat.cs b/src/Network/Network.Management.Sdk/Generated/Models/BastionHostPropertiesFormat.cs index 32593856afcd..966fc5acd12c 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/BastionHostPropertiesFormat.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/BastionHostPropertiesFormat.cs @@ -64,7 +64,10 @@ public BastionHostPropertiesFormat() /// Enable/Disable Session Recording feature of the Bastion Host resource. /// - public BastionHostPropertiesFormat(System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), string dnsName = default(string), SubResource virtualNetwork = default(SubResource), BastionHostPropertiesFormatNetworkAcls networkAcls = default(BastionHostPropertiesFormatNetworkAcls), string provisioningState = default(string), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?), bool? enableSessionRecording = default(bool?)) + + /// Enable/Disable Private Only feature of the Bastion Host resource. + /// + public BastionHostPropertiesFormat(System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), string dnsName = default(string), SubResource virtualNetwork = default(SubResource), BastionHostPropertiesFormatNetworkAcls networkAcls = default(BastionHostPropertiesFormatNetworkAcls), string provisioningState = default(string), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?), bool? enableSessionRecording = default(bool?), bool? enablePrivateOnlyBastion = default(bool?)) { this.IPConfigurations = ipConfigurations; @@ -80,6 +83,7 @@ public BastionHostPropertiesFormat() this.EnableTunneling = enableTunneling; this.EnableKerberos = enableKerberos; this.EnableSessionRecording = enableSessionRecording; + this.EnablePrivateOnlyBastion = enablePrivateOnlyBastion; CustomInit(); } @@ -170,6 +174,13 @@ public BastionHostPropertiesFormat() /// [Newtonsoft.Json.JsonProperty(PropertyName = "enableSessionRecording")] public bool? EnableSessionRecording {get; set; } + + /// + /// Gets or sets enable/Disable Private Only feature of the Bastion Host + /// resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enablePrivateOnlyBastion")] + public bool? EnablePrivateOnlyBastion {get; set; } /// /// Validate the object. /// diff --git a/src/Network/Network.Management.Sdk/Generated/Models/DefaultAdminRule.cs b/src/Network/Network.Management.Sdk/Generated/Models/DefaultAdminRule.cs index c5d50fed3f8d..b5d447909311 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/DefaultAdminRule.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/DefaultAdminRule.cs @@ -26,19 +26,19 @@ public DefaultAdminRule() /// Initializes a new instance of the DefaultAdminRule class. /// - /// Fully qualified resource ID for the resource. E.g. - /// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// Resource ID. /// - /// The name of the resource + /// Resource name. /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" + /// Resource type. /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy - /// information. + /// A unique read-only string that changes whenever the resource is updated. + /// + + /// The system metadata related to this resource. /// /// The provisioning state of the resource. @@ -79,9 +79,9 @@ public DefaultAdminRule() /// Unique identifier for this resource. /// - public DefaultAdminRule(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), string flag = default(string), string protocol = default(string), System.Collections.Generic.IList sources = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinations = default(System.Collections.Generic.IList), System.Collections.Generic.IList sourcePortRanges = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinationPortRanges = default(System.Collections.Generic.IList), string access = default(string), int? priority = default(int?), string direction = default(string), string resourceGuid = default(string)) + public DefaultAdminRule(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), string flag = default(string), string protocol = default(string), System.Collections.Generic.IList sources = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinations = default(System.Collections.Generic.IList), System.Collections.Generic.IList sourcePortRanges = default(System.Collections.Generic.IList), System.Collections.Generic.IList destinationPortRanges = default(System.Collections.Generic.IList), string access = default(string), int? priority = default(int?), string direction = default(string), string resourceGuid = default(string)) - : base(id, name, type, systemData) + : base(id, name, type, etag, systemData) { this.ProvisioningState = provisioningState; this.Description = description; diff --git a/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverCircuitResourceDetails.cs b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverCircuitResourceDetails.cs new file mode 100644 index 000000000000..af22554cf07e --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverCircuitResourceDetails.cs @@ -0,0 +1,65 @@ +// 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 System.Linq; + + public partial class ExpressRouteFailoverCircuitResourceDetails + { + /// + /// Initializes a new instance of the ExpressRouteFailoverCircuitResourceDetails class. + /// + public ExpressRouteFailoverCircuitResourceDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressRouteFailoverCircuitResourceDetails class. + /// + + /// NRP Resource URI of the circuit + /// + + /// Circuit Name + /// + + /// Connection name associated with the circuit + /// + public ExpressRouteFailoverCircuitResourceDetails(string nrpResourceUri = default(string), string name = default(string), string connectionName = default(string)) + + { + this.NrpResourceUri = nrpResourceUri; + this.Name = name; + this.ConnectionName = connectionName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets nRP Resource URI of the circuit + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nrpResourceUri")] + public string NrpResourceUri {get; set; } + + /// + /// Gets or sets circuit Name + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } + + /// + /// Gets or sets connection name associated with the circuit + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "connectionName")] + public string ConnectionName {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverConnectionResourceDetails.cs b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverConnectionResourceDetails.cs new file mode 100644 index 000000000000..f0642f6698c9 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverConnectionResourceDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Network.Models +{ + using System.Linq; + + public partial class ExpressRouteFailoverConnectionResourceDetails + { + /// + /// Initializes a new instance of the ExpressRouteFailoverConnectionResourceDetails class. + /// + public ExpressRouteFailoverConnectionResourceDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressRouteFailoverConnectionResourceDetails class. + /// + + /// NRP Resource URI of the connection + /// + + /// Connection Name + /// + + /// The current status of the connection + /// Possible values include: 'Connected', 'Disconnected' + + /// Time when the connection was last updated + /// + public ExpressRouteFailoverConnectionResourceDetails(string nrpResourceUri = default(string), string name = default(string), string status = default(string), string lastUpdatedTime = default(string)) + + { + this.NrpResourceUri = nrpResourceUri; + this.Name = name; + this.Status = status; + this.LastUpdatedTime = lastUpdatedTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets nRP Resource URI of the connection + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nrpResourceUri")] + public string NrpResourceUri {get; set; } + + /// + /// Gets or sets connection Name + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } + + /// + /// Gets or sets the current status of the connection Possible values include: 'Connected', 'Disconnected' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + + /// + /// Gets or sets time when the connection was last updated + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdatedTime")] + public string LastUpdatedTime {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverRedundantRoute.cs b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverRedundantRoute.cs new file mode 100644 index 000000000000..27f34226ebc0 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverRedundantRoute.cs @@ -0,0 +1,55 @@ +// 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 System.Linq; + + public partial class ExpressRouteFailoverRedundantRoute + { + /// + /// Initializes a new instance of the ExpressRouteFailoverRedundantRoute class. + /// + public ExpressRouteFailoverRedundantRoute() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressRouteFailoverRedundantRoute class. + /// + + /// A list of all the peering locations for the redundant routes + /// + + /// A list of all the redundant routes in the peering locations + /// + public ExpressRouteFailoverRedundantRoute(System.Collections.Generic.IList peeringLocations = default(System.Collections.Generic.IList), System.Collections.Generic.IList routes = default(System.Collections.Generic.IList)) + + { + this.PeeringLocations = peeringLocations; + this.Routes = routes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets a list of all the peering locations for the redundant routes + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "peeringLocations")] + public System.Collections.Generic.IList PeeringLocations {get; set; } + + /// + /// Gets or sets a list of all the redundant routes in the peering locations + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "routes")] + public System.Collections.Generic.IList Routes {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverSingleTestDetails.cs b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverSingleTestDetails.cs new file mode 100644 index 000000000000..4d1c310ef1b8 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverSingleTestDetails.cs @@ -0,0 +1,122 @@ +// 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 System.Linq; + + /// + /// ExpressRoute failover single test details + /// + public partial class ExpressRouteFailoverSingleTestDetails + { + /// + /// Initializes a new instance of the ExpressRouteFailoverSingleTestDetails class. + /// + public ExpressRouteFailoverSingleTestDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressRouteFailoverSingleTestDetails class. + /// + + /// Peering location of the test + /// + + /// The current status of the test + /// Possible values include: 'NotStarted', 'Starting', 'Running', + /// 'StartFailed', 'Stopping', 'Completed', 'StopFailed', 'Invalid', 'Expired' + + /// Time when the test was started + /// + + /// Time when the test was completed + /// + + /// List of routes received from this peering as well as some other peering + /// location + /// + + /// List of al the routes that were received only from this peering location + /// + + /// Whether the failover simulation was successful or not + /// + + /// List of all the failover connections for this peering location + /// + public ExpressRouteFailoverSingleTestDetails(string peeringLocation = default(string), string status = default(string), string startTimeUtc = default(string), string endTimeUtc = default(string), System.Collections.Generic.IList redundantRoutes = default(System.Collections.Generic.IList), System.Collections.Generic.IList nonRedundantRoutes = default(System.Collections.Generic.IList), bool? wasSimulationSuccessful = default(bool?), System.Collections.Generic.IList failoverConnectionDetails = default(System.Collections.Generic.IList)) + + { + this.PeeringLocation = peeringLocation; + this.Status = status; + this.StartTimeUtc = startTimeUtc; + this.EndTimeUtc = endTimeUtc; + this.RedundantRoutes = redundantRoutes; + this.NonRedundantRoutes = nonRedundantRoutes; + this.WasSimulationSuccessful = wasSimulationSuccessful; + this.FailoverConnectionDetails = failoverConnectionDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets peering location of the test + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "peeringLocation")] + public string PeeringLocation {get; set; } + + /// + /// Gets or sets the current status of the test Possible values include: 'NotStarted', 'Starting', 'Running', 'StartFailed', 'Stopping', 'Completed', 'StopFailed', 'Invalid', 'Expired' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + + /// + /// Gets or sets time when the test was started + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTimeUtc")] + public string StartTimeUtc {get; set; } + + /// + /// Gets or sets time when the test was completed + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTimeUtc")] + public string EndTimeUtc {get; set; } + + /// + /// Gets or sets list of routes received from this peering as well as some + /// other peering location + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "redundantRoutes")] + public System.Collections.Generic.IList RedundantRoutes {get; set; } + + /// + /// Gets or sets list of al the routes that were received only from this + /// peering location + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nonRedundantRoutes")] + public System.Collections.Generic.IList NonRedundantRoutes {get; set; } + + /// + /// Gets or sets whether the failover simulation was successful or not + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "wasSimulationSuccessful")] + public bool? WasSimulationSuccessful {get; set; } + + /// + /// Gets or sets list of all the failover connections for this peering location + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverConnectionDetails")] + public System.Collections.Generic.IList FailoverConnectionDetails {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverStopApiParameters.cs b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverStopApiParameters.cs new file mode 100644 index 000000000000..a3045ab15492 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverStopApiParameters.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Network.Models +{ + using System.Linq; + + /// + /// Start packet capture parameters on virtual network gateway. + /// + public partial class ExpressRouteFailoverStopApiParameters + { + /// + /// Initializes a new instance of the ExpressRouteFailoverStopApiParameters class. + /// + public ExpressRouteFailoverStopApiParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressRouteFailoverStopApiParameters class. + /// + + /// Peering location of the test + /// + + /// Whether the failover simulation was successful or not + /// + + /// List of all the failover connections for this peering location + /// + public ExpressRouteFailoverStopApiParameters(string peeringLocation = default(string), bool? wasSimulationSuccessful = default(bool?), System.Collections.Generic.IList details = default(System.Collections.Generic.IList)) + + { + this.PeeringLocation = peeringLocation; + this.WasSimulationSuccessful = wasSimulationSuccessful; + this.Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets peering location of the test + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "peeringLocation")] + public string PeeringLocation {get; set; } + + /// + /// Gets or sets whether the failover simulation was successful or not + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "wasSimulationSuccessful")] + public bool? WasSimulationSuccessful {get; set; } + + /// + /// Gets or sets list of all the failover connections for this peering location + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverTestDetails.cs b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverTestDetails.cs new file mode 100644 index 000000000000..555dc3bbfc34 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/ExpressRouteFailoverTestDetails.cs @@ -0,0 +1,129 @@ +// 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 System.Linq; + + /// + /// ExpressRoute failover test details + /// + public partial class ExpressRouteFailoverTestDetails + { + /// + /// Initializes a new instance of the ExpressRouteFailoverTestDetails class. + /// + public ExpressRouteFailoverTestDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressRouteFailoverTestDetails class. + /// + + /// Peering location of the test + /// + + /// All circuits in the peering location + /// + + /// The current status of the test + /// Possible values include: 'NotStarted', 'Starting', 'Running', + /// 'StartFailed', 'Stopping', 'Completed', 'StopFailed', 'Invalid', 'Expired' + + /// Time when the test was started + /// + + /// Time when the test was completed + /// + + /// All connections to the circuits in the peering location + /// + + /// The unique GUID associated with the test + /// + + /// The type of failover test + /// Possible values include: 'SingleSiteFailover', 'MultiSiteFailover', 'All' + + /// A list of all issues with the test + /// + public ExpressRouteFailoverTestDetails(string peeringLocation = default(string), System.Collections.Generic.IList circuits = default(System.Collections.Generic.IList), string status = default(string), string startTime = default(string), string endTime = default(string), System.Collections.Generic.IList connections = default(System.Collections.Generic.IList), string testGuid = default(string), string testType = default(string), System.Collections.Generic.IList issues = default(System.Collections.Generic.IList)) + + { + this.PeeringLocation = peeringLocation; + this.Circuits = circuits; + this.Status = status; + this.StartTime = startTime; + this.EndTime = endTime; + this.Connections = connections; + this.TestGuid = testGuid; + this.TestType = testType; + this.Issues = issues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets peering location of the test + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "peeringLocation")] + public string PeeringLocation {get; set; } + + /// + /// Gets or sets all circuits in the peering location + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "circuits")] + public System.Collections.Generic.IList Circuits {get; set; } + + /// + /// Gets or sets the current status of the test Possible values include: 'NotStarted', 'Starting', 'Running', 'StartFailed', 'Stopping', 'Completed', 'StopFailed', 'Invalid', 'Expired' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + + /// + /// Gets or sets time when the test was started + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public string StartTime {get; set; } + + /// + /// Gets or sets time when the test was completed + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public string EndTime {get; set; } + + /// + /// Gets or sets all connections to the circuits in the peering location + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "connections")] + public System.Collections.Generic.IList Connections {get; set; } + + /// + /// Gets or sets the unique GUID associated with the test + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "testGuid")] + public string TestGuid {get; set; } + + /// + /// Gets or sets the type of failover test Possible values include: 'SingleSiteFailover', 'MultiSiteFailover', 'All' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "testType")] + public string TestType {get; set; } + + /// + /// Gets or sets a list of all issues with the test + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "issues")] + public System.Collections.Generic.IList Issues {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionDetails.cs b/src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionDetails.cs new file mode 100644 index 000000000000..0dccdcc0d992 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionDetails.cs @@ -0,0 +1,67 @@ +// 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 System.Linq; + + public partial class FailoverConnectionDetails + { + /// + /// Initializes a new instance of the FailoverConnectionDetails class. + /// + public FailoverConnectionDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FailoverConnectionDetails class. + /// + + /// Name of the failover connection + /// + + /// Location of the failover connection + /// + + /// Whether the customer was able to establish connectivity through this + /// failover connection or not + /// + public FailoverConnectionDetails(string failoverConnectionName = default(string), string failoverLocation = default(string), bool? isVerified = default(bool?)) + + { + this.FailoverConnectionName = failoverConnectionName; + this.FailoverLocation = failoverLocation; + this.IsVerified = isVerified; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets name of the failover connection + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverConnectionName")] + public string FailoverConnectionName {get; set; } + + /// + /// Gets or sets location of the failover connection + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverLocation")] + public string FailoverLocation {get; set; } + + /// + /// Gets or sets whether the customer was able to establish connectivity + /// through this failover connection or not + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "isVerified")] + public bool? IsVerified {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionStatus.cs b/src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionStatus.cs new file mode 100644 index 000000000000..e322a36fa90e --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/FailoverConnectionStatus.cs @@ -0,0 +1,19 @@ +// 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 +{ + + /// + /// Defines values for FailoverConnectionStatus. + /// + + + public static class FailoverConnectionStatus + { + public const string Connected = "Connected"; + public const string Disconnected = "Disconnected"; + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatus.cs b/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatus.cs new file mode 100644 index 000000000000..c1a95df75e58 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatus.cs @@ -0,0 +1,26 @@ +// 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 +{ + + /// + /// Defines values for FailoverTestStatus. + /// + + + public static class FailoverTestStatus + { + public const string NotStarted = "NotStarted"; + public const string Starting = "Starting"; + public const string Running = "Running"; + public const string StartFailed = "StartFailed"; + public const string Stopping = "Stopping"; + public const string Completed = "Completed"; + public const string StopFailed = "StopFailed"; + public const string Invalid = "Invalid"; + public const string Expired = "Expired"; + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatusForSingleTest.cs b/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatusForSingleTest.cs new file mode 100644 index 000000000000..b0d2b61b28f5 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestStatusForSingleTest.cs @@ -0,0 +1,26 @@ +// 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 +{ + + /// + /// Defines values for FailoverTestStatusForSingleTest. + /// + + + public static class FailoverTestStatusForSingleTest + { + public const string NotStarted = "NotStarted"; + public const string Starting = "Starting"; + public const string Running = "Running"; + public const string StartFailed = "StartFailed"; + public const string Stopping = "Stopping"; + public const string Completed = "Completed"; + public const string StopFailed = "StopFailed"; + public const string Invalid = "Invalid"; + public const string Expired = "Expired"; + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestType.cs b/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestType.cs new file mode 100644 index 000000000000..6ca08114c192 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/FailoverTestType.cs @@ -0,0 +1,20 @@ +// 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 +{ + + /// + /// Defines values for FailoverTestType. + /// + + + public static class FailoverTestType + { + public const string SingleSiteFailover = "SingleSiteFailover"; + public const string MultiSiteFailover = "MultiSiteFailover"; + public const string All = "All"; + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/FirewallPolicyIdpsSignatureDirection.cs b/src/Network/Network.Management.Sdk/Generated/Models/FirewallPolicyIdpsSignatureDirection.cs index 25febd83bc73..91bc127be82a 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/FirewallPolicyIdpsSignatureDirection.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/FirewallPolicyIdpsSignatureDirection.cs @@ -23,7 +23,9 @@ public enum FirewallPolicyIdpsSignatureDirection [System.Runtime.Serialization.EnumMember(Value = "3")] Three, [System.Runtime.Serialization.EnumMember(Value = "4")] - Four + Four, + [System.Runtime.Serialization.EnumMember(Value = "5")] + Five } internal static class FirewallPolicyIdpsSignatureDirectionEnumExtension { @@ -45,6 +47,8 @@ internal static string ToSerializedValue(this FirewallPolicyIdpsSignatureDirecti return "3"; case FirewallPolicyIdpsSignatureDirection.Four: return "4"; + case FirewallPolicyIdpsSignatureDirection.Five: + return "5"; } return null; } @@ -62,6 +66,8 @@ internal static string ToSerializedValue(this FirewallPolicyIdpsSignatureDirecti return FirewallPolicyIdpsSignatureDirection.Three; case "4": return FirewallPolicyIdpsSignatureDirection.Four; + case "5": + return FirewallPolicyIdpsSignatureDirection.Five; } return null; } diff --git a/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRule.cs b/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRule.cs new file mode 100644 index 000000000000..2af356595a54 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRule.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Network.Models +{ + using System.Linq; + + /// + /// The response for a Health API. + /// + public partial class LoadBalancerHealthPerRule + { + /// + /// Initializes a new instance of the LoadBalancerHealthPerRule class. + /// + public LoadBalancerHealthPerRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LoadBalancerHealthPerRule class. + /// + + /// Number of backend instances associated to the LB rule that are considered + /// healthy. + /// + + /// Number of backend instances associated to the LB rule that are considered + /// unhealthy. + /// + + /// Information about the health per rule of the backend addresses. + /// + public LoadBalancerHealthPerRule(int? up = default(int?), int? down = default(int?), System.Collections.Generic.IList loadBalancerBackendAddresses = default(System.Collections.Generic.IList)) + + { + this.Up = up; + this.Down = down; + this.LoadBalancerBackendAddresses = loadBalancerBackendAddresses; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets number of backend instances associated to the LB rule that are + /// considered healthy. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "up")] + public int? Up {get; set; } + + /// + /// Gets or sets number of backend instances associated to the LB rule that are + /// considered unhealthy. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "down")] + public int? Down {get; set; } + + /// + /// Gets or sets information about the health per rule of the backend + /// addresses. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "loadBalancerBackendAddresses")] + public System.Collections.Generic.IList LoadBalancerBackendAddresses {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRulePerBackendAddress.cs b/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRulePerBackendAddress.cs new file mode 100644 index 000000000000..68050151093b --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerHealthPerRulePerBackendAddress.cs @@ -0,0 +1,98 @@ +// 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 System.Linq; + + /// + /// The information about health per rule per backend address. + /// + public partial class LoadBalancerHealthPerRulePerBackendAddress + { + /// + /// Initializes a new instance of the LoadBalancerHealthPerRulePerBackendAddress class. + /// + public LoadBalancerHealthPerRulePerBackendAddress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LoadBalancerHealthPerRulePerBackendAddress class. + /// + + /// The IP address belonging to the backend address. + /// + + /// The id of the network interface ip configuration belonging to the backend + /// address + /// + + /// The current health of the backend instances that is associated to the LB + /// rule. + /// + + /// The explanation of the State + /// + public LoadBalancerHealthPerRulePerBackendAddress(string ipAddress = default(string), NetworkInterfaceIPConfiguration networkInterfaceIPConfigurationId = default(NetworkInterfaceIPConfiguration), string state = default(string), string reason = default(string)) + + { + this.IPAddress = ipAddress; + this.NetworkInterfaceIPConfigurationId = networkInterfaceIPConfigurationId; + this.State = state; + this.Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the IP address belonging to the backend address. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } + + /// + /// Gets or sets the id of the network interface ip configuration belonging to + /// the backend address + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "networkInterfaceIPConfigurationId")] + public NetworkInterfaceIPConfiguration NetworkInterfaceIPConfigurationId {get; set; } + + /// + /// Gets or sets the current health of the backend instances that is associated + /// to the LB rule. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } + + /// + /// Gets or sets the explanation of the State + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "reason")] + public string Reason {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + if (this.NetworkInterfaceIPConfigurationId != null) + { + this.NetworkInterfaceIPConfigurationId.Validate(); + } + + + } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerLoadBalancingRulesHealthHeaders.cs b/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerLoadBalancingRulesHealthHeaders.cs new file mode 100644 index 000000000000..a1055acdc4dc --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/LoadBalancerLoadBalancingRulesHealthHeaders.cs @@ -0,0 +1,45 @@ +// 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 System.Linq; + + public partial class LoadBalancerLoadBalancingRulesHealthHeaders + { + /// + /// Initializes a new instance of the LoadBalancerLoadBalancingRulesHealthHeaders class. + /// + public LoadBalancerLoadBalancingRulesHealthHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LoadBalancerLoadBalancingRulesHealthHeaders class. + /// + + /// + /// + public LoadBalancerLoadBalancingRulesHealthHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterface.cs b/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterface.cs index ac61053ed3d9..6466855504c1 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterface.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterface.cs @@ -78,6 +78,9 @@ public NetworkInterface() /// Whether the virtual machine this nic is attached to supports encryption. /// + /// Whether default outbound connectivity for nic was configured or not. + /// + /// If the network interface is configured for accelerated networking. Not /// applicable to VM sizes which require accelerated networking. /// @@ -116,7 +119,7 @@ public NetworkInterface() /// Auxiliary sku of Network Interface resource. /// Possible values include: 'None', 'A1', 'A2', 'A4', 'A8' - public NetworkInterface(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), ExtendedLocation extendedLocation = default(ExtendedLocation), string etag = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), string provisioningState = default(string), SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), System.Collections.Generic.IList tapConfigurations = default(System.Collections.Generic.IList), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool? primary = default(bool?), bool? vnetEncryptionSupported = default(bool?), bool? enableAcceleratedNetworking = default(bool?), bool? disableTcpStateTracking = default(bool?), bool? enableIPForwarding = default(bool?), System.Collections.Generic.IList hostedWorkloads = default(System.Collections.Generic.IList), SubResource dscpConfiguration = default(SubResource), string resourceGuid = default(string), string workloadType = default(string), string nicType = default(string), PrivateLinkService privateLinkService = default(PrivateLinkService), string migrationPhase = default(string), string auxiliaryMode = default(string), string auxiliarySku = default(string)) + public NetworkInterface(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), ExtendedLocation extendedLocation = default(ExtendedLocation), string etag = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), string provisioningState = default(string), SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), System.Collections.Generic.IList tapConfigurations = default(System.Collections.Generic.IList), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool? primary = default(bool?), bool? vnetEncryptionSupported = default(bool?), bool? defaultOutboundConnectivityEnabled = default(bool?), bool? enableAcceleratedNetworking = default(bool?), bool? disableTcpStateTracking = default(bool?), bool? enableIPForwarding = default(bool?), System.Collections.Generic.IList hostedWorkloads = default(System.Collections.Generic.IList), SubResource dscpConfiguration = default(SubResource), string resourceGuid = default(string), string workloadType = default(string), string nicType = default(string), PrivateLinkService privateLinkService = default(PrivateLinkService), string migrationPhase = default(string), string auxiliaryMode = default(string), string auxiliarySku = default(string)) : base(id, name, type, location, tags) { @@ -132,6 +135,7 @@ public NetworkInterface() this.MacAddress = macAddress; this.Primary = primary; this.VnetEncryptionSupported = vnetEncryptionSupported; + this.DefaultOutboundConnectivityEnabled = defaultOutboundConnectivityEnabled; this.EnableAcceleratedNetworking = enableAcceleratedNetworking; this.DisableTcpStateTracking = disableTcpStateTracking; this.EnableIPForwarding = enableIPForwarding; @@ -228,6 +232,12 @@ public NetworkInterface() [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vnetEncryptionSupported")] public bool? VnetEncryptionSupported {get; private set; } + /// + /// Gets whether default outbound connectivity for nic was configured or not. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.defaultOutboundConnectivityEnabled")] + public bool? DefaultOutboundConnectivityEnabled {get; private set; } + /// /// Gets or sets if the network interface is configured for accelerated /// networking. Not applicable to VM sizes which require accelerated diff --git a/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterfacePropertiesFormat.cs b/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterfacePropertiesFormat.cs index a705ec512447..1638dfcf107b 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterfacePropertiesFormat.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/NetworkInterfacePropertiesFormat.cs @@ -52,6 +52,9 @@ public NetworkInterfacePropertiesFormat() /// Whether the virtual machine this nic is attached to supports encryption. /// + /// Whether default outbound connectivity for nic was configured or not. + /// + /// If the network interface is configured for accelerated networking. Not /// applicable to VM sizes which require accelerated networking. /// @@ -94,7 +97,7 @@ public NetworkInterfacePropertiesFormat() /// Auxiliary sku of Network Interface resource. /// Possible values include: 'None', 'A1', 'A2', 'A4', 'A8' - public NetworkInterfacePropertiesFormat(SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), System.Collections.Generic.IList tapConfigurations = default(System.Collections.Generic.IList), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool? primary = default(bool?), bool? vnetEncryptionSupported = default(bool?), bool? enableAcceleratedNetworking = default(bool?), bool? disableTcpStateTracking = default(bool?), bool? enableIPForwarding = default(bool?), System.Collections.Generic.IList hostedWorkloads = default(System.Collections.Generic.IList), SubResource dscpConfiguration = default(SubResource), string resourceGuid = default(string), string provisioningState = default(string), string workloadType = default(string), string nicType = default(string), PrivateLinkService privateLinkService = default(PrivateLinkService), string migrationPhase = default(string), string auxiliaryMode = default(string), string auxiliarySku = default(string)) + public NetworkInterfacePropertiesFormat(SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), System.Collections.Generic.IList ipConfigurations = default(System.Collections.Generic.IList), System.Collections.Generic.IList tapConfigurations = default(System.Collections.Generic.IList), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool? primary = default(bool?), bool? vnetEncryptionSupported = default(bool?), bool? defaultOutboundConnectivityEnabled = default(bool?), bool? enableAcceleratedNetworking = default(bool?), bool? disableTcpStateTracking = default(bool?), bool? enableIPForwarding = default(bool?), System.Collections.Generic.IList hostedWorkloads = default(System.Collections.Generic.IList), SubResource dscpConfiguration = default(SubResource), string resourceGuid = default(string), string provisioningState = default(string), string workloadType = default(string), string nicType = default(string), PrivateLinkService privateLinkService = default(PrivateLinkService), string migrationPhase = default(string), string auxiliaryMode = default(string), string auxiliarySku = default(string)) { this.VirtualMachine = virtualMachine; @@ -106,6 +109,7 @@ public NetworkInterfacePropertiesFormat() this.MacAddress = macAddress; this.Primary = primary; this.VnetEncryptionSupported = vnetEncryptionSupported; + this.DefaultOutboundConnectivityEnabled = defaultOutboundConnectivityEnabled; this.EnableAcceleratedNetworking = enableAcceleratedNetworking; this.DisableTcpStateTracking = disableTcpStateTracking; this.EnableIPForwarding = enableIPForwarding; @@ -184,6 +188,12 @@ public NetworkInterfacePropertiesFormat() [Newtonsoft.Json.JsonProperty(PropertyName = "vnetEncryptionSupported")] public bool? VnetEncryptionSupported {get; private set; } + /// + /// Gets whether default outbound connectivity for nic was configured or not. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultOutboundConnectivityEnabled")] + public bool? DefaultOutboundConnectivityEnabled {get; private set; } + /// /// Gets or sets if the network interface is configured for accelerated /// networking. Not applicable to VM sizes which require accelerated diff --git a/src/Network/Network.Management.Sdk/Generated/Models/SecurityAdminConfiguration.cs b/src/Network/Network.Management.Sdk/Generated/Models/SecurityAdminConfiguration.cs index e8b4ca77f94b..8994d889da9a 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/SecurityAdminConfiguration.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/SecurityAdminConfiguration.cs @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Management.Network.Models /// Defines the security admin configuration /// [Microsoft.Rest.Serialization.JsonTransformation] - public partial class SecurityAdminConfiguration : CommonProxyResource + public partial class SecurityAdminConfiguration : ChildResource { /// /// Initializes a new instance of the SecurityAdminConfiguration class. @@ -25,19 +25,19 @@ public SecurityAdminConfiguration() /// Initializes a new instance of the SecurityAdminConfiguration class. /// - /// Fully qualified resource ID for the resource. E.g. - /// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// Resource ID. /// - /// The name of the resource + /// Resource name. /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" + /// Resource type. /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy - /// information. + /// A unique read-only string that changes whenever the resource is updated. + /// + + /// The system metadata related to this resource. /// /// The provisioning state of the resource. @@ -56,10 +56,11 @@ public SecurityAdminConfiguration() /// Unique identifier for this resource. /// - public SecurityAdminConfiguration(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), System.Collections.Generic.IList applyOnNetworkIntentPolicyBasedServices = default(System.Collections.Generic.IList), string networkGroupAddressSpaceAggregationOption = default(string), string resourceGuid = default(string)) + public SecurityAdminConfiguration(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string description = default(string), System.Collections.Generic.IList applyOnNetworkIntentPolicyBasedServices = default(System.Collections.Generic.IList), string networkGroupAddressSpaceAggregationOption = default(string), string resourceGuid = default(string)) - : base(id, name, type, systemData) + : base(id, name, type, etag) { + this.SystemData = systemData; this.ProvisioningState = provisioningState; this.Description = description; this.ApplyOnNetworkIntentPolicyBasedServices = applyOnNetworkIntentPolicyBasedServices; @@ -74,6 +75,12 @@ public SecurityAdminConfiguration() partial void CustomInit(); + /// + /// Gets the system metadata related to this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } + /// /// Gets the provisioning state of the resource. Possible values include: 'Failed', 'Succeeded', 'Canceled', 'Creating', 'Updating', 'Deleting' /// diff --git a/src/Network/Network.Management.Sdk/Generated/Models/SingleQueryResult.cs b/src/Network/Network.Management.Sdk/Generated/Models/SingleQueryResult.cs index 54fee7943911..34914cfad673 100644 --- a/src/Network/Network.Management.Sdk/Generated/Models/SingleQueryResult.cs +++ b/src/Network/Network.Management.Sdk/Generated/Models/SingleQueryResult.cs @@ -31,8 +31,8 @@ public SingleQueryResult() /// Possible values include: '1', '2', '3' /// Describes in which direction signature is being enforced: 0 - OutBound, 1 - - /// InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound - /// Possible values include: '0', '1', '2', '3', '4' + /// InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound + /// Possible values include: '0', '1', '2', '3', '4', '5' /// Describes the groups the signature belongs to /// @@ -99,7 +99,8 @@ public SingleQueryResult() /// /// Gets or sets describes in which direction signature is being enforced: 0 - - /// OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound Possible values include: '0', '1', '2', '3', '4' + /// OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - + /// InternalInbound Possible values include: '0', '1', '2', '3', '4', '5' /// [Newtonsoft.Json.JsonProperty(PropertyName = "direction")] public int? Direction {get; set; } diff --git a/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders.cs b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders.cs new file mode 100644 index 000000000000..9604f6a1be40 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders.cs @@ -0,0 +1,45 @@ +// 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 System.Linq; + + public partial class VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders + { + /// + /// Initializes a new instance of the VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders class. + /// + public VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders class. + /// + + /// + /// + public VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders.cs b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders.cs new file mode 100644 index 000000000000..5244fa043d94 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders.cs @@ -0,0 +1,45 @@ +// 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 System.Linq; + + public partial class VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders + { + /// + /// Initializes a new instance of the VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders class. + /// + public VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders class. + /// + + /// + /// + public VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders.cs b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders.cs new file mode 100644 index 000000000000..270f72604906 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders.cs @@ -0,0 +1,45 @@ +// 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 System.Linq; + + public partial class VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders + { + /// + /// Initializes a new instance of the VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders class. + /// + public VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders class. + /// + + /// + /// + public VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders.cs b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders.cs new file mode 100644 index 000000000000..a8bf822905c3 --- /dev/null +++ b/src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders.cs @@ -0,0 +1,45 @@ +// 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 System.Linq; + + public partial class VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders + { + /// + /// Initializes a new instance of the VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders class. + /// + public VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders class. + /// + + /// + /// + public VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Network/Network.Management.Sdk/Generated/NetworkManagerCommitsOperations.cs b/src/Network/Network.Management.Sdk/Generated/NetworkManagerCommitsOperations.cs index e501bbc789e2..767bf94b8f8d 100644 --- a/src/Network/Network.Management.Sdk/Generated/NetworkManagerCommitsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/NetworkManagerCommitsOperations.cs @@ -126,9 +126,9 @@ internal NetworkManagerCommitsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; diff --git a/src/Network/Network.Management.Sdk/Generated/NetworkManagerDeploymentStatusOperations.cs b/src/Network/Network.Management.Sdk/Generated/NetworkManagerDeploymentStatusOperations.cs index 81e46a43e489..5fea333f30e7 100644 --- a/src/Network/Network.Management.Sdk/Generated/NetworkManagerDeploymentStatusOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/NetworkManagerDeploymentStatusOperations.cs @@ -102,9 +102,9 @@ internal NetworkManagerDeploymentStatusOperations (NetworkManagementClient clien } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (top != null) diff --git a/src/Network/Network.Management.Sdk/Generated/NetworkManagersOperations.cs b/src/Network/Network.Management.Sdk/Generated/NetworkManagersOperations.cs index 3108279359f0..e9ea0833426b 100644 --- a/src/Network/Network.Management.Sdk/Generated/NetworkManagersOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/NetworkManagersOperations.cs @@ -90,9 +90,9 @@ internal NetworkManagersOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -314,9 +314,9 @@ internal NetworkManagersOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -589,9 +589,9 @@ internal NetworkManagersOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -1268,9 +1268,9 @@ internal NetworkManagersOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } diff --git a/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisIntentsOperations.cs b/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisIntentsOperations.cs index 146fc84c693d..2ccb4b39901c 100644 --- a/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisIntentsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisIntentsOperations.cs @@ -108,9 +108,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -119,9 +119,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } @@ -368,9 +368,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -379,9 +379,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (reachabilityAnalysisIntentName == null) @@ -390,9 +390,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (reachabilityAnalysisIntentName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisIntentName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisIntentName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisIntentName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisIntentName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -622,9 +622,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -633,9 +633,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (reachabilityAnalysisIntentName == null) @@ -644,9 +644,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (reachabilityAnalysisIntentName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisIntentName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisIntentName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisIntentName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisIntentName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -887,9 +887,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -898,9 +898,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (reachabilityAnalysisIntentName == null) @@ -909,9 +909,9 @@ internal ReachabilityAnalysisIntentsOperations (NetworkManagementClient client) } if (reachabilityAnalysisIntentName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisIntentName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisIntentName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisIntentName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisIntentName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; diff --git a/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisRunsOperations.cs b/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisRunsOperations.cs index 913074fa142f..106ff0672714 100644 --- a/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisRunsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/ReachabilityAnalysisRunsOperations.cs @@ -108,9 +108,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -119,9 +119,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } @@ -368,9 +368,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -379,9 +379,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (reachabilityAnalysisRunName == null) @@ -390,9 +390,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (reachabilityAnalysisRunName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisRunName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisRunName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisRunName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisRunName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -622,9 +622,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -633,9 +633,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (reachabilityAnalysisRunName == null) @@ -644,9 +644,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (reachabilityAnalysisRunName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisRunName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisRunName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisRunName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisRunName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -915,9 +915,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -926,9 +926,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (reachabilityAnalysisRunName == null) @@ -937,9 +937,9 @@ internal ReachabilityAnalysisRunsOperations (NetworkManagementClient client) } if (reachabilityAnalysisRunName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisRunName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(reachabilityAnalysisRunName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisRunName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "reachabilityAnalysisRunName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; diff --git a/src/Network/Network.Management.Sdk/Generated/ScopeConnectionsOperations.cs b/src/Network/Network.Management.Sdk/Generated/ScopeConnectionsOperations.cs index b42b533c3b1b..c577635d3613 100644 --- a/src/Network/Network.Management.Sdk/Generated/ScopeConnectionsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/ScopeConnectionsOperations.cs @@ -101,9 +101,9 @@ internal ScopeConnectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (scopeConnectionName == null) @@ -352,9 +352,9 @@ internal ScopeConnectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (scopeConnectionName == null) @@ -575,9 +575,9 @@ internal ScopeConnectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (scopeConnectionName == null) @@ -790,9 +790,9 @@ internal ScopeConnectionsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (top != null) diff --git a/src/Network/Network.Management.Sdk/Generated/SecurityAdminConfigurationsOperations.cs b/src/Network/Network.Management.Sdk/Generated/SecurityAdminConfigurationsOperations.cs index 32a4733af9f2..8a4192e415a3 100644 --- a/src/Network/Network.Management.Sdk/Generated/SecurityAdminConfigurationsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/SecurityAdminConfigurationsOperations.cs @@ -101,9 +101,9 @@ internal SecurityAdminConfigurationsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (top != null) @@ -337,9 +337,9 @@ internal SecurityAdminConfigurationsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -566,9 +566,9 @@ internal SecurityAdminConfigurationsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) @@ -844,9 +844,9 @@ internal SecurityAdminConfigurationsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (configurationName == null) diff --git a/src/Network/Network.Management.Sdk/Generated/StaticCidrsOperations.cs b/src/Network/Network.Management.Sdk/Generated/StaticCidrsOperations.cs index 2934ea929f27..29657d84dac7 100644 --- a/src/Network/Network.Management.Sdk/Generated/StaticCidrsOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/StaticCidrsOperations.cs @@ -108,9 +108,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -119,9 +119,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } @@ -372,9 +372,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -383,9 +383,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (staticCidrName == null) @@ -394,9 +394,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (staticCidrName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(staticCidrName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(staticCidrName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "staticCidrName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "staticCidrName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -640,9 +640,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -651,9 +651,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (staticCidrName == null) @@ -662,9 +662,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (staticCidrName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(staticCidrName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(staticCidrName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "staticCidrName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "staticCidrName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -908,9 +908,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (poolName == null) @@ -919,9 +919,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (poolName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(poolName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "poolName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (staticCidrName == null) @@ -930,9 +930,9 @@ internal StaticCidrsOperations (NetworkManagementClient client) } if (staticCidrName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(staticCidrName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(staticCidrName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "staticCidrName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "staticCidrName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; diff --git a/src/Network/Network.Management.Sdk/Generated/VerifierWorkspacesOperations.cs b/src/Network/Network.Management.Sdk/Generated/VerifierWorkspacesOperations.cs index 931807b7e2fc..ee0f8e96e751 100644 --- a/src/Network/Network.Management.Sdk/Generated/VerifierWorkspacesOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/VerifierWorkspacesOperations.cs @@ -105,9 +105,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } @@ -349,9 +349,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -360,9 +360,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -587,9 +587,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -598,9 +598,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -842,9 +842,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -853,9 +853,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; @@ -1098,9 +1098,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (networkManagerName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[a-zA-Z0-9-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(networkManagerName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[a-zA-Z0-9-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "networkManagerName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } if (workspaceName == null) @@ -1109,9 +1109,9 @@ internal VerifierWorkspacesOperations (NetworkManagementClient client) } if (workspaceName != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[a-zA-Z0-9_.-]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(workspaceName, "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$")) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[a-zA-Z0-9_.-]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "workspaceName", "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"); } } string apiVersion = "2024-05-01"; diff --git a/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperations.cs b/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperations.cs index f65355fb8eec..85aff96661cd 100644 --- a/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperations.cs +++ b/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperations.cs @@ -1475,6 +1475,117 @@ internal VirtualNetworkGatewaysOperations (NetworkManagementClient client) return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders>> GetFailoverAllTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse,VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders> _response = await BeginGetFailoverAllTestDetailsWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, type, fetchLatest, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders>> GetFailoverSingleTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse,VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders> _response = await BeginGetFailoverSingleTestDetailsWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestId, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> StartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginStartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Virtual network gateway stop simulation parameters supplied to stop + /// failover simulation on gateway. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> StopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginStopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, stopParameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Get VPN client connection health detail per P2S client connection of the /// virtual network gateway in the specified resource group. @@ -4797,6 +4908,976 @@ internal VirtualNetworkGatewaysOperations (NetworkManagementClient client) + } + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders>> BeginGetFailoverAllTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (virtualNetworkGatewayName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); + } + + if (type == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "type"); + } + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + string apiVersion = "2024-05-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("type", type); + tracingParameters.Add("fetchLatest", fetchLatest); + tracingParameters.Add("apiVersion", apiVersion); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginGetFailoverAllTestDetails", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (type != null) + { + _queryParameters.Add(string.Format("type={0}", System.Uri.EscapeDataString(type))); + } + _queryParameters.Add(string.Format("fetchLatest={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(fetchLatest, this.Client.SerializationSettings).Trim('"')))); + 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,VirtualNetworkGatewaysGetFailoverAllTestDetailsHeaders>(); + _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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders>> BeginGetFailoverSingleTestDetailsWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (virtualNetworkGatewayName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); + } + + if (peeringLocation == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "peeringLocation"); + } + + if (failoverTestId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "failoverTestId"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + string apiVersion = "2024-05-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("peeringLocation", peeringLocation); + tracingParameters.Add("failoverTestId", failoverTestId); + tracingParameters.Add("apiVersion", apiVersion); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginGetFailoverSingleTestDetails", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (peeringLocation != null) + { + _queryParameters.Add(string.Format("peeringLocation={0}", System.Uri.EscapeDataString(peeringLocation))); + } + if (failoverTestId != null) + { + _queryParameters.Add(string.Format("failoverTestId={0}", System.Uri.EscapeDataString(failoverTestId))); + } + 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,VirtualNetworkGatewaysGetFailoverSingleTestDetailsHeaders>(); + _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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginStartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (virtualNetworkGatewayName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); + } + + if (peeringLocation == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "peeringLocation"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + string apiVersion = "2024-05-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("peeringLocation", peeringLocation); + tracingParameters.Add("apiVersion", apiVersion); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginStartExpressRouteSiteFailoverSimulation", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (peeringLocation != null) + { + _queryParameters.Add(string.Format("peeringLocation={0}", System.Uri.EscapeDataString(peeringLocation))); + } + 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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Virtual network gateway stop simulation parameters supplied to stop + /// failover simulation on gateway. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> BeginStopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (stopParameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "stopParameters"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (virtualNetworkGatewayName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "virtualNetworkGatewayName"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + string apiVersion = "2024-05-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName); + tracingParameters.Add("apiVersion", apiVersion); + + tracingParameters.Add("stopParameters", stopParameters); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginStopExpressRouteSiteFailoverSimulation", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{virtualNetworkGatewayName}", System.Uri.EscapeDataString(virtualNetworkGatewayName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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(stopParameters != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(stopParameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } /// /// Get VPN client connection health detail per P2S client connection of the diff --git a/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperationsExtensions.cs b/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperationsExtensions.cs index d4817c0a44ee..fa43f214923b 100644 --- a/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperationsExtensions.cs +++ b/src/Network/Network.Management.Sdk/Generated/VirtualNetworkGatewaysOperationsExtensions.cs @@ -833,6 +833,200 @@ public static string StopPacketCapture(this IVirtualNetworkGatewaysOperations op } } /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + public static System.Collections.Generic.IList GetFailoverAllTestDetails(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest) + { + return ((IVirtualNetworkGatewaysOperations)operations).GetFailoverAllTestDetailsAsync(resourceGroupName, virtualNetworkGatewayName, type, fetchLatest).GetAwaiter().GetResult(); + } + + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> GetFailoverAllTestDetailsAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetFailoverAllTestDetailsWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, type, fetchLatest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + public static System.Collections.Generic.IList GetFailoverSingleTestDetails(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId) + { + return ((IVirtualNetworkGatewaysOperations)operations).GetFailoverSingleTestDetailsAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestId).GetAwaiter().GetResult(); + } + + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> GetFailoverSingleTestDetailsAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetFailoverSingleTestDetailsWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + public static string StartExpressRouteSiteFailoverSimulation(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation) + { + return ((IVirtualNetworkGatewaysOperations)operations).StartExpressRouteSiteFailoverSimulationAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation).GetAwaiter().GetResult(); + } + + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task StartExpressRouteSiteFailoverSimulationAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.StartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + public static string StopExpressRouteSiteFailoverSimulation(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters) + { + return ((IVirtualNetworkGatewaysOperations)operations).StopExpressRouteSiteFailoverSimulationAsync(resourceGroupName, virtualNetworkGatewayName, stopParameters).GetAwaiter().GetResult(); + } + + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task StopExpressRouteSiteFailoverSimulationAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.StopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, stopParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get VPN client connection health detail per P2S client connection of the /// virtual network gateway in the specified resource group. /// @@ -1541,6 +1735,200 @@ public static string BeginStopPacketCapture(this IVirtualNetworkGatewaysOperatio } } /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + public static System.Collections.Generic.IList BeginGetFailoverAllTestDetails(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest) + { + return ((IVirtualNetworkGatewaysOperations)operations).BeginGetFailoverAllTestDetailsAsync(resourceGroupName, virtualNetworkGatewayName, type, fetchLatest).GetAwaiter().GetResult(); + } + + /// + /// This operation retrieves the details of all the failover tests performed on + /// the gateway for different peering locations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The type of failover test + /// + /// + /// Fetch only the latest tests for each peering location + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> BeginGetFailoverAllTestDetailsAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string type, bool fetchLatest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginGetFailoverAllTestDetailsWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, type, fetchLatest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + public static System.Collections.Generic.IList BeginGetFailoverSingleTestDetails(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId) + { + return ((IVirtualNetworkGatewaysOperations)operations).BeginGetFailoverSingleTestDetailsAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestId).GetAwaiter().GetResult(); + } + + /// + /// This operation retrieves the details of a particular failover test + /// performed on the gateway based on the test Guid + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The unique Guid value which identifies the test + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> BeginGetFailoverSingleTestDetailsAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, string failoverTestId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginGetFailoverSingleTestDetailsWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + public static string BeginStartExpressRouteSiteFailoverSimulation(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation) + { + return ((IVirtualNetworkGatewaysOperations)operations).BeginStartExpressRouteSiteFailoverSimulationAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation).GetAwaiter().GetResult(); + } + + /// + /// This operation starts failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// Peering location of the test + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginStartExpressRouteSiteFailoverSimulationAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string peeringLocation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginStartExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, peeringLocation, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + public static string BeginStopExpressRouteSiteFailoverSimulation(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters) + { + return ((IVirtualNetworkGatewaysOperations)operations).BeginStopExpressRouteSiteFailoverSimulationAsync(resourceGroupName, virtualNetworkGatewayName, stopParameters).GetAwaiter().GetResult(); + } + + /// + /// This operation stops failover simulation on the gateway for the specified + /// peering location + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual network gateway. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginStopExpressRouteSiteFailoverSimulationAsync(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, string virtualNetworkGatewayName, ExpressRouteFailoverStopApiParameters stopParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginStopExpressRouteSiteFailoverSimulationWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, stopParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get VPN client connection health detail per P2S client connection of the /// virtual network gateway in the specified resource group. /// diff --git a/src/Network/Network.Management.Sdk/README.md b/src/Network/Network.Management.Sdk/README.md index 548117c2ec6f..0528986bbdc4 100644 --- a/src/Network/Network.Management.Sdk/README.md +++ b/src/Network/Network.Management.Sdk/README.md @@ -27,7 +27,7 @@ use-extension: ### ``` yaml -commit: 3516acc4e60bd9fed55e488da0b4aad7baa93fb2 +commit: 5dc3201e0fd56e77cd54d8f79867af4d3f57a51b input-file: - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/applicationGateway.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/applicationGatewayWafDynamicManifests.json