| | | 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.Threading; |
| | | 10 | | using System.Threading.Tasks; |
| | | 11 | | using Azure; |
| | | 12 | | using Azure.Core; |
| | | 13 | | using Azure.Core.Pipeline; |
| | | 14 | | using Azure.ResourceManager.Network.Models; |
| | | 15 | | |
| | | 16 | | namespace Azure.ResourceManager.Network |
| | | 17 | | { |
| | | 18 | | /// <summary> The ExpressRouteCircuits service client. </summary> |
| | | 19 | | public partial class ExpressRouteCircuitsOperations |
| | | 20 | | { |
| | | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | | 22 | | private readonly HttpPipeline _pipeline; |
| | 0 | 23 | | internal ExpressRouteCircuitsRestOperations RestClient { get; } |
| | | 24 | | /// <summary> Initializes a new instance of ExpressRouteCircuitsOperations for mocking. </summary> |
| | 0 | 25 | | protected ExpressRouteCircuitsOperations() |
| | | 26 | | { |
| | 0 | 27 | | } |
| | | 28 | | /// <summary> Initializes a new instance of ExpressRouteCircuitsOperations. </summary> |
| | | 29 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | | 30 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | | 31 | | /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc |
| | | 32 | | /// <param name="endpoint"> server parameter. </param> |
| | 0 | 33 | | internal ExpressRouteCircuitsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subsc |
| | | 34 | | { |
| | 0 | 35 | | RestClient = new ExpressRouteCircuitsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| | 0 | 36 | | _clientDiagnostics = clientDiagnostics; |
| | 0 | 37 | | _pipeline = pipeline; |
| | 0 | 38 | | } |
| | | 39 | | |
| | | 40 | | /// <summary> Gets information about the specified express route circuit. </summary> |
| | | 41 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 42 | | /// <param name="circuitName"> The name of express route circuit. </param> |
| | | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 44 | | public virtual async Task<Response<ExpressRouteCircuit>> GetAsync(string resourceGroupName, string circuitName, |
| | | 45 | | { |
| | 0 | 46 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.Get"); |
| | 0 | 47 | | scope.Start(); |
| | | 48 | | try |
| | | 49 | | { |
| | 0 | 50 | | return await RestClient.GetAsync(resourceGroupName, circuitName, cancellationToken).ConfigureAwait(false |
| | | 51 | | } |
| | 0 | 52 | | catch (Exception e) |
| | | 53 | | { |
| | 0 | 54 | | scope.Failed(e); |
| | 0 | 55 | | throw; |
| | | 56 | | } |
| | 0 | 57 | | } |
| | | 58 | | |
| | | 59 | | /// <summary> Gets information about the specified express route circuit. </summary> |
| | | 60 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 61 | | /// <param name="circuitName"> The name of express route circuit. </param> |
| | | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 63 | | public virtual Response<ExpressRouteCircuit> Get(string resourceGroupName, string circuitName, CancellationToken |
| | | 64 | | { |
| | 0 | 65 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.Get"); |
| | 0 | 66 | | scope.Start(); |
| | | 67 | | try |
| | | 68 | | { |
| | 0 | 69 | | return RestClient.Get(resourceGroupName, circuitName, cancellationToken); |
| | | 70 | | } |
| | 0 | 71 | | catch (Exception e) |
| | | 72 | | { |
| | 0 | 73 | | scope.Failed(e); |
| | 0 | 74 | | throw; |
| | | 75 | | } |
| | 0 | 76 | | } |
| | | 77 | | |
| | | 78 | | /// <summary> Updates an express route circuit tags. </summary> |
| | | 79 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 80 | | /// <param name="circuitName"> The name of the circuit. </param> |
| | | 81 | | /// <param name="parameters"> Parameters supplied to update express route circuit tags. </param> |
| | | 82 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 83 | | public virtual async Task<Response<ExpressRouteCircuit>> UpdateTagsAsync(string resourceGroupName, string circui |
| | | 84 | | { |
| | 0 | 85 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.UpdateTags"); |
| | 0 | 86 | | scope.Start(); |
| | | 87 | | try |
| | | 88 | | { |
| | 0 | 89 | | return await RestClient.UpdateTagsAsync(resourceGroupName, circuitName, parameters, cancellationToken).C |
| | | 90 | | } |
| | 0 | 91 | | catch (Exception e) |
| | | 92 | | { |
| | 0 | 93 | | scope.Failed(e); |
| | 0 | 94 | | throw; |
| | | 95 | | } |
| | 0 | 96 | | } |
| | | 97 | | |
| | | 98 | | /// <summary> Updates an express route circuit tags. </summary> |
| | | 99 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 100 | | /// <param name="circuitName"> The name of the circuit. </param> |
| | | 101 | | /// <param name="parameters"> Parameters supplied to update express route circuit tags. </param> |
| | | 102 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 103 | | public virtual Response<ExpressRouteCircuit> UpdateTags(string resourceGroupName, string circuitName, TagsObject |
| | | 104 | | { |
| | 0 | 105 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.UpdateTags"); |
| | 0 | 106 | | scope.Start(); |
| | | 107 | | try |
| | | 108 | | { |
| | 0 | 109 | | return RestClient.UpdateTags(resourceGroupName, circuitName, parameters, cancellationToken); |
| | | 110 | | } |
| | 0 | 111 | | catch (Exception e) |
| | | 112 | | { |
| | 0 | 113 | | scope.Failed(e); |
| | 0 | 114 | | throw; |
| | | 115 | | } |
| | 0 | 116 | | } |
| | | 117 | | |
| | | 118 | | /// <summary> Gets all the stats from an express route circuit in a resource group. </summary> |
| | | 119 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 120 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 121 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 122 | | public virtual async Task<Response<ExpressRouteCircuitStats>> GetStatsAsync(string resourceGroupName, string cir |
| | | 123 | | { |
| | 0 | 124 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.GetStats"); |
| | 0 | 125 | | scope.Start(); |
| | | 126 | | try |
| | | 127 | | { |
| | 0 | 128 | | return await RestClient.GetStatsAsync(resourceGroupName, circuitName, cancellationToken).ConfigureAwait( |
| | | 129 | | } |
| | 0 | 130 | | catch (Exception e) |
| | | 131 | | { |
| | 0 | 132 | | scope.Failed(e); |
| | 0 | 133 | | throw; |
| | | 134 | | } |
| | 0 | 135 | | } |
| | | 136 | | |
| | | 137 | | /// <summary> Gets all the stats from an express route circuit in a resource group. </summary> |
| | | 138 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 139 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 140 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 141 | | public virtual Response<ExpressRouteCircuitStats> GetStats(string resourceGroupName, string circuitName, Cancell |
| | | 142 | | { |
| | 0 | 143 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.GetStats"); |
| | 0 | 144 | | scope.Start(); |
| | | 145 | | try |
| | | 146 | | { |
| | 0 | 147 | | return RestClient.GetStats(resourceGroupName, circuitName, cancellationToken); |
| | | 148 | | } |
| | 0 | 149 | | catch (Exception e) |
| | | 150 | | { |
| | 0 | 151 | | scope.Failed(e); |
| | 0 | 152 | | throw; |
| | | 153 | | } |
| | 0 | 154 | | } |
| | | 155 | | |
| | | 156 | | /// <summary> Gets all stats from an express route circuit in a resource group. </summary> |
| | | 157 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 158 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 159 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 160 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 161 | | public virtual async Task<Response<ExpressRouteCircuitStats>> GetPeeringStatsAsync(string resourceGroupName, str |
| | | 162 | | { |
| | 0 | 163 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.GetPeeringStats"); |
| | 0 | 164 | | scope.Start(); |
| | | 165 | | try |
| | | 166 | | { |
| | 0 | 167 | | return await RestClient.GetPeeringStatsAsync(resourceGroupName, circuitName, peeringName, cancellationTo |
| | | 168 | | } |
| | 0 | 169 | | catch (Exception e) |
| | | 170 | | { |
| | 0 | 171 | | scope.Failed(e); |
| | 0 | 172 | | throw; |
| | | 173 | | } |
| | 0 | 174 | | } |
| | | 175 | | |
| | | 176 | | /// <summary> Gets all stats from an express route circuit in a resource group. </summary> |
| | | 177 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 178 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 179 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 180 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 181 | | public virtual Response<ExpressRouteCircuitStats> GetPeeringStats(string resourceGroupName, string circuitName, |
| | | 182 | | { |
| | 0 | 183 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.GetPeeringStats"); |
| | 0 | 184 | | scope.Start(); |
| | | 185 | | try |
| | | 186 | | { |
| | 0 | 187 | | return RestClient.GetPeeringStats(resourceGroupName, circuitName, peeringName, cancellationToken); |
| | | 188 | | } |
| | 0 | 189 | | catch (Exception e) |
| | | 190 | | { |
| | 0 | 191 | | scope.Failed(e); |
| | 0 | 192 | | throw; |
| | | 193 | | } |
| | 0 | 194 | | } |
| | | 195 | | |
| | | 196 | | /// <summary> Gets all the express route circuits in a resource group. </summary> |
| | | 197 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 198 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 199 | | public virtual AsyncPageable<ExpressRouteCircuit> ListAsync(string resourceGroupName, CancellationToken cancella |
| | | 200 | | { |
| | 0 | 201 | | if (resourceGroupName == null) |
| | | 202 | | { |
| | 0 | 203 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 204 | | } |
| | | 205 | | |
| | | 206 | | async Task<Page<ExpressRouteCircuit>> FirstPageFunc(int? pageSizeHint) |
| | | 207 | | { |
| | 0 | 208 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.List"); |
| | 0 | 209 | | scope.Start(); |
| | | 210 | | try |
| | | 211 | | { |
| | 0 | 212 | | var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false |
| | 0 | 213 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 214 | | } |
| | 0 | 215 | | catch (Exception e) |
| | | 216 | | { |
| | 0 | 217 | | scope.Failed(e); |
| | 0 | 218 | | throw; |
| | | 219 | | } |
| | 0 | 220 | | } |
| | | 221 | | async Task<Page<ExpressRouteCircuit>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 222 | | { |
| | 0 | 223 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.List"); |
| | 0 | 224 | | scope.Start(); |
| | | 225 | | try |
| | | 226 | | { |
| | 0 | 227 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co |
| | 0 | 228 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 229 | | } |
| | 0 | 230 | | catch (Exception e) |
| | | 231 | | { |
| | 0 | 232 | | scope.Failed(e); |
| | 0 | 233 | | throw; |
| | | 234 | | } |
| | 0 | 235 | | } |
| | 0 | 236 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 237 | | } |
| | | 238 | | |
| | | 239 | | /// <summary> Gets all the express route circuits in a resource group. </summary> |
| | | 240 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 241 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 242 | | public virtual Pageable<ExpressRouteCircuit> List(string resourceGroupName, CancellationToken cancellationToken |
| | | 243 | | { |
| | 0 | 244 | | if (resourceGroupName == null) |
| | | 245 | | { |
| | 0 | 246 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 247 | | } |
| | | 248 | | |
| | | 249 | | Page<ExpressRouteCircuit> FirstPageFunc(int? pageSizeHint) |
| | | 250 | | { |
| | 0 | 251 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.List"); |
| | 0 | 252 | | scope.Start(); |
| | | 253 | | try |
| | | 254 | | { |
| | 0 | 255 | | var response = RestClient.List(resourceGroupName, cancellationToken); |
| | 0 | 256 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 257 | | } |
| | 0 | 258 | | catch (Exception e) |
| | | 259 | | { |
| | 0 | 260 | | scope.Failed(e); |
| | 0 | 261 | | throw; |
| | | 262 | | } |
| | 0 | 263 | | } |
| | | 264 | | Page<ExpressRouteCircuit> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 265 | | { |
| | 0 | 266 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.List"); |
| | 0 | 267 | | scope.Start(); |
| | | 268 | | try |
| | | 269 | | { |
| | 0 | 270 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken); |
| | 0 | 271 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 272 | | } |
| | 0 | 273 | | catch (Exception e) |
| | | 274 | | { |
| | 0 | 275 | | scope.Failed(e); |
| | 0 | 276 | | throw; |
| | | 277 | | } |
| | 0 | 278 | | } |
| | 0 | 279 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 280 | | } |
| | | 281 | | |
| | | 282 | | /// <summary> Gets all the express route circuits in a subscription. </summary> |
| | | 283 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 284 | | public virtual AsyncPageable<ExpressRouteCircuit> ListAllAsync(CancellationToken cancellationToken = default) |
| | | 285 | | { |
| | | 286 | | async Task<Page<ExpressRouteCircuit>> FirstPageFunc(int? pageSizeHint) |
| | | 287 | | { |
| | 0 | 288 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.ListAll"); |
| | 0 | 289 | | scope.Start(); |
| | | 290 | | try |
| | | 291 | | { |
| | 0 | 292 | | var response = await RestClient.ListAllAsync(cancellationToken).ConfigureAwait(false); |
| | 0 | 293 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 294 | | } |
| | 0 | 295 | | catch (Exception e) |
| | | 296 | | { |
| | 0 | 297 | | scope.Failed(e); |
| | 0 | 298 | | throw; |
| | | 299 | | } |
| | 0 | 300 | | } |
| | | 301 | | async Task<Page<ExpressRouteCircuit>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 302 | | { |
| | 0 | 303 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.ListAll"); |
| | 0 | 304 | | scope.Start(); |
| | | 305 | | try |
| | | 306 | | { |
| | 0 | 307 | | var response = await RestClient.ListAllNextPageAsync(nextLink, cancellationToken).ConfigureAwait(fal |
| | 0 | 308 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 309 | | } |
| | 0 | 310 | | catch (Exception e) |
| | | 311 | | { |
| | 0 | 312 | | scope.Failed(e); |
| | 0 | 313 | | throw; |
| | | 314 | | } |
| | 0 | 315 | | } |
| | 0 | 316 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 317 | | } |
| | | 318 | | |
| | | 319 | | /// <summary> Gets all the express route circuits in a subscription. </summary> |
| | | 320 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 321 | | public virtual Pageable<ExpressRouteCircuit> ListAll(CancellationToken cancellationToken = default) |
| | | 322 | | { |
| | | 323 | | Page<ExpressRouteCircuit> FirstPageFunc(int? pageSizeHint) |
| | | 324 | | { |
| | 0 | 325 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.ListAll"); |
| | 0 | 326 | | scope.Start(); |
| | | 327 | | try |
| | | 328 | | { |
| | 0 | 329 | | var response = RestClient.ListAll(cancellationToken); |
| | 0 | 330 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 331 | | } |
| | 0 | 332 | | catch (Exception e) |
| | | 333 | | { |
| | 0 | 334 | | scope.Failed(e); |
| | 0 | 335 | | throw; |
| | | 336 | | } |
| | 0 | 337 | | } |
| | | 338 | | Page<ExpressRouteCircuit> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 339 | | { |
| | 0 | 340 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.ListAll"); |
| | 0 | 341 | | scope.Start(); |
| | | 342 | | try |
| | | 343 | | { |
| | 0 | 344 | | var response = RestClient.ListAllNextPage(nextLink, cancellationToken); |
| | 0 | 345 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 346 | | } |
| | 0 | 347 | | catch (Exception e) |
| | | 348 | | { |
| | 0 | 349 | | scope.Failed(e); |
| | 0 | 350 | | throw; |
| | | 351 | | } |
| | 0 | 352 | | } |
| | 0 | 353 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 354 | | } |
| | | 355 | | |
| | | 356 | | /// <summary> Deletes the specified express route circuit. </summary> |
| | | 357 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 358 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 359 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 360 | | public virtual async Task<ExpressRouteCircuitsDeleteOperation> StartDeleteAsync(string resourceGroupName, string |
| | | 361 | | { |
| | 0 | 362 | | if (resourceGroupName == null) |
| | | 363 | | { |
| | 0 | 364 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 365 | | } |
| | 0 | 366 | | if (circuitName == null) |
| | | 367 | | { |
| | 0 | 368 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 369 | | } |
| | | 370 | | |
| | 0 | 371 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartDelete"); |
| | 0 | 372 | | scope.Start(); |
| | | 373 | | try |
| | | 374 | | { |
| | 0 | 375 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, circuitName, cancellationToken).C |
| | 0 | 376 | | return new ExpressRouteCircuitsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteReq |
| | | 377 | | } |
| | 0 | 378 | | catch (Exception e) |
| | | 379 | | { |
| | 0 | 380 | | scope.Failed(e); |
| | 0 | 381 | | throw; |
| | | 382 | | } |
| | 0 | 383 | | } |
| | | 384 | | |
| | | 385 | | /// <summary> Deletes the specified express route circuit. </summary> |
| | | 386 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 387 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 388 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 389 | | public virtual ExpressRouteCircuitsDeleteOperation StartDelete(string resourceGroupName, string circuitName, Can |
| | | 390 | | { |
| | 0 | 391 | | if (resourceGroupName == null) |
| | | 392 | | { |
| | 0 | 393 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 394 | | } |
| | 0 | 395 | | if (circuitName == null) |
| | | 396 | | { |
| | 0 | 397 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 398 | | } |
| | | 399 | | |
| | 0 | 400 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartDelete"); |
| | 0 | 401 | | scope.Start(); |
| | | 402 | | try |
| | | 403 | | { |
| | 0 | 404 | | var originalResponse = RestClient.Delete(resourceGroupName, circuitName, cancellationToken); |
| | 0 | 405 | | return new ExpressRouteCircuitsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteReq |
| | | 406 | | } |
| | 0 | 407 | | catch (Exception e) |
| | | 408 | | { |
| | 0 | 409 | | scope.Failed(e); |
| | 0 | 410 | | throw; |
| | | 411 | | } |
| | 0 | 412 | | } |
| | | 413 | | |
| | | 414 | | /// <summary> Creates or updates an express route circuit. </summary> |
| | | 415 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 416 | | /// <param name="circuitName"> The name of the circuit. </param> |
| | | 417 | | /// <param name="parameters"> Parameters supplied to the create or update express route circuit operation. </par |
| | | 418 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 419 | | public virtual async Task<ExpressRouteCircuitsCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceG |
| | | 420 | | { |
| | 0 | 421 | | if (resourceGroupName == null) |
| | | 422 | | { |
| | 0 | 423 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 424 | | } |
| | 0 | 425 | | if (circuitName == null) |
| | | 426 | | { |
| | 0 | 427 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 428 | | } |
| | 0 | 429 | | if (parameters == null) |
| | | 430 | | { |
| | 0 | 431 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 432 | | } |
| | | 433 | | |
| | 0 | 434 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartCreateOrUpdate"); |
| | 0 | 435 | | scope.Start(); |
| | | 436 | | try |
| | | 437 | | { |
| | 0 | 438 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, circuitName, parameters, |
| | 0 | 439 | | return new ExpressRouteCircuitsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateC |
| | | 440 | | } |
| | 0 | 441 | | catch (Exception e) |
| | | 442 | | { |
| | 0 | 443 | | scope.Failed(e); |
| | 0 | 444 | | throw; |
| | | 445 | | } |
| | 0 | 446 | | } |
| | | 447 | | |
| | | 448 | | /// <summary> Creates or updates an express route circuit. </summary> |
| | | 449 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 450 | | /// <param name="circuitName"> The name of the circuit. </param> |
| | | 451 | | /// <param name="parameters"> Parameters supplied to the create or update express route circuit operation. </par |
| | | 452 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 453 | | public virtual ExpressRouteCircuitsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string |
| | | 454 | | { |
| | 0 | 455 | | if (resourceGroupName == null) |
| | | 456 | | { |
| | 0 | 457 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 458 | | } |
| | 0 | 459 | | if (circuitName == null) |
| | | 460 | | { |
| | 0 | 461 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 462 | | } |
| | 0 | 463 | | if (parameters == null) |
| | | 464 | | { |
| | 0 | 465 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 466 | | } |
| | | 467 | | |
| | 0 | 468 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartCreateOrUpdate"); |
| | 0 | 469 | | scope.Start(); |
| | | 470 | | try |
| | | 471 | | { |
| | 0 | 472 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, circuitName, parameters, cancellatio |
| | 0 | 473 | | return new ExpressRouteCircuitsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateC |
| | | 474 | | } |
| | 0 | 475 | | catch (Exception e) |
| | | 476 | | { |
| | 0 | 477 | | scope.Failed(e); |
| | 0 | 478 | | throw; |
| | | 479 | | } |
| | 0 | 480 | | } |
| | | 481 | | |
| | | 482 | | /// <summary> Gets the currently advertised ARP table associated with the express route circuit in a resource gr |
| | | 483 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 484 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 485 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 486 | | /// <param name="devicePath"> The path of the device. </param> |
| | | 487 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 488 | | public virtual async Task<ExpressRouteCircuitsListArpTableOperation> StartListArpTableAsync(string resourceGroup |
| | | 489 | | { |
| | 0 | 490 | | if (resourceGroupName == null) |
| | | 491 | | { |
| | 0 | 492 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 493 | | } |
| | 0 | 494 | | if (circuitName == null) |
| | | 495 | | { |
| | 0 | 496 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 497 | | } |
| | 0 | 498 | | if (peeringName == null) |
| | | 499 | | { |
| | 0 | 500 | | throw new ArgumentNullException(nameof(peeringName)); |
| | | 501 | | } |
| | 0 | 502 | | if (devicePath == null) |
| | | 503 | | { |
| | 0 | 504 | | throw new ArgumentNullException(nameof(devicePath)); |
| | | 505 | | } |
| | | 506 | | |
| | 0 | 507 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartListArpTable"); |
| | 0 | 508 | | scope.Start(); |
| | | 509 | | try |
| | | 510 | | { |
| | 0 | 511 | | var originalResponse = await RestClient.ListArpTableAsync(resourceGroupName, circuitName, peeringName, d |
| | 0 | 512 | | return new ExpressRouteCircuitsListArpTableOperation(_clientDiagnostics, _pipeline, RestClient.CreateLis |
| | | 513 | | } |
| | 0 | 514 | | catch (Exception e) |
| | | 515 | | { |
| | 0 | 516 | | scope.Failed(e); |
| | 0 | 517 | | throw; |
| | | 518 | | } |
| | 0 | 519 | | } |
| | | 520 | | |
| | | 521 | | /// <summary> Gets the currently advertised ARP table associated with the express route circuit in a resource gr |
| | | 522 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 523 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 524 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 525 | | /// <param name="devicePath"> The path of the device. </param> |
| | | 526 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 527 | | public virtual ExpressRouteCircuitsListArpTableOperation StartListArpTable(string resourceGroupName, string circ |
| | | 528 | | { |
| | 0 | 529 | | if (resourceGroupName == null) |
| | | 530 | | { |
| | 0 | 531 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 532 | | } |
| | 0 | 533 | | if (circuitName == null) |
| | | 534 | | { |
| | 0 | 535 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 536 | | } |
| | 0 | 537 | | if (peeringName == null) |
| | | 538 | | { |
| | 0 | 539 | | throw new ArgumentNullException(nameof(peeringName)); |
| | | 540 | | } |
| | 0 | 541 | | if (devicePath == null) |
| | | 542 | | { |
| | 0 | 543 | | throw new ArgumentNullException(nameof(devicePath)); |
| | | 544 | | } |
| | | 545 | | |
| | 0 | 546 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartListArpTable"); |
| | 0 | 547 | | scope.Start(); |
| | | 548 | | try |
| | | 549 | | { |
| | 0 | 550 | | var originalResponse = RestClient.ListArpTable(resourceGroupName, circuitName, peeringName, devicePath, |
| | 0 | 551 | | return new ExpressRouteCircuitsListArpTableOperation(_clientDiagnostics, _pipeline, RestClient.CreateLis |
| | | 552 | | } |
| | 0 | 553 | | catch (Exception e) |
| | | 554 | | { |
| | 0 | 555 | | scope.Failed(e); |
| | 0 | 556 | | throw; |
| | | 557 | | } |
| | 0 | 558 | | } |
| | | 559 | | |
| | | 560 | | /// <summary> Gets the currently advertised routes table associated with the express route circuit in a resource |
| | | 561 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 562 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 563 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 564 | | /// <param name="devicePath"> The path of the device. </param> |
| | | 565 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 566 | | public virtual async Task<ExpressRouteCircuitsListRoutesTableOperation> StartListRoutesTableAsync(string resourc |
| | | 567 | | { |
| | 0 | 568 | | if (resourceGroupName == null) |
| | | 569 | | { |
| | 0 | 570 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 571 | | } |
| | 0 | 572 | | if (circuitName == null) |
| | | 573 | | { |
| | 0 | 574 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 575 | | } |
| | 0 | 576 | | if (peeringName == null) |
| | | 577 | | { |
| | 0 | 578 | | throw new ArgumentNullException(nameof(peeringName)); |
| | | 579 | | } |
| | 0 | 580 | | if (devicePath == null) |
| | | 581 | | { |
| | 0 | 582 | | throw new ArgumentNullException(nameof(devicePath)); |
| | | 583 | | } |
| | | 584 | | |
| | 0 | 585 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartListRoutesTable"); |
| | 0 | 586 | | scope.Start(); |
| | | 587 | | try |
| | | 588 | | { |
| | 0 | 589 | | var originalResponse = await RestClient.ListRoutesTableAsync(resourceGroupName, circuitName, peeringName |
| | 0 | 590 | | return new ExpressRouteCircuitsListRoutesTableOperation(_clientDiagnostics, _pipeline, RestClient.Create |
| | | 591 | | } |
| | 0 | 592 | | catch (Exception e) |
| | | 593 | | { |
| | 0 | 594 | | scope.Failed(e); |
| | 0 | 595 | | throw; |
| | | 596 | | } |
| | 0 | 597 | | } |
| | | 598 | | |
| | | 599 | | /// <summary> Gets the currently advertised routes table associated with the express route circuit in a resource |
| | | 600 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 601 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 602 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 603 | | /// <param name="devicePath"> The path of the device. </param> |
| | | 604 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 605 | | public virtual ExpressRouteCircuitsListRoutesTableOperation StartListRoutesTable(string resourceGroupName, strin |
| | | 606 | | { |
| | 0 | 607 | | if (resourceGroupName == null) |
| | | 608 | | { |
| | 0 | 609 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 610 | | } |
| | 0 | 611 | | if (circuitName == null) |
| | | 612 | | { |
| | 0 | 613 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 614 | | } |
| | 0 | 615 | | if (peeringName == null) |
| | | 616 | | { |
| | 0 | 617 | | throw new ArgumentNullException(nameof(peeringName)); |
| | | 618 | | } |
| | 0 | 619 | | if (devicePath == null) |
| | | 620 | | { |
| | 0 | 621 | | throw new ArgumentNullException(nameof(devicePath)); |
| | | 622 | | } |
| | | 623 | | |
| | 0 | 624 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartListRoutesTable"); |
| | 0 | 625 | | scope.Start(); |
| | | 626 | | try |
| | | 627 | | { |
| | 0 | 628 | | var originalResponse = RestClient.ListRoutesTable(resourceGroupName, circuitName, peeringName, devicePat |
| | 0 | 629 | | return new ExpressRouteCircuitsListRoutesTableOperation(_clientDiagnostics, _pipeline, RestClient.Create |
| | | 630 | | } |
| | 0 | 631 | | catch (Exception e) |
| | | 632 | | { |
| | 0 | 633 | | scope.Failed(e); |
| | 0 | 634 | | throw; |
| | | 635 | | } |
| | 0 | 636 | | } |
| | | 637 | | |
| | | 638 | | /// <summary> Gets the currently advertised routes table summary associated with the express route circuit in a |
| | | 639 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 640 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 641 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 642 | | /// <param name="devicePath"> The path of the device. </param> |
| | | 643 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 644 | | public virtual async Task<ExpressRouteCircuitsListRoutesTableSummaryOperation> StartListRoutesTableSummaryAsync( |
| | | 645 | | { |
| | 0 | 646 | | if (resourceGroupName == null) |
| | | 647 | | { |
| | 0 | 648 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 649 | | } |
| | 0 | 650 | | if (circuitName == null) |
| | | 651 | | { |
| | 0 | 652 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 653 | | } |
| | 0 | 654 | | if (peeringName == null) |
| | | 655 | | { |
| | 0 | 656 | | throw new ArgumentNullException(nameof(peeringName)); |
| | | 657 | | } |
| | 0 | 658 | | if (devicePath == null) |
| | | 659 | | { |
| | 0 | 660 | | throw new ArgumentNullException(nameof(devicePath)); |
| | | 661 | | } |
| | | 662 | | |
| | 0 | 663 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartListRoutesTableSummary |
| | 0 | 664 | | scope.Start(); |
| | | 665 | | try |
| | | 666 | | { |
| | 0 | 667 | | var originalResponse = await RestClient.ListRoutesTableSummaryAsync(resourceGroupName, circuitName, peer |
| | 0 | 668 | | return new ExpressRouteCircuitsListRoutesTableSummaryOperation(_clientDiagnostics, _pipeline, RestClient |
| | | 669 | | } |
| | 0 | 670 | | catch (Exception e) |
| | | 671 | | { |
| | 0 | 672 | | scope.Failed(e); |
| | 0 | 673 | | throw; |
| | | 674 | | } |
| | 0 | 675 | | } |
| | | 676 | | |
| | | 677 | | /// <summary> Gets the currently advertised routes table summary associated with the express route circuit in a |
| | | 678 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 679 | | /// <param name="circuitName"> The name of the express route circuit. </param> |
| | | 680 | | /// <param name="peeringName"> The name of the peering. </param> |
| | | 681 | | /// <param name="devicePath"> The path of the device. </param> |
| | | 682 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 683 | | public virtual ExpressRouteCircuitsListRoutesTableSummaryOperation StartListRoutesTableSummary(string resourceGr |
| | | 684 | | { |
| | 0 | 685 | | if (resourceGroupName == null) |
| | | 686 | | { |
| | 0 | 687 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 688 | | } |
| | 0 | 689 | | if (circuitName == null) |
| | | 690 | | { |
| | 0 | 691 | | throw new ArgumentNullException(nameof(circuitName)); |
| | | 692 | | } |
| | 0 | 693 | | if (peeringName == null) |
| | | 694 | | { |
| | 0 | 695 | | throw new ArgumentNullException(nameof(peeringName)); |
| | | 696 | | } |
| | 0 | 697 | | if (devicePath == null) |
| | | 698 | | { |
| | 0 | 699 | | throw new ArgumentNullException(nameof(devicePath)); |
| | | 700 | | } |
| | | 701 | | |
| | 0 | 702 | | using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitsOperations.StartListRoutesTableSummary |
| | 0 | 703 | | scope.Start(); |
| | | 704 | | try |
| | | 705 | | { |
| | 0 | 706 | | var originalResponse = RestClient.ListRoutesTableSummary(resourceGroupName, circuitName, peeringName, de |
| | 0 | 707 | | return new ExpressRouteCircuitsListRoutesTableSummaryOperation(_clientDiagnostics, _pipeline, RestClient |
| | | 708 | | } |
| | 0 | 709 | | catch (Exception e) |
| | | 710 | | { |
| | 0 | 711 | | scope.Failed(e); |
| | 0 | 712 | | throw; |
| | | 713 | | } |
| | 0 | 714 | | } |
| | | 715 | | } |
| | | 716 | | } |