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
// ManagedHostingEnvironmentsClient is the use these APIs to manage Azure
28
// Websites resources through the Azure Resource Manager. All task operations
29
// conform to the HTTP/1.1 protocol specification and each operation returns
30
// an x-ms-request-id header that can be used to obtain information about the
31
// request. You must make sure that requests made to these resources are
32
// secure. For more information, see <a
33
// href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
34
// Azure Resource Manager requests.</a>
35
type ManagedHostingEnvironmentsClient struct {
39
// NewManagedHostingEnvironmentsClient creates an instance of the
40
// ManagedHostingEnvironmentsClient client.
41
func NewManagedHostingEnvironmentsClient(subscriptionID string) ManagedHostingEnvironmentsClient {
42
return NewManagedHostingEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
45
// NewManagedHostingEnvironmentsClientWithBaseURI creates an instance of the
46
// ManagedHostingEnvironmentsClient client.
47
func NewManagedHostingEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedHostingEnvironmentsClient {
48
return ManagedHostingEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
51
// CreateOrUpdateManagedHostingEnvironment sends the create or update managed
52
// hosting environment request.
54
// resourceGroupName is name of resource group name is name of managed hosting
55
// environment managedHostingEnvironmentEnvelope is properties of managed
56
// hosting environment
57
func (client ManagedHostingEnvironmentsClient) CreateOrUpdateManagedHostingEnvironment(resourceGroupName string, name string, managedHostingEnvironmentEnvelope HostingEnvironment) (result HostingEnvironment, ae error) {
58
req, err := client.CreateOrUpdateManagedHostingEnvironmentPreparer(resourceGroupName, name, managedHostingEnvironmentEnvelope)
60
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "CreateOrUpdateManagedHostingEnvironment", "Failure preparing request")
63
resp, err := client.CreateOrUpdateManagedHostingEnvironmentSender(req)
65
result.Response = autorest.Response{Response: resp}
66
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "CreateOrUpdateManagedHostingEnvironment", "Failure sending request")
69
result, err = client.CreateOrUpdateManagedHostingEnvironmentResponder(resp)
71
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "CreateOrUpdateManagedHostingEnvironment", "Failure responding to request")
77
// CreateOrUpdateManagedHostingEnvironmentPreparer prepares the CreateOrUpdateManagedHostingEnvironment request.
78
func (client ManagedHostingEnvironmentsClient) CreateOrUpdateManagedHostingEnvironmentPreparer(resourceGroupName string, name string, managedHostingEnvironmentEnvelope HostingEnvironment) (*http.Request, error) {
79
pathParameters := map[string]interface{}{
80
"name": url.QueryEscape(name),
81
"resourceGroupName": url.QueryEscape(resourceGroupName),
82
"subscriptionId": url.QueryEscape(client.SubscriptionID),
85
queryParameters := map[string]interface{}{
86
"api-version": APIVersion,
89
return autorest.Prepare(&http.Request{},
92
autorest.WithBaseURL(client.BaseURI),
93
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}"),
94
autorest.WithJSON(managedHostingEnvironmentEnvelope),
95
autorest.WithPathParameters(pathParameters),
96
autorest.WithQueryParameters(queryParameters))
99
// CreateOrUpdateManagedHostingEnvironmentSender sends the CreateOrUpdateManagedHostingEnvironment request. The method will close the
100
// http.Response Body if it receives an error.
101
func (client ManagedHostingEnvironmentsClient) CreateOrUpdateManagedHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
102
return client.Send(req, http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict)
105
// CreateOrUpdateManagedHostingEnvironmentResponder handles the response to the CreateOrUpdateManagedHostingEnvironment request. The method always
106
// closes the http.Response Body.
107
func (client ManagedHostingEnvironmentsClient) CreateOrUpdateManagedHostingEnvironmentResponder(resp *http.Response) (result HostingEnvironment, err error) {
108
err = autorest.Respond(
110
client.ByInspecting(),
111
autorest.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict),
112
autorest.ByUnmarshallingJSON(&result),
113
autorest.ByClosing())
114
result.Response = autorest.Response{Response: resp}
118
// DeleteManagedHostingEnvironment sends the delete managed hosting
119
// environment request.
121
// resourceGroupName is name of resource group name is name of managed hosting
122
// environment forceDelete is delete even if the managed hosting environment
123
// contains resources
124
func (client ManagedHostingEnvironmentsClient) DeleteManagedHostingEnvironment(resourceGroupName string, name string, forceDelete *bool) (result ObjectSet, ae error) {
125
req, err := client.DeleteManagedHostingEnvironmentPreparer(resourceGroupName, name, forceDelete)
127
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "DeleteManagedHostingEnvironment", "Failure preparing request")
130
resp, err := client.DeleteManagedHostingEnvironmentSender(req)
132
result.Response = autorest.Response{Response: resp}
133
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "DeleteManagedHostingEnvironment", "Failure sending request")
136
result, err = client.DeleteManagedHostingEnvironmentResponder(resp)
138
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "DeleteManagedHostingEnvironment", "Failure responding to request")
144
// DeleteManagedHostingEnvironmentPreparer prepares the DeleteManagedHostingEnvironment request.
145
func (client ManagedHostingEnvironmentsClient) DeleteManagedHostingEnvironmentPreparer(resourceGroupName string, name string, forceDelete *bool) (*http.Request, error) {
146
pathParameters := map[string]interface{}{
147
"name": url.QueryEscape(name),
148
"resourceGroupName": url.QueryEscape(resourceGroupName),
149
"subscriptionId": url.QueryEscape(client.SubscriptionID),
152
queryParameters := map[string]interface{}{
153
"api-version": APIVersion,
155
if forceDelete != nil {
156
queryParameters["forceDelete"] = forceDelete
159
return autorest.Prepare(&http.Request{},
162
autorest.WithBaseURL(client.BaseURI),
163
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}"),
164
autorest.WithPathParameters(pathParameters),
165
autorest.WithQueryParameters(queryParameters))
168
// DeleteManagedHostingEnvironmentSender sends the DeleteManagedHostingEnvironment request. The method will close the
169
// http.Response Body if it receives an error.
170
func (client ManagedHostingEnvironmentsClient) DeleteManagedHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
171
return client.Send(req, http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict)
174
// DeleteManagedHostingEnvironmentResponder handles the response to the DeleteManagedHostingEnvironment request. The method always
175
// closes the http.Response Body.
176
func (client ManagedHostingEnvironmentsClient) DeleteManagedHostingEnvironmentResponder(resp *http.Response) (result ObjectSet, err error) {
177
err = autorest.Respond(
179
client.ByInspecting(),
180
autorest.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusBadRequest, http.StatusNotFound, http.StatusConflict),
181
autorest.ByUnmarshallingJSON(&result.Value),
182
autorest.ByClosing())
183
result.Response = autorest.Response{Response: resp}
187
// GetManagedHostingEnvironment sends the get managed hosting environment
190
// resourceGroupName is name of resource group name is name of managed hosting
192
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironment(resourceGroupName string, name string) (result ManagedHostingEnvironment, ae error) {
193
req, err := client.GetManagedHostingEnvironmentPreparer(resourceGroupName, name)
195
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironment", "Failure preparing request")
198
resp, err := client.GetManagedHostingEnvironmentSender(req)
200
result.Response = autorest.Response{Response: resp}
201
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironment", "Failure sending request")
204
result, err = client.GetManagedHostingEnvironmentResponder(resp)
206
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironment", "Failure responding to request")
212
// GetManagedHostingEnvironmentPreparer prepares the GetManagedHostingEnvironment request.
213
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentPreparer(resourceGroupName string, name string) (*http.Request, error) {
214
pathParameters := map[string]interface{}{
215
"name": url.QueryEscape(name),
216
"resourceGroupName": url.QueryEscape(resourceGroupName),
217
"subscriptionId": url.QueryEscape(client.SubscriptionID),
220
queryParameters := map[string]interface{}{
221
"api-version": APIVersion,
224
return autorest.Prepare(&http.Request{},
227
autorest.WithBaseURL(client.BaseURI),
228
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}"),
229
autorest.WithPathParameters(pathParameters),
230
autorest.WithQueryParameters(queryParameters))
233
// GetManagedHostingEnvironmentSender sends the GetManagedHostingEnvironment request. The method will close the
234
// http.Response Body if it receives an error.
235
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
236
return client.Send(req, http.StatusOK)
239
// GetManagedHostingEnvironmentResponder handles the response to the GetManagedHostingEnvironment request. The method always
240
// closes the http.Response Body.
241
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentResponder(resp *http.Response) (result ManagedHostingEnvironment, err error) {
242
err = autorest.Respond(
244
client.ByInspecting(),
245
autorest.WithErrorUnlessStatusCode(http.StatusOK),
246
autorest.ByUnmarshallingJSON(&result),
247
autorest.ByClosing())
248
result.Response = autorest.Response{Response: resp}
252
// GetManagedHostingEnvironmentOperation sends the get managed hosting
253
// environment operation request.
255
// resourceGroupName is name of resource group name is name of managed hosting
256
// environment operationID is operation identifier GUID
257
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentOperation(resourceGroupName string, name string, operationID string) (result ObjectSet, ae error) {
258
req, err := client.GetManagedHostingEnvironmentOperationPreparer(resourceGroupName, name, operationID)
260
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentOperation", "Failure preparing request")
263
resp, err := client.GetManagedHostingEnvironmentOperationSender(req)
265
result.Response = autorest.Response{Response: resp}
266
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentOperation", "Failure sending request")
269
result, err = client.GetManagedHostingEnvironmentOperationResponder(resp)
271
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentOperation", "Failure responding to request")
277
// GetManagedHostingEnvironmentOperationPreparer prepares the GetManagedHostingEnvironmentOperation request.
278
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentOperationPreparer(resourceGroupName string, name string, operationID string) (*http.Request, error) {
279
pathParameters := map[string]interface{}{
280
"name": url.QueryEscape(name),
281
"operationId": url.QueryEscape(operationID),
282
"resourceGroupName": url.QueryEscape(resourceGroupName),
283
"subscriptionId": url.QueryEscape(client.SubscriptionID),
286
queryParameters := map[string]interface{}{
287
"api-version": APIVersion,
290
return autorest.Prepare(&http.Request{},
293
autorest.WithBaseURL(client.BaseURI),
294
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/operations/{operationId}"),
295
autorest.WithPathParameters(pathParameters),
296
autorest.WithQueryParameters(queryParameters))
299
// GetManagedHostingEnvironmentOperationSender sends the GetManagedHostingEnvironmentOperation request. The method will close the
300
// http.Response Body if it receives an error.
301
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentOperationSender(req *http.Request) (*http.Response, error) {
302
return client.Send(req, http.StatusOK, http.StatusAccepted, http.StatusNotFound, http.StatusInternalServerError)
305
// GetManagedHostingEnvironmentOperationResponder handles the response to the GetManagedHostingEnvironmentOperation request. The method always
306
// closes the http.Response Body.
307
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentOperationResponder(resp *http.Response) (result ObjectSet, err error) {
308
err = autorest.Respond(
310
client.ByInspecting(),
311
autorest.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound, http.StatusInternalServerError),
312
autorest.ByUnmarshallingJSON(&result.Value),
313
autorest.ByClosing())
314
result.Response = autorest.Response{Response: resp}
318
// GetManagedHostingEnvironments sends the get managed hosting environments
321
// resourceGroupName is name of resource group
322
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironments(resourceGroupName string) (result HostingEnvironmentCollection, ae error) {
323
req, err := client.GetManagedHostingEnvironmentsPreparer(resourceGroupName)
325
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironments", "Failure preparing request")
328
resp, err := client.GetManagedHostingEnvironmentsSender(req)
330
result.Response = autorest.Response{Response: resp}
331
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironments", "Failure sending request")
334
result, err = client.GetManagedHostingEnvironmentsResponder(resp)
336
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironments", "Failure responding to request")
342
// GetManagedHostingEnvironmentsPreparer prepares the GetManagedHostingEnvironments request.
343
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentsPreparer(resourceGroupName string) (*http.Request, error) {
344
pathParameters := map[string]interface{}{
345
"resourceGroupName": url.QueryEscape(resourceGroupName),
346
"subscriptionId": url.QueryEscape(client.SubscriptionID),
349
queryParameters := map[string]interface{}{
350
"api-version": APIVersion,
353
return autorest.Prepare(&http.Request{},
356
autorest.WithBaseURL(client.BaseURI),
357
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments"),
358
autorest.WithPathParameters(pathParameters),
359
autorest.WithQueryParameters(queryParameters))
362
// GetManagedHostingEnvironmentsSender sends the GetManagedHostingEnvironments request. The method will close the
363
// http.Response Body if it receives an error.
364
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentsSender(req *http.Request) (*http.Response, error) {
365
return client.Send(req, http.StatusOK)
368
// GetManagedHostingEnvironmentsResponder handles the response to the GetManagedHostingEnvironments request. The method always
369
// closes the http.Response Body.
370
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentsResponder(resp *http.Response) (result HostingEnvironmentCollection, err error) {
371
err = autorest.Respond(
373
client.ByInspecting(),
374
autorest.WithErrorUnlessStatusCode(http.StatusOK),
375
autorest.ByUnmarshallingJSON(&result),
376
autorest.ByClosing())
377
result.Response = autorest.Response{Response: resp}
381
// GetManagedHostingEnvironmentServerFarms sends the get managed hosting
382
// environment server farms request.
384
// resourceGroupName is name of resource group name is name of managed hosting
386
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentServerFarms(resourceGroupName string, name string) (result ServerFarmCollection, ae error) {
387
req, err := client.GetManagedHostingEnvironmentServerFarmsPreparer(resourceGroupName, name)
389
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentServerFarms", "Failure preparing request")
392
resp, err := client.GetManagedHostingEnvironmentServerFarmsSender(req)
394
result.Response = autorest.Response{Response: resp}
395
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentServerFarms", "Failure sending request")
398
result, err = client.GetManagedHostingEnvironmentServerFarmsResponder(resp)
400
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentServerFarms", "Failure responding to request")
406
// GetManagedHostingEnvironmentServerFarmsPreparer prepares the GetManagedHostingEnvironmentServerFarms request.
407
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentServerFarmsPreparer(resourceGroupName string, name string) (*http.Request, error) {
408
pathParameters := map[string]interface{}{
409
"name": url.QueryEscape(name),
410
"resourceGroupName": url.QueryEscape(resourceGroupName),
411
"subscriptionId": url.QueryEscape(client.SubscriptionID),
414
queryParameters := map[string]interface{}{
415
"api-version": APIVersion,
418
return autorest.Prepare(&http.Request{},
421
autorest.WithBaseURL(client.BaseURI),
422
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/serverfarms"),
423
autorest.WithPathParameters(pathParameters),
424
autorest.WithQueryParameters(queryParameters))
427
// GetManagedHostingEnvironmentServerFarmsSender sends the GetManagedHostingEnvironmentServerFarms request. The method will close the
428
// http.Response Body if it receives an error.
429
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentServerFarmsSender(req *http.Request) (*http.Response, error) {
430
return client.Send(req, http.StatusOK)
433
// GetManagedHostingEnvironmentServerFarmsResponder handles the response to the GetManagedHostingEnvironmentServerFarms request. The method always
434
// closes the http.Response Body.
435
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentServerFarmsResponder(resp *http.Response) (result ServerFarmCollection, err error) {
436
err = autorest.Respond(
438
client.ByInspecting(),
439
autorest.WithErrorUnlessStatusCode(http.StatusOK),
440
autorest.ByUnmarshallingJSON(&result),
441
autorest.ByClosing())
442
result.Response = autorest.Response{Response: resp}
446
// GetManagedHostingEnvironmentSites sends the get managed hosting environment
449
// resourceGroupName is name of resource group name is name of managed hosting
450
// environment propertiesToInclude is comma separated list of site properties
452
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentSites(resourceGroupName string, name string, propertiesToInclude string) (result SiteCollection, ae error) {
453
req, err := client.GetManagedHostingEnvironmentSitesPreparer(resourceGroupName, name, propertiesToInclude)
455
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentSites", "Failure preparing request")
458
resp, err := client.GetManagedHostingEnvironmentSitesSender(req)
460
result.Response = autorest.Response{Response: resp}
461
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentSites", "Failure sending request")
464
result, err = client.GetManagedHostingEnvironmentSitesResponder(resp)
466
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentSites", "Failure responding to request")
472
// GetManagedHostingEnvironmentSitesPreparer prepares the GetManagedHostingEnvironmentSites request.
473
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentSitesPreparer(resourceGroupName string, name string, propertiesToInclude string) (*http.Request, error) {
474
pathParameters := map[string]interface{}{
475
"name": url.QueryEscape(name),
476
"resourceGroupName": url.QueryEscape(resourceGroupName),
477
"subscriptionId": url.QueryEscape(client.SubscriptionID),
480
queryParameters := map[string]interface{}{
481
"api-version": APIVersion,
483
if len(propertiesToInclude) > 0 {
484
queryParameters["propertiesToInclude"] = propertiesToInclude
487
return autorest.Prepare(&http.Request{},
490
autorest.WithBaseURL(client.BaseURI),
491
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/sites"),
492
autorest.WithPathParameters(pathParameters),
493
autorest.WithQueryParameters(queryParameters))
496
// GetManagedHostingEnvironmentSitesSender sends the GetManagedHostingEnvironmentSites request. The method will close the
497
// http.Response Body if it receives an error.
498
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentSitesSender(req *http.Request) (*http.Response, error) {
499
return client.Send(req, http.StatusOK)
502
// GetManagedHostingEnvironmentSitesResponder handles the response to the GetManagedHostingEnvironmentSites request. The method always
503
// closes the http.Response Body.
504
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentSitesResponder(resp *http.Response) (result SiteCollection, err error) {
505
err = autorest.Respond(
507
client.ByInspecting(),
508
autorest.WithErrorUnlessStatusCode(http.StatusOK),
509
autorest.ByUnmarshallingJSON(&result),
510
autorest.ByClosing())
511
result.Response = autorest.Response{Response: resp}
515
// GetManagedHostingEnvironmentVips sends the get managed hosting environment
518
// resourceGroupName is name of resource group name is name of managed hosting
520
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentVips(resourceGroupName string, name string) (result AddressResponse, ae error) {
521
req, err := client.GetManagedHostingEnvironmentVipsPreparer(resourceGroupName, name)
523
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentVips", "Failure preparing request")
526
resp, err := client.GetManagedHostingEnvironmentVipsSender(req)
528
result.Response = autorest.Response{Response: resp}
529
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentVips", "Failure sending request")
532
result, err = client.GetManagedHostingEnvironmentVipsResponder(resp)
534
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentVips", "Failure responding to request")
540
// GetManagedHostingEnvironmentVipsPreparer prepares the GetManagedHostingEnvironmentVips request.
541
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentVipsPreparer(resourceGroupName string, name string) (*http.Request, error) {
542
pathParameters := map[string]interface{}{
543
"name": url.QueryEscape(name),
544
"resourceGroupName": url.QueryEscape(resourceGroupName),
545
"subscriptionId": url.QueryEscape(client.SubscriptionID),
548
queryParameters := map[string]interface{}{
549
"api-version": APIVersion,
552
return autorest.Prepare(&http.Request{},
555
autorest.WithBaseURL(client.BaseURI),
556
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/capacities/virtualip"),
557
autorest.WithPathParameters(pathParameters),
558
autorest.WithQueryParameters(queryParameters))
561
// GetManagedHostingEnvironmentVipsSender sends the GetManagedHostingEnvironmentVips request. The method will close the
562
// http.Response Body if it receives an error.
563
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentVipsSender(req *http.Request) (*http.Response, error) {
564
return client.Send(req, http.StatusOK)
567
// GetManagedHostingEnvironmentVipsResponder handles the response to the GetManagedHostingEnvironmentVips request. The method always
568
// closes the http.Response Body.
569
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentVipsResponder(resp *http.Response) (result AddressResponse, err error) {
570
err = autorest.Respond(
572
client.ByInspecting(),
573
autorest.WithErrorUnlessStatusCode(http.StatusOK),
574
autorest.ByUnmarshallingJSON(&result),
575
autorest.ByClosing())
576
result.Response = autorest.Response{Response: resp}
580
// GetManagedHostingEnvironmentWebHostingPlans sends the get managed hosting
581
// environment web hosting plans request.
583
// resourceGroupName is name of resource group name is name of managed hosting
585
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentWebHostingPlans(resourceGroupName string, name string) (result ServerFarmCollection, ae error) {
586
req, err := client.GetManagedHostingEnvironmentWebHostingPlansPreparer(resourceGroupName, name)
588
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentWebHostingPlans", "Failure preparing request")
591
resp, err := client.GetManagedHostingEnvironmentWebHostingPlansSender(req)
593
result.Response = autorest.Response{Response: resp}
594
return result, autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentWebHostingPlans", "Failure sending request")
597
result, err = client.GetManagedHostingEnvironmentWebHostingPlansResponder(resp)
599
ae = autorest.NewErrorWithError(err, "web/ManagedHostingEnvironmentsClient", "GetManagedHostingEnvironmentWebHostingPlans", "Failure responding to request")
605
// GetManagedHostingEnvironmentWebHostingPlansPreparer prepares the GetManagedHostingEnvironmentWebHostingPlans request.
606
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentWebHostingPlansPreparer(resourceGroupName string, name string) (*http.Request, error) {
607
pathParameters := map[string]interface{}{
608
"name": url.QueryEscape(name),
609
"resourceGroupName": url.QueryEscape(resourceGroupName),
610
"subscriptionId": url.QueryEscape(client.SubscriptionID),
613
queryParameters := map[string]interface{}{
614
"api-version": APIVersion,
617
return autorest.Prepare(&http.Request{},
620
autorest.WithBaseURL(client.BaseURI),
621
autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/webhostingplans"),
622
autorest.WithPathParameters(pathParameters),
623
autorest.WithQueryParameters(queryParameters))
626
// GetManagedHostingEnvironmentWebHostingPlansSender sends the GetManagedHostingEnvironmentWebHostingPlans request. The method will close the
627
// http.Response Body if it receives an error.
628
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentWebHostingPlansSender(req *http.Request) (*http.Response, error) {
629
return client.Send(req, http.StatusOK)
632
// GetManagedHostingEnvironmentWebHostingPlansResponder handles the response to the GetManagedHostingEnvironmentWebHostingPlans request. The method always
633
// closes the http.Response Body.
634
func (client ManagedHostingEnvironmentsClient) GetManagedHostingEnvironmentWebHostingPlansResponder(resp *http.Response) (result ServerFarmCollection, err error) {
635
err = autorest.Respond(
637
client.ByInspecting(),
638
autorest.WithErrorUnlessStatusCode(http.StatusOK),
639
autorest.ByUnmarshallingJSON(&result),
640
autorest.ByClosing())
641
result.Response = autorest.Response{Response: resp}