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

We recommend using Azure Native.

Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi

azure.network.getTrafficManagerProfile

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.12.0 published on Monday, Dec 2, 2024 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);
    
    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)
    // 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.
    ResourceGroupName 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 string
    Specifies the name of the Traffic Manager Profile.
    ResourceGroupName 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 String
    Specifies the name of the Traffic Manager Profile.
    resourceGroupName 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 string
    Specifies the name of the Traffic Manager Profile.
    resourceGroupName 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 str
    Specifies the name of the Traffic Manager Profile.
    resource_group_name 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 String
    Specifies the name of the Traffic Manager Profile.
    resourceGroupName 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 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<GetTrafficManagerProfileMonitorConfigCustomHeader>
    One or more custom_header blocks as defined below.
    ExpectedStatusCodeRanges List<string>
    A list of status code ranges.
    IntervalInSeconds int
    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.
    TimeoutInSeconds 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 int
    The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
    CustomHeaders []GetTrafficManagerProfileMonitorConfigCustomHeader
    One or more custom_header blocks as defined below.
    ExpectedStatusCodeRanges []string
    A list of status code ranges.
    IntervalInSeconds int
    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.
    TimeoutInSeconds 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 int
    The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
    customHeaders List<GetTrafficManagerProfileMonitorConfigCustomHeader>
    One or more custom_header blocks as defined below.
    expectedStatusCodeRanges List<String>
    A list of status code ranges.
    intervalInSeconds Integer
    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.
    timeoutInSeconds 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 Integer
    The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
    customHeaders GetTrafficManagerProfileMonitorConfigCustomHeader[]
    One or more custom_header blocks as defined below.
    expectedStatusCodeRanges string[]
    A list of status code ranges.
    intervalInSeconds number
    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.
    timeoutInSeconds 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 number
    The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
    custom_headers Sequence[GetTrafficManagerProfileMonitorConfigCustomHeader]
    One or more custom_header blocks as defined below.
    expected_status_code_ranges Sequence[str]
    A list of status code ranges.
    interval_in_seconds int
    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_seconds 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 int
    The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
    customHeaders List<Property Map>
    One or more custom_header blocks as defined below.
    expectedStatusCodeRanges List<String>
    A list of status code ranges.
    intervalInSeconds Number
    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.
    timeoutInSeconds 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 Number
    The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.

    GetTrafficManagerProfileMonitorConfigCustomHeader

    Name string
    Specifies the name of the Traffic Manager Profile.
    Value string
    The value of custom header. Applicable for HTTP and HTTPS protocol.
    Name string
    Specifies the name of the Traffic Manager Profile.
    Value string
    The value of custom header. Applicable for HTTP and HTTPS protocol.
    name String
    Specifies the name of the Traffic Manager Profile.
    value String
    The value of custom header. Applicable for HTTP and HTTPS protocol.
    name string
    Specifies the name of the Traffic Manager Profile.
    value string
    The value of custom header. Applicable for HTTP and HTTPS protocol.
    name str
    Specifies the name of the Traffic Manager Profile.
    value str
    The value of custom header. Applicable for HTTP and HTTPS protocol.
    name String
    Specifies the name of the Traffic Manager Profile.
    value 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.
    azure logo

    We recommend using Azure Native.

    Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi