1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. getTrafficManagerProfile

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.network.getTrafficManagerProfile

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Traffic Manager Profile.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getTrafficManagerProfile({
    name: "test",
    resourceGroupName: "test",
});
export const trafficRoutingMethod = example.then(example => example.trafficRoutingMethod);
Copy
import pulumi
import pulumi_azure as azure

example = azure.network.get_traffic_manager_profile(name="test",
    resource_group_name="test")
pulumi.export("trafficRoutingMethod", example.traffic_routing_method)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := network.LookupTrafficManagerProfile(ctx, &network.LookupTrafficManagerProfileArgs{
			Name:              "test",
			ResourceGroupName: "test",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("trafficRoutingMethod", example.TrafficRoutingMethod)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetTrafficManagerProfile.Invoke(new()
    {
        Name = "test",
        ResourceGroupName = "test",
    });

    return new Dictionary<string, object?>
    {
        ["trafficRoutingMethod"] = example.Apply(getTrafficManagerProfileResult => getTrafficManagerProfileResult.TrafficRoutingMethod),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetTrafficManagerProfileArgs;
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) {
        final var example = NetworkFunctions.getTrafficManagerProfile(GetTrafficManagerProfileArgs.builder()
            .name("test")
            .resourceGroupName("test")
            .build());

        ctx.export("trafficRoutingMethod", example.applyValue(getTrafficManagerProfileResult -> getTrafficManagerProfileResult.trafficRoutingMethod()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:network:getTrafficManagerProfile
      arguments:
        name: test
        resourceGroupName: test
outputs:
  trafficRoutingMethod: ${example.trafficRoutingMethod}
Copy

Using getTrafficManagerProfile

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTrafficManagerProfile(args: GetTrafficManagerProfileArgs, opts?: InvokeOptions): Promise<GetTrafficManagerProfileResult>
function getTrafficManagerProfileOutput(args: GetTrafficManagerProfileOutputArgs, opts?: InvokeOptions): Output<GetTrafficManagerProfileResult>
Copy
def get_traffic_manager_profile(name: Optional[str] = None,
                                resource_group_name: Optional[str] = None,
                                tags: Optional[Mapping[str, str]] = None,
                                traffic_view_enabled: Optional[bool] = None,
                                opts: Optional[InvokeOptions] = None) -> GetTrafficManagerProfileResult
def get_traffic_manager_profile_output(name: Optional[pulumi.Input[str]] = None,
                                resource_group_name: Optional[pulumi.Input[str]] = None,
                                tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                traffic_view_enabled: Optional[pulumi.Input[bool]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetTrafficManagerProfileResult]
Copy
func LookupTrafficManagerProfile(ctx *Context, args *LookupTrafficManagerProfileArgs, opts ...InvokeOption) (*LookupTrafficManagerProfileResult, error)
func LookupTrafficManagerProfileOutput(ctx *Context, args *LookupTrafficManagerProfileOutputArgs, opts ...InvokeOption) LookupTrafficManagerProfileResultOutput
Copy

> Note: This function is named LookupTrafficManagerProfile in the Go SDK.

public static class GetTrafficManagerProfile 
{
    public static Task<GetTrafficManagerProfileResult> InvokeAsync(GetTrafficManagerProfileArgs args, InvokeOptions? opts = null)
    public static Output<GetTrafficManagerProfileResult> Invoke(GetTrafficManagerProfileInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTrafficManagerProfileResult> getTrafficManagerProfile(GetTrafficManagerProfileArgs args, InvokeOptions options)
public static Output<GetTrafficManagerProfileResult> getTrafficManagerProfile(GetTrafficManagerProfileArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:network/getTrafficManagerProfile:getTrafficManagerProfile
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Specifies the name of the Traffic Manager Profile.
ResourceGroupName This property is required. string
Specifies the name of the resource group the Traffic Manager Profile is located in.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
TrafficViewEnabled bool
Indicates whether Traffic View is enabled for the Traffic Manager profile.
Name This property is required. string
Specifies the name of the Traffic Manager Profile.
ResourceGroupName This property is required. string
Specifies the name of the resource group the Traffic Manager Profile is located in.
Tags map[string]string
A mapping of tags to assign to the resource.
TrafficViewEnabled bool
Indicates whether Traffic View is enabled for the Traffic Manager profile.
name This property is required. String
Specifies the name of the Traffic Manager Profile.
resourceGroupName This property is required. String
Specifies the name of the resource group the Traffic Manager Profile is located in.
tags Map<String,String>
A mapping of tags to assign to the resource.
trafficViewEnabled Boolean
Indicates whether Traffic View is enabled for the Traffic Manager profile.
name This property is required. string
Specifies the name of the Traffic Manager Profile.
resourceGroupName This property is required. string
Specifies the name of the resource group the Traffic Manager Profile is located in.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
trafficViewEnabled boolean
Indicates whether Traffic View is enabled for the Traffic Manager profile.
name This property is required. str
Specifies the name of the Traffic Manager Profile.
resource_group_name This property is required. str
Specifies the name of the resource group the Traffic Manager Profile is located in.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
traffic_view_enabled bool
Indicates whether Traffic View is enabled for the Traffic Manager profile.
name This property is required. String
Specifies the name of the Traffic Manager Profile.
resourceGroupName This property is required. String
Specifies the name of the resource group the Traffic Manager Profile is located in.
tags Map<String>
A mapping of tags to assign to the resource.
trafficViewEnabled Boolean
Indicates whether Traffic View is enabled for the Traffic Manager profile.

getTrafficManagerProfile Result

The following output properties are available:

DnsConfigs List<GetTrafficManagerProfileDnsConfig>
This block specifies the DNS configuration of the Profile.
Fqdn string
The FQDN of the created Profile.
Id string
The provider-assigned unique ID for this managed resource.
MonitorConfigs List<GetTrafficManagerProfileMonitorConfig>
This block specifies the Endpoint monitoring configuration for the Profile.
Name string
The name of the custom header.
ProfileStatus string
The status of the profile.
ResourceGroupName string
TrafficRoutingMethod string
Specifies the algorithm used to route traffic.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
TrafficViewEnabled bool
Indicates whether Traffic View is enabled for the Traffic Manager profile.
DnsConfigs []GetTrafficManagerProfileDnsConfig
This block specifies the DNS configuration of the Profile.
Fqdn string
The FQDN of the created Profile.
Id string
The provider-assigned unique ID for this managed resource.
MonitorConfigs []GetTrafficManagerProfileMonitorConfig
This block specifies the Endpoint monitoring configuration for the Profile.
Name string
The name of the custom header.
ProfileStatus string
The status of the profile.
ResourceGroupName string
TrafficRoutingMethod string
Specifies the algorithm used to route traffic.
Tags map[string]string
A mapping of tags to assign to the resource.
TrafficViewEnabled bool
Indicates whether Traffic View is enabled for the Traffic Manager profile.
dnsConfigs List<GetTrafficManagerProfileDnsConfig>
This block specifies the DNS configuration of the Profile.
fqdn String
The FQDN of the created Profile.
id String
The provider-assigned unique ID for this managed resource.
monitorConfigs List<GetTrafficManagerProfileMonitorConfig>
This block specifies the Endpoint monitoring configuration for the Profile.
name String
The name of the custom header.
profileStatus String
The status of the profile.
resourceGroupName String
trafficRoutingMethod String
Specifies the algorithm used to route traffic.
tags Map<String,String>
A mapping of tags to assign to the resource.
trafficViewEnabled Boolean
Indicates whether Traffic View is enabled for the Traffic Manager profile.
dnsConfigs GetTrafficManagerProfileDnsConfig[]
This block specifies the DNS configuration of the Profile.
fqdn string
The FQDN of the created Profile.
id string
The provider-assigned unique ID for this managed resource.
monitorConfigs GetTrafficManagerProfileMonitorConfig[]
This block specifies the Endpoint monitoring configuration for the Profile.
name string
The name of the custom header.
profileStatus string
The status of the profile.
resourceGroupName string
trafficRoutingMethod string
Specifies the algorithm used to route traffic.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
trafficViewEnabled boolean
Indicates whether Traffic View is enabled for the Traffic Manager profile.
dns_configs Sequence[GetTrafficManagerProfileDnsConfig]
This block specifies the DNS configuration of the Profile.
fqdn str
The FQDN of the created Profile.
id str
The provider-assigned unique ID for this managed resource.
monitor_configs Sequence[GetTrafficManagerProfileMonitorConfig]
This block specifies the Endpoint monitoring configuration for the Profile.
name str
The name of the custom header.
profile_status str
The status of the profile.
resource_group_name str
traffic_routing_method str
Specifies the algorithm used to route traffic.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
traffic_view_enabled bool
Indicates whether Traffic View is enabled for the Traffic Manager profile.
dnsConfigs List<Property Map>
This block specifies the DNS configuration of the Profile.
fqdn String
The FQDN of the created Profile.
id String
The provider-assigned unique ID for this managed resource.
monitorConfigs List<Property Map>
This block specifies the Endpoint monitoring configuration for the Profile.
name String
The name of the custom header.
profileStatus String
The status of the profile.
resourceGroupName String
trafficRoutingMethod String
Specifies the algorithm used to route traffic.
tags Map<String>
A mapping of tags to assign to the resource.
trafficViewEnabled Boolean
Indicates whether Traffic View is enabled for the Traffic Manager profile.

Supporting Types

GetTrafficManagerProfileDnsConfig

RelativeName This property is required. 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.
Ttl This property is required. int
The TTL value of the Profile used by Local DNS resolvers and clients.
RelativeName This property is required. 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.
Ttl This property is required. int
The TTL value of the Profile used by Local DNS resolvers and clients.
relativeName This property is required. 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.
ttl This property is required. Integer
The TTL value of the Profile used by Local DNS resolvers and clients.
relativeName This property is required. 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.
ttl This property is required. number
The TTL value of the Profile used by Local DNS resolvers and clients.
relative_name This property is required. 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.
ttl This property is required. int
The TTL value of the Profile used by Local DNS resolvers and clients.
relativeName This property is required. 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.
ttl This property is required. Number
The TTL value of the Profile used by Local DNS resolvers and clients.

GetTrafficManagerProfileMonitorConfig

CustomHeaders This property is required. List<GetTrafficManagerProfileMonitorConfigCustomHeader>
One or more custom_header blocks as defined below.
ExpectedStatusCodeRanges This property is required. List<string>
A list of status code ranges.
IntervalInSeconds This property is required. int
The interval used to check the endpoint health from a Traffic Manager probing agent.
Path This property is required. string
The path used by the monitoring checks.
Port This property is required. int
The port number used by the monitoring checks.
Protocol This property is required. string
The protocol used by the monitoring checks.
TimeoutInSeconds This property is required. int
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.
ToleratedNumberOfFailures This property is required. int
The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
CustomHeaders This property is required. []GetTrafficManagerProfileMonitorConfigCustomHeader
One or more custom_header blocks as defined below.
ExpectedStatusCodeRanges This property is required. []string
A list of status code ranges.
IntervalInSeconds This property is required. int
The interval used to check the endpoint health from a Traffic Manager probing agent.
Path This property is required. string
The path used by the monitoring checks.
Port This property is required. int
The port number used by the monitoring checks.
Protocol This property is required. string
The protocol used by the monitoring checks.
TimeoutInSeconds This property is required. int
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.
ToleratedNumberOfFailures This property is required. int
The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
customHeaders This property is required. List<GetTrafficManagerProfileMonitorConfigCustomHeader>
One or more custom_header blocks as defined below.
expectedStatusCodeRanges This property is required. List<String>
A list of status code ranges.
intervalInSeconds This property is required. Integer
The interval used to check the endpoint health from a Traffic Manager probing agent.
path This property is required. String
The path used by the monitoring checks.
port This property is required. Integer
The port number used by the monitoring checks.
protocol This property is required. String
The protocol used by the monitoring checks.
timeoutInSeconds This property is required. Integer
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.
toleratedNumberOfFailures This property is required. Integer
The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
customHeaders This property is required. GetTrafficManagerProfileMonitorConfigCustomHeader[]
One or more custom_header blocks as defined below.
expectedStatusCodeRanges This property is required. string[]
A list of status code ranges.
intervalInSeconds This property is required. number
The interval used to check the endpoint health from a Traffic Manager probing agent.
path This property is required. string
The path used by the monitoring checks.
port This property is required. number
The port number used by the monitoring checks.
protocol This property is required. string
The protocol used by the monitoring checks.
timeoutInSeconds This property is required. number
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.
toleratedNumberOfFailures This property is required. number
The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
custom_headers This property is required. Sequence[GetTrafficManagerProfileMonitorConfigCustomHeader]
One or more custom_header blocks as defined below.
expected_status_code_ranges This property is required. Sequence[str]
A list of status code ranges.
interval_in_seconds This property is required. int
The interval used to check the endpoint health from a Traffic Manager probing agent.
path This property is required. str
The path used by the monitoring checks.
port This property is required. int
The port number used by the monitoring checks.
protocol This property is required. str
The protocol used by the monitoring checks.
timeout_in_seconds This property is required. int
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.
tolerated_number_of_failures This property is required. int
The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
customHeaders This property is required. List<Property Map>
One or more custom_header blocks as defined below.
expectedStatusCodeRanges This property is required. List<String>
A list of status code ranges.
intervalInSeconds This property is required. Number
The interval used to check the endpoint health from a Traffic Manager probing agent.
path This property is required. String
The path used by the monitoring checks.
port This property is required. Number
The port number used by the monitoring checks.
protocol This property is required. String
The protocol used by the monitoring checks.
timeoutInSeconds This property is required. Number
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.
toleratedNumberOfFailures This property is required. Number
The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.

GetTrafficManagerProfileMonitorConfigCustomHeader

Name This property is required. string
Specifies the name of the Traffic Manager Profile.
Value This property is required. string
The value of custom header. Applicable for HTTP and HTTPS protocol.
Name This property is required. string
Specifies the name of the Traffic Manager Profile.
Value This property is required. string
The value of custom header. Applicable for HTTP and HTTPS protocol.
name This property is required. String
Specifies the name of the Traffic Manager Profile.
value This property is required. String
The value of custom header. Applicable for HTTP and HTTPS protocol.
name This property is required. string
Specifies the name of the Traffic Manager Profile.
value This property is required. string
The value of custom header. Applicable for HTTP and HTTPS protocol.
name This property is required. str
Specifies the name of the Traffic Manager Profile.
value This property is required. str
The value of custom header. Applicable for HTTP and HTTPS protocol.
name This property is required. String
Specifies the name of the Traffic Manager Profile.
value This property is required. String
The value of custom header. Applicable for HTTP and HTTPS protocol.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi