All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.network.kotlin.TrafficManagerAzureEndpointArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.TrafficManagerAzureEndpointArgs.builder
import com.pulumi.azure.network.kotlin.inputs.TrafficManagerAzureEndpointCustomHeaderArgs
import com.pulumi.azure.network.kotlin.inputs.TrafficManagerAzureEndpointCustomHeaderArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.TrafficManagerAzureEndpointSubnetArgs
import com.pulumi.azure.network.kotlin.inputs.TrafficManagerAzureEndpointSubnetArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages an Azure Endpoint within a Traffic Manager Profile.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "example-public-ip",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     allocationMethod: "Static",
 *     domainNameLabel: "example-public-ip",
 * });
 * const exampleTrafficManagerProfile = new azure.network.TrafficManagerProfile("example", {
 *     name: "example-profile",
 *     resourceGroupName: example.name,
 *     trafficRoutingMethod: "Weighted",
 *     dnsConfig: {
 *         relativeName: "example-profile",
 *         ttl: 100,
 *     },
 *     monitorConfig: {
 *         protocol: "HTTP",
 *         port: 80,
 *         path: "/",
 *         intervalInSeconds: 30,
 *         timeoutInSeconds: 9,
 *         toleratedNumberOfFailures: 3,
 *     },
 *     tags: {
 *         environment: "Production",
 *     },
 * });
 * const exampleTrafficManagerAzureEndpoint = new azure.network.TrafficManagerAzureEndpoint("example", {
 *     name: "example-endpoint",
 *     profileId: exampleTrafficManagerProfile.id,
 *     alwaysServeEnabled: true,
 *     weight: 100,
 *     targetResourceId: examplePublicIp.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_public_ip = azure.network.PublicIp("example",
 *     name="example-public-ip",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     allocation_method="Static",
 *     domain_name_label="example-public-ip")
 * example_traffic_manager_profile = azure.network.TrafficManagerProfile("example",
 *     name="example-profile",
 *     resource_group_name=example.name,
 *     traffic_routing_method="Weighted",
 *     dns_config=azure.network.TrafficManagerProfileDnsConfigArgs(
 *         relative_name="example-profile",
 *         ttl=100,
 *     ),
 *     monitor_config=azure.network.TrafficManagerProfileMonitorConfigArgs(
 *         protocol="HTTP",
 *         port=80,
 *         path="/",
 *         interval_in_seconds=30,
 *         timeout_in_seconds=9,
 *         tolerated_number_of_failures=3,
 *     ),
 *     tags={
 *         "environment": "Production",
 *     })
 * example_traffic_manager_azure_endpoint = azure.network.TrafficManagerAzureEndpoint("example",
 *     name="example-endpoint",
 *     profile_id=example_traffic_manager_profile.id,
 *     always_serve_enabled=True,
 *     weight=100,
 *     target_resource_id=example_public_ip.id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var examplePublicIp = new Azure.Network.PublicIp("example", new()
 *     {
 *         Name = "example-public-ip",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AllocationMethod = "Static",
 *         DomainNameLabel = "example-public-ip",
 *     });
 *     var exampleTrafficManagerProfile = new Azure.Network.TrafficManagerProfile("example", new()
 *     {
 *         Name = "example-profile",
 *         ResourceGroupName = example.Name,
 *         TrafficRoutingMethod = "Weighted",
 *         DnsConfig = new Azure.Network.Inputs.TrafficManagerProfileDnsConfigArgs
 *         {
 *             RelativeName = "example-profile",
 *             Ttl = 100,
 *         },
 *         MonitorConfig = new Azure.Network.Inputs.TrafficManagerProfileMonitorConfigArgs
 *         {
 *             Protocol = "HTTP",
 *             Port = 80,
 *             Path = "/",
 *             IntervalInSeconds = 30,
 *             TimeoutInSeconds = 9,
 *             ToleratedNumberOfFailures = 3,
 *         },
 *         Tags =
 *         {
 *             { "environment", "Production" },
 *         },
 *     });
 *     var exampleTrafficManagerAzureEndpoint = new Azure.Network.TrafficManagerAzureEndpoint("example", new()
 *     {
 *         Name = "example-endpoint",
 *         ProfileId = exampleTrafficManagerProfile.Id,
 *         AlwaysServeEnabled = true,
 *         Weight = 100,
 *         TargetResourceId = examplePublicIp.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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 := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
 * 			Name:              pulumi.String("example-public-ip"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AllocationMethod:  pulumi.String("Static"),
 * 			DomainNameLabel:   pulumi.String("example-public-ip"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleTrafficManagerProfile, err := network.NewTrafficManagerProfile(ctx, "example", &network.TrafficManagerProfileArgs{
 * 			Name:                 pulumi.String("example-profile"),
 * 			ResourceGroupName:    example.Name,
 * 			TrafficRoutingMethod: pulumi.String("Weighted"),
 * 			DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{
 * 				RelativeName: pulumi.String("example-profile"),
 * 				Ttl:          pulumi.Int(100),
 * 			},
 * 			MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{
 * 				Protocol:                  pulumi.String("HTTP"),
 * 				Port:                      pulumi.Int(80),
 * 				Path:                      pulumi.String("/"),
 * 				IntervalInSeconds:         pulumi.Int(30),
 * 				TimeoutInSeconds:          pulumi.Int(9),
 * 				ToleratedNumberOfFailures: pulumi.Int(3),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("Production"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewTrafficManagerAzureEndpoint(ctx, "example", &network.TrafficManagerAzureEndpointArgs{
 * 			Name:               pulumi.String("example-endpoint"),
 * 			ProfileId:          exampleTrafficManagerProfile.ID(),
 * 			AlwaysServeEnabled: pulumi.Bool(true),
 * 			Weight:             pulumi.Int(100),
 * 			TargetResourceId:   examplePublicIp.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * 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 com.pulumi.azure.network.TrafficManagerAzureEndpoint;
 * import com.pulumi.azure.network.TrafficManagerAzureEndpointArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("example-public-ip")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .allocationMethod("Static")
 *             .domainNameLabel("example-public-ip")
 *             .build());
 *         var exampleTrafficManagerProfile = new TrafficManagerProfile("exampleTrafficManagerProfile", TrafficManagerProfileArgs.builder()
 *             .name("example-profile")
 *             .resourceGroupName(example.name())
 *             .trafficRoutingMethod("Weighted")
 *             .dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
 *                 .relativeName("example-profile")
 *                 .ttl(100)
 *                 .build())
 *             .monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
 *                 .protocol("HTTP")
 *                 .port(80)
 *                 .path("/")
 *                 .intervalInSeconds(30)
 *                 .timeoutInSeconds(9)
 *                 .toleratedNumberOfFailures(3)
 *                 .build())
 *             .tags(Map.of("environment", "Production"))
 *             .build());
 *         var exampleTrafficManagerAzureEndpoint = new TrafficManagerAzureEndpoint("exampleTrafficManagerAzureEndpoint", TrafficManagerAzureEndpointArgs.builder()
 *             .name("example-endpoint")
 *             .profileId(exampleTrafficManagerProfile.id())
 *             .alwaysServeEnabled(true)
 *             .weight(100)
 *             .targetResourceId(examplePublicIp.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   examplePublicIp:
 *     type: azure:network:PublicIp
 *     name: example
 *     properties:
 *       name: example-public-ip
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       allocationMethod: Static
 *       domainNameLabel: example-public-ip
 *   exampleTrafficManagerProfile:
 *     type: azure:network:TrafficManagerProfile
 *     name: example
 *     properties:
 *       name: example-profile
 *       resourceGroupName: ${example.name}
 *       trafficRoutingMethod: Weighted
 *       dnsConfig:
 *         relativeName: example-profile
 *         ttl: 100
 *       monitorConfig:
 *         protocol: HTTP
 *         port: 80
 *         path: /
 *         intervalInSeconds: 30
 *         timeoutInSeconds: 9
 *         toleratedNumberOfFailures: 3
 *       tags:
 *         environment: Production
 *   exampleTrafficManagerAzureEndpoint:
 *     type: azure:network:TrafficManagerAzureEndpoint
 *     name: example
 *     properties:
 *       name: example-endpoint
 *       profileId: ${exampleTrafficManagerProfile.id}
 *       alwaysServeEnabled: true
 *       weight: 100
 *       targetResourceId: ${examplePublicIp.id}
 * ```
 * 
 * ## Import
 * Azure Endpoints can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/trafficManagerAzureEndpoint:TrafficManagerAzureEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Network/trafficManagerProfiles/example-profile/AzureEndpoints/example-endpoint
 * ```
 * @property alwaysServeEnabled If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
 * @property customHeaders One or more `custom_header` blocks as defined below.
 * @property enabled Is the endpoint enabled? Defaults to `true`.
 * @property geoMappings A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
 * @property name The name of the Azure Endpoint. Changing this forces a new resource to be created.
 * @property priority Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
 * @property profileId The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created.
 * @property subnets One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
 * @property targetResourceId The ID of the Azure Resource which should be used as a target.
 * @property weight Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`.
 */
public data class TrafficManagerAzureEndpointArgs(
    public val alwaysServeEnabled: Output? = null,
    public val customHeaders: Output>? = null,
    public val enabled: Output? = null,
    public val geoMappings: Output>? = null,
    public val name: Output? = null,
    public val priority: Output? = null,
    public val profileId: Output? = null,
    public val subnets: Output>? = null,
    public val targetResourceId: Output? = null,
    public val weight: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.TrafficManagerAzureEndpointArgs =
        com.pulumi.azure.network.TrafficManagerAzureEndpointArgs.builder()
            .alwaysServeEnabled(alwaysServeEnabled?.applyValue({ args0 -> args0 }))
            .customHeaders(
                customHeaders?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .geoMappings(geoMappings?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .profileId(profileId?.applyValue({ args0 -> args0 }))
            .subnets(
                subnets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .targetResourceId(targetResourceId?.applyValue({ args0 -> args0 }))
            .weight(weight?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TrafficManagerAzureEndpointArgs].
 */
@PulumiTagMarker
public class TrafficManagerAzureEndpointArgsBuilder internal constructor() {
    private var alwaysServeEnabled: Output? = null

    private var customHeaders: Output>? = null

    private var enabled: Output? = null

    private var geoMappings: Output>? = null

    private var name: Output? = null

    private var priority: Output? = null

    private var profileId: Output? = null

    private var subnets: Output>? = null

    private var targetResourceId: Output? = null

    private var weight: Output? = null

    /**
     * @param value If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
     */
    @JvmName("fxqwsofhbtevvjam")
    public suspend fun alwaysServeEnabled(`value`: Output) {
        this.alwaysServeEnabled = value
    }

    /**
     * @param value One or more `custom_header` blocks as defined below.
     */
    @JvmName("cmauduehjwvasgxt")
    public suspend
    fun customHeaders(`value`: Output>) {
        this.customHeaders = value
    }

    @JvmName("jwxsgeyaopgxvbin")
    public suspend fun customHeaders(
        vararg
        values: Output,
    ) {
        this.customHeaders = Output.all(values.asList())
    }

    /**
     * @param values One or more `custom_header` blocks as defined below.
     */
    @JvmName("fsprlufamqxjvagb")
    public suspend
    fun customHeaders(values: List>) {
        this.customHeaders = Output.all(values)
    }

    /**
     * @param value Is the endpoint enabled? Defaults to `true`.
     */
    @JvmName("etujxnmwqgvwkolm")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
     */
    @JvmName("oglplbbcjseabghs")
    public suspend fun geoMappings(`value`: Output>) {
        this.geoMappings = value
    }

    @JvmName("svnaovklncunsaof")
    public suspend fun geoMappings(vararg values: Output) {
        this.geoMappings = Output.all(values.asList())
    }

    /**
     * @param values A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
     */
    @JvmName("hrjstupsfydadrfh")
    public suspend fun geoMappings(values: List>) {
        this.geoMappings = Output.all(values)
    }

    /**
     * @param value The name of the Azure Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("aehtjlcexvjnrygt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
     */
    @JvmName("hjlnqdunlewllalr")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created.
     */
    @JvmName("yebcuyiappbvlcnh")
    public suspend fun profileId(`value`: Output) {
        this.profileId = value
    }

    /**
     * @param value One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("lyggonqipmmawaov")
    public suspend fun subnets(`value`: Output>) {
        this.subnets = value
    }

    @JvmName("eqvvsjesjqvcuacg")
    public suspend fun subnets(vararg values: Output) {
        this.subnets = Output.all(values.asList())
    }

    /**
     * @param values One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("tvjwrdotliljgknv")
    public suspend fun subnets(values: List>) {
        this.subnets = Output.all(values)
    }

    /**
     * @param value The ID of the Azure Resource which should be used as a target.
     */
    @JvmName("qtmbmqkeixiefenj")
    public suspend fun targetResourceId(`value`: Output) {
        this.targetResourceId = value
    }

    /**
     * @param value Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`.
     */
    @JvmName("milxynnhntuewnrv")
    public suspend fun weight(`value`: Output) {
        this.weight = value
    }

    /**
     * @param value If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`.
     */
    @JvmName("slspihkusgbsrvhy")
    public suspend fun alwaysServeEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alwaysServeEnabled = mapped
    }

    /**
     * @param value One or more `custom_header` blocks as defined below.
     */
    @JvmName("gbhdaksigxvudcuc")
    public suspend fun customHeaders(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customHeaders = mapped
    }

    /**
     * @param argument One or more `custom_header` blocks as defined below.
     */
    @JvmName("ayhumvlruufdsduc")
    public suspend
    fun customHeaders(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrafficManagerAzureEndpointCustomHeaderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customHeaders = mapped
    }

    /**
     * @param argument One or more `custom_header` blocks as defined below.
     */
    @JvmName("tnamkwcxeknfurpq")
    public suspend fun customHeaders(
        vararg
        argument: suspend TrafficManagerAzureEndpointCustomHeaderArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            TrafficManagerAzureEndpointCustomHeaderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customHeaders = mapped
    }

    /**
     * @param argument One or more `custom_header` blocks as defined below.
     */
    @JvmName("eltcglnkysayupvo")
    public suspend
    fun customHeaders(argument: suspend TrafficManagerAzureEndpointCustomHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TrafficManagerAzureEndpointCustomHeaderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.customHeaders = mapped
    }

    /**
     * @param values One or more `custom_header` blocks as defined below.
     */
    @JvmName("jqqmkxydvjxdtchg")
    public suspend fun customHeaders(vararg values: TrafficManagerAzureEndpointCustomHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customHeaders = mapped
    }

    /**
     * @param value Is the endpoint enabled? Defaults to `true`.
     */
    @JvmName("lgcestojairmslvl")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
     */
    @JvmName("txuvwgfmhcwysqes")
    public suspend fun geoMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.geoMappings = mapped
    }

    /**
     * @param values A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault).
     */
    @JvmName("tgatlueleeldetkh")
    public suspend fun geoMappings(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.geoMappings = mapped
    }

    /**
     * @param value The name of the Azure Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("dntqxjdyxkbcwkcs")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation.
     */
    @JvmName("qolfikhxvrfcltoj")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created.
     */
    @JvmName("wvdcmtgixfkuvmlk")
    public suspend fun profileId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profileId = mapped
    }

    /**
     * @param value One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("tgyxqewqlabcvpww")
    public suspend fun subnets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param argument One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("otphluoojwkmdqrs")
    public suspend
    fun subnets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrafficManagerAzureEndpointSubnetArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.subnets = mapped
    }

    /**
     * @param argument One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("oppfuutsscmhqbfx")
    public suspend fun subnets(
        vararg
        argument: suspend TrafficManagerAzureEndpointSubnetArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            TrafficManagerAzureEndpointSubnetArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.subnets = mapped
    }

    /**
     * @param argument One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ywqnfhyyxdflyxnb")
    public suspend
    fun subnets(argument: suspend TrafficManagerAzureEndpointSubnetArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TrafficManagerAzureEndpointSubnetArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.subnets = mapped
    }

    /**
     * @param values One or more `subnet` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("jcmdnbedydyxnoae")
    public suspend fun subnets(vararg values: TrafficManagerAzureEndpointSubnetArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param value The ID of the Azure Resource which should be used as a target.
     */
    @JvmName("fbldfiufxqukygca")
    public suspend fun targetResourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetResourceId = mapped
    }

    /**
     * @param value Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`.
     */
    @JvmName("jafwgaaalxnegeft")
    public suspend fun weight(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weight = mapped
    }

    internal fun build(): TrafficManagerAzureEndpointArgs = TrafficManagerAzureEndpointArgs(
        alwaysServeEnabled = alwaysServeEnabled,
        customHeaders = customHeaders,
        enabled = enabled,
        geoMappings = geoMappings,
        name = name,
        priority = priority,
        profileId = profileId,
        subnets = subnets,
        targetResourceId = targetResourceId,
        weight = weight,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy