get Traffic Manager Profile
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)
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 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
})
}
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.trafficRoutingMethod());
}
}
variables:
example:
fn::invoke:
function: azure:network:getTrafficManagerProfile
arguments:
name: test
resourceGroupName: test
outputs:
trafficRoutingMethod: ${example.trafficRoutingMethod}
API Providers
This data source uses the following Azure API Providers:
Microsoft.Network
: 2022-04-01
Return
A collection of values returned by getTrafficManagerProfile.
Parameters
A collection of arguments for invoking getTrafficManagerProfile.
Return
A collection of values returned by getTrafficManagerProfile.
Parameters
Specifies the name of the Traffic Manager Profile.
Specifies the name of the resource group the Traffic Manager Profile is located in.
A mapping of tags to assign to the resource.
Indicates whether Traffic View is enabled for the Traffic Manager profile.
See also
Return
A collection of values returned by getTrafficManagerProfile.
Parameters
Builder for com.pulumi.azure.network.kotlin.inputs.GetTrafficManagerProfilePlainArgs.