From 0f7e89e1ef40197beae5ea6940460617c6fd2f61 Mon Sep 17 00:00:00 2001 From: Robert Lippens Date: Mon, 8 Apr 2019 14:33:31 -0700 Subject: [PATCH] Add new Trafficmanager Routing Methods (#3207) --- azurerm/config.go | 2 +- ...e_traffic_manager_geographical_location.go | 2 +- .../resource_arm_traffic_manager_endpoint.go | 2 +- .../resource_arm_traffic_manager_profile.go | 4 +- .../trafficmanager/client.go | 2 +- .../trafficmanager/endpoints.go | 8 +- .../trafficmanager/geographichierarchies.go | 2 +- .../mgmt/2018-04-01/trafficmanager/heatmap.go | 142 +++++++++ .../trafficmanager/models.go | 292 +++++++++++++++++- .../trafficmanager/profiles.go | 14 +- .../trafficmanager/usermetricskeys.go | 257 +++++++++++++++ .../trafficmanager/version.go | 2 +- vendor/modules.txt | 2 +- .../r/traffic_manager_profile.html.markdown | 7 +- 14 files changed, 709 insertions(+), 29 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/{2017-05-01 => 2018-04-01}/trafficmanager/client.go (97%) rename vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/{2017-05-01 => 2018-04-01}/trafficmanager/endpoints.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/{2017-05-01 => 2018-04-01}/trafficmanager/geographichierarchies.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go rename vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/{2017-05-01 => 2018-04-01}/trafficmanager/models.go (66%) rename vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/{2017-05-01 => 2018-04-01}/trafficmanager/profiles.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go rename vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/{2017-05-01 => 2018-04-01}/trafficmanager/version.go (98%) diff --git a/azurerm/config.go b/azurerm/config.go index f636e9aa95d0..f626ecd8413f 100644 --- a/azurerm/config.go +++ b/azurerm/config.go @@ -64,7 +64,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" "github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage" - "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager" + "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager" "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web" mainStorage "github.com/Azure/azure-sdk-for-go/storage" diff --git a/azurerm/data_source_traffic_manager_geographical_location.go b/azurerm/data_source_traffic_manager_geographical_location.go index 6a2bca1cf4c9..42299ff5bf09 100644 --- a/azurerm/data_source_traffic_manager_geographical_location.go +++ b/azurerm/data_source_traffic_manager_geographical_location.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager" + "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/azurerm/resource_arm_traffic_manager_endpoint.go b/azurerm/resource_arm_traffic_manager_endpoint.go index c1a8b934a56a..c1a3306fc996 100644 --- a/azurerm/resource_arm_traffic_manager_endpoint.go +++ b/azurerm/resource_arm_traffic_manager_endpoint.go @@ -5,7 +5,7 @@ import ( "log" "regexp" - "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager" + "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_traffic_manager_profile.go b/azurerm/resource_arm_traffic_manager_profile.go index 12148012823b..c7b56707e47c 100644 --- a/azurerm/resource_arm_traffic_manager_profile.go +++ b/azurerm/resource_arm_traffic_manager_profile.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager" + "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -52,6 +52,8 @@ func resourceArmTrafficManagerProfile() *schema.Resource { string(trafficmanager.Weighted), string(trafficmanager.Performance), string(trafficmanager.Priority), + string(trafficmanager.Subnet), + string(trafficmanager.MultiValue), }, false), }, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go index 7cff0c128de1..8e5e255f9a5d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go @@ -1,4 +1,4 @@ -// Package trafficmanager implements the Azure ARM Trafficmanager service API version 2017-05-01. +// Package trafficmanager implements the Azure ARM Trafficmanager service API version 2018-04-01. // // package trafficmanager diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go index 47cc4c2aecee..2b229561c548 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go @@ -90,7 +90,7 @@ func (client EndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client EndpointsClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,7 +254,7 @@ func (client EndpointsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -336,7 +336,7 @@ func (client EndpointsClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go index 26fb01763742..6125587a8438 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go @@ -75,7 +75,7 @@ func (client GeographicHierarchiesClient) GetDefault(ctx context.Context) (resul // GetDefaultPreparer prepares the GetDefault request. func (client GeographicHierarchiesClient) GetDefaultPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go new file mode 100644 index 000000000000..02c08a91d1fe --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go @@ -0,0 +1,142 @@ +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 ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// HeatMapClient is the client for the HeatMap methods of the Trafficmanager service. +type HeatMapClient struct { + BaseClient +} + +// 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. +// Parameters: +// resourceGroupName - the name of the resource group containing the Traffic Manager endpoint. +// profileName - the name of the Traffic Manager profile. +// topLeft - the top left latitude,longitude pair of the rectangular viewport to query for. +// botRight - the bottom right latitude,longitude pair of the rectangular viewport to query for. +func (client HeatMapClient) Get(ctx context.Context, resourceGroupName string, profileName string, topLeft []float64, botRight []float64) (result HeatMapModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/HeatMapClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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.NewError("trafficmanager.HeatMapClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, profileName, 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(ctx context.Context, resourceGroupName string, profileName string, topLeft []float64, botRight []float64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "heatMapType": autorest.Encode("path", "default"), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + 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{}).WithContext(ctx)) +} + +// 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, + azure.DoRetryWithRegistration(client.Client)) +} + +// 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 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/models.go similarity index 66% rename from vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/models.go index 706f08f0d84f..48dbbabd7159 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/models.go @@ -20,10 +20,11 @@ package trafficmanager import ( "encoding/json" "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager" // EndpointMonitorStatus enumerates the values for endpoint monitor status. type EndpointMonitorStatus string @@ -122,17 +123,36 @@ type TrafficRoutingMethod string const ( // Geographic ... Geographic TrafficRoutingMethod = "Geographic" + // MultiValue ... + MultiValue TrafficRoutingMethod = "MultiValue" // Performance ... Performance TrafficRoutingMethod = "Performance" // Priority ... Priority TrafficRoutingMethod = "Priority" + // Subnet ... + Subnet TrafficRoutingMethod = "Subnet" // Weighted ... Weighted TrafficRoutingMethod = "Weighted" ) // PossibleTrafficRoutingMethodValues returns an array of possible values for the TrafficRoutingMethod const type. func PossibleTrafficRoutingMethodValues() []TrafficRoutingMethod { - return []TrafficRoutingMethod{Geographic, Performance, Priority, Weighted} + return []TrafficRoutingMethod{Geographic, MultiValue, Performance, Priority, Subnet, Weighted} +} + +// TrafficViewEnrollmentStatus enumerates the values for traffic view enrollment status. +type TrafficViewEnrollmentStatus string + +const ( + // TrafficViewEnrollmentStatusDisabled ... + TrafficViewEnrollmentStatusDisabled TrafficViewEnrollmentStatus = "Disabled" + // TrafficViewEnrollmentStatusEnabled ... + TrafficViewEnrollmentStatusEnabled TrafficViewEnrollmentStatus = "Enabled" +) + +// PossibleTrafficViewEnrollmentStatusValues returns an array of possible values for the TrafficViewEnrollmentStatus const type. +func PossibleTrafficViewEnrollmentStatusValues() []TrafficViewEnrollmentStatus { + return []TrafficViewEnrollmentStatus{TrafficViewEnrollmentStatusDisabled, TrafficViewEnrollmentStatusEnabled} } // CheckTrafficManagerRelativeDNSNameAvailabilityParameters parameters supplied to check Traffic Manager @@ -265,22 +285,44 @@ func (e *Endpoint) UnmarshalJSON(body []byte) error { type EndpointProperties struct { // TargetResourceID - The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. TargetResourceID *string `json:"targetResourceId,omitempty"` - // Target - The fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint. + // Target - The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint. Target *string `json:"target,omitempty"` // EndpointStatus - The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values include: 'EndpointStatusEnabled', 'EndpointStatusDisabled' EndpointStatus EndpointStatus `json:"endpointStatus,omitempty"` // Weight - The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. Weight *int64 `json:"weight,omitempty"` - // Priority - The priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. + // Priority - The priority of this endpoint when using the 'Priority' traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. Priority *int64 `json:"priority,omitempty"` - // EndpointLocation - Specifies the location of the external or nested endpoints when using the ‘Performance’ traffic routing method. + // EndpointLocation - Specifies the location of the external or nested endpoints when using the 'Performance' traffic routing method. EndpointLocation *string `json:"endpointLocation,omitempty"` // EndpointMonitorStatus - The monitoring status of the endpoint. Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', 'Disabled', 'Inactive', 'Stopped' EndpointMonitorStatus EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"` // MinChildEndpoints - The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"` - // GeoMapping - The list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. + // GeoMapping - The list of countries/regions mapped to this endpoint when using the 'Geographic' traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. GeoMapping *[]string `json:"geoMapping,omitempty"` + // Subnets - The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints. + Subnets *[]EndpointPropertiesSubnetsItem `json:"subnets,omitempty"` + // CustomHeaders - List of custom headers. + CustomHeaders *[]EndpointPropertiesCustomHeadersItem `json:"customHeaders,omitempty"` +} + +// EndpointPropertiesCustomHeadersItem custom header name and value. +type EndpointPropertiesCustomHeadersItem struct { + // Name - Header name. + Name *string `json:"name,omitempty"` + // Value - Header value. + Value *string `json:"value,omitempty"` +} + +// EndpointPropertiesSubnetsItem subnet first address, scope, and/or last address. +type EndpointPropertiesSubnetsItem struct { + // First - First address in the subnet. + First *string `json:"first,omitempty"` + // Last - Last address in the subnet. + Last *string `json:"last,omitempty"` + // Scope - Block size (number of leading bits in the subnet mask). + Scope *int32 `json:"scope,omitempty"` } // GeographicHierarchy class representing the Geographic hierarchy used with the Geographic traffic routing @@ -373,6 +415,108 @@ type GeographicHierarchyProperties struct { GeographicHierarchy *Region `json:"geographicHierarchy,omitempty"` } +// HeatMapEndpoint class which is a sparse representation of a Traffic Manager endpoint. +type HeatMapEndpoint struct { + // ResourceID - The ARM Resource ID of this Traffic Manager endpoint. + ResourceID *string `json:"resourceId,omitempty"` + // EndpointID - A number uniquely identifying this endpoint in query experiences. + EndpointID *int32 `json:"endpointId,omitempty"` +} + +// HeatMapModel class representing a Traffic Manager HeatMap. +type HeatMapModel struct { + autorest.Response `json:"-"` + // HeatMapProperties - The properties of the Traffic Manager HeatMap. + *HeatMapProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + ID *string `json:"id,omitempty"` + // Name - The name of the resource + Name *string `json:"name,omitempty"` + // Type - The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for HeatMapModel. +func (hmm HeatMapModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hmm.HeatMapProperties != nil { + objectMap["properties"] = hmm.HeatMapProperties + } + if hmm.ID != nil { + objectMap["id"] = hmm.ID + } + if hmm.Name != nil { + objectMap["name"] = hmm.Name + } + if hmm.Type != nil { + objectMap["type"] = hmm.Type + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HeatMapModel struct. +func (hmm *HeatMapModel) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var heatMapProperties HeatMapProperties + err = json.Unmarshal(*v, &heatMapProperties) + if err != nil { + return err + } + hmm.HeatMapProperties = &heatMapProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hmm.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hmm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hmm.Type = &typeVar + } + } + } + + return nil +} + +// HeatMapProperties class representing a Traffic Manager HeatMap properties. +type HeatMapProperties struct { + // StartTime - The beginning of the time window for this HeatMap, inclusive. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The ending of the time window for this HeatMap, exclusive. + EndTime *date.Time `json:"endTime,omitempty"` + // Endpoints - The endpoints used in this HeatMap calculation. + Endpoints *[]HeatMapEndpoint `json:"endpoints,omitempty"` + // TrafficFlows - The traffic flows produced in this HeatMap calculation. + TrafficFlows *[]TrafficFlow `json:"trafficFlows,omitempty"` +} + // MonitorConfig class containing endpoint monitoring settings in a Traffic Manager profile. type MonitorConfig struct { // ProfileMonitorStatus - The profile-level monitoring status of the Traffic Manager profile. Possible values include: 'ProfileMonitorStatusCheckingEndpoints', 'ProfileMonitorStatusOnline', 'ProfileMonitorStatusDegraded', 'ProfileMonitorStatusDisabled', 'ProfileMonitorStatusInactive' @@ -389,6 +533,26 @@ type MonitorConfig struct { TimeoutInSeconds *int64 `json:"timeoutInSeconds,omitempty"` // ToleratedNumberOfFailures - The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check. ToleratedNumberOfFailures *int64 `json:"toleratedNumberOfFailures,omitempty"` + // CustomHeaders - List of custom headers. + CustomHeaders *[]MonitorConfigCustomHeadersItem `json:"customHeaders,omitempty"` + // ExpectedStatusCodeRanges - List of expected status code ranges. + ExpectedStatusCodeRanges *[]MonitorConfigExpectedStatusCodeRangesItem `json:"expectedStatusCodeRanges,omitempty"` +} + +// MonitorConfigCustomHeadersItem custom header name and value. +type MonitorConfigCustomHeadersItem struct { + // Name - Header name. + Name *string `json:"name,omitempty"` + // Value - Header value. + Value *string `json:"value,omitempty"` +} + +// MonitorConfigExpectedStatusCodeRangesItem min and max value of a status code range. +type MonitorConfigExpectedStatusCodeRangesItem struct { + // Min - Min status code. + Min *int32 `json:"min,omitempty"` + // Max - Max status code. + Max *int32 `json:"max,omitempty"` } // NameAvailability class representing a Traffic Manager Name Availability response. @@ -527,7 +691,7 @@ type ProfileListResult struct { type ProfileProperties struct { // ProfileStatus - The status of the Traffic Manager profile. Possible values include: 'ProfileStatusEnabled', 'ProfileStatusDisabled' ProfileStatus ProfileStatus `json:"profileStatus,omitempty"` - // TrafficRoutingMethod - The traffic routing method of the Traffic Manager profile. Possible values include: 'Performance', 'Priority', 'Weighted', 'Geographic' + // TrafficRoutingMethod - The traffic routing method of the Traffic Manager profile. Possible values include: 'Performance', 'Priority', 'Weighted', 'Geographic', 'MultiValue', 'Subnet' TrafficRoutingMethod TrafficRoutingMethod `json:"trafficRoutingMethod,omitempty"` // DNSConfig - The DNS settings of the Traffic Manager profile. DNSConfig *DNSConfig `json:"dnsConfig,omitempty"` @@ -535,6 +699,10 @@ type ProfileProperties struct { MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"` // Endpoints - The list of endpoints in the Traffic Manager profile. Endpoints *[]Endpoint `json:"endpoints,omitempty"` + // TrafficViewEnrollmentStatus - Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile. Possible values include: 'TrafficViewEnrollmentStatusEnabled', 'TrafficViewEnrollmentStatusDisabled' + TrafficViewEnrollmentStatus TrafficViewEnrollmentStatus `json:"trafficViewEnrollmentStatus,omitempty"` + // MaxReturn - Maximum number of endpoints to be returned for MultiValue routing type. + MaxReturn *int64 `json:"maxReturn,omitempty"` } // ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than @@ -548,6 +716,16 @@ type ProxyResource struct { Type *string `json:"type,omitempty"` } +// QueryExperience class representing a Traffic Manager HeatMap query experience properties. +type QueryExperience struct { + // EndpointID - The id of the endpoint from the 'endpoints' array which these queries were routed to. + EndpointID *int32 `json:"endpointId,omitempty"` + // QueryCount - The number of queries originating from this location. + QueryCount *int32 `json:"queryCount,omitempty"` + // Latency - The latency experienced by queries originating from this location. + Latency *float64 `json:"latency,omitempty"` +} + // Region class representing a region in the Geographic hierarchy used with the Geographic traffic routing // method. type Region struct { @@ -603,3 +781,103 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { } return json.Marshal(objectMap) } + +// TrafficFlow class representing a Traffic Manager HeatMap traffic flow properties. +type TrafficFlow struct { + // SourceIP - The IP address that this query experience originated from. + SourceIP *string `json:"sourceIp,omitempty"` + // Latitude - The approximate latitude that these queries originated from. + Latitude *float64 `json:"latitude,omitempty"` + // Longitude - The approximate longitude that these queries originated from. + Longitude *float64 `json:"longitude,omitempty"` + // QueryExperiences - The query experiences produced in this HeatMap calculation. + QueryExperiences *[]QueryExperience `json:"queryExperiences,omitempty"` +} + +// UserMetricsModel class representing Traffic Manager User Metrics. +type UserMetricsModel struct { + autorest.Response `json:"-"` + // UserMetricsProperties - The properties of the Traffic Manager User Metrics. + *UserMetricsProperties `json:"properties,omitempty"` + // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + ID *string `json:"id,omitempty"` + // Name - The name of the resource + Name *string `json:"name,omitempty"` + // Type - The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for UserMetricsModel. +func (umm UserMetricsModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if umm.UserMetricsProperties != nil { + objectMap["properties"] = umm.UserMetricsProperties + } + if umm.ID != nil { + objectMap["id"] = umm.ID + } + if umm.Name != nil { + objectMap["name"] = umm.Name + } + if umm.Type != nil { + objectMap["type"] = umm.Type + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UserMetricsModel struct. +func (umm *UserMetricsModel) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var userMetricsProperties UserMetricsProperties + err = json.Unmarshal(*v, &userMetricsProperties) + if err != nil { + return err + } + umm.UserMetricsProperties = &userMetricsProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + umm.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + umm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + umm.Type = &typeVar + } + } + } + + return nil +} + +// UserMetricsProperties class representing a Traffic Manager Real User Metrics key response. +type UserMetricsProperties struct { + // Key - The key returned by the User Metrics operation. + Key *string `json:"key,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go index 838b489feb01..9ace8c13ff55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go @@ -78,7 +78,7 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailability(ctx // CheckTrafficManagerRelativeDNSNameAvailabilityPreparer prepares the CheckTrafficManagerRelativeDNSNameAvailability request. func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(ctx context.Context, parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (*http.Request, error) { - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -389,7 +389,7 @@ func (client ProfilesClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,7 +461,7 @@ func (client ProfilesClient) ListBySubscriptionPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client ProfilesClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-05-01" + const APIVersion = "2018-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go new file mode 100644 index 000000000000..e13df0e48940 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go @@ -0,0 +1,257 @@ +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 ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// UserMetricsKeysClient is the client for the UserMetricsKeys methods of the Trafficmanager service. +type UserMetricsKeysClient struct { + BaseClient +} + +// NewUserMetricsKeysClient creates an instance of the UserMetricsKeysClient client. +func NewUserMetricsKeysClient(subscriptionID string) UserMetricsKeysClient { + return NewUserMetricsKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client. +func NewUserMetricsKeysClientWithBaseURI(baseURI string, subscriptionID string) UserMetricsKeysClient { + return UserMetricsKeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a subscription-level key used for Real User Metrics collection. +func (client UserMetricsKeysClient) CreateOrUpdate(ctx context.Context) (result UserMetricsModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UserMetricsKeysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client UserMetricsKeysClient) CreateOrUpdatePreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client UserMetricsKeysClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client UserMetricsKeysClient) CreateOrUpdateResponder(resp *http.Response) (result UserMetricsModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a subscription-level key used for Real User Metrics collection. +func (client UserMetricsKeysClient) Delete(ctx context.Context) (result DeleteOperationResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UserMetricsKeysClient.Delete") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client UserMetricsKeysClient) DeletePreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client UserMetricsKeysClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client UserMetricsKeysClient) DeleteResponder(resp *http.Response) (result DeleteOperationResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get the subscription-level key used for Real User Metrics collection. +func (client UserMetricsKeysClient) Get(ctx context.Context) (result UserMetricsModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UserMetricsKeysClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "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.UserMetricsKeysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.UserMetricsKeysClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client UserMetricsKeysClient) GetPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client UserMetricsKeysClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client UserMetricsKeysClient) GetResponder(resp *http.Response) (result UserMetricsModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/version.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/version.go index 0ee2738cada2..dd1972d8d5a5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " trafficmanager/2017-05-01" + return "Azure-SDK-For-Go/" + version.Number + " trafficmanager/2018-04-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/modules.txt b/vendor/modules.txt index 3a98cc50ba11..a1e873ec29e2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -56,7 +56,7 @@ github.com/Azure/azure-sdk-for-go/services/search/mgmt/2015-08-19/search github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2018-02-01/servicefabric github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-02-01/storage -github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2017-05-01/trafficmanager +github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web github.com/Azure/azure-sdk-for-go/storage github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources diff --git a/website/docs/r/traffic_manager_profile.html.markdown b/website/docs/r/traffic_manager_profile.html.markdown index e8785a589e2b..787180aaebb8 100644 --- a/website/docs/r/traffic_manager_profile.html.markdown +++ b/website/docs/r/traffic_manager_profile.html.markdown @@ -63,12 +63,13 @@ The following arguments are supported: * `profile_status` - (Optional) The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. -* `traffic_routing_method` - (Required) Specifies the algorithm used to route - traffic, possible values are: +* `traffic_routing_method` - (Required) Specifies the algorithm used to route traffic, possible values are: - `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. + - `MultiValue`- All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type ‘External’ and are specified as IPv4 or IPv6 addresses. - `Performance` - Traffic is routed via the User's closest Endpoint - - `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. - `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. + - `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. + - `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. * `dns_config` - (Required) This block specifies the DNS configuration of the Profile, it supports the fields documented below.