We recommend using Azure Native.
azure.network.TrafficManagerProfile
Explore with Pulumi AI
Manages a Traffic Manager Profile to which multiple endpoints can be attached.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";
const server = new random.RandomId("server", {
keepers: {
azi_id: "1",
},
byteLength: 8,
});
const example = new azure.core.ResourceGroup("example", {
name: "trafficmanagerProfile",
location: "West Europe",
});
const exampleTrafficManagerProfile = new azure.network.TrafficManagerProfile("example", {
name: server.hex,
resourceGroupName: example.name,
trafficRoutingMethod: "Weighted",
dnsConfig: {
relativeName: server.hex,
ttl: 100,
},
monitorConfig: {
protocol: "HTTP",
port: 80,
path: "/",
intervalInSeconds: 30,
timeoutInSeconds: 9,
toleratedNumberOfFailures: 3,
},
tags: {
environment: "Production",
},
});
import pulumi
import pulumi_azure as azure
import pulumi_random as random
server = random.RandomId("server",
keepers={
"azi_id": "1",
},
byte_length=8)
example = azure.core.ResourceGroup("example",
name="trafficmanagerProfile",
location="West Europe")
example_traffic_manager_profile = azure.network.TrafficManagerProfile("example",
name=server.hex,
resource_group_name=example.name,
traffic_routing_method="Weighted",
dns_config=azure.network.TrafficManagerProfileDnsConfigArgs(
relative_name=server.hex,
ttl=100,
),
monitor_config=azure.network.TrafficManagerProfileMonitorConfigArgs(
protocol="HTTP",
port=80,
path="/",
interval_in_seconds=30,
timeout_in_seconds=9,
tolerated_number_of_failures=3,
),
tags={
"environment": "Production",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
server, err := random.NewRandomId(ctx, "server", &random.RandomIdArgs{
Keepers: pulumi.StringMap{
"azi_id": pulumi.String("1"),
},
ByteLength: pulumi.Int(8),
})
if err != nil {
return err
}
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("trafficmanagerProfile"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = network.NewTrafficManagerProfile(ctx, "example", &network.TrafficManagerProfileArgs{
Name: server.Hex,
ResourceGroupName: example.Name,
TrafficRoutingMethod: pulumi.String("Weighted"),
DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{
RelativeName: server.Hex,
Ttl: pulumi.Int(100),
},
MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{
Protocol: pulumi.String("HTTP"),
Port: pulumi.Int(80),
Path: pulumi.String("/"),
IntervalInSeconds: pulumi.Int(30),
TimeoutInSeconds: pulumi.Int(9),
ToleratedNumberOfFailures: pulumi.Int(3),
},
Tags: pulumi.StringMap{
"environment": pulumi.String("Production"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var server = new Random.RandomId("server", new()
{
Keepers =
{
{ "azi_id", "1" },
},
ByteLength = 8,
});
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "trafficmanagerProfile",
Location = "West Europe",
});
var exampleTrafficManagerProfile = new Azure.Network.TrafficManagerProfile("example", new()
{
Name = server.Hex,
ResourceGroupName = example.Name,
TrafficRoutingMethod = "Weighted",
DnsConfig = new Azure.Network.Inputs.TrafficManagerProfileDnsConfigArgs
{
RelativeName = server.Hex,
Ttl = 100,
},
MonitorConfig = new Azure.Network.Inputs.TrafficManagerProfileMonitorConfigArgs
{
Protocol = "HTTP",
Port = 80,
Path = "/",
IntervalInSeconds = 30,
TimeoutInSeconds = 9,
ToleratedNumberOfFailures = 3,
},
Tags =
{
{ "environment", "Production" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomId;
import com.pulumi.random.RandomIdArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.TrafficManagerProfile;
import com.pulumi.azure.network.TrafficManagerProfileArgs;
import com.pulumi.azure.network.inputs.TrafficManagerProfileDnsConfigArgs;
import com.pulumi.azure.network.inputs.TrafficManagerProfileMonitorConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var server = new RandomId("server", RandomIdArgs.builder()
.keepers(Map.of("azi_id", 1))
.byteLength(8)
.build());
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("trafficmanagerProfile")
.location("West Europe")
.build());
var exampleTrafficManagerProfile = new TrafficManagerProfile("exampleTrafficManagerProfile", TrafficManagerProfileArgs.builder()
.name(server.hex())
.resourceGroupName(example.name())
.trafficRoutingMethod("Weighted")
.dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
.relativeName(server.hex())
.ttl(100)
.build())
.monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
.protocol("HTTP")
.port(80)
.path("/")
.intervalInSeconds(30)
.timeoutInSeconds(9)
.toleratedNumberOfFailures(3)
.build())
.tags(Map.of("environment", "Production"))
.build());
}
}
resources:
server:
type: random:RandomId
properties:
keepers:
azi_id: 1
byteLength: 8
example:
type: azure:core:ResourceGroup
properties:
name: trafficmanagerProfile
location: West Europe
exampleTrafficManagerProfile:
type: azure:network:TrafficManagerProfile
name: example
properties:
name: ${server.hex}
resourceGroupName: ${example.name}
trafficRoutingMethod: Weighted
dnsConfig:
relativeName: ${server.hex}
ttl: 100
monitorConfig:
protocol: HTTP
port: 80
path: /
intervalInSeconds: 30
timeoutInSeconds: 9
toleratedNumberOfFailures: 3
tags:
environment: Production
Create TrafficManagerProfile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficManagerProfile(name: string, args: TrafficManagerProfileArgs, opts?: CustomResourceOptions);
@overload
def TrafficManagerProfile(resource_name: str,
args: TrafficManagerProfileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficManagerProfile(resource_name: str,
opts: Optional[ResourceOptions] = None,
dns_config: Optional[TrafficManagerProfileDnsConfigArgs] = None,
monitor_config: Optional[TrafficManagerProfileMonitorConfigArgs] = None,
resource_group_name: Optional[str] = None,
traffic_routing_method: Optional[str] = None,
max_return: Optional[int] = None,
name: Optional[str] = None,
profile_status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
traffic_view_enabled: Optional[bool] = None)
func NewTrafficManagerProfile(ctx *Context, name string, args TrafficManagerProfileArgs, opts ...ResourceOption) (*TrafficManagerProfile, error)
public TrafficManagerProfile(string name, TrafficManagerProfileArgs args, CustomResourceOptions? opts = null)
public TrafficManagerProfile(String name, TrafficManagerProfileArgs args)
public TrafficManagerProfile(String name, TrafficManagerProfileArgs args, CustomResourceOptions options)
type: azure:network:TrafficManagerProfile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TrafficManagerProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TrafficManagerProfileArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TrafficManagerProfileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficManagerProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficManagerProfileArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var trafficManagerProfileResource = new Azure.Network.TrafficManagerProfile("trafficManagerProfileResource", new()
{
DnsConfig = new Azure.Network.Inputs.TrafficManagerProfileDnsConfigArgs
{
RelativeName = "string",
Ttl = 0,
},
MonitorConfig = new Azure.Network.Inputs.TrafficManagerProfileMonitorConfigArgs
{
Port = 0,
Protocol = "string",
CustomHeaders = new[]
{
new Azure.Network.Inputs.TrafficManagerProfileMonitorConfigCustomHeaderArgs
{
Name = "string",
Value = "string",
},
},
ExpectedStatusCodeRanges = new[]
{
"string",
},
IntervalInSeconds = 0,
Path = "string",
TimeoutInSeconds = 0,
ToleratedNumberOfFailures = 0,
},
ResourceGroupName = "string",
TrafficRoutingMethod = "string",
MaxReturn = 0,
Name = "string",
ProfileStatus = "string",
Tags =
{
{ "string", "string" },
},
TrafficViewEnabled = false,
});
example, err := network.NewTrafficManagerProfile(ctx, "trafficManagerProfileResource", &network.TrafficManagerProfileArgs{
DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{
RelativeName: pulumi.String("string"),
Ttl: pulumi.Int(0),
},
MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{
Port: pulumi.Int(0),
Protocol: pulumi.String("string"),
CustomHeaders: network.TrafficManagerProfileMonitorConfigCustomHeaderArray{
&network.TrafficManagerProfileMonitorConfigCustomHeaderArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
ExpectedStatusCodeRanges: pulumi.StringArray{
pulumi.String("string"),
},
IntervalInSeconds: pulumi.Int(0),
Path: pulumi.String("string"),
TimeoutInSeconds: pulumi.Int(0),
ToleratedNumberOfFailures: pulumi.Int(0),
},
ResourceGroupName: pulumi.String("string"),
TrafficRoutingMethod: pulumi.String("string"),
MaxReturn: pulumi.Int(0),
Name: pulumi.String("string"),
ProfileStatus: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TrafficViewEnabled: pulumi.Bool(false),
})
var trafficManagerProfileResource = new TrafficManagerProfile("trafficManagerProfileResource", TrafficManagerProfileArgs.builder()
.dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
.relativeName("string")
.ttl(0)
.build())
.monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
.port(0)
.protocol("string")
.customHeaders(TrafficManagerProfileMonitorConfigCustomHeaderArgs.builder()
.name("string")
.value("string")
.build())
.expectedStatusCodeRanges("string")
.intervalInSeconds(0)
.path("string")
.timeoutInSeconds(0)
.toleratedNumberOfFailures(0)
.build())
.resourceGroupName("string")
.trafficRoutingMethod("string")
.maxReturn(0)
.name("string")
.profileStatus("string")
.tags(Map.of("string", "string"))
.trafficViewEnabled(false)
.build());
traffic_manager_profile_resource = azure.network.TrafficManagerProfile("trafficManagerProfileResource",
dns_config=azure.network.TrafficManagerProfileDnsConfigArgs(
relative_name="string",
ttl=0,
),
monitor_config=azure.network.TrafficManagerProfileMonitorConfigArgs(
port=0,
protocol="string",
custom_headers=[azure.network.TrafficManagerProfileMonitorConfigCustomHeaderArgs(
name="string",
value="string",
)],
expected_status_code_ranges=["string"],
interval_in_seconds=0,
path="string",
timeout_in_seconds=0,
tolerated_number_of_failures=0,
),
resource_group_name="string",
traffic_routing_method="string",
max_return=0,
name="string",
profile_status="string",
tags={
"string": "string",
},
traffic_view_enabled=False)
const trafficManagerProfileResource = new azure.network.TrafficManagerProfile("trafficManagerProfileResource", {
dnsConfig: {
relativeName: "string",
ttl: 0,
},
monitorConfig: {
port: 0,
protocol: "string",
customHeaders: [{
name: "string",
value: "string",
}],
expectedStatusCodeRanges: ["string"],
intervalInSeconds: 0,
path: "string",
timeoutInSeconds: 0,
toleratedNumberOfFailures: 0,
},
resourceGroupName: "string",
trafficRoutingMethod: "string",
maxReturn: 0,
name: "string",
profileStatus: "string",
tags: {
string: "string",
},
trafficViewEnabled: false,
});
type: azure:network:TrafficManagerProfile
properties:
dnsConfig:
relativeName: string
ttl: 0
maxReturn: 0
monitorConfig:
customHeaders:
- name: string
value: string
expectedStatusCodeRanges:
- string
intervalInSeconds: 0
path: string
port: 0
protocol: string
timeoutInSeconds: 0
toleratedNumberOfFailures: 0
name: string
profileStatus: string
resourceGroupName: string
tags:
string: string
trafficRoutingMethod: string
trafficViewEnabled: false
TrafficManagerProfile Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TrafficManagerProfile resource accepts the following input properties:
- Dns
Config TrafficManager Profile Dns Config - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - Monitor
Config TrafficManager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - Resource
Group stringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- Traffic
Routing stringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- Max
Return int The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- Name string
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- Profile
Status string - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Traffic
View boolEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- Dns
Config TrafficManager Profile Dns Config Args - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - Monitor
Config TrafficManager Profile Monitor Config Args - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - Resource
Group stringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- Traffic
Routing stringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- Max
Return int The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- Name string
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- Profile
Status string - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - map[string]string
- A mapping of tags to assign to the resource.
- Traffic
View boolEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns
Config TrafficManager Profile Dns Config - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - monitor
Config TrafficManager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - resource
Group StringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- traffic
Routing StringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- max
Return Integer The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- name String
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile
Status String - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - Map<String,String>
- A mapping of tags to assign to the resource.
- traffic
View BooleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns
Config TrafficManager Profile Dns Config - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - monitor
Config TrafficManager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - resource
Group stringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- traffic
Routing stringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- max
Return number The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- name string
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile
Status string - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- traffic
View booleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns_
config TrafficManager Profile Dns Config Args - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - monitor_
config TrafficManager Profile Monitor Config Args - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - resource_
group_ strname - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- traffic_
routing_ strmethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- max_
return int The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- name str
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile_
status str - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- traffic_
view_ boolenabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns
Config Property Map - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - monitor
Config Property Map - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - resource
Group StringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- traffic
Routing StringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- max
Return Number The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- name String
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile
Status String - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - Map<String>
- A mapping of tags to assign to the resource.
- traffic
View BooleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficManagerProfile resource produces the following output properties:
Look up Existing TrafficManagerProfile Resource
Get an existing TrafficManagerProfile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TrafficManagerProfileState, opts?: CustomResourceOptions): TrafficManagerProfile
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dns_config: Optional[TrafficManagerProfileDnsConfigArgs] = None,
fqdn: Optional[str] = None,
max_return: Optional[int] = None,
monitor_config: Optional[TrafficManagerProfileMonitorConfigArgs] = None,
name: Optional[str] = None,
profile_status: Optional[str] = None,
resource_group_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
traffic_routing_method: Optional[str] = None,
traffic_view_enabled: Optional[bool] = None) -> TrafficManagerProfile
func GetTrafficManagerProfile(ctx *Context, name string, id IDInput, state *TrafficManagerProfileState, opts ...ResourceOption) (*TrafficManagerProfile, error)
public static TrafficManagerProfile Get(string name, Input<string> id, TrafficManagerProfileState? state, CustomResourceOptions? opts = null)
public static TrafficManagerProfile get(String name, Output<String> id, TrafficManagerProfileState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dns
Config TrafficManager Profile Dns Config - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - Fqdn string
- The FQDN of the created Profile.
- Max
Return int The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- Monitor
Config TrafficManager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - Name string
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- Profile
Status string - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - Resource
Group stringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Traffic
Routing stringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- Traffic
View boolEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- Dns
Config TrafficManager Profile Dns Config Args - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - Fqdn string
- The FQDN of the created Profile.
- Max
Return int The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- Monitor
Config TrafficManager Profile Monitor Config Args - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - Name string
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- Profile
Status string - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - Resource
Group stringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- Traffic
Routing stringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- Traffic
View boolEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns
Config TrafficManager Profile Dns Config - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - fqdn String
- The FQDN of the created Profile.
- max
Return Integer The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- monitor
Config TrafficManager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - name String
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile
Status String - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - resource
Group StringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- traffic
Routing StringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- traffic
View BooleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns
Config TrafficManager Profile Dns Config - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - fqdn string
- The FQDN of the created Profile.
- max
Return number The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- monitor
Config TrafficManager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - name string
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile
Status string - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - resource
Group stringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- traffic
Routing stringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- traffic
View booleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns_
config TrafficManager Profile Dns Config Args - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - fqdn str
- The FQDN of the created Profile.
- max_
return int The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- monitor_
config TrafficManager Profile Monitor Config Args - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - name str
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile_
status str - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - resource_
group_ strname - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- traffic_
routing_ strmethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- traffic_
view_ boolenabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns
Config Property Map - This block specifies the DNS configuration of the Profile. One
dns_config
block as defined below. - fqdn String
- The FQDN of the created Profile.
- max
Return Number The amount of endpoints to return for DNS queries to this Profile. Possible values range from
1
to8
.NOTE:
max_return
must be set when thetraffic_routing_method
isMultiValue
.- monitor
Config Property Map - This block specifies the Endpoint monitoring configuration for the Profile. One
monitor_config
block as defined below. - name String
- The name of the Traffic Manager profile. Changing this forces a new resource to be created.
- profile
Status String - The status of the profile, can be set to either
Enabled
orDisabled
. Defaults toEnabled
. - resource
Group StringName - The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
- traffic
Routing StringMethod - Specifies the algorithm used to route traffic. Possible values are
Geographic
,Weighted
,Performance
,Priority
,Subnet
andMultiValue
.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 typeExternal
and are specified as IPv4 or IPv6 addresses.Performance
- Traffic is routed via the User's closest EndpointPriority
- Traffic is routed to the Endpoint with the lowestpriority
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 theirweight
value.
- traffic
View BooleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
Supporting Types
TrafficManagerProfileDnsConfig, TrafficManagerProfileDnsConfigArgs
- Relative
Name string - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.
- Ttl int
- The TTL value of the Profile used by Local DNS resolvers and clients.
- Relative
Name string - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.
- Ttl int
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relative
Name String - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.
- ttl Integer
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relative
Name string - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.
- ttl number
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relative_
name str - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.
- ttl int
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relative
Name String - The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created.
- ttl Number
- The TTL value of the Profile used by Local DNS resolvers and clients.
TrafficManagerProfileMonitorConfig, TrafficManagerProfileMonitorConfigArgs
- Port int
- The port number used by the monitoring checks.
- Protocol string
- The protocol used by the monitoring checks, supported values are
HTTP
,HTTPS
andTCP
. - Custom
Headers List<TrafficManager Profile Monitor Config Custom Header> - One or more
custom_header
blocks as defined below. - Expected
Status List<string>Code Ranges - A list of status code ranges in the format of
100-101
. - Interval
In intSeconds - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:
30
(normal probing) and10
(fast probing). The default value is30
. - Path string
- The path used by the monitoring checks. Required when
protocol
is set toHTTP
orHTTPS
- cannot be set whenprotocol
is set toTCP
. - Timeout
In intSeconds - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If
interval_in_seconds
is set to30
, thentimeout_in_seconds
can be between5
and10
. The default value is10
. Ifinterval_in_seconds
is set to10
, then valid values are between5
and9
andtimeout_in_seconds
is required. - Tolerated
Number intOf Failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between
0
and9
. The default value is3
- Port int
- The port number used by the monitoring checks.
- Protocol string
- The protocol used by the monitoring checks, supported values are
HTTP
,HTTPS
andTCP
. - Custom
Headers []TrafficManager Profile Monitor Config Custom Header - One or more
custom_header
blocks as defined below. - Expected
Status []stringCode Ranges - A list of status code ranges in the format of
100-101
. - Interval
In intSeconds - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:
30
(normal probing) and10
(fast probing). The default value is30
. - Path string
- The path used by the monitoring checks. Required when
protocol
is set toHTTP
orHTTPS
- cannot be set whenprotocol
is set toTCP
. - Timeout
In intSeconds - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If
interval_in_seconds
is set to30
, thentimeout_in_seconds
can be between5
and10
. The default value is10
. Ifinterval_in_seconds
is set to10
, then valid values are between5
and9
andtimeout_in_seconds
is required. - Tolerated
Number intOf Failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between
0
and9
. The default value is3
- port Integer
- The port number used by the monitoring checks.
- protocol String
- The protocol used by the monitoring checks, supported values are
HTTP
,HTTPS
andTCP
. - custom
Headers List<TrafficManager Profile Monitor Config Custom Header> - One or more
custom_header
blocks as defined below. - expected
Status List<String>Code Ranges - A list of status code ranges in the format of
100-101
. - interval
In IntegerSeconds - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:
30
(normal probing) and10
(fast probing). The default value is30
. - path String
- The path used by the monitoring checks. Required when
protocol
is set toHTTP
orHTTPS
- cannot be set whenprotocol
is set toTCP
. - timeout
In IntegerSeconds - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If
interval_in_seconds
is set to30
, thentimeout_in_seconds
can be between5
and10
. The default value is10
. Ifinterval_in_seconds
is set to10
, then valid values are between5
and9
andtimeout_in_seconds
is required. - tolerated
Number IntegerOf Failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between
0
and9
. The default value is3
- port number
- The port number used by the monitoring checks.
- protocol string
- The protocol used by the monitoring checks, supported values are
HTTP
,HTTPS
andTCP
. - custom
Headers TrafficManager Profile Monitor Config Custom Header[] - One or more
custom_header
blocks as defined below. - expected
Status string[]Code Ranges - A list of status code ranges in the format of
100-101
. - interval
In numberSeconds - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:
30
(normal probing) and10
(fast probing). The default value is30
. - path string
- The path used by the monitoring checks. Required when
protocol
is set toHTTP
orHTTPS
- cannot be set whenprotocol
is set toTCP
. - timeout
In numberSeconds - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If
interval_in_seconds
is set to30
, thentimeout_in_seconds
can be between5
and10
. The default value is10
. Ifinterval_in_seconds
is set to10
, then valid values are between5
and9
andtimeout_in_seconds
is required. - tolerated
Number numberOf Failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between
0
and9
. The default value is3
- port int
- The port number used by the monitoring checks.
- protocol str
- The protocol used by the monitoring checks, supported values are
HTTP
,HTTPS
andTCP
. - custom_
headers Sequence[TrafficManager Profile Monitor Config Custom Header] - One or more
custom_header
blocks as defined below. - expected_
status_ Sequence[str]code_ ranges - A list of status code ranges in the format of
100-101
. - interval_
in_ intseconds - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:
30
(normal probing) and10
(fast probing). The default value is30
. - path str
- The path used by the monitoring checks. Required when
protocol
is set toHTTP
orHTTPS
- cannot be set whenprotocol
is set toTCP
. - timeout_
in_ intseconds - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If
interval_in_seconds
is set to30
, thentimeout_in_seconds
can be between5
and10
. The default value is10
. Ifinterval_in_seconds
is set to10
, then valid values are between5
and9
andtimeout_in_seconds
is required. - tolerated_
number_ intof_ failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between
0
and9
. The default value is3
- port Number
- The port number used by the monitoring checks.
- protocol String
- The protocol used by the monitoring checks, supported values are
HTTP
,HTTPS
andTCP
. - custom
Headers List<Property Map> - One or more
custom_header
blocks as defined below. - expected
Status List<String>Code Ranges - A list of status code ranges in the format of
100-101
. - interval
In NumberSeconds - The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here:
30
(normal probing) and10
(fast probing). The default value is30
. - path String
- The path used by the monitoring checks. Required when
protocol
is set toHTTP
orHTTPS
- cannot be set whenprotocol
is set toTCP
. - timeout
In NumberSeconds - The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If
interval_in_seconds
is set to30
, thentimeout_in_seconds
can be between5
and10
. The default value is10
. Ifinterval_in_seconds
is set to10
, then valid values are between5
and9
andtimeout_in_seconds
is required. - tolerated
Number NumberOf Failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between
0
and9
. The default value is3
TrafficManagerProfileMonitorConfigCustomHeader, TrafficManagerProfileMonitorConfigCustomHeaderArgs
Import
Traffic Manager Profiles can be imported using the resource id
, e.g.
$ pulumi import azure:network/trafficManagerProfile:TrafficManagerProfile exampleProfile /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/trafficManagerProfiles/mytrafficmanagerprofile1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.