We recommend using Azure Native.
Azure v6.22.0 published on Tuesday, Apr 1, 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 dictionary
The following arguments are supported:
- Name
This property is required. string - Specifies the name of the Traffic Manager Profile.
- Resource
Group Name This property is required. string - 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.
- Traffic
View boolEnabled - 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.
- Resource
Group Name This property is required. string - 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.
- Traffic
View boolEnabled - 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.
- resource
Group Name This property is required. String - 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.
- traffic
View BooleanEnabled - 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.
- resource
Group Name This property is required. string - 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.
- traffic
View booleanEnabled - 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.
- 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
This property is required. String - Specifies the name of the Traffic Manager Profile.
- resource
Group Name This property is required. String - 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.
- traffic
View BooleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
getTrafficManagerProfile Result
The following output properties are available:
- Dns
Configs 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.
- Monitor
Configs List<GetTraffic Manager Profile Monitor Config> - This block specifies the Endpoint monitoring configuration for the Profile.
- Name string
- The name of the custom header.
- Profile
Status string - The status of the profile.
- Resource
Group stringName - Traffic
Routing stringMethod - Specifies the algorithm used to route traffic.
- 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
Configs []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.
- Monitor
Configs []GetTraffic Manager Profile Monitor Config - This block specifies the Endpoint monitoring configuration for the Profile.
- Name string
- The name of the custom header.
- Profile
Status string - The status of the profile.
- Resource
Group stringName - Traffic
Routing stringMethod - Specifies the algorithm used to route traffic.
- 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
Configs 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.
- monitor
Configs List<GetTraffic Manager Profile Monitor Config> - This block specifies the Endpoint monitoring configuration for the Profile.
- name String
- The name of the custom header.
- profile
Status String - The status of the profile.
- resource
Group StringName - traffic
Routing StringMethod - Specifies the algorithm used to route traffic.
- 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
Configs 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.
- monitor
Configs GetTraffic Manager Profile Monitor Config[] - This block specifies the Endpoint monitoring configuration for the Profile.
- name string
- The name of the custom header.
- profile
Status string - The status of the profile.
- resource
Group stringName - traffic
Routing stringMethod - Specifies the algorithm used to route traffic.
- {[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_
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.
- dns
Configs 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.
- monitor
Configs List<Property Map> - This block specifies the Endpoint monitoring configuration for the Profile.
- name String
- The name of the custom header.
- profile
Status String - The status of the profile.
- resource
Group StringName - traffic
Routing StringMethod - Specifies the algorithm used to route traffic.
- 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.
Supporting Types
GetTrafficManagerProfileDnsConfig
- Relative
Name 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.
- Relative
Name 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.
- relative
Name 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.
- relative
Name 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.
- relative
Name 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
- Custom
Headers This property is required. List<GetTraffic Manager Profile Monitor Config Custom Header> - One or more
custom_header
blocks as defined below. - Expected
Status Code Ranges This property is required. List<string> - 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. 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.
- 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.
- Custom
Headers This property is required. []GetTraffic Manager Profile Monitor Config Custom Header - One or more
custom_header
blocks as defined below. - Expected
Status Code Ranges This property is required. []string - 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. 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.
- 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.
- custom
Headers This property is required. List<GetTraffic Manager Profile Monitor Config Custom Header> - One or more
custom_header
blocks as defined below. - expected
Status Code Ranges This property is required. List<String> - A list of status code ranges.
- interval
In Seconds 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.
- timeout
In Seconds 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.
- tolerated
Number Of Failures This property is required. Integer - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- custom
Headers This property is required. GetTraffic Manager Profile Monitor Config Custom Header[] - One or more
custom_header
blocks as defined below. - expected
Status Code Ranges This property is required. string[] - A list of status code ranges.
- interval
In Seconds 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.
- timeout
In Seconds 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.
- tolerated
Number Of Failures 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[GetTraffic Manager Profile Monitor Config Custom Header] - 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.
- custom
Headers This property is required. List<Property Map> - One or more
custom_header
blocks as defined below. - expected
Status Code Ranges This property is required. List<String> - A list of status code ranges.
- interval
In Seconds 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.
- timeout
In Seconds 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.
- tolerated
Number Of Failures This property is required. Number - 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
azurerm
Terraform Provider.