We recommend using Azure Native.
Azure Classic v5.81.0 published on Monday, Jun 24, 2024 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/v5/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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:network/getTrafficManagerProfile:getTrafficManagerProfile
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Specifies the name of the Traffic Manager Profile.
- Resource
Group 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.
- Traffic
View boolEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- Name string
- Specifies the name of the Traffic Manager Profile.
- Resource
Group 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.
- Traffic
View boolEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- name String
- Specifies the name of the Traffic Manager Profile.
- resource
Group 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.
- traffic
View BooleanEnabled - Indicates whether Traffic View is enabled for the Traffic Manager profile.
- name string
- Specifies the name of the Traffic Manager Profile.
- resource
Group 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.
- traffic
View 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.
- resource
Group 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.
- 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 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- ttl Number
- The TTL value of the Profile used by Local DNS resolvers and clients.
GetTrafficManagerProfileMonitorConfig
- Custom
Headers List<GetTraffic Manager 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.
- Interval
In 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.
- 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.
- Custom
Headers []GetTraffic Manager Profile Monitor Config Custom Header - One or more
custom_header
blocks as defined below. - Expected
Status []stringCode 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 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.
- 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.
- custom
Headers List<GetTraffic Manager 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.
- interval
In 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.
- 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.
- tolerated
Number IntegerOf Failures - The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
- custom
Headers GetTraffic Manager 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.
- interval
In 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.
- 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.
- tolerated
Number 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_header
blocks 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.
- 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.
- interval
In 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.
- 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.
- tolerated
Number 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
azurerm
Terraform Provider.