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

com.pulumi.azurenative.cdn.kotlin.AFDTargetGroupArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cdn.kotlin

import com.pulumi.azurenative.cdn.AFDTargetGroupArgs.builder
import com.pulumi.azurenative.cdn.kotlin.inputs.TargetEndpointArgs
import com.pulumi.azurenative.cdn.kotlin.inputs.TargetEndpointArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * AFDTargetGroup comprises a list of Endpoints that is used for tunnelling protocols to allow certain traffic.
 * Azure REST API version: 2024-06-01-preview.
 * ## Example Usage
 * ### AfdTargetGroups_Create
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var afdTargetGroup = new AzureNative.Cdn.AFDTargetGroup("afdTargetGroup", new()
 *     {
 *         ProfileName = "profile1",
 *         ResourceGroupName = "RG",
 *         TargetEndpoints = new[]
 *         {
 *             new AzureNative.Cdn.Inputs.TargetEndpointArgs
 *             {
 *                 Ports = new[]
 *                 {
 *                     443,
 *                     80,
 *                 },
 *                 TargetFqdn = "host1.foo.com",
 *             },
 *             new AzureNative.Cdn.Inputs.TargetEndpointArgs
 *             {
 *                 Ports = new[]
 *                 {
 *                     443,
 *                     80,
 *                 },
 *                 TargetFqdn = "host2.contoso.com",
 *             },
 *         },
 *         TargetGroupName = "targetgroup1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cdn.NewAFDTargetGroup(ctx, "afdTargetGroup", &cdn.AFDTargetGroupArgs{
 * 			ProfileName:       pulumi.String("profile1"),
 * 			ResourceGroupName: pulumi.String("RG"),
 * 			TargetEndpoints: cdn.TargetEndpointArray{
 * 				&cdn.TargetEndpointArgs{
 * 					Ports: pulumi.IntArray{
 * 						pulumi.Int(443),
 * 						pulumi.Int(80),
 * 					},
 * 					TargetFqdn: pulumi.String("host1.foo.com"),
 * 				},
 * 				&cdn.TargetEndpointArgs{
 * 					Ports: pulumi.IntArray{
 * 						pulumi.Int(443),
 * 						pulumi.Int(80),
 * 					},
 * 					TargetFqdn: pulumi.String("host2.contoso.com"),
 * 				},
 * 			},
 * 			TargetGroupName: pulumi.String("targetgroup1"),
 * 		})
 * 		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.azurenative.cdn.AFDTargetGroup;
 * import com.pulumi.azurenative.cdn.AFDTargetGroupArgs;
 * import com.pulumi.azurenative.cdn.inputs.TargetEndpointArgs;
 * 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 afdTargetGroup = new AFDTargetGroup("afdTargetGroup", AFDTargetGroupArgs.builder()
 *             .profileName("profile1")
 *             .resourceGroupName("RG")
 *             .targetEndpoints(
 *                 TargetEndpointArgs.builder()
 *                     .ports(
 *                         443,
 *                         80)
 *                     .targetFqdn("host1.foo.com")
 *                     .build(),
 *                 TargetEndpointArgs.builder()
 *                     .ports(
 *                         443,
 *                         80)
 *                     .targetFqdn("host2.contoso.com")
 *                     .build())
 *             .targetGroupName("targetgroup1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:cdn:AFDTargetGroup targetgroup1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/targetGroups/{targetGroupName}
 * ```
 * @property profileName Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
 * @property resourceGroupName Name of the Resource group within the Azure subscription.
 * @property targetEndpoints TargetEndpoint list referenced by this target group.
 * @property targetGroupName Name of the Target Group under the profile.
 */
public data class AFDTargetGroupArgs(
    public val profileName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val targetEndpoints: Output>? = null,
    public val targetGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.AFDTargetGroupArgs =
        com.pulumi.azurenative.cdn.AFDTargetGroupArgs.builder()
            .profileName(profileName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .targetEndpoints(
                targetEndpoints?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .targetGroupName(targetGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AFDTargetGroupArgs].
 */
@PulumiTagMarker
public class AFDTargetGroupArgsBuilder internal constructor() {
    private var profileName: Output? = null

    private var resourceGroupName: Output? = null

    private var targetEndpoints: Output>? = null

    private var targetGroupName: Output? = null

    /**
     * @param value Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
     */
    @JvmName("dnmslcrjxicmghrd")
    public suspend fun profileName(`value`: Output) {
        this.profileName = value
    }

    /**
     * @param value Name of the Resource group within the Azure subscription.
     */
    @JvmName("kmochubqssaychlf")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value TargetEndpoint list referenced by this target group.
     */
    @JvmName("ssberqglxsoayuax")
    public suspend fun targetEndpoints(`value`: Output>) {
        this.targetEndpoints = value
    }

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

    /**
     * @param values TargetEndpoint list referenced by this target group.
     */
    @JvmName("jafwpagrsojdftqf")
    public suspend fun targetEndpoints(values: List>) {
        this.targetEndpoints = Output.all(values)
    }

    /**
     * @param value Name of the Target Group under the profile.
     */
    @JvmName("fgwpuglwgureaojo")
    public suspend fun targetGroupName(`value`: Output) {
        this.targetGroupName = value
    }

    /**
     * @param value Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
     */
    @JvmName("rixnhjdpchbcacmk")
    public suspend fun profileName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profileName = mapped
    }

    /**
     * @param value Name of the Resource group within the Azure subscription.
     */
    @JvmName("blmsqmbsgruxnqju")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value TargetEndpoint list referenced by this target group.
     */
    @JvmName("kknlthmvonbppedc")
    public suspend fun targetEndpoints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetEndpoints = mapped
    }

    /**
     * @param argument TargetEndpoint list referenced by this target group.
     */
    @JvmName("lchbtkttwfkrcojm")
    public suspend fun targetEndpoints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TargetEndpointArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.targetEndpoints = mapped
    }

    /**
     * @param argument TargetEndpoint list referenced by this target group.
     */
    @JvmName("uhhijnecshsiixll")
    public suspend fun targetEndpoints(vararg argument: suspend TargetEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TargetEndpointArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.targetEndpoints = mapped
    }

    /**
     * @param argument TargetEndpoint list referenced by this target group.
     */
    @JvmName("ogwnrndoaaqmvcqy")
    public suspend fun targetEndpoints(argument: suspend TargetEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TargetEndpointArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.targetEndpoints = mapped
    }

    /**
     * @param values TargetEndpoint list referenced by this target group.
     */
    @JvmName("iqxyiskgewbpiels")
    public suspend fun targetEndpoints(vararg values: TargetEndpointArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetEndpoints = mapped
    }

    /**
     * @param value Name of the Target Group under the profile.
     */
    @JvmName("rxhmpkvhwkoettss")
    public suspend fun targetGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetGroupName = mapped
    }

    internal fun build(): AFDTargetGroupArgs = AFDTargetGroupArgs(
        profileName = profileName,
        resourceGroupName = resourceGroupName,
        targetEndpoints = targetEndpoints,
        targetGroupName = targetGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy