We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.network.getTrafficManagerProfile
Explore with Pulumi AI
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);
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)
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
	})
}
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),
    };
});
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()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:network:getTrafficManagerProfile
      arguments:
        name: test
        resourceGroupName: test
outputs:
  trafficRoutingMethod: ${example.trafficRoutingMethod}
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>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]func LookupTrafficManagerProfile(ctx *Context, args *LookupTrafficManagerProfileArgs, opts ...InvokeOption) (*LookupTrafficManagerProfileResult, error)
func LookupTrafficManagerProfileOutput(ctx *Context, args *LookupTrafficManagerProfileOutputArgs, opts ...InvokeOption) LookupTrafficManagerProfileResultOutput> 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)
}public static CompletableFuture<GetTrafficManagerProfileResult> getTrafficManagerProfile(GetTrafficManagerProfileArgs args, InvokeOptions options)
public static Output<GetTrafficManagerProfileResult> getTrafficManagerProfile(GetTrafficManagerProfileArgs args, InvokeOptions options)
fn::invoke:
  function: azure:network/getTrafficManagerProfile:getTrafficManagerProfile
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the Traffic Manager Profile.
- ResourceGroup stringName 
- Specifies the name of the resource group the Traffic Manager Profile is located in.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- TrafficView boolEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- Name string
- Specifies the name of the Traffic Manager Profile.
- ResourceGroup stringName 
- Specifies the name of the resource group the Traffic Manager Profile is located in.
- map[string]string
- A mapping of tags to assign to the resource.
- TrafficView boolEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- name String
- Specifies the name of the Traffic Manager Profile.
- resourceGroup StringName 
- Specifies the name of the resource group the Traffic Manager Profile is located in.
- Map<String,String>
- A mapping of tags to assign to the resource.
- trafficView BooleanEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- name string
- Specifies the name of the Traffic Manager Profile.
- resourceGroup stringName 
- Specifies the name of the resource group the Traffic Manager Profile is located in.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- trafficView booleanEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- name str
- Specifies the name of the Traffic Manager Profile.
- resource_group_ strname 
- Specifies the name of the resource group the Traffic Manager Profile is located in.
- 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.
- name String
- Specifies the name of the Traffic Manager Profile.
- resourceGroup StringName 
- Specifies the name of the resource group the Traffic Manager Profile is located in.
- Map<String>
- A mapping of tags to assign to the resource.
- trafficView BooleanEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
getTrafficManagerProfile Result
The following output properties are available:
- DnsConfigs List<GetTraffic Manager Profile Dns Config> 
- 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<GetTraffic Manager Profile Monitor Config> 
- 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.
- ResourceGroup stringName 
- TrafficRouting stringMethod 
- Specifies the algorithm used to route traffic.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- TrafficView boolEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- DnsConfigs []GetTraffic Manager Profile Dns Config 
- 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 []GetTraffic Manager Profile Monitor Config 
- 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.
- ResourceGroup stringName 
- TrafficRouting stringMethod 
- Specifies the algorithm used to route traffic.
- map[string]string
- A mapping of tags to assign to the resource.
- TrafficView boolEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dnsConfigs List<GetTraffic Manager Profile Dns Config> 
- 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<GetTraffic Manager Profile Monitor Config> 
- 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.
- resourceGroup StringName 
- trafficRouting StringMethod 
- Specifies the algorithm used to route traffic.
- Map<String,String>
- A mapping of tags to assign to the resource.
- trafficView BooleanEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dnsConfigs GetTraffic Manager Profile Dns Config[] 
- 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 GetTraffic Manager Profile Monitor Config[] 
- 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.
- resourceGroup stringName 
- trafficRouting stringMethod 
- Specifies the algorithm used to route traffic.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- trafficView booleanEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
- dns_configs Sequence[GetTraffic Manager Profile Dns Config] 
- 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[GetTraffic Manager Profile Monitor Config] 
- 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_ strname 
- traffic_routing_ strmethod 
- Specifies the algorithm used to route traffic.
- 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.
- 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.
- resourceGroup StringName 
- trafficRouting StringMethod 
- Specifies the algorithm used to route traffic.
- Map<String>
- A mapping of tags to assign to the resource.
- trafficView BooleanEnabled 
- Indicates whether Traffic View is enabled for the Traffic Manager profile.
Supporting Types
GetTrafficManagerProfileDnsConfig     
- RelativeName 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 int
- The TTL value of the Profile used by Local DNS resolvers and clients.
- RelativeName 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 int
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relativeName 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 Integer
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relativeName 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 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.
- ttl int
- The TTL value of the Profile used by Local DNS resolvers and clients.
- relativeName 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 Number
- The TTL value of the Profile used by Local DNS resolvers and clients.
GetTrafficManagerProfileMonitorConfig     
- CustomHeaders List<GetTraffic Manager Profile Monitor Config Custom Header> 
- One or more custom_headerblocks as defined below.
- ExpectedStatus List<string>Code Ranges 
- A list of status code ranges.
- IntervalIn intSeconds 
- The interval used to check the endpoint health from a Traffic Manager probing agent.
- Path string
- The path used by the monitoring checks.
- Port int
- The port number used by the monitoring checks.
- Protocol string
- The protocol used by the monitoring checks.
- TimeoutIn 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.
- ToleratedNumber intOf Failures 
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- CustomHeaders []GetTraffic Manager Profile Monitor Config Custom Header 
- One or more custom_headerblocks as defined below.
- ExpectedStatus []stringCode Ranges 
- A list of status code ranges.
- IntervalIn intSeconds 
- The interval used to check the endpoint health from a Traffic Manager probing agent.
- Path string
- The path used by the monitoring checks.
- Port int
- The port number used by the monitoring checks.
- Protocol string
- The protocol used by the monitoring checks.
- TimeoutIn 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.
- ToleratedNumber intOf Failures 
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- customHeaders List<GetTraffic Manager Profile Monitor Config Custom Header> 
- One or more custom_headerblocks as defined below.
- expectedStatus List<String>Code Ranges 
- A list of status code ranges.
- intervalIn IntegerSeconds 
- The interval used to check the endpoint health from a Traffic Manager probing agent.
- path String
- The path used by the monitoring checks.
- port Integer
- The port number used by the monitoring checks.
- protocol String
- The protocol used by the monitoring checks.
- timeoutIn 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.
- toleratedNumber IntegerOf Failures 
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- customHeaders GetTraffic Manager Profile Monitor Config Custom Header[] 
- One or more custom_headerblocks as defined below.
- expectedStatus string[]Code Ranges 
- A list of status code ranges.
- intervalIn numberSeconds 
- The interval used to check the endpoint health from a Traffic Manager probing agent.
- path string
- The path used by the monitoring checks.
- port number
- The port number used by the monitoring checks.
- protocol string
- The protocol used by the monitoring checks.
- timeoutIn 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.
- toleratedNumber numberOf Failures 
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- custom_headers Sequence[GetTraffic Manager Profile Monitor Config Custom Header] 
- One or more custom_headerblocks as defined below.
- expected_status_ Sequence[str]code_ ranges 
- A list of status code ranges.
- interval_in_ intseconds 
- The interval used to check the endpoint health from a Traffic Manager probing agent.
- path str
- The path used by the monitoring checks.
- port int
- The port number used by the monitoring checks.
- protocol str
- The protocol used by the monitoring checks.
- 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.
- tolerated_number_ intof_ failures 
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- customHeaders List<Property Map>
- One or more custom_headerblocks as defined below.
- expectedStatus List<String>Code Ranges 
- A list of status code ranges.
- intervalIn NumberSeconds 
- The interval used to check the endpoint health from a Traffic Manager probing agent.
- path String
- The path used by the monitoring checks.
- port Number
- The port number used by the monitoring checks.
- protocol String
- The protocol used by the monitoring checks.
- timeoutIn 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.
- toleratedNumber NumberOf Failures 
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
GetTrafficManagerProfileMonitorConfigCustomHeader       
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.