1package network 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/azure" 24 "github.com/Azure/go-autorest/tracing" 25 "net/http" 26) 27 28// ExpressRoutePortsClient is the network Client 29type ExpressRoutePortsClient struct { 30 BaseClient 31} 32 33// NewExpressRoutePortsClient creates an instance of the ExpressRoutePortsClient client. 34func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { 35 return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) 36} 37 38// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client using a custom 39// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure 40// stack). 41func NewExpressRoutePortsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsClient { 42 return ExpressRoutePortsClient{NewWithBaseURI(baseURI, subscriptionID)} 43} 44 45// CreateOrUpdate creates or updates the specified ExpressRoutePort resource. 46// Parameters: 47// resourceGroupName - the name of the resource group. 48// expressRoutePortName - the name of the ExpressRoutePort resource. 49// parameters - parameters supplied to the create ExpressRoutePort operation. 50func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (result ExpressRoutePortsCreateOrUpdateFuture, err error) { 51 if tracing.IsEnabled() { 52 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.CreateOrUpdate") 53 defer func() { 54 sc := -1 55 if result.Response() != nil { 56 sc = result.Response().StatusCode 57 } 58 tracing.EndSpan(ctx, sc, err) 59 }() 60 } 61 req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRoutePortName, parameters) 62 if err != nil { 63 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure preparing request") 64 return 65 } 66 67 result, err = client.CreateOrUpdateSender(req) 68 if err != nil { 69 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request") 70 return 71 } 72 73 return 74} 75 76// CreateOrUpdatePreparer prepares the CreateOrUpdate request. 77func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (*http.Request, error) { 78 pathParameters := map[string]interface{}{ 79 "expressRoutePortName": autorest.Encode("path", expressRoutePortName), 80 "resourceGroupName": autorest.Encode("path", resourceGroupName), 81 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 82 } 83 84 const APIVersion = "2020-04-01" 85 queryParameters := map[string]interface{}{ 86 "api-version": APIVersion, 87 } 88 89 parameters.Etag = nil 90 preparer := autorest.CreatePreparer( 91 autorest.AsContentType("application/json; charset=utf-8"), 92 autorest.AsPut(), 93 autorest.WithBaseURL(client.BaseURI), 94 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), 95 autorest.WithJSON(parameters), 96 autorest.WithQueryParameters(queryParameters)) 97 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 98} 99 100// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the 101// http.Response Body if it receives an error. 102func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) { 103 var resp *http.Response 104 resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) 105 if err != nil { 106 return 107 } 108 future.Future, err = azure.NewFutureFromResponse(resp) 109 return 110} 111 112// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always 113// closes the http.Response Body. 114func (client ExpressRoutePortsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePort, err error) { 115 err = autorest.Respond( 116 resp, 117 client.ByInspecting(), 118 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), 119 autorest.ByUnmarshallingJSON(&result), 120 autorest.ByClosing()) 121 result.Response = autorest.Response{Response: resp} 122 return 123} 124 125// Delete deletes the specified ExpressRoutePort resource. 126// Parameters: 127// resourceGroupName - the name of the resource group. 128// expressRoutePortName - the name of the ExpressRoutePort resource. 129func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortsDeleteFuture, err error) { 130 if tracing.IsEnabled() { 131 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Delete") 132 defer func() { 133 sc := -1 134 if result.Response() != nil { 135 sc = result.Response().StatusCode 136 } 137 tracing.EndSpan(ctx, sc, err) 138 }() 139 } 140 req, err := client.DeletePreparer(ctx, resourceGroupName, expressRoutePortName) 141 if err != nil { 142 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure preparing request") 143 return 144 } 145 146 result, err = client.DeleteSender(req) 147 if err != nil { 148 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request") 149 return 150 } 151 152 return 153} 154 155// DeletePreparer prepares the Delete request. 156func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { 157 pathParameters := map[string]interface{}{ 158 "expressRoutePortName": autorest.Encode("path", expressRoutePortName), 159 "resourceGroupName": autorest.Encode("path", resourceGroupName), 160 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 161 } 162 163 const APIVersion = "2020-04-01" 164 queryParameters := map[string]interface{}{ 165 "api-version": APIVersion, 166 } 167 168 preparer := autorest.CreatePreparer( 169 autorest.AsDelete(), 170 autorest.WithBaseURL(client.BaseURI), 171 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), 172 autorest.WithQueryParameters(queryParameters)) 173 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 174} 175 176// DeleteSender sends the Delete request. The method will close the 177// http.Response Body if it receives an error. 178func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) { 179 var resp *http.Response 180 resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) 181 if err != nil { 182 return 183 } 184 future.Future, err = azure.NewFutureFromResponse(resp) 185 return 186} 187 188// DeleteResponder handles the response to the Delete request. The method always 189// closes the http.Response Body. 190func (client ExpressRoutePortsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { 191 err = autorest.Respond( 192 resp, 193 client.ByInspecting(), 194 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), 195 autorest.ByClosing()) 196 result.Response = resp 197 return 198} 199 200// Get retrieves the requested ExpressRoutePort resource. 201// Parameters: 202// resourceGroupName - the name of the resource group. 203// expressRoutePortName - the name of ExpressRoutePort. 204func (client ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePort, err error) { 205 if tracing.IsEnabled() { 206 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Get") 207 defer func() { 208 sc := -1 209 if result.Response.Response != nil { 210 sc = result.Response.Response.StatusCode 211 } 212 tracing.EndSpan(ctx, sc, err) 213 }() 214 } 215 req, err := client.GetPreparer(ctx, resourceGroupName, expressRoutePortName) 216 if err != nil { 217 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", nil, "Failure preparing request") 218 return 219 } 220 221 resp, err := client.GetSender(req) 222 if err != nil { 223 result.Response = autorest.Response{Response: resp} 224 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure sending request") 225 return 226 } 227 228 result, err = client.GetResponder(resp) 229 if err != nil { 230 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure responding to request") 231 } 232 233 return 234} 235 236// GetPreparer prepares the Get request. 237func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { 238 pathParameters := map[string]interface{}{ 239 "expressRoutePortName": autorest.Encode("path", expressRoutePortName), 240 "resourceGroupName": autorest.Encode("path", resourceGroupName), 241 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 242 } 243 244 const APIVersion = "2020-04-01" 245 queryParameters := map[string]interface{}{ 246 "api-version": APIVersion, 247 } 248 249 preparer := autorest.CreatePreparer( 250 autorest.AsGet(), 251 autorest.WithBaseURL(client.BaseURI), 252 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), 253 autorest.WithQueryParameters(queryParameters)) 254 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 255} 256 257// GetSender sends the Get request. The method will close the 258// http.Response Body if it receives an error. 259func (client ExpressRoutePortsClient) GetSender(req *http.Request) (*http.Response, error) { 260 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 261} 262 263// GetResponder handles the response to the Get request. The method always 264// closes the http.Response Body. 265func (client ExpressRoutePortsClient) GetResponder(resp *http.Response) (result ExpressRoutePort, err error) { 266 err = autorest.Respond( 267 resp, 268 client.ByInspecting(), 269 azure.WithErrorUnlessStatusCode(http.StatusOK), 270 autorest.ByUnmarshallingJSON(&result), 271 autorest.ByClosing()) 272 result.Response = autorest.Response{Response: resp} 273 return 274} 275 276// List list all the ExpressRoutePort resources in the specified subscription. 277func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressRoutePortListResultPage, err error) { 278 if tracing.IsEnabled() { 279 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List") 280 defer func() { 281 sc := -1 282 if result.erplr.Response.Response != nil { 283 sc = result.erplr.Response.Response.StatusCode 284 } 285 tracing.EndSpan(ctx, sc, err) 286 }() 287 } 288 result.fn = client.listNextResults 289 req, err := client.ListPreparer(ctx) 290 if err != nil { 291 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", nil, "Failure preparing request") 292 return 293 } 294 295 resp, err := client.ListSender(req) 296 if err != nil { 297 result.erplr.Response = autorest.Response{Response: resp} 298 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure sending request") 299 return 300 } 301 302 result.erplr, err = client.ListResponder(resp) 303 if err != nil { 304 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure responding to request") 305 } 306 307 return 308} 309 310// ListPreparer prepares the List request. 311func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.Request, error) { 312 pathParameters := map[string]interface{}{ 313 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 314 } 315 316 const APIVersion = "2020-04-01" 317 queryParameters := map[string]interface{}{ 318 "api-version": APIVersion, 319 } 320 321 preparer := autorest.CreatePreparer( 322 autorest.AsGet(), 323 autorest.WithBaseURL(client.BaseURI), 324 autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts", pathParameters), 325 autorest.WithQueryParameters(queryParameters)) 326 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 327} 328 329// ListSender sends the List request. The method will close the 330// http.Response Body if it receives an error. 331func (client ExpressRoutePortsClient) ListSender(req *http.Request) (*http.Response, error) { 332 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 333} 334 335// ListResponder handles the response to the List request. The method always 336// closes the http.Response Body. 337func (client ExpressRoutePortsClient) ListResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { 338 err = autorest.Respond( 339 resp, 340 client.ByInspecting(), 341 azure.WithErrorUnlessStatusCode(http.StatusOK), 342 autorest.ByUnmarshallingJSON(&result), 343 autorest.ByClosing()) 344 result.Response = autorest.Response{Response: resp} 345 return 346} 347 348// listNextResults retrieves the next set of results, if any. 349func (client ExpressRoutePortsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) { 350 req, err := lastResults.expressRoutePortListResultPreparer(ctx) 351 if err != nil { 352 return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", nil, "Failure preparing next results request") 353 } 354 if req == nil { 355 return 356 } 357 resp, err := client.ListSender(req) 358 if err != nil { 359 result.Response = autorest.Response{Response: resp} 360 return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure sending next results request") 361 } 362 result, err = client.ListResponder(resp) 363 if err != nil { 364 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure responding to next results request") 365 } 366 return 367} 368 369// ListComplete enumerates all values, automatically crossing page boundaries as required. 370func (client ExpressRoutePortsClient) ListComplete(ctx context.Context) (result ExpressRoutePortListResultIterator, err error) { 371 if tracing.IsEnabled() { 372 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List") 373 defer func() { 374 sc := -1 375 if result.Response().Response.Response != nil { 376 sc = result.page.Response().Response.Response.StatusCode 377 } 378 tracing.EndSpan(ctx, sc, err) 379 }() 380 } 381 result.page, err = client.List(ctx) 382 return 383} 384 385// ListByResourceGroup list all the ExpressRoutePort resources in the specified resource group. 386// Parameters: 387// resourceGroupName - the name of the resource group. 388func (client ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultPage, err error) { 389 if tracing.IsEnabled() { 390 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup") 391 defer func() { 392 sc := -1 393 if result.erplr.Response.Response != nil { 394 sc = result.erplr.Response.Response.StatusCode 395 } 396 tracing.EndSpan(ctx, sc, err) 397 }() 398 } 399 result.fn = client.listByResourceGroupNextResults 400 req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) 401 if err != nil { 402 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", nil, "Failure preparing request") 403 return 404 } 405 406 resp, err := client.ListByResourceGroupSender(req) 407 if err != nil { 408 result.erplr.Response = autorest.Response{Response: resp} 409 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure sending request") 410 return 411 } 412 413 result.erplr, err = client.ListByResourceGroupResponder(resp) 414 if err != nil { 415 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure responding to request") 416 } 417 418 return 419} 420 421// ListByResourceGroupPreparer prepares the ListByResourceGroup request. 422func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { 423 pathParameters := map[string]interface{}{ 424 "resourceGroupName": autorest.Encode("path", resourceGroupName), 425 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 426 } 427 428 const APIVersion = "2020-04-01" 429 queryParameters := map[string]interface{}{ 430 "api-version": APIVersion, 431 } 432 433 preparer := autorest.CreatePreparer( 434 autorest.AsGet(), 435 autorest.WithBaseURL(client.BaseURI), 436 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts", pathParameters), 437 autorest.WithQueryParameters(queryParameters)) 438 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 439} 440 441// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the 442// http.Response Body if it receives an error. 443func (client ExpressRoutePortsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { 444 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 445} 446 447// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always 448// closes the http.Response Body. 449func (client ExpressRoutePortsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { 450 err = autorest.Respond( 451 resp, 452 client.ByInspecting(), 453 azure.WithErrorUnlessStatusCode(http.StatusOK), 454 autorest.ByUnmarshallingJSON(&result), 455 autorest.ByClosing()) 456 result.Response = autorest.Response{Response: resp} 457 return 458} 459 460// listByResourceGroupNextResults retrieves the next set of results, if any. 461func (client ExpressRoutePortsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) { 462 req, err := lastResults.expressRoutePortListResultPreparer(ctx) 463 if err != nil { 464 return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") 465 } 466 if req == nil { 467 return 468 } 469 resp, err := client.ListByResourceGroupSender(req) 470 if err != nil { 471 result.Response = autorest.Response{Response: resp} 472 return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") 473 } 474 result, err = client.ListByResourceGroupResponder(resp) 475 if err != nil { 476 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") 477 } 478 return 479} 480 481// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. 482func (client ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultIterator, err error) { 483 if tracing.IsEnabled() { 484 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup") 485 defer func() { 486 sc := -1 487 if result.Response().Response.Response != nil { 488 sc = result.page.Response().Response.Response.StatusCode 489 } 490 tracing.EndSpan(ctx, sc, err) 491 }() 492 } 493 result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) 494 return 495} 496 497// UpdateTags update ExpressRoutePort tags. 498// Parameters: 499// resourceGroupName - the name of the resource group. 500// expressRoutePortName - the name of the ExpressRoutePort resource. 501// parameters - parameters supplied to update ExpressRoutePort resource tags. 502func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (result ExpressRoutePort, err error) { 503 if tracing.IsEnabled() { 504 ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.UpdateTags") 505 defer func() { 506 sc := -1 507 if result.Response.Response != nil { 508 sc = result.Response.Response.StatusCode 509 } 510 tracing.EndSpan(ctx, sc, err) 511 }() 512 } 513 req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, expressRoutePortName, parameters) 514 if err != nil { 515 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", nil, "Failure preparing request") 516 return 517 } 518 519 resp, err := client.UpdateTagsSender(req) 520 if err != nil { 521 result.Response = autorest.Response{Response: resp} 522 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", resp, "Failure sending request") 523 return 524 } 525 526 result, err = client.UpdateTagsResponder(resp) 527 if err != nil { 528 err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", resp, "Failure responding to request") 529 } 530 531 return 532} 533 534// UpdateTagsPreparer prepares the UpdateTags request. 535func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (*http.Request, error) { 536 pathParameters := map[string]interface{}{ 537 "expressRoutePortName": autorest.Encode("path", expressRoutePortName), 538 "resourceGroupName": autorest.Encode("path", resourceGroupName), 539 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 540 } 541 542 const APIVersion = "2020-04-01" 543 queryParameters := map[string]interface{}{ 544 "api-version": APIVersion, 545 } 546 547 preparer := autorest.CreatePreparer( 548 autorest.AsContentType("application/json; charset=utf-8"), 549 autorest.AsPatch(), 550 autorest.WithBaseURL(client.BaseURI), 551 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters), 552 autorest.WithJSON(parameters), 553 autorest.WithQueryParameters(queryParameters)) 554 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 555} 556 557// UpdateTagsSender sends the UpdateTags request. The method will close the 558// http.Response Body if it receives an error. 559func (client ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { 560 return client.Send(req, azure.DoRetryWithRegistration(client.Client)) 561} 562 563// UpdateTagsResponder handles the response to the UpdateTags request. The method always 564// closes the http.Response Body. 565func (client ExpressRoutePortsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRoutePort, err error) { 566 err = autorest.Respond( 567 resp, 568 client.ByInspecting(), 569 azure.WithErrorUnlessStatusCode(http.StatusOK), 570 autorest.ByUnmarshallingJSON(&result), 571 autorest.ByClosing()) 572 result.Response = autorest.Response{Response: resp} 573 return 574} 575