TrafficManagerProfileArgs

data class TrafficManagerProfileArgs(val dnsConfig: Output<TrafficManagerProfileDnsConfigArgs>? = null, val maxReturn: Output<Int>? = null, val monitorConfig: Output<TrafficManagerProfileMonitorConfigArgs>? = null, val name: Output<String>? = null, val profileStatus: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val trafficRoutingMethod: Output<String>? = null, val trafficViewEnabled: Output<Boolean>? = null) : ConvertibleToJava<TrafficManagerProfileArgs>

Manages a Traffic Manager Profile to which multiple endpoints can be attached.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomId;
import com.pulumi.random.RandomIdArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.TrafficManagerProfile;
import com.pulumi.azure.network.TrafficManagerProfileArgs;
import com.pulumi.azure.network.inputs.TrafficManagerProfileDnsConfigArgs;
import com.pulumi.azure.network.inputs.TrafficManagerProfileMonitorConfigArgs;
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) {
var server = new RandomId("server", RandomIdArgs.builder()
.keepers(Map.of("azi_id", 1))
.byteLength(8)
.build());
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleTrafficManagerProfile = new TrafficManagerProfile("exampleTrafficManagerProfile", TrafficManagerProfileArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.trafficRoutingMethod("Weighted")
.dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
.relativeName(server.hex())
.ttl(100)
.build())
.monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
.protocol("HTTP")
.port(80)
.path("/")
.intervalInSeconds(30)
.timeoutInSeconds(9)
.toleratedNumberOfFailures(3)
.build())
.tags(Map.of("environment", "Production"))
.build());
}
}

Import

Traffic Manager Profiles can be imported using the resource id, e.g.

$ pulumi import azure:network/trafficManagerProfile:TrafficManagerProfile exampleProfile /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/trafficManagerProfiles/mytrafficmanagerprofile1

Constructors

Link copied to clipboard
fun TrafficManagerProfileArgs(dnsConfig: Output<TrafficManagerProfileDnsConfigArgs>? = null, maxReturn: Output<Int>? = null, monitorConfig: Output<TrafficManagerProfileMonitorConfigArgs>? = null, name: Output<String>? = null, profileStatus: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, trafficRoutingMethod: Output<String>? = null, trafficViewEnabled: Output<Boolean>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TrafficManagerProfileArgs

Properties

Link copied to clipboard

This block specifies the DNS configuration of the Profile, it supports the fields documented below.

Link copied to clipboard
val maxReturn: Output<Int>? = null

The amount of endpoints to return for DNS queries to this Profile. Possible values range from 1 to 8.

Link copied to clipboard

This block specifies the Endpoint monitoring configuration for the Profile, it supports the fields documented below.

Link copied to clipboard
val name: Output<String>? = null

The name of the Traffic Manager profile. Changing this forces a new resource to be created.

Link copied to clipboard
val profileStatus: Output<String>? = null

The status of the profile, can be set to either Enabled or Disabled. Defaults to Enabled.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val trafficRoutingMethod: Output<String>? = null

Specifies the algorithm used to route traffic. Possible values are Geographic, Weighted, Performance, Priority, Subnet and MultiValue.

Link copied to clipboard
val trafficViewEnabled: Output<Boolean>? = null

Indicates whether Traffic View is enabled for the Traffic Manager profile.