| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | // <auto-generated/> |
| | | 5 | | |
| | | 6 | | #nullable disable |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | using System.Collections.Generic; |
| | | 10 | | using System.Threading; |
| | | 11 | | using System.Threading.Tasks; |
| | | 12 | | using Azure; |
| | | 13 | | using Azure.Core; |
| | | 14 | | using Azure.Core.Pipeline; |
| | | 15 | | using Azure.ResourceManager.Network.Models; |
| | | 16 | | |
| | | 17 | | namespace Azure.ResourceManager.Network |
| | | 18 | | { |
| | | 19 | | /// <summary> The ApplicationGateways service client. </summary> |
| | | 20 | | public partial class ApplicationGatewaysOperations |
| | | 21 | | { |
| | | 22 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | | 23 | | private readonly HttpPipeline _pipeline; |
| | 0 | 24 | | internal ApplicationGatewaysRestOperations RestClient { get; } |
| | | 25 | | /// <summary> Initializes a new instance of ApplicationGatewaysOperations for mocking. </summary> |
| | 0 | 26 | | protected ApplicationGatewaysOperations() |
| | | 27 | | { |
| | 0 | 28 | | } |
| | | 29 | | /// <summary> Initializes a new instance of ApplicationGatewaysOperations. </summary> |
| | | 30 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | | 31 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | | 32 | | /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc |
| | | 33 | | /// <param name="endpoint"> server parameter. </param> |
| | 0 | 34 | | internal ApplicationGatewaysOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscr |
| | | 35 | | { |
| | 0 | 36 | | RestClient = new ApplicationGatewaysRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| | 0 | 37 | | _clientDiagnostics = clientDiagnostics; |
| | 0 | 38 | | _pipeline = pipeline; |
| | 0 | 39 | | } |
| | | 40 | | |
| | | 41 | | /// <summary> Gets the specified application gateway. </summary> |
| | | 42 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 43 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 44 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 45 | | public virtual async Task<Response<ApplicationGateway>> GetAsync(string resourceGroupName, string applicationGat |
| | | 46 | | { |
| | 0 | 47 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.Get"); |
| | 0 | 48 | | scope.Start(); |
| | | 49 | | try |
| | | 50 | | { |
| | 0 | 51 | | return await RestClient.GetAsync(resourceGroupName, applicationGatewayName, cancellationToken).Configure |
| | | 52 | | } |
| | 0 | 53 | | catch (Exception e) |
| | | 54 | | { |
| | 0 | 55 | | scope.Failed(e); |
| | 0 | 56 | | throw; |
| | | 57 | | } |
| | 0 | 58 | | } |
| | | 59 | | |
| | | 60 | | /// <summary> Gets the specified application gateway. </summary> |
| | | 61 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 62 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 63 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 64 | | public virtual Response<ApplicationGateway> Get(string resourceGroupName, string applicationGatewayName, Cancell |
| | | 65 | | { |
| | 0 | 66 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.Get"); |
| | 0 | 67 | | scope.Start(); |
| | | 68 | | try |
| | | 69 | | { |
| | 0 | 70 | | return RestClient.Get(resourceGroupName, applicationGatewayName, cancellationToken); |
| | | 71 | | } |
| | 0 | 72 | | catch (Exception e) |
| | | 73 | | { |
| | 0 | 74 | | scope.Failed(e); |
| | 0 | 75 | | throw; |
| | | 76 | | } |
| | 0 | 77 | | } |
| | | 78 | | |
| | | 79 | | /// <summary> Updates the specified application gateway tags. </summary> |
| | | 80 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 81 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 82 | | /// <param name="parameters"> Parameters supplied to update application gateway tags. </param> |
| | | 83 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 84 | | public virtual async Task<Response<ApplicationGateway>> UpdateTagsAsync(string resourceGroupName, string applica |
| | | 85 | | { |
| | 0 | 86 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.UpdateTags"); |
| | 0 | 87 | | scope.Start(); |
| | | 88 | | try |
| | | 89 | | { |
| | 0 | 90 | | return await RestClient.UpdateTagsAsync(resourceGroupName, applicationGatewayName, parameters, cancellat |
| | | 91 | | } |
| | 0 | 92 | | catch (Exception e) |
| | | 93 | | { |
| | 0 | 94 | | scope.Failed(e); |
| | 0 | 95 | | throw; |
| | | 96 | | } |
| | 0 | 97 | | } |
| | | 98 | | |
| | | 99 | | /// <summary> Updates the specified application gateway tags. </summary> |
| | | 100 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 101 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 102 | | /// <param name="parameters"> Parameters supplied to update application gateway tags. </param> |
| | | 103 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 104 | | public virtual Response<ApplicationGateway> UpdateTags(string resourceGroupName, string applicationGatewayName, |
| | | 105 | | { |
| | 0 | 106 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.UpdateTags"); |
| | 0 | 107 | | scope.Start(); |
| | | 108 | | try |
| | | 109 | | { |
| | 0 | 110 | | return RestClient.UpdateTags(resourceGroupName, applicationGatewayName, parameters, cancellationToken); |
| | | 111 | | } |
| | 0 | 112 | | catch (Exception e) |
| | | 113 | | { |
| | 0 | 114 | | scope.Failed(e); |
| | 0 | 115 | | throw; |
| | | 116 | | } |
| | 0 | 117 | | } |
| | | 118 | | |
| | | 119 | | /// <summary> Lists all available server variables. </summary> |
| | | 120 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 121 | | public virtual async Task<Response<IReadOnlyList<string>>> ListAvailableServerVariablesAsync(CancellationToken c |
| | | 122 | | { |
| | 0 | 123 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableServerVariables |
| | 0 | 124 | | scope.Start(); |
| | | 125 | | try |
| | | 126 | | { |
| | 0 | 127 | | return await RestClient.ListAvailableServerVariablesAsync(cancellationToken).ConfigureAwait(false); |
| | | 128 | | } |
| | 0 | 129 | | catch (Exception e) |
| | | 130 | | { |
| | 0 | 131 | | scope.Failed(e); |
| | 0 | 132 | | throw; |
| | | 133 | | } |
| | 0 | 134 | | } |
| | | 135 | | |
| | | 136 | | /// <summary> Lists all available server variables. </summary> |
| | | 137 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 138 | | public virtual Response<IReadOnlyList<string>> ListAvailableServerVariables(CancellationToken cancellationToken |
| | | 139 | | { |
| | 0 | 140 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableServerVariables |
| | 0 | 141 | | scope.Start(); |
| | | 142 | | try |
| | | 143 | | { |
| | 0 | 144 | | return RestClient.ListAvailableServerVariables(cancellationToken); |
| | | 145 | | } |
| | 0 | 146 | | catch (Exception e) |
| | | 147 | | { |
| | 0 | 148 | | scope.Failed(e); |
| | 0 | 149 | | throw; |
| | | 150 | | } |
| | 0 | 151 | | } |
| | | 152 | | |
| | | 153 | | /// <summary> Lists all available request headers. </summary> |
| | | 154 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 155 | | public virtual async Task<Response<IReadOnlyList<string>>> ListAvailableRequestHeadersAsync(CancellationToken ca |
| | | 156 | | { |
| | 0 | 157 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableRequestHeaders" |
| | 0 | 158 | | scope.Start(); |
| | | 159 | | try |
| | | 160 | | { |
| | 0 | 161 | | return await RestClient.ListAvailableRequestHeadersAsync(cancellationToken).ConfigureAwait(false); |
| | | 162 | | } |
| | 0 | 163 | | catch (Exception e) |
| | | 164 | | { |
| | 0 | 165 | | scope.Failed(e); |
| | 0 | 166 | | throw; |
| | | 167 | | } |
| | 0 | 168 | | } |
| | | 169 | | |
| | | 170 | | /// <summary> Lists all available request headers. </summary> |
| | | 171 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 172 | | public virtual Response<IReadOnlyList<string>> ListAvailableRequestHeaders(CancellationToken cancellationToken = |
| | | 173 | | { |
| | 0 | 174 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableRequestHeaders" |
| | 0 | 175 | | scope.Start(); |
| | | 176 | | try |
| | | 177 | | { |
| | 0 | 178 | | return RestClient.ListAvailableRequestHeaders(cancellationToken); |
| | | 179 | | } |
| | 0 | 180 | | catch (Exception e) |
| | | 181 | | { |
| | 0 | 182 | | scope.Failed(e); |
| | 0 | 183 | | throw; |
| | | 184 | | } |
| | 0 | 185 | | } |
| | | 186 | | |
| | | 187 | | /// <summary> Lists all available response headers. </summary> |
| | | 188 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 189 | | public virtual async Task<Response<IReadOnlyList<string>>> ListAvailableResponseHeadersAsync(CancellationToken c |
| | | 190 | | { |
| | 0 | 191 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableResponseHeaders |
| | 0 | 192 | | scope.Start(); |
| | | 193 | | try |
| | | 194 | | { |
| | 0 | 195 | | return await RestClient.ListAvailableResponseHeadersAsync(cancellationToken).ConfigureAwait(false); |
| | | 196 | | } |
| | 0 | 197 | | catch (Exception e) |
| | | 198 | | { |
| | 0 | 199 | | scope.Failed(e); |
| | 0 | 200 | | throw; |
| | | 201 | | } |
| | 0 | 202 | | } |
| | | 203 | | |
| | | 204 | | /// <summary> Lists all available response headers. </summary> |
| | | 205 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 206 | | public virtual Response<IReadOnlyList<string>> ListAvailableResponseHeaders(CancellationToken cancellationToken |
| | | 207 | | { |
| | 0 | 208 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableResponseHeaders |
| | 0 | 209 | | scope.Start(); |
| | | 210 | | try |
| | | 211 | | { |
| | 0 | 212 | | return RestClient.ListAvailableResponseHeaders(cancellationToken); |
| | | 213 | | } |
| | 0 | 214 | | catch (Exception e) |
| | | 215 | | { |
| | 0 | 216 | | scope.Failed(e); |
| | 0 | 217 | | throw; |
| | | 218 | | } |
| | 0 | 219 | | } |
| | | 220 | | |
| | | 221 | | /// <summary> Lists all available web application firewall rule sets. </summary> |
| | | 222 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 223 | | public virtual async Task<Response<ApplicationGatewayAvailableWafRuleSetsResult>> ListAvailableWafRuleSetsAsync( |
| | | 224 | | { |
| | 0 | 225 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableWafRuleSets"); |
| | 0 | 226 | | scope.Start(); |
| | | 227 | | try |
| | | 228 | | { |
| | 0 | 229 | | return await RestClient.ListAvailableWafRuleSetsAsync(cancellationToken).ConfigureAwait(false); |
| | | 230 | | } |
| | 0 | 231 | | catch (Exception e) |
| | | 232 | | { |
| | 0 | 233 | | scope.Failed(e); |
| | 0 | 234 | | throw; |
| | | 235 | | } |
| | 0 | 236 | | } |
| | | 237 | | |
| | | 238 | | /// <summary> Lists all available web application firewall rule sets. </summary> |
| | | 239 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 240 | | public virtual Response<ApplicationGatewayAvailableWafRuleSetsResult> ListAvailableWafRuleSets(CancellationToken |
| | | 241 | | { |
| | 0 | 242 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableWafRuleSets"); |
| | 0 | 243 | | scope.Start(); |
| | | 244 | | try |
| | | 245 | | { |
| | 0 | 246 | | return RestClient.ListAvailableWafRuleSets(cancellationToken); |
| | | 247 | | } |
| | 0 | 248 | | catch (Exception e) |
| | | 249 | | { |
| | 0 | 250 | | scope.Failed(e); |
| | 0 | 251 | | throw; |
| | | 252 | | } |
| | 0 | 253 | | } |
| | | 254 | | |
| | | 255 | | /// <summary> Lists available Ssl options for configuring Ssl policy. </summary> |
| | | 256 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 257 | | public virtual async Task<Response<ApplicationGatewayAvailableSslOptions>> ListAvailableSslOptionsAsync(Cancella |
| | | 258 | | { |
| | 0 | 259 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableSslOptions"); |
| | 0 | 260 | | scope.Start(); |
| | | 261 | | try |
| | | 262 | | { |
| | 0 | 263 | | return await RestClient.ListAvailableSslOptionsAsync(cancellationToken).ConfigureAwait(false); |
| | | 264 | | } |
| | 0 | 265 | | catch (Exception e) |
| | | 266 | | { |
| | 0 | 267 | | scope.Failed(e); |
| | 0 | 268 | | throw; |
| | | 269 | | } |
| | 0 | 270 | | } |
| | | 271 | | |
| | | 272 | | /// <summary> Lists available Ssl options for configuring Ssl policy. </summary> |
| | | 273 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 274 | | public virtual Response<ApplicationGatewayAvailableSslOptions> ListAvailableSslOptions(CancellationToken cancell |
| | | 275 | | { |
| | 0 | 276 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableSslOptions"); |
| | 0 | 277 | | scope.Start(); |
| | | 278 | | try |
| | | 279 | | { |
| | 0 | 280 | | return RestClient.ListAvailableSslOptions(cancellationToken); |
| | | 281 | | } |
| | 0 | 282 | | catch (Exception e) |
| | | 283 | | { |
| | 0 | 284 | | scope.Failed(e); |
| | 0 | 285 | | throw; |
| | | 286 | | } |
| | 0 | 287 | | } |
| | | 288 | | |
| | | 289 | | /// <summary> Gets Ssl predefined policy with the specified policy name. </summary> |
| | | 290 | | /// <param name="predefinedPolicyName"> Name of Ssl predefined policy. </param> |
| | | 291 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 292 | | public virtual async Task<Response<ApplicationGatewaySslPredefinedPolicy>> GetSslPredefinedPolicyAsync(string pr |
| | | 293 | | { |
| | 0 | 294 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.GetSslPredefinedPolicy"); |
| | 0 | 295 | | scope.Start(); |
| | | 296 | | try |
| | | 297 | | { |
| | 0 | 298 | | return await RestClient.GetSslPredefinedPolicyAsync(predefinedPolicyName, cancellationToken).ConfigureAw |
| | | 299 | | } |
| | 0 | 300 | | catch (Exception e) |
| | | 301 | | { |
| | 0 | 302 | | scope.Failed(e); |
| | 0 | 303 | | throw; |
| | | 304 | | } |
| | 0 | 305 | | } |
| | | 306 | | |
| | | 307 | | /// <summary> Gets Ssl predefined policy with the specified policy name. </summary> |
| | | 308 | | /// <param name="predefinedPolicyName"> Name of Ssl predefined policy. </param> |
| | | 309 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 310 | | public virtual Response<ApplicationGatewaySslPredefinedPolicy> GetSslPredefinedPolicy(string predefinedPolicyNam |
| | | 311 | | { |
| | 0 | 312 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.GetSslPredefinedPolicy"); |
| | 0 | 313 | | scope.Start(); |
| | | 314 | | try |
| | | 315 | | { |
| | 0 | 316 | | return RestClient.GetSslPredefinedPolicy(predefinedPolicyName, cancellationToken); |
| | | 317 | | } |
| | 0 | 318 | | catch (Exception e) |
| | | 319 | | { |
| | 0 | 320 | | scope.Failed(e); |
| | 0 | 321 | | throw; |
| | | 322 | | } |
| | 0 | 323 | | } |
| | | 324 | | |
| | | 325 | | /// <summary> Lists all application gateways in a resource group. </summary> |
| | | 326 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 327 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 328 | | public virtual AsyncPageable<ApplicationGateway> ListAsync(string resourceGroupName, CancellationToken cancellat |
| | | 329 | | { |
| | 0 | 330 | | if (resourceGroupName == null) |
| | | 331 | | { |
| | 0 | 332 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 333 | | } |
| | | 334 | | |
| | | 335 | | async Task<Page<ApplicationGateway>> FirstPageFunc(int? pageSizeHint) |
| | | 336 | | { |
| | 0 | 337 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.List"); |
| | 0 | 338 | | scope.Start(); |
| | | 339 | | try |
| | | 340 | | { |
| | 0 | 341 | | var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false |
| | 0 | 342 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 343 | | } |
| | 0 | 344 | | catch (Exception e) |
| | | 345 | | { |
| | 0 | 346 | | scope.Failed(e); |
| | 0 | 347 | | throw; |
| | | 348 | | } |
| | 0 | 349 | | } |
| | | 350 | | async Task<Page<ApplicationGateway>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 351 | | { |
| | 0 | 352 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.List"); |
| | 0 | 353 | | scope.Start(); |
| | | 354 | | try |
| | | 355 | | { |
| | 0 | 356 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co |
| | 0 | 357 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 358 | | } |
| | 0 | 359 | | catch (Exception e) |
| | | 360 | | { |
| | 0 | 361 | | scope.Failed(e); |
| | 0 | 362 | | throw; |
| | | 363 | | } |
| | 0 | 364 | | } |
| | 0 | 365 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 366 | | } |
| | | 367 | | |
| | | 368 | | /// <summary> Lists all application gateways in a resource group. </summary> |
| | | 369 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 370 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 371 | | public virtual Pageable<ApplicationGateway> List(string resourceGroupName, CancellationToken cancellationToken = |
| | | 372 | | { |
| | 0 | 373 | | if (resourceGroupName == null) |
| | | 374 | | { |
| | 0 | 375 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 376 | | } |
| | | 377 | | |
| | | 378 | | Page<ApplicationGateway> FirstPageFunc(int? pageSizeHint) |
| | | 379 | | { |
| | 0 | 380 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.List"); |
| | 0 | 381 | | scope.Start(); |
| | | 382 | | try |
| | | 383 | | { |
| | 0 | 384 | | var response = RestClient.List(resourceGroupName, cancellationToken); |
| | 0 | 385 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 386 | | } |
| | 0 | 387 | | catch (Exception e) |
| | | 388 | | { |
| | 0 | 389 | | scope.Failed(e); |
| | 0 | 390 | | throw; |
| | | 391 | | } |
| | 0 | 392 | | } |
| | | 393 | | Page<ApplicationGateway> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 394 | | { |
| | 0 | 395 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.List"); |
| | 0 | 396 | | scope.Start(); |
| | | 397 | | try |
| | | 398 | | { |
| | 0 | 399 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken); |
| | 0 | 400 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 401 | | } |
| | 0 | 402 | | catch (Exception e) |
| | | 403 | | { |
| | 0 | 404 | | scope.Failed(e); |
| | 0 | 405 | | throw; |
| | | 406 | | } |
| | 0 | 407 | | } |
| | 0 | 408 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 409 | | } |
| | | 410 | | |
| | | 411 | | /// <summary> Gets all the application gateways in a subscription. </summary> |
| | | 412 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 413 | | public virtual AsyncPageable<ApplicationGateway> ListAllAsync(CancellationToken cancellationToken = default) |
| | | 414 | | { |
| | | 415 | | async Task<Page<ApplicationGateway>> FirstPageFunc(int? pageSizeHint) |
| | | 416 | | { |
| | 0 | 417 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAll"); |
| | 0 | 418 | | scope.Start(); |
| | | 419 | | try |
| | | 420 | | { |
| | 0 | 421 | | var response = await RestClient.ListAllAsync(cancellationToken).ConfigureAwait(false); |
| | 0 | 422 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 423 | | } |
| | 0 | 424 | | catch (Exception e) |
| | | 425 | | { |
| | 0 | 426 | | scope.Failed(e); |
| | 0 | 427 | | throw; |
| | | 428 | | } |
| | 0 | 429 | | } |
| | | 430 | | async Task<Page<ApplicationGateway>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 431 | | { |
| | 0 | 432 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAll"); |
| | 0 | 433 | | scope.Start(); |
| | | 434 | | try |
| | | 435 | | { |
| | 0 | 436 | | var response = await RestClient.ListAllNextPageAsync(nextLink, cancellationToken).ConfigureAwait(fal |
| | 0 | 437 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 438 | | } |
| | 0 | 439 | | catch (Exception e) |
| | | 440 | | { |
| | 0 | 441 | | scope.Failed(e); |
| | 0 | 442 | | throw; |
| | | 443 | | } |
| | 0 | 444 | | } |
| | 0 | 445 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 446 | | } |
| | | 447 | | |
| | | 448 | | /// <summary> Gets all the application gateways in a subscription. </summary> |
| | | 449 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 450 | | public virtual Pageable<ApplicationGateway> ListAll(CancellationToken cancellationToken = default) |
| | | 451 | | { |
| | | 452 | | Page<ApplicationGateway> FirstPageFunc(int? pageSizeHint) |
| | | 453 | | { |
| | 0 | 454 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAll"); |
| | 0 | 455 | | scope.Start(); |
| | | 456 | | try |
| | | 457 | | { |
| | 0 | 458 | | var response = RestClient.ListAll(cancellationToken); |
| | 0 | 459 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 460 | | } |
| | 0 | 461 | | catch (Exception e) |
| | | 462 | | { |
| | 0 | 463 | | scope.Failed(e); |
| | 0 | 464 | | throw; |
| | | 465 | | } |
| | 0 | 466 | | } |
| | | 467 | | Page<ApplicationGateway> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 468 | | { |
| | 0 | 469 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAll"); |
| | 0 | 470 | | scope.Start(); |
| | | 471 | | try |
| | | 472 | | { |
| | 0 | 473 | | var response = RestClient.ListAllNextPage(nextLink, cancellationToken); |
| | 0 | 474 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 475 | | } |
| | 0 | 476 | | catch (Exception e) |
| | | 477 | | { |
| | 0 | 478 | | scope.Failed(e); |
| | 0 | 479 | | throw; |
| | | 480 | | } |
| | 0 | 481 | | } |
| | 0 | 482 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 483 | | } |
| | | 484 | | |
| | | 485 | | /// <summary> Lists all SSL predefined policies for configuring Ssl policy. </summary> |
| | | 486 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 487 | | public virtual AsyncPageable<ApplicationGatewaySslPredefinedPolicy> ListAvailableSslPredefinedPoliciesAsync(Canc |
| | | 488 | | { |
| | | 489 | | async Task<Page<ApplicationGatewaySslPredefinedPolicy>> FirstPageFunc(int? pageSizeHint) |
| | | 490 | | { |
| | 0 | 491 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableSslPredefin |
| | 0 | 492 | | scope.Start(); |
| | | 493 | | try |
| | | 494 | | { |
| | 0 | 495 | | var response = await RestClient.ListAvailableSslPredefinedPoliciesAsync(cancellationToken).Configure |
| | 0 | 496 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 497 | | } |
| | 0 | 498 | | catch (Exception e) |
| | | 499 | | { |
| | 0 | 500 | | scope.Failed(e); |
| | 0 | 501 | | throw; |
| | | 502 | | } |
| | 0 | 503 | | } |
| | | 504 | | async Task<Page<ApplicationGatewaySslPredefinedPolicy>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 505 | | { |
| | 0 | 506 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableSslPredefin |
| | 0 | 507 | | scope.Start(); |
| | | 508 | | try |
| | | 509 | | { |
| | 0 | 510 | | var response = await RestClient.ListAvailableSslPredefinedPoliciesNextPageAsync(nextLink, cancellati |
| | 0 | 511 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 512 | | } |
| | 0 | 513 | | catch (Exception e) |
| | | 514 | | { |
| | 0 | 515 | | scope.Failed(e); |
| | 0 | 516 | | throw; |
| | | 517 | | } |
| | 0 | 518 | | } |
| | 0 | 519 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 520 | | } |
| | | 521 | | |
| | | 522 | | /// <summary> Lists all SSL predefined policies for configuring Ssl policy. </summary> |
| | | 523 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 524 | | public virtual Pageable<ApplicationGatewaySslPredefinedPolicy> ListAvailableSslPredefinedPolicies(CancellationTo |
| | | 525 | | { |
| | | 526 | | Page<ApplicationGatewaySslPredefinedPolicy> FirstPageFunc(int? pageSizeHint) |
| | | 527 | | { |
| | 0 | 528 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableSslPredefin |
| | 0 | 529 | | scope.Start(); |
| | | 530 | | try |
| | | 531 | | { |
| | 0 | 532 | | var response = RestClient.ListAvailableSslPredefinedPolicies(cancellationToken); |
| | 0 | 533 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 534 | | } |
| | 0 | 535 | | catch (Exception e) |
| | | 536 | | { |
| | 0 | 537 | | scope.Failed(e); |
| | 0 | 538 | | throw; |
| | | 539 | | } |
| | 0 | 540 | | } |
| | | 541 | | Page<ApplicationGatewaySslPredefinedPolicy> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 542 | | { |
| | 0 | 543 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.ListAvailableSslPredefin |
| | 0 | 544 | | scope.Start(); |
| | | 545 | | try |
| | | 546 | | { |
| | 0 | 547 | | var response = RestClient.ListAvailableSslPredefinedPoliciesNextPage(nextLink, cancellationToken); |
| | 0 | 548 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 549 | | } |
| | 0 | 550 | | catch (Exception e) |
| | | 551 | | { |
| | 0 | 552 | | scope.Failed(e); |
| | 0 | 553 | | throw; |
| | | 554 | | } |
| | 0 | 555 | | } |
| | 0 | 556 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 557 | | } |
| | | 558 | | |
| | | 559 | | /// <summary> Deletes the specified application gateway. </summary> |
| | | 560 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 561 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 562 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 563 | | public virtual async Task<ApplicationGatewaysDeleteOperation> StartDeleteAsync(string resourceGroupName, string |
| | | 564 | | { |
| | 0 | 565 | | if (resourceGroupName == null) |
| | | 566 | | { |
| | 0 | 567 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 568 | | } |
| | 0 | 569 | | if (applicationGatewayName == null) |
| | | 570 | | { |
| | 0 | 571 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 572 | | } |
| | | 573 | | |
| | 0 | 574 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartDelete"); |
| | 0 | 575 | | scope.Start(); |
| | | 576 | | try |
| | | 577 | | { |
| | 0 | 578 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, applicationGatewayName, cancellat |
| | 0 | 579 | | return new ApplicationGatewaysDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequ |
| | | 580 | | } |
| | 0 | 581 | | catch (Exception e) |
| | | 582 | | { |
| | 0 | 583 | | scope.Failed(e); |
| | 0 | 584 | | throw; |
| | | 585 | | } |
| | 0 | 586 | | } |
| | | 587 | | |
| | | 588 | | /// <summary> Deletes the specified application gateway. </summary> |
| | | 589 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 590 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 591 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 592 | | public virtual ApplicationGatewaysDeleteOperation StartDelete(string resourceGroupName, string applicationGatewa |
| | | 593 | | { |
| | 0 | 594 | | if (resourceGroupName == null) |
| | | 595 | | { |
| | 0 | 596 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 597 | | } |
| | 0 | 598 | | if (applicationGatewayName == null) |
| | | 599 | | { |
| | 0 | 600 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 601 | | } |
| | | 602 | | |
| | 0 | 603 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartDelete"); |
| | 0 | 604 | | scope.Start(); |
| | | 605 | | try |
| | | 606 | | { |
| | 0 | 607 | | var originalResponse = RestClient.Delete(resourceGroupName, applicationGatewayName, cancellationToken); |
| | 0 | 608 | | return new ApplicationGatewaysDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequ |
| | | 609 | | } |
| | 0 | 610 | | catch (Exception e) |
| | | 611 | | { |
| | 0 | 612 | | scope.Failed(e); |
| | 0 | 613 | | throw; |
| | | 614 | | } |
| | 0 | 615 | | } |
| | | 616 | | |
| | | 617 | | /// <summary> Creates or updates the specified application gateway. </summary> |
| | | 618 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 619 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 620 | | /// <param name="parameters"> Parameters supplied to the create or update application gateway operation. </param |
| | | 621 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 622 | | public virtual async Task<ApplicationGatewaysCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGr |
| | | 623 | | { |
| | 0 | 624 | | if (resourceGroupName == null) |
| | | 625 | | { |
| | 0 | 626 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 627 | | } |
| | 0 | 628 | | if (applicationGatewayName == null) |
| | | 629 | | { |
| | 0 | 630 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 631 | | } |
| | 0 | 632 | | if (parameters == null) |
| | | 633 | | { |
| | 0 | 634 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 635 | | } |
| | | 636 | | |
| | 0 | 637 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartCreateOrUpdate"); |
| | 0 | 638 | | scope.Start(); |
| | | 639 | | try |
| | | 640 | | { |
| | 0 | 641 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, applicationGatewayName, p |
| | 0 | 642 | | return new ApplicationGatewaysCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCr |
| | | 643 | | } |
| | 0 | 644 | | catch (Exception e) |
| | | 645 | | { |
| | 0 | 646 | | scope.Failed(e); |
| | 0 | 647 | | throw; |
| | | 648 | | } |
| | 0 | 649 | | } |
| | | 650 | | |
| | | 651 | | /// <summary> Creates or updates the specified application gateway. </summary> |
| | | 652 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 653 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 654 | | /// <param name="parameters"> Parameters supplied to the create or update application gateway operation. </param |
| | | 655 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 656 | | public virtual ApplicationGatewaysCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string a |
| | | 657 | | { |
| | 0 | 658 | | if (resourceGroupName == null) |
| | | 659 | | { |
| | 0 | 660 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 661 | | } |
| | 0 | 662 | | if (applicationGatewayName == null) |
| | | 663 | | { |
| | 0 | 664 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 665 | | } |
| | 0 | 666 | | if (parameters == null) |
| | | 667 | | { |
| | 0 | 668 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 669 | | } |
| | | 670 | | |
| | 0 | 671 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartCreateOrUpdate"); |
| | 0 | 672 | | scope.Start(); |
| | | 673 | | try |
| | | 674 | | { |
| | 0 | 675 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, applicationGatewayName, parameters, |
| | 0 | 676 | | return new ApplicationGatewaysCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCr |
| | | 677 | | } |
| | 0 | 678 | | catch (Exception e) |
| | | 679 | | { |
| | 0 | 680 | | scope.Failed(e); |
| | 0 | 681 | | throw; |
| | | 682 | | } |
| | 0 | 683 | | } |
| | | 684 | | |
| | | 685 | | /// <summary> Starts the specified application gateway. </summary> |
| | | 686 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 687 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 688 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 689 | | public virtual async Task<ApplicationGatewaysStartOperation> StartStartAsync(string resourceGroupName, string ap |
| | | 690 | | { |
| | 0 | 691 | | if (resourceGroupName == null) |
| | | 692 | | { |
| | 0 | 693 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 694 | | } |
| | 0 | 695 | | if (applicationGatewayName == null) |
| | | 696 | | { |
| | 0 | 697 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 698 | | } |
| | | 699 | | |
| | 0 | 700 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartStart"); |
| | 0 | 701 | | scope.Start(); |
| | | 702 | | try |
| | | 703 | | { |
| | 0 | 704 | | var originalResponse = await RestClient.StartAsync(resourceGroupName, applicationGatewayName, cancellati |
| | 0 | 705 | | return new ApplicationGatewaysStartOperation(_clientDiagnostics, _pipeline, RestClient.CreateStartReques |
| | | 706 | | } |
| | 0 | 707 | | catch (Exception e) |
| | | 708 | | { |
| | 0 | 709 | | scope.Failed(e); |
| | 0 | 710 | | throw; |
| | | 711 | | } |
| | 0 | 712 | | } |
| | | 713 | | |
| | | 714 | | /// <summary> Starts the specified application gateway. </summary> |
| | | 715 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 716 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 717 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 718 | | public virtual ApplicationGatewaysStartOperation StartStart(string resourceGroupName, string applicationGatewayN |
| | | 719 | | { |
| | 0 | 720 | | if (resourceGroupName == null) |
| | | 721 | | { |
| | 0 | 722 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 723 | | } |
| | 0 | 724 | | if (applicationGatewayName == null) |
| | | 725 | | { |
| | 0 | 726 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 727 | | } |
| | | 728 | | |
| | 0 | 729 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartStart"); |
| | 0 | 730 | | scope.Start(); |
| | | 731 | | try |
| | | 732 | | { |
| | 0 | 733 | | var originalResponse = RestClient.Start(resourceGroupName, applicationGatewayName, cancellationToken); |
| | 0 | 734 | | return new ApplicationGatewaysStartOperation(_clientDiagnostics, _pipeline, RestClient.CreateStartReques |
| | | 735 | | } |
| | 0 | 736 | | catch (Exception e) |
| | | 737 | | { |
| | 0 | 738 | | scope.Failed(e); |
| | 0 | 739 | | throw; |
| | | 740 | | } |
| | 0 | 741 | | } |
| | | 742 | | |
| | | 743 | | /// <summary> Stops the specified application gateway in a resource group. </summary> |
| | | 744 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 745 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 746 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 747 | | public virtual async Task<ApplicationGatewaysStopOperation> StartStopAsync(string resourceGroupName, string appl |
| | | 748 | | { |
| | 0 | 749 | | if (resourceGroupName == null) |
| | | 750 | | { |
| | 0 | 751 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 752 | | } |
| | 0 | 753 | | if (applicationGatewayName == null) |
| | | 754 | | { |
| | 0 | 755 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 756 | | } |
| | | 757 | | |
| | 0 | 758 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartStop"); |
| | 0 | 759 | | scope.Start(); |
| | | 760 | | try |
| | | 761 | | { |
| | 0 | 762 | | var originalResponse = await RestClient.StopAsync(resourceGroupName, applicationGatewayName, cancellatio |
| | 0 | 763 | | return new ApplicationGatewaysStopOperation(_clientDiagnostics, _pipeline, RestClient.CreateStopRequest( |
| | | 764 | | } |
| | 0 | 765 | | catch (Exception e) |
| | | 766 | | { |
| | 0 | 767 | | scope.Failed(e); |
| | 0 | 768 | | throw; |
| | | 769 | | } |
| | 0 | 770 | | } |
| | | 771 | | |
| | | 772 | | /// <summary> Stops the specified application gateway in a resource group. </summary> |
| | | 773 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 774 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 775 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 776 | | public virtual ApplicationGatewaysStopOperation StartStop(string resourceGroupName, string applicationGatewayNam |
| | | 777 | | { |
| | 0 | 778 | | if (resourceGroupName == null) |
| | | 779 | | { |
| | 0 | 780 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 781 | | } |
| | 0 | 782 | | if (applicationGatewayName == null) |
| | | 783 | | { |
| | 0 | 784 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 785 | | } |
| | | 786 | | |
| | 0 | 787 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartStop"); |
| | 0 | 788 | | scope.Start(); |
| | | 789 | | try |
| | | 790 | | { |
| | 0 | 791 | | var originalResponse = RestClient.Stop(resourceGroupName, applicationGatewayName, cancellationToken); |
| | 0 | 792 | | return new ApplicationGatewaysStopOperation(_clientDiagnostics, _pipeline, RestClient.CreateStopRequest( |
| | | 793 | | } |
| | 0 | 794 | | catch (Exception e) |
| | | 795 | | { |
| | 0 | 796 | | scope.Failed(e); |
| | 0 | 797 | | throw; |
| | | 798 | | } |
| | 0 | 799 | | } |
| | | 800 | | |
| | | 801 | | /// <summary> Gets the backend health of the specified application gateway in a resource group. </summary> |
| | | 802 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 803 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 804 | | /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par |
| | | 805 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 806 | | public virtual async Task<ApplicationGatewaysBackendHealthOperation> StartBackendHealthAsync(string resourceGrou |
| | | 807 | | { |
| | 0 | 808 | | if (resourceGroupName == null) |
| | | 809 | | { |
| | 0 | 810 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 811 | | } |
| | 0 | 812 | | if (applicationGatewayName == null) |
| | | 813 | | { |
| | 0 | 814 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 815 | | } |
| | | 816 | | |
| | 0 | 817 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartBackendHealth"); |
| | 0 | 818 | | scope.Start(); |
| | | 819 | | try |
| | | 820 | | { |
| | 0 | 821 | | var originalResponse = await RestClient.BackendHealthAsync(resourceGroupName, applicationGatewayName, ex |
| | 0 | 822 | | return new ApplicationGatewaysBackendHealthOperation(_clientDiagnostics, _pipeline, RestClient.CreateBac |
| | | 823 | | } |
| | 0 | 824 | | catch (Exception e) |
| | | 825 | | { |
| | 0 | 826 | | scope.Failed(e); |
| | 0 | 827 | | throw; |
| | | 828 | | } |
| | 0 | 829 | | } |
| | | 830 | | |
| | | 831 | | /// <summary> Gets the backend health of the specified application gateway in a resource group. </summary> |
| | | 832 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 833 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 834 | | /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par |
| | | 835 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 836 | | public virtual ApplicationGatewaysBackendHealthOperation StartBackendHealth(string resourceGroupName, string app |
| | | 837 | | { |
| | 0 | 838 | | if (resourceGroupName == null) |
| | | 839 | | { |
| | 0 | 840 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 841 | | } |
| | 0 | 842 | | if (applicationGatewayName == null) |
| | | 843 | | { |
| | 0 | 844 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 845 | | } |
| | | 846 | | |
| | 0 | 847 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartBackendHealth"); |
| | 0 | 848 | | scope.Start(); |
| | | 849 | | try |
| | | 850 | | { |
| | 0 | 851 | | var originalResponse = RestClient.BackendHealth(resourceGroupName, applicationGatewayName, expand, cance |
| | 0 | 852 | | return new ApplicationGatewaysBackendHealthOperation(_clientDiagnostics, _pipeline, RestClient.CreateBac |
| | | 853 | | } |
| | 0 | 854 | | catch (Exception e) |
| | | 855 | | { |
| | 0 | 856 | | scope.Failed(e); |
| | 0 | 857 | | throw; |
| | | 858 | | } |
| | 0 | 859 | | } |
| | | 860 | | |
| | | 861 | | /// <summary> Gets the backend health for given combination of backend pool and http setting of the specified ap |
| | | 862 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 863 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 864 | | /// <param name="probeRequest"> Request body for on-demand test probe operation. </param> |
| | | 865 | | /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par |
| | | 866 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 867 | | public virtual async Task<ApplicationGatewaysBackendHealthOnDemandOperation> StartBackendHealthOnDemandAsync(str |
| | | 868 | | { |
| | 0 | 869 | | if (resourceGroupName == null) |
| | | 870 | | { |
| | 0 | 871 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 872 | | } |
| | 0 | 873 | | if (applicationGatewayName == null) |
| | | 874 | | { |
| | 0 | 875 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 876 | | } |
| | 0 | 877 | | if (probeRequest == null) |
| | | 878 | | { |
| | 0 | 879 | | throw new ArgumentNullException(nameof(probeRequest)); |
| | | 880 | | } |
| | | 881 | | |
| | 0 | 882 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartBackendHealthOnDemand") |
| | 0 | 883 | | scope.Start(); |
| | | 884 | | try |
| | | 885 | | { |
| | 0 | 886 | | var originalResponse = await RestClient.BackendHealthOnDemandAsync(resourceGroupName, applicationGateway |
| | 0 | 887 | | return new ApplicationGatewaysBackendHealthOnDemandOperation(_clientDiagnostics, _pipeline, RestClient.C |
| | | 888 | | } |
| | 0 | 889 | | catch (Exception e) |
| | | 890 | | { |
| | 0 | 891 | | scope.Failed(e); |
| | 0 | 892 | | throw; |
| | | 893 | | } |
| | 0 | 894 | | } |
| | | 895 | | |
| | | 896 | | /// <summary> Gets the backend health for given combination of backend pool and http setting of the specified ap |
| | | 897 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 898 | | /// <param name="applicationGatewayName"> The name of the application gateway. </param> |
| | | 899 | | /// <param name="probeRequest"> Request body for on-demand test probe operation. </param> |
| | | 900 | | /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par |
| | | 901 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 902 | | public virtual ApplicationGatewaysBackendHealthOnDemandOperation StartBackendHealthOnDemand(string resourceGroup |
| | | 903 | | { |
| | 0 | 904 | | if (resourceGroupName == null) |
| | | 905 | | { |
| | 0 | 906 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 907 | | } |
| | 0 | 908 | | if (applicationGatewayName == null) |
| | | 909 | | { |
| | 0 | 910 | | throw new ArgumentNullException(nameof(applicationGatewayName)); |
| | | 911 | | } |
| | 0 | 912 | | if (probeRequest == null) |
| | | 913 | | { |
| | 0 | 914 | | throw new ArgumentNullException(nameof(probeRequest)); |
| | | 915 | | } |
| | | 916 | | |
| | 0 | 917 | | using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaysOperations.StartBackendHealthOnDemand") |
| | 0 | 918 | | scope.Start(); |
| | | 919 | | try |
| | | 920 | | { |
| | 0 | 921 | | var originalResponse = RestClient.BackendHealthOnDemand(resourceGroupName, applicationGatewayName, probe |
| | 0 | 922 | | return new ApplicationGatewaysBackendHealthOnDemandOperation(_clientDiagnostics, _pipeline, RestClient.C |
| | | 923 | | } |
| | 0 | 924 | | catch (Exception e) |
| | | 925 | | { |
| | 0 | 926 | | scope.Failed(e); |
| | 0 | 927 | | throw; |
| | | 928 | | } |
| | 0 | 929 | | } |
| | | 930 | | } |
| | | 931 | | } |