3
// Copyright (c) Microsoft and contributors. All rights reserved.
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
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.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
17
// Code generated by Microsoft (R) AutoRest Code Generator 0.12.0.0
18
// Changes may cause incorrect behavior and will be lost if the code is
22
"github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest"
27
// InterfacesClient is the the Windows Azure Network management API provides a
28
// RESTful set of web services that interact with Windows Azure Networks
29
// service to manage your network resrources. The API has entities that
30
// capture the relationship between an end user and the Windows Azure
32
type InterfacesClient struct {
36
// NewInterfacesClient creates an instance of the InterfacesClient client.
37
func NewInterfacesClient(subscriptionID string) InterfacesClient {
38
return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID)
41
// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient
43
func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient {
44
return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)}
47
// CreateOrUpdate the Put NetworkInterface operation creates/updates a
50
// resourceGroupName is the name of the resource group. networkInterfaceName
51
// is the name of the network interface. parameters is parameters supplied to
52
// the create/update NetworkInterface operation
53
func (client InterfacesClient) CreateOrUpdate(resourceGroupName string, networkInterfaceName string, parameters Interface) (result Interface, ae error) {
54
req, err := client.CreateOrUpdatePreparer(resourceGroupName, networkInterfaceName, parameters)
56
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "CreateOrUpdate", "Failure preparing request")
59
resp, err := client.CreateOrUpdateSender(req)
61
result.Response = autorest.Response{Response: resp}
62
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "CreateOrUpdate", "Failure sending request")
65
result, err = client.CreateOrUpdateResponder(resp)
67
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "CreateOrUpdate", "Failure responding to request")
73
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
74
func (client InterfacesClient) CreateOrUpdatePreparer(resourceGroupName string, networkInterfaceName string, parameters Interface) (*http.Request, error) {
75
pathParameters := map[string]interface{}{
76
"networkInterfaceName": url.QueryEscape(networkInterfaceName),
77
"resourceGroupName": url.QueryEscape(resourceGroupName),
78
"subscriptionId": url.QueryEscape(client.SubscriptionID),
81
queryParameters := map[string]interface{}{
82
"api-version": APIVersion,
85
return autorest.Prepare(&http.Request{},
88
autorest.WithBaseURL(client.BaseURI),
89
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"),
90
autorest.WithJSON(parameters),
91
autorest.WithPathParameters(pathParameters),
92
autorest.WithQueryParameters(queryParameters))
95
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
96
// http.Response Body if it receives an error.
97
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
98
return client.Send(req, http.StatusCreated, http.StatusOK)
101
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
102
// closes the http.Response Body.
103
func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (result Interface, err error) {
104
err = autorest.Respond(
106
client.ByInspecting(),
107
autorest.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK),
108
autorest.ByUnmarshallingJSON(&result),
109
autorest.ByClosing())
110
result.Response = autorest.Response{Response: resp}
114
// Delete the delete netwokInterface operation deletes the specified
117
// resourceGroupName is the name of the resource group. networkInterfaceName
118
// is the name of the network interface.
119
func (client InterfacesClient) Delete(resourceGroupName string, networkInterfaceName string) (result autorest.Response, ae error) {
120
req, err := client.DeletePreparer(resourceGroupName, networkInterfaceName)
122
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "Delete", "Failure preparing request")
125
resp, err := client.DeleteSender(req)
127
result.Response = resp
128
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "Delete", "Failure sending request")
131
result, err = client.DeleteResponder(resp)
133
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "Delete", "Failure responding to request")
139
// DeletePreparer prepares the Delete request.
140
func (client InterfacesClient) DeletePreparer(resourceGroupName string, networkInterfaceName string) (*http.Request, error) {
141
pathParameters := map[string]interface{}{
142
"networkInterfaceName": url.QueryEscape(networkInterfaceName),
143
"resourceGroupName": url.QueryEscape(resourceGroupName),
144
"subscriptionId": url.QueryEscape(client.SubscriptionID),
147
queryParameters := map[string]interface{}{
148
"api-version": APIVersion,
151
return autorest.Prepare(&http.Request{},
154
autorest.WithBaseURL(client.BaseURI),
155
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"),
156
autorest.WithPathParameters(pathParameters),
157
autorest.WithQueryParameters(queryParameters))
160
// DeleteSender sends the Delete request. The method will close the
161
// http.Response Body if it receives an error.
162
func (client InterfacesClient) DeleteSender(req *http.Request) (*http.Response, error) {
163
return client.Send(req, http.StatusNoContent, http.StatusAccepted, http.StatusOK)
166
// DeleteResponder handles the response to the Delete request. The method always
167
// closes the http.Response Body.
168
func (client InterfacesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
169
err = autorest.Respond(
171
client.ByInspecting(),
172
autorest.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusAccepted, http.StatusOK),
173
autorest.ByClosing())
174
result.Response = resp
178
// Get the Get ntework interface operation retreives information about the
179
// specified network interface.
181
// resourceGroupName is the name of the resource group. networkInterfaceName
182
// is the name of the network interface.
183
func (client InterfacesClient) Get(resourceGroupName string, networkInterfaceName string) (result Interface, ae error) {
184
req, err := client.GetPreparer(resourceGroupName, networkInterfaceName)
186
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "Get", "Failure preparing request")
189
resp, err := client.GetSender(req)
191
result.Response = autorest.Response{Response: resp}
192
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "Get", "Failure sending request")
195
result, err = client.GetResponder(resp)
197
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "Get", "Failure responding to request")
203
// GetPreparer prepares the Get request.
204
func (client InterfacesClient) GetPreparer(resourceGroupName string, networkInterfaceName string) (*http.Request, error) {
205
pathParameters := map[string]interface{}{
206
"networkInterfaceName": url.QueryEscape(networkInterfaceName),
207
"resourceGroupName": url.QueryEscape(resourceGroupName),
208
"subscriptionId": url.QueryEscape(client.SubscriptionID),
211
queryParameters := map[string]interface{}{
212
"api-version": APIVersion,
215
return autorest.Prepare(&http.Request{},
218
autorest.WithBaseURL(client.BaseURI),
219
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"),
220
autorest.WithPathParameters(pathParameters),
221
autorest.WithQueryParameters(queryParameters))
224
// GetSender sends the Get request. The method will close the
225
// http.Response Body if it receives an error.
226
func (client InterfacesClient) GetSender(req *http.Request) (*http.Response, error) {
227
return client.Send(req, http.StatusOK)
230
// GetResponder handles the response to the Get request. The method always
231
// closes the http.Response Body.
232
func (client InterfacesClient) GetResponder(resp *http.Response) (result Interface, err error) {
233
err = autorest.Respond(
235
client.ByInspecting(),
236
autorest.WithErrorUnlessStatusCode(http.StatusOK),
237
autorest.ByUnmarshallingJSON(&result),
238
autorest.ByClosing())
239
result.Response = autorest.Response{Response: resp}
243
// GetVirtualMachineScaleSetNetworkInterface the Get ntework interface
244
// operation retreives information about the specified network interface in a
245
// virtual machine scale set.
247
// resourceGroupName is the name of the resource group.
248
// virtualMachineScaleSetName is the name of the virtual machine scale set.
249
// virtualmachineIndex is the virtual machine index. networkInterfaceName is
250
// the name of the network interface.
251
func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string) (result Interface, ae error) {
252
req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName)
254
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", "Failure preparing request")
257
resp, err := client.GetVirtualMachineScaleSetNetworkInterfaceSender(req)
259
result.Response = autorest.Response{Response: resp}
260
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", "Failure sending request")
263
result, err = client.GetVirtualMachineScaleSetNetworkInterfaceResponder(resp)
265
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", "Failure responding to request")
271
// GetVirtualMachineScaleSetNetworkInterfacePreparer prepares the GetVirtualMachineScaleSetNetworkInterface request.
272
func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string) (*http.Request, error) {
273
pathParameters := map[string]interface{}{
274
"networkInterfaceName": url.QueryEscape(networkInterfaceName),
275
"resourceGroupName": url.QueryEscape(resourceGroupName),
276
"subscriptionId": url.QueryEscape(client.SubscriptionID),
277
"virtualmachineIndex": url.QueryEscape(virtualmachineIndex),
278
"virtualMachineScaleSetName": url.QueryEscape(virtualMachineScaleSetName),
281
queryParameters := map[string]interface{}{
282
"api-version": APIVersion,
285
return autorest.Prepare(&http.Request{},
288
autorest.WithBaseURL(client.BaseURI),
289
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}"),
290
autorest.WithPathParameters(pathParameters),
291
autorest.WithQueryParameters(queryParameters))
294
// GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the
295
// http.Response Body if it receives an error.
296
func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) {
297
return client.Send(req, http.StatusOK)
300
// GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always
301
// closes the http.Response Body.
302
func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponder(resp *http.Response) (result Interface, err error) {
303
err = autorest.Respond(
305
client.ByInspecting(),
306
autorest.WithErrorUnlessStatusCode(http.StatusOK),
307
autorest.ByUnmarshallingJSON(&result),
308
autorest.ByClosing())
309
result.Response = autorest.Response{Response: resp}
313
// List the List networkInterfaces opertion retrieves all the
314
// networkInterfaces in a resource group.
316
// resourceGroupName is the name of the resource group.
317
func (client InterfacesClient) List(resourceGroupName string) (result InterfaceListResult, ae error) {
318
req, err := client.ListPreparer(resourceGroupName)
320
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "List", "Failure preparing request")
323
resp, err := client.ListSender(req)
325
result.Response = autorest.Response{Response: resp}
326
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "List", "Failure sending request")
329
result, err = client.ListResponder(resp)
331
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "List", "Failure responding to request")
337
// ListPreparer prepares the List request.
338
func (client InterfacesClient) ListPreparer(resourceGroupName string) (*http.Request, error) {
339
pathParameters := map[string]interface{}{
340
"resourceGroupName": url.QueryEscape(resourceGroupName),
341
"subscriptionId": url.QueryEscape(client.SubscriptionID),
344
queryParameters := map[string]interface{}{
345
"api-version": APIVersion,
348
return autorest.Prepare(&http.Request{},
351
autorest.WithBaseURL(client.BaseURI),
352
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces"),
353
autorest.WithPathParameters(pathParameters),
354
autorest.WithQueryParameters(queryParameters))
357
// ListSender sends the List request. The method will close the
358
// http.Response Body if it receives an error.
359
func (client InterfacesClient) ListSender(req *http.Request) (*http.Response, error) {
360
return client.Send(req, http.StatusOK)
363
// ListResponder handles the response to the List request. The method always
364
// closes the http.Response Body.
365
func (client InterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, err error) {
366
err = autorest.Respond(
368
client.ByInspecting(),
369
autorest.WithErrorUnlessStatusCode(http.StatusOK),
370
autorest.ByUnmarshallingJSON(&result),
371
autorest.ByClosing())
372
result.Response = autorest.Response{Response: resp}
376
// ListNextResults retrieves the next set of results, if any.
377
func (client InterfacesClient) ListNextResults(lastResults InterfaceListResult) (result InterfaceListResult, ae error) {
378
req, err := lastResults.InterfaceListResultPreparer()
380
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "List", "Failure preparing next results request request")
386
resp, err := client.ListSender(req)
388
result.Response = autorest.Response{Response: resp}
389
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "List", "Failure sending next results request request")
392
result, err = client.ListResponder(resp)
394
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "List", "Failure responding to next results request request")
400
// ListAll the List networkInterfaces opertion retrieves all the
401
// networkInterfaces in a subscription.
402
func (client InterfacesClient) ListAll() (result InterfaceListResult, ae error) {
403
req, err := client.ListAllPreparer()
405
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListAll", "Failure preparing request")
408
resp, err := client.ListAllSender(req)
410
result.Response = autorest.Response{Response: resp}
411
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListAll", "Failure sending request")
414
result, err = client.ListAllResponder(resp)
416
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "ListAll", "Failure responding to request")
422
// ListAllPreparer prepares the ListAll request.
423
func (client InterfacesClient) ListAllPreparer() (*http.Request, error) {
424
pathParameters := map[string]interface{}{
425
"subscriptionId": url.QueryEscape(client.SubscriptionID),
428
queryParameters := map[string]interface{}{
429
"api-version": APIVersion,
432
return autorest.Prepare(&http.Request{},
435
autorest.WithBaseURL(client.BaseURI),
436
autorest.WithPath("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces"),
437
autorest.WithPathParameters(pathParameters),
438
autorest.WithQueryParameters(queryParameters))
441
// ListAllSender sends the ListAll request. The method will close the
442
// http.Response Body if it receives an error.
443
func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) {
444
return client.Send(req, http.StatusOK)
447
// ListAllResponder handles the response to the ListAll request. The method always
448
// closes the http.Response Body.
449
func (client InterfacesClient) ListAllResponder(resp *http.Response) (result InterfaceListResult, err error) {
450
err = autorest.Respond(
452
client.ByInspecting(),
453
autorest.WithErrorUnlessStatusCode(http.StatusOK),
454
autorest.ByUnmarshallingJSON(&result),
455
autorest.ByClosing())
456
result.Response = autorest.Response{Response: resp}
460
// ListAllNextResults retrieves the next set of results, if any.
461
func (client InterfacesClient) ListAllNextResults(lastResults InterfaceListResult) (result InterfaceListResult, ae error) {
462
req, err := lastResults.InterfaceListResultPreparer()
464
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListAll", "Failure preparing next results request request")
470
resp, err := client.ListAllSender(req)
472
result.Response = autorest.Response{Response: resp}
473
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListAll", "Failure sending next results request request")
476
result, err = client.ListAllResponder(resp)
478
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "ListAll", "Failure responding to next results request request")
484
// ListVirtualMachineScaleSetNetworkInterfaces the list network interface
485
// operation retrieves information about all network interfaces in a virtual
486
// machine scale set.
488
// resourceGroupName is the name of the resource group.
489
// virtualMachineScaleSetName is the name of the virtual machine scale set.
490
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResult, ae error) {
491
req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(resourceGroupName, virtualMachineScaleSetName)
493
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", "Failure preparing request")
496
resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req)
498
result.Response = autorest.Response{Response: resp}
499
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", "Failure sending request")
502
result, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp)
504
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", "Failure responding to request")
510
// ListVirtualMachineScaleSetNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetNetworkInterfaces request.
511
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPreparer(resourceGroupName string, virtualMachineScaleSetName string) (*http.Request, error) {
512
pathParameters := map[string]interface{}{
513
"resourceGroupName": url.QueryEscape(resourceGroupName),
514
"subscriptionId": url.QueryEscape(client.SubscriptionID),
515
"virtualMachineScaleSetName": url.QueryEscape(virtualMachineScaleSetName),
518
queryParameters := map[string]interface{}{
519
"api-version": APIVersion,
522
return autorest.Prepare(&http.Request{},
525
autorest.WithBaseURL(client.BaseURI),
526
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces"),
527
autorest.WithPathParameters(pathParameters),
528
autorest.WithQueryParameters(queryParameters))
531
// ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the
532
// http.Response Body if it receives an error.
533
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) {
534
return client.Send(req, http.StatusOK)
537
// ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always
538
// closes the http.Response Body.
539
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) {
540
err = autorest.Respond(
542
client.ByInspecting(),
543
autorest.WithErrorUnlessStatusCode(http.StatusOK),
544
autorest.ByUnmarshallingJSON(&result),
545
autorest.ByClosing())
546
result.Response = autorest.Response{Response: resp}
550
// ListVirtualMachineScaleSetNetworkInterfacesNextResults retrieves the next set of results, if any.
551
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, ae error) {
552
req, err := lastResults.InterfaceListResultPreparer()
554
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", "Failure preparing next results request request")
560
resp, err := client.ListVirtualMachineScaleSetNetworkInterfacesSender(req)
562
result.Response = autorest.Response{Response: resp}
563
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", "Failure sending next results request request")
566
result, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp)
568
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", "Failure responding to next results request request")
574
// ListVirtualMachineScaleSetVMNetworkInterfaces the list network interface
575
// operation retrieves information about all network interfaces in a virtual
576
// machine from a virtual machine scale set.
578
// resourceGroupName is the name of the resource group.
579
// virtualMachineScaleSetName is the name of the virtual machine scale set.
580
// virtualmachineIndex is the virtual machine index.
581
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResult, ae error) {
582
req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
584
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", "Failure preparing request")
587
resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req)
589
result.Response = autorest.Response{Response: resp}
590
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", "Failure sending request")
593
result, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp)
595
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", "Failure responding to request")
601
// ListVirtualMachineScaleSetVMNetworkInterfacesPreparer prepares the ListVirtualMachineScaleSetVMNetworkInterfaces request.
602
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (*http.Request, error) {
603
pathParameters := map[string]interface{}{
604
"resourceGroupName": url.QueryEscape(resourceGroupName),
605
"subscriptionId": url.QueryEscape(client.SubscriptionID),
606
"virtualmachineIndex": url.QueryEscape(virtualmachineIndex),
607
"virtualMachineScaleSetName": url.QueryEscape(virtualMachineScaleSetName),
610
queryParameters := map[string]interface{}{
611
"api-version": APIVersion,
614
return autorest.Prepare(&http.Request{},
617
autorest.WithBaseURL(client.BaseURI),
618
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces"),
619
autorest.WithPathParameters(pathParameters),
620
autorest.WithQueryParameters(queryParameters))
623
// ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the
624
// http.Response Body if it receives an error.
625
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) {
626
return client.Send(req, http.StatusOK)
629
// ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always
630
// closes the http.Response Body.
631
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp *http.Response) (result InterfaceListResult, err error) {
632
err = autorest.Respond(
634
client.ByInspecting(),
635
autorest.WithErrorUnlessStatusCode(http.StatusOK),
636
autorest.ByUnmarshallingJSON(&result),
637
autorest.ByClosing())
638
result.Response = autorest.Response{Response: resp}
642
// ListVirtualMachineScaleSetVMNetworkInterfacesNextResults retrieves the next set of results, if any.
643
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, ae error) {
644
req, err := lastResults.InterfaceListResultPreparer()
646
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", "Failure preparing next results request request")
652
resp, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesSender(req)
654
result.Response = autorest.Response{Response: resp}
655
return result, autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", "Failure sending next results request request")
658
result, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp)
660
ae = autorest.NewErrorWithError(err, "network/InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", "Failure responding to next results request request")