vendor: update all dependencies to latest versions
This commit is contained in:
+3
-5
@@ -1,5 +1,4 @@
|
||||
// Package trafficmanager implements the Azure ARM Trafficmanager service API
|
||||
// version 2015-11-01.
|
||||
// Package trafficmanager implements the Azure ARM Trafficmanager service API version 2017-09-01-preview.
|
||||
//
|
||||
//
|
||||
package trafficmanager
|
||||
@@ -18,9 +17,8 @@ package trafficmanager
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
||||
+27
-36
@@ -14,9 +14,8 @@ package trafficmanager
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// EndpointsClient is the client for the Endpoints methods of the
|
||||
// Trafficmanager service.
|
||||
// EndpointsClient is the client for the Endpoints methods of the Trafficmanager service.
|
||||
type EndpointsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,20 +33,17 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient {
|
||||
return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient
|
||||
// client.
|
||||
// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client.
|
||||
func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient {
|
||||
return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or update a Traffic Manager endpoint.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager endpoint to be created or updated. profileName is the name of the
|
||||
// Traffic Manager profile. endpointType is the type of the Traffic Manager
|
||||
// endpoint to be created or updated. endpointName is the name of the Traffic
|
||||
// Manager endpoint to be created or updated. parameters is the Traffic Manager
|
||||
// endpoint parameters supplied to the CreateOrUpdate operation.
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint to be created or
|
||||
// updated. profileName is the name of the Traffic Manager profile. endpointType is the type of the Traffic Manager
|
||||
// endpoint to be created or updated. endpointName is the name of the Traffic Manager endpoint to be created or
|
||||
// updated. parameters is the Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation.
|
||||
func (client EndpointsClient) CreateOrUpdate(resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (result Endpoint, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, profileName, endpointType, endpointName, parameters)
|
||||
if err != nil {
|
||||
@@ -81,7 +76,7 @@ func (client EndpointsClient) CreateOrUpdatePreparer(resourceGroupName string, p
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -117,12 +112,10 @@ func (client EndpointsClient) CreateOrUpdateResponder(resp *http.Response) (resu
|
||||
|
||||
// Delete deletes a Traffic Manager endpoint.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager endpoint to be deleted. profileName is the name of the Traffic
|
||||
// Manager profile. endpointType is the type of the Traffic Manager endpoint to
|
||||
// be deleted. endpointName is the name of the Traffic Manager endpoint to be
|
||||
// deleted.
|
||||
func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointType string, endpointName string) (result autorest.Response, err error) {
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint to be deleted.
|
||||
// profileName is the name of the Traffic Manager profile. endpointType is the type of the Traffic Manager endpoint to
|
||||
// be deleted. endpointName is the name of the Traffic Manager endpoint to be deleted.
|
||||
func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointType string, endpointName string) (result DeleteOperationResult, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, profileName, endpointType, endpointName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", nil, "Failure preparing request")
|
||||
@@ -131,7 +124,7 @@ func (client EndpointsClient) Delete(resourceGroupName string, profileName strin
|
||||
|
||||
resp, err := client.DeleteSender(req)
|
||||
if err != nil {
|
||||
result.Response = resp
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
@@ -154,7 +147,7 @@ func (client EndpointsClient) DeletePreparer(resourceGroupName string, profileNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -175,22 +168,22 @@ func (client EndpointsClient) DeleteSender(req *http.Request) (*http.Response, e
|
||||
|
||||
// DeleteResponder handles the response to the Delete request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client EndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
|
||||
func (client EndpointsClient) DeleteResponder(resp *http.Response) (result DeleteOperationResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = resp
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Get gets a Traffic Manager endpoint.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager endpoint. profileName is the name of the Traffic Manager profile.
|
||||
// endpointType is the type of the Traffic Manager endpoint. endpointName is
|
||||
// the name of the Traffic Manager endpoint.
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint. profileName is the name
|
||||
// of the Traffic Manager profile. endpointType is the type of the Traffic Manager endpoint. endpointName is the name
|
||||
// of the Traffic Manager endpoint.
|
||||
func (client EndpointsClient) Get(resourceGroupName string, profileName string, endpointType string, endpointName string) (result Endpoint, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, profileName, endpointType, endpointName)
|
||||
if err != nil {
|
||||
@@ -223,7 +216,7 @@ func (client EndpointsClient) GetPreparer(resourceGroupName string, profileName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -257,12 +250,10 @@ func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint
|
||||
|
||||
// Update update a Traffic Manager endpoint.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager endpoint to be updated. profileName is the name of the Traffic
|
||||
// Manager profile. endpointType is the type of the Traffic Manager endpoint to
|
||||
// be updated. endpointName is the name of the Traffic Manager endpoint to be
|
||||
// updated. parameters is the Traffic Manager endpoint parameters supplied to
|
||||
// the Update operation.
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint to be updated.
|
||||
// profileName is the name of the Traffic Manager profile. endpointType is the type of the Traffic Manager endpoint to
|
||||
// be updated. endpointName is the name of the Traffic Manager endpoint to be updated. parameters is the Traffic
|
||||
// Manager endpoint parameters supplied to the Update operation.
|
||||
func (client EndpointsClient) Update(resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (result Endpoint, err error) {
|
||||
req, err := client.UpdatePreparer(resourceGroupName, profileName, endpointType, endpointName, parameters)
|
||||
if err != nil {
|
||||
@@ -295,7 +286,7 @@ func (client EndpointsClient) UpdatePreparer(resourceGroupName string, profileNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
Generated
Vendored
+96
@@ -0,0 +1,96 @@
|
||||
package trafficmanager
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// GeographicHierarchiesClient is the client for the GeographicHierarchies methods of the Trafficmanager service.
|
||||
type GeographicHierarchiesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewGeographicHierarchiesClient creates an instance of the GeographicHierarchiesClient client.
|
||||
func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchiesClient {
|
||||
return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client.
|
||||
func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient {
|
||||
return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// GetDefault gets the default Geographic Hierarchy used by the Geographic traffic routing method.
|
||||
func (client GeographicHierarchiesClient) GetDefault() (result GeographicHierarchy, err error) {
|
||||
req, err := client.GetDefaultPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.GeographicHierarchiesClient", "GetDefault", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GetDefaultSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.GeographicHierarchiesClient", "GetDefault", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GetDefaultResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.GeographicHierarchiesClient", "GetDefault", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetDefaultPreparer prepares the GetDefault request.
|
||||
func (client GeographicHierarchiesClient) GetDefaultPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default"),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// GetDefaultSender sends the GetDefault request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client GeographicHierarchiesClient) GetDefaultSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// GetDefaultResponder handles the response to the GetDefault request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client GeographicHierarchiesClient) GetDefaultResponder(resp *http.Response) (result GeographicHierarchy, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package trafficmanager
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"github.com/Azure/go-autorest/autorest/validation"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// HeatMapClient is the client for the HeatMap methods of the Trafficmanager service.
|
||||
type HeatMapClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewHeatMapClient creates an instance of the HeatMapClient client.
|
||||
func NewHeatMapClient(subscriptionID string) HeatMapClient {
|
||||
return NewHeatMapClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client.
|
||||
func NewHeatMapClientWithBaseURI(baseURI string, subscriptionID string) HeatMapClient {
|
||||
return HeatMapClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets latest heatmap for Traffic Manager profile.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint. profileName is the name
|
||||
// of the Traffic Manager profile. heatMapType is the type of HeatMap for the Traffic Manager profile. topLeft is the
|
||||
// top left latitude,longitude pair of the rectangular viewport to query for. botRight is the bottom right
|
||||
// latitude,longitude pair of the rectangular viewport to query for.
|
||||
func (client HeatMapClient) Get(resourceGroupName string, profileName string, heatMapType string, topLeft []float64, botRight []float64) (result HeatMapModel, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: topLeft,
|
||||
Constraints: []validation.Constraint{{Target: "topLeft", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "topLeft", Name: validation.MaxItems, Rule: 2, Chain: nil},
|
||||
{Target: "topLeft", Name: validation.MinItems, Rule: 2, Chain: nil},
|
||||
}}}},
|
||||
{TargetValue: botRight,
|
||||
Constraints: []validation.Constraint{{Target: "botRight", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "botRight", Name: validation.MaxItems, Rule: 2, Chain: nil},
|
||||
{Target: "botRight", Name: validation.MinItems, Rule: 2, Chain: nil},
|
||||
}}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "trafficmanager.HeatMapClient", "Get")
|
||||
}
|
||||
|
||||
req, err := client.GetPreparer(resourceGroupName, profileName, heatMapType, topLeft, botRight)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.HeatMapClient", "Get", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GetSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.HeatMapClient", "Get", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GetResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.HeatMapClient", "Get", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client HeatMapClient) GetPreparer(resourceGroupName string, profileName string, heatMapType string, topLeft []float64, botRight []float64) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"heatMapType": autorest.Encode("path", heatMapType),
|
||||
"profileName": autorest.Encode("path", profileName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
if topLeft != nil && len(topLeft) > 0 {
|
||||
queryParameters["topLeft"] = autorest.Encode("query", topLeft, ",")
|
||||
}
|
||||
if botRight != nil && len(botRight) > 0 {
|
||||
queryParameters["botRight"] = autorest.Encode("query", botRight, ",")
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// GetSender sends the Get request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client HeatMapClient) GetSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// GetResponder handles the response to the Get request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client HeatMapClient) GetResponder(resp *http.Response) (result HeatMapModel, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
+206
-36
@@ -14,21 +14,121 @@ package trafficmanager
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/date"
|
||||
)
|
||||
|
||||
// CheckTrafficManagerRelativeDNSNameAvailabilityParameters is parameters
|
||||
// supplied to check Traffic Manager name operation.
|
||||
// EndpointMonitorStatus enumerates the values for endpoint monitor status.
|
||||
type EndpointMonitorStatus string
|
||||
|
||||
const (
|
||||
// CheckingEndpoint specifies the checking endpoint state for endpoint monitor status.
|
||||
CheckingEndpoint EndpointMonitorStatus = "CheckingEndpoint"
|
||||
// Degraded specifies the degraded state for endpoint monitor status.
|
||||
Degraded EndpointMonitorStatus = "Degraded"
|
||||
// Disabled specifies the disabled state for endpoint monitor status.
|
||||
Disabled EndpointMonitorStatus = "Disabled"
|
||||
// Inactive specifies the inactive state for endpoint monitor status.
|
||||
Inactive EndpointMonitorStatus = "Inactive"
|
||||
// Online specifies the online state for endpoint monitor status.
|
||||
Online EndpointMonitorStatus = "Online"
|
||||
// Stopped specifies the stopped state for endpoint monitor status.
|
||||
Stopped EndpointMonitorStatus = "Stopped"
|
||||
)
|
||||
|
||||
// EndpointStatus enumerates the values for endpoint status.
|
||||
type EndpointStatus string
|
||||
|
||||
const (
|
||||
// EndpointStatusDisabled specifies the endpoint status disabled state for endpoint status.
|
||||
EndpointStatusDisabled EndpointStatus = "Disabled"
|
||||
// EndpointStatusEnabled specifies the endpoint status enabled state for endpoint status.
|
||||
EndpointStatusEnabled EndpointStatus = "Enabled"
|
||||
)
|
||||
|
||||
// MonitorProtocol enumerates the values for monitor protocol.
|
||||
type MonitorProtocol string
|
||||
|
||||
const (
|
||||
// HTTP specifies the http state for monitor protocol.
|
||||
HTTP MonitorProtocol = "HTTP"
|
||||
// HTTPS specifies the https state for monitor protocol.
|
||||
HTTPS MonitorProtocol = "HTTPS"
|
||||
// TCP specifies the tcp state for monitor protocol.
|
||||
TCP MonitorProtocol = "TCP"
|
||||
)
|
||||
|
||||
// ProfileMonitorStatus enumerates the values for profile monitor status.
|
||||
type ProfileMonitorStatus string
|
||||
|
||||
const (
|
||||
// ProfileMonitorStatusCheckingEndpoints specifies the profile monitor status checking endpoints state for profile
|
||||
// monitor status.
|
||||
ProfileMonitorStatusCheckingEndpoints ProfileMonitorStatus = "CheckingEndpoints"
|
||||
// ProfileMonitorStatusDegraded specifies the profile monitor status degraded state for profile monitor status.
|
||||
ProfileMonitorStatusDegraded ProfileMonitorStatus = "Degraded"
|
||||
// ProfileMonitorStatusDisabled specifies the profile monitor status disabled state for profile monitor status.
|
||||
ProfileMonitorStatusDisabled ProfileMonitorStatus = "Disabled"
|
||||
// ProfileMonitorStatusInactive specifies the profile monitor status inactive state for profile monitor status.
|
||||
ProfileMonitorStatusInactive ProfileMonitorStatus = "Inactive"
|
||||
// ProfileMonitorStatusOnline specifies the profile monitor status online state for profile monitor status.
|
||||
ProfileMonitorStatusOnline ProfileMonitorStatus = "Online"
|
||||
)
|
||||
|
||||
// ProfileStatus enumerates the values for profile status.
|
||||
type ProfileStatus string
|
||||
|
||||
const (
|
||||
// ProfileStatusDisabled specifies the profile status disabled state for profile status.
|
||||
ProfileStatusDisabled ProfileStatus = "Disabled"
|
||||
// ProfileStatusEnabled specifies the profile status enabled state for profile status.
|
||||
ProfileStatusEnabled ProfileStatus = "Enabled"
|
||||
)
|
||||
|
||||
// TrafficRoutingMethod enumerates the values for traffic routing method.
|
||||
type TrafficRoutingMethod string
|
||||
|
||||
const (
|
||||
// Geographic specifies the geographic state for traffic routing method.
|
||||
Geographic TrafficRoutingMethod = "Geographic"
|
||||
// Performance specifies the performance state for traffic routing method.
|
||||
Performance TrafficRoutingMethod = "Performance"
|
||||
// Priority specifies the priority state for traffic routing method.
|
||||
Priority TrafficRoutingMethod = "Priority"
|
||||
// Weighted specifies the weighted state for traffic routing method.
|
||||
Weighted TrafficRoutingMethod = "Weighted"
|
||||
)
|
||||
|
||||
// CheckTrafficManagerRelativeDNSNameAvailabilityParameters is parameters supplied to check Traffic Manager name
|
||||
// operation.
|
||||
type CheckTrafficManagerRelativeDNSNameAvailabilityParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// CloudError is an error returned by the Azure Resource Manager
|
||||
type CloudError struct {
|
||||
Error *CloudErrorBody `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// CloudErrorBody is the content of an error returned by the Azure Resource Manager
|
||||
type CloudErrorBody struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Target *string `json:"target,omitempty"`
|
||||
Details *[]CloudErrorBody `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// DeleteOperationResult is the result of the request or operation.
|
||||
type DeleteOperationResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
OperationResult *bool `json:"boolean,omitempty"`
|
||||
}
|
||||
|
||||
// DNSConfig is class containing DNS settings in a Traffic Manager profile.
|
||||
type DNSConfig struct {
|
||||
RelativeName *string `json:"relativeName,omitempty"`
|
||||
@@ -45,30 +145,69 @@ type Endpoint struct {
|
||||
*EndpointProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointProperties is class representing a Traffic Manager endpoint
|
||||
// properties.
|
||||
// EndpointProperties is class representing a Traffic Manager endpoint properties.
|
||||
type EndpointProperties struct {
|
||||
TargetResourceID *string `json:"targetResourceId,omitempty"`
|
||||
Target *string `json:"target,omitempty"`
|
||||
EndpointStatus *string `json:"endpointStatus,omitempty"`
|
||||
Weight *int64 `json:"weight,omitempty"`
|
||||
Priority *int64 `json:"priority,omitempty"`
|
||||
EndpointLocation *string `json:"endpointLocation,omitempty"`
|
||||
EndpointMonitorStatus *string `json:"endpointMonitorStatus,omitempty"`
|
||||
MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"`
|
||||
TargetResourceID *string `json:"targetResourceId,omitempty"`
|
||||
Target *string `json:"target,omitempty"`
|
||||
EndpointStatus EndpointStatus `json:"endpointStatus,omitempty"`
|
||||
Weight *int64 `json:"weight,omitempty"`
|
||||
Priority *int64 `json:"priority,omitempty"`
|
||||
EndpointLocation *string `json:"endpointLocation,omitempty"`
|
||||
EndpointMonitorStatus EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"`
|
||||
MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"`
|
||||
GeoMapping *[]string `json:"geoMapping,omitempty"`
|
||||
}
|
||||
|
||||
// MonitorConfig is class containing endpoint monitoring settings in a Traffic
|
||||
// Manager profile.
|
||||
// GeographicHierarchy is class representing the Geographic hierarchy used with the Geographic traffic routing method.
|
||||
type GeographicHierarchy struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
*GeographicHierarchyProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// GeographicHierarchyProperties is class representing the properties of the Geographic hierarchy used with the
|
||||
// Geographic traffic routing method.
|
||||
type GeographicHierarchyProperties struct {
|
||||
GeographicHierarchy *Region `json:"geographicHierarchy,omitempty"`
|
||||
}
|
||||
|
||||
// HeatMapEndpoint is class which is a sparse representation of a Traffic Manager endpoint.
|
||||
type HeatMapEndpoint struct {
|
||||
ResourceID *string `json:"resourceId,omitempty"`
|
||||
EndpointID *int32 `json:"endpointId,omitempty"`
|
||||
}
|
||||
|
||||
// HeatMapModel is class representing a Traffic Manager HeatMap.
|
||||
type HeatMapModel struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
*HeatMapProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// HeatMapProperties is class representing a Traffic Manager HeatMap properties.
|
||||
type HeatMapProperties struct {
|
||||
StartTime *date.Time `json:"startTime,omitempty"`
|
||||
EndTime *date.Time `json:"endTime,omitempty"`
|
||||
Endpoints *[]HeatMapEndpoint `json:"endpoints,omitempty"`
|
||||
TrafficFlows *[]TrafficFlow `json:"trafficFlows,omitempty"`
|
||||
}
|
||||
|
||||
// MonitorConfig is class containing endpoint monitoring settings in a Traffic Manager profile.
|
||||
type MonitorConfig struct {
|
||||
ProfileMonitorStatus *string `json:"profileMonitorStatus,omitempty"`
|
||||
Protocol *string `json:"protocol,omitempty"`
|
||||
Port *int64 `json:"port,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
ProfileMonitorStatus ProfileMonitorStatus `json:"profileMonitorStatus,omitempty"`
|
||||
Protocol MonitorProtocol `json:"protocol,omitempty"`
|
||||
Port *int64 `json:"port,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"`
|
||||
TimeoutInSeconds *int64 `json:"timeoutInSeconds,omitempty"`
|
||||
ToleratedNumberOfFailures *int64 `json:"toleratedNumberOfFailures,omitempty"`
|
||||
}
|
||||
|
||||
// NameAvailability is class representing a Traffic Manager Name Availability
|
||||
// response.
|
||||
// NameAvailability is class representing a Traffic Manager Name Availability response.
|
||||
type NameAvailability struct {
|
||||
autorest.Response `json:"-"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@@ -84,8 +223,8 @@ type Profile struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
*ProfileProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
@@ -95,26 +234,57 @@ type ProfileListResult struct {
|
||||
Value *[]Profile `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// ProfileProperties is class representing the Traffic Manager profile
|
||||
// properties.
|
||||
// ProfileProperties is class representing the Traffic Manager profile properties.
|
||||
type ProfileProperties struct {
|
||||
ProfileStatus *string `json:"profileStatus,omitempty"`
|
||||
TrafficRoutingMethod *string `json:"trafficRoutingMethod,omitempty"`
|
||||
DNSConfig *DNSConfig `json:"dnsConfig,omitempty"`
|
||||
MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"`
|
||||
Endpoints *[]Endpoint `json:"endpoints,omitempty"`
|
||||
ProfileStatus ProfileStatus `json:"profileStatus,omitempty"`
|
||||
TrafficRoutingMethod TrafficRoutingMethod `json:"trafficRoutingMethod,omitempty"`
|
||||
DNSConfig *DNSConfig `json:"dnsConfig,omitempty"`
|
||||
MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"`
|
||||
Endpoints *[]Endpoint `json:"endpoints,omitempty"`
|
||||
}
|
||||
|
||||
// Resource is
|
||||
// ProxyResource is the resource model definition for a ARM proxy resource. It will have everything other than required
|
||||
// location and tags
|
||||
type ProxyResource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// QueryExperience is class representing a Traffic Manager HeatMap query experience properties.
|
||||
type QueryExperience struct {
|
||||
EndpointID *int32 `json:"endpointId,omitempty"`
|
||||
QueryCount *int32 `json:"queryCount,omitempty"`
|
||||
Latency *float64 `json:"latency,omitempty"`
|
||||
}
|
||||
|
||||
// Region is class representing a region in the Geographic hierarchy used with the Geographic traffic routing method.
|
||||
type Region struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Regions *[]Region `json:"regions,omitempty"`
|
||||
}
|
||||
|
||||
// Resource is the core properties of ARM resources
|
||||
type Resource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// TrackedResource is the resource model definition for a ARM tracked top level resource
|
||||
type TrackedResource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
}
|
||||
|
||||
// SubResource is
|
||||
type SubResource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
// TrafficFlow is class representing a Traffic Manager HeatMap traffic flow properties.
|
||||
type TrafficFlow struct {
|
||||
SourceIP *string `json:"sourceIp,omitempty"`
|
||||
Latitude *float64 `json:"latitude,omitempty"`
|
||||
Longitude *float64 `json:"longitude,omitempty"`
|
||||
QueryExperiences *[]QueryExperience `json:"queryExperiences,omitempty"`
|
||||
}
|
||||
|
||||
+103
-116
@@ -14,9 +14,8 @@ package trafficmanager
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ProfilesClient is the client for the Profiles methods of the Trafficmanager
|
||||
// service.
|
||||
// ProfilesClient is the client for the Profiles methods of the Trafficmanager service.
|
||||
type ProfilesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,17 +33,14 @@ func NewProfilesClient(subscriptionID string) ProfilesClient {
|
||||
return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient
|
||||
// client.
|
||||
// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client.
|
||||
func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient {
|
||||
return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CheckTrafficManagerRelativeDNSNameAvailability checks the availability of a
|
||||
// Traffic Manager Relative DNS name.
|
||||
// CheckTrafficManagerRelativeDNSNameAvailability checks the availability of a Traffic Manager Relative DNS name.
|
||||
//
|
||||
// parameters is the Traffic Manager name parameters supplied to the
|
||||
// CheckTrafficManagerNameAvailability operation.
|
||||
// parameters is the Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation.
|
||||
func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailability(parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (result NameAvailability, err error) {
|
||||
req, err := client.CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(parameters)
|
||||
if err != nil {
|
||||
@@ -70,11 +65,7 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailability(para
|
||||
|
||||
// CheckTrafficManagerRelativeDNSNameAvailabilityPreparer prepares the CheckTrafficManagerRelativeDNSNameAvailability request.
|
||||
func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -83,7 +74,7 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityPrepa
|
||||
autorest.AsJSON(),
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/providers/Microsoft.Network/checkTrafficManagerNameAvailability", pathParameters),
|
||||
autorest.WithPath("/providers/Microsoft.Network/checkTrafficManagerNameAvailability"),
|
||||
autorest.WithJSON(parameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
@@ -110,10 +101,9 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityRespo
|
||||
|
||||
// CreateOrUpdate create or update a Traffic Manager profile.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager profile. profileName is the name of the Traffic Manager profile.
|
||||
// parameters is the Traffic Manager profile parameters supplied to the
|
||||
// CreateOrUpdate operation.
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager profile. profileName is the name
|
||||
// of the Traffic Manager profile. parameters is the Traffic Manager profile parameters supplied to the CreateOrUpdate
|
||||
// operation.
|
||||
func (client ProfilesClient) CreateOrUpdate(resourceGroupName string, profileName string, parameters Profile) (result Profile, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, profileName, parameters)
|
||||
if err != nil {
|
||||
@@ -144,7 +134,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(resourceGroupName string, pr
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -180,10 +170,9 @@ func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
||||
|
||||
// Delete deletes a Traffic Manager profile.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager profile to be deleted. profileName is the name of the Traffic
|
||||
// Manager profile to be deleted.
|
||||
func (client ProfilesClient) Delete(resourceGroupName string, profileName string) (result autorest.Response, err error) {
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager profile to be deleted.
|
||||
// profileName is the name of the Traffic Manager profile to be deleted.
|
||||
func (client ProfilesClient) Delete(resourceGroupName string, profileName string) (result DeleteOperationResult, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, profileName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", nil, "Failure preparing request")
|
||||
@@ -192,7 +181,7 @@ func (client ProfilesClient) Delete(resourceGroupName string, profileName string
|
||||
|
||||
resp, err := client.DeleteSender(req)
|
||||
if err != nil {
|
||||
result.Response = resp
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
@@ -213,7 +202,7 @@ func (client ProfilesClient) DeletePreparer(resourceGroupName string, profileNam
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -234,20 +223,21 @@ func (client ProfilesClient) DeleteSender(req *http.Request) (*http.Response, er
|
||||
|
||||
// DeleteResponder handles the response to the Delete request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
|
||||
func (client ProfilesClient) DeleteResponder(resp *http.Response) (result DeleteOperationResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = resp
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Get gets a Traffic Manager profile.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager profile. profileName is the name of the Traffic Manager profile.
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager profile. profileName is the name
|
||||
// of the Traffic Manager profile.
|
||||
func (client ProfilesClient) Get(resourceGroupName string, profileName string) (result Profile, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, profileName)
|
||||
if err != nil {
|
||||
@@ -278,7 +268,7 @@ func (client ProfilesClient) GetPreparer(resourceGroupName string, profileName s
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -310,102 +300,39 @@ func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile,
|
||||
return
|
||||
}
|
||||
|
||||
// ListAll lists all Traffic Manager profiles within a subscription.
|
||||
func (client ProfilesClient) ListAll() (result ProfileListResult, err error) {
|
||||
req, err := client.ListAllPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAll", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListAllSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAll", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListAllResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAll", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListAllPreparer prepares the ListAll request.
|
||||
func (client ProfilesClient) ListAllPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListAllSender sends the ListAll request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ProfilesClient) ListAllSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListAllResponder handles the response to the ListAll request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ProfilesClient) ListAllResponder(resp *http.Response) (result ProfileListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListAllInResourceGroup lists all Traffic Manager profiles within a resource
|
||||
// group.
|
||||
// ListByResourceGroup lists all Traffic Manager profiles within a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager profiles to be listed.
|
||||
func (client ProfilesClient) ListAllInResourceGroup(resourceGroupName string) (result ProfileListResult, err error) {
|
||||
req, err := client.ListAllInResourceGroupPreparer(resourceGroupName)
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager profiles to be listed.
|
||||
func (client ProfilesClient) ListByResourceGroup(resourceGroupName string) (result ProfileListResult, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAllInResourceGroup", nil, "Failure preparing request")
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListAllInResourceGroupSender(req)
|
||||
resp, err := client.ListByResourceGroupSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAllInResourceGroup", resp, "Failure sending request")
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListAllInResourceGroupResponder(resp)
|
||||
result, err = client.ListByResourceGroupResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAllInResourceGroup", resp, "Failure responding to request")
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListAllInResourceGroupPreparer prepares the ListAllInResourceGroup request.
|
||||
func (client ProfilesClient) ListAllInResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
|
||||
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
|
||||
func (client ProfilesClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -418,15 +345,76 @@ func (client ProfilesClient) ListAllInResourceGroupPreparer(resourceGroupName st
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListAllInResourceGroupSender sends the ListAllInResourceGroup request. The method will close the
|
||||
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ProfilesClient) ListAllInResourceGroupSender(req *http.Request) (*http.Response, error) {
|
||||
func (client ProfilesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListAllInResourceGroupResponder handles the response to the ListAllInResourceGroup request. The method always
|
||||
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ProfilesClient) ListAllInResourceGroupResponder(resp *http.Response) (result ProfileListResult, err error) {
|
||||
func (client ProfilesClient) ListByResourceGroupResponder(resp *http.Response) (result ProfileListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListBySubscription lists all Traffic Manager profiles within a subscription.
|
||||
func (client ProfilesClient) ListBySubscription() (result ProfileListResult, err error) {
|
||||
req, err := client.ListBySubscriptionPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListBySubscription", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListBySubscriptionSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListBySubscription", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListBySubscriptionResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListBySubscription", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListBySubscriptionPreparer prepares the ListBySubscription request.
|
||||
func (client ProfilesClient) ListBySubscriptionPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ProfilesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ProfilesClient) ListBySubscriptionResponder(resp *http.Response) (result ProfileListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
@@ -439,9 +427,8 @@ func (client ProfilesClient) ListAllInResourceGroupResponder(resp *http.Response
|
||||
|
||||
// Update update a Traffic Manager profile.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the Traffic
|
||||
// Manager profile. profileName is the name of the Traffic Manager profile.
|
||||
// parameters is the Traffic Manager profile parameters supplied to the Update
|
||||
// resourceGroupName is the name of the resource group containing the Traffic Manager profile. profileName is the name
|
||||
// of the Traffic Manager profile. parameters is the Traffic Manager profile parameters supplied to the Update
|
||||
// operation.
|
||||
func (client ProfilesClient) Update(resourceGroupName string, profileName string, parameters Profile) (result Profile, err error) {
|
||||
req, err := client.UpdatePreparer(resourceGroupName, profileName, parameters)
|
||||
@@ -473,7 +460,7 @@ func (client ProfilesClient) UpdatePreparer(resourceGroupName string, profileNam
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2015-11-01"
|
||||
const APIVersion = "2017-09-01-preview"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package trafficmanager
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
// UserAgent returns the UserAgent string to use when sending http.Requests.
|
||||
func UserAgent() string {
|
||||
return "Azure-SDK-For-Go/v10.1.0-beta arm-trafficmanager/2015-11-01"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-trafficmanager/2017-09-01-preview"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.1.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user