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

com.pulumi.azurenative.cdn.kotlin.AFDEndpointArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cdn.kotlin

import com.pulumi.azurenative.cdn.AFDEndpointArgs.builder
import com.pulumi.azurenative.cdn.kotlin.enums.AutoGeneratedDomainNameLabelScope
import com.pulumi.azurenative.cdn.kotlin.enums.EnabledState
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net.
 * Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2020-09-01.
 * Other available API versions: 2020-09-01, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview.
 * ## Example Usage
 * ### AFDEndpoints_Create
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var afdEndpoint = new AzureNative.Cdn.AFDEndpoint("afdEndpoint", new()
 *     {
 *         AutoGeneratedDomainNameLabelScope = AzureNative.Cdn.AutoGeneratedDomainNameLabelScope.TenantReuse,
 *         EnabledState = AzureNative.Cdn.EnabledState.Enabled,
 *         EndpointName = "endpoint1",
 *         Location = "global",
 *         ProfileName = "profile1",
 *         ResourceGroupName = "RG",
 *         Tags = null,
 *     });
 * });
 * ```
 * ```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.NewAFDEndpoint(ctx, "afdEndpoint", &cdn.AFDEndpointArgs{
 * 			AutoGeneratedDomainNameLabelScope: pulumi.String(cdn.AutoGeneratedDomainNameLabelScopeTenantReuse),
 * 			EnabledState:                      pulumi.String(cdn.EnabledStateEnabled),
 * 			EndpointName:                      pulumi.String("endpoint1"),
 * 			Location:                          pulumi.String("global"),
 * 			ProfileName:                       pulumi.String("profile1"),
 * 			ResourceGroupName:                 pulumi.String("RG"),
 * 			Tags:                              nil,
 * 		})
 * 		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.AFDEndpoint;
 * import com.pulumi.azurenative.cdn.AFDEndpointArgs;
 * 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 afdEndpoint = new AFDEndpoint("afdEndpoint", AFDEndpointArgs.builder()
 *             .autoGeneratedDomainNameLabelScope("TenantReuse")
 *             .enabledState("Enabled")
 *             .endpointName("endpoint1")
 *             .location("global")
 *             .profileName("profile1")
 *             .resourceGroupName("RG")
 *             .tags()
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:cdn:AFDEndpoint endpoint1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}
 * ```
 * @property autoGeneratedDomainNameLabelScope Indicates the endpoint name reuse scope. The default value is TenantReuse.
 * @property enabledState Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
 * @property endpointName Name of the endpoint under the profile which is unique globally.
 * @property location Resource location.
 * @property profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
 * @property resourceGroupName Name of the Resource group within the Azure subscription.
 * @property tags Resource tags.
 */
public data class AFDEndpointArgs(
    public val autoGeneratedDomainNameLabelScope: Output>? = null,
    public val enabledState: Output>? = null,
    public val endpointName: Output? = null,
    public val location: Output? = null,
    public val profileName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cdn.AFDEndpointArgs =
        com.pulumi.azurenative.cdn.AFDEndpointArgs.builder()
            .autoGeneratedDomainNameLabelScope(
                autoGeneratedDomainNameLabelScope?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .enabledState(
                enabledState?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .endpointName(endpointName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .profileName(profileName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AFDEndpointArgs].
 */
@PulumiTagMarker
public class AFDEndpointArgsBuilder internal constructor() {
    private var autoGeneratedDomainNameLabelScope:
        Output>? = null

    private var enabledState: Output>? = null

    private var endpointName: Output? = null

    private var location: Output? = null

    private var profileName: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Indicates the endpoint name reuse scope. The default value is TenantReuse.
     */
    @JvmName("cyyfmkjfgjrgrgho")
    public suspend fun autoGeneratedDomainNameLabelScope(`value`: Output>) {
        this.autoGeneratedDomainNameLabelScope = value
    }

    /**
     * @param value Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
     */
    @JvmName("gmefhhfcgdshsgqd")
    public suspend fun enabledState(`value`: Output>) {
        this.enabledState = value
    }

    /**
     * @param value Name of the endpoint under the profile which is unique globally.
     */
    @JvmName("pemymjhchblmdadp")
    public suspend fun endpointName(`value`: Output) {
        this.endpointName = value
    }

    /**
     * @param value Resource location.
     */
    @JvmName("gkjouhmwptwuxyym")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

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

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

    /**
     * @param value Resource tags.
     */
    @JvmName("oktlvcvcghumhykb")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Indicates the endpoint name reuse scope. The default value is TenantReuse.
     */
    @JvmName("bctttvbisneqmgnr")
    public suspend fun autoGeneratedDomainNameLabelScope(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoGeneratedDomainNameLabelScope = mapped
    }

    /**
     * @param value Indicates the endpoint name reuse scope. The default value is TenantReuse.
     */
    @JvmName("mdeqhhmbkdlhqtyc")
    public fun autoGeneratedDomainNameLabelScope(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoGeneratedDomainNameLabelScope = mapped
    }

    /**
     * @param value Indicates the endpoint name reuse scope. The default value is TenantReuse.
     */
    @JvmName("hlwgroddjcfqfikp")
    public fun autoGeneratedDomainNameLabelScope(`value`: AutoGeneratedDomainNameLabelScope) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoGeneratedDomainNameLabelScope = mapped
    }

    /**
     * @param value Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
     */
    @JvmName("ifrlejwugmlpdfsr")
    public suspend fun enabledState(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabledState = mapped
    }

    /**
     * @param value Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
     */
    @JvmName("iwwayxliybyntuhw")
    public fun enabledState(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabledState = mapped
    }

    /**
     * @param value Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'
     */
    @JvmName("dknbbumtvylrdrpu")
    public fun enabledState(`value`: EnabledState) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabledState = mapped
    }

    /**
     * @param value Name of the endpoint under the profile which is unique globally.
     */
    @JvmName("oovfkymrgmrjiyty")
    public suspend fun endpointName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpointName = mapped
    }

    /**
     * @param value Resource location.
     */
    @JvmName("uowmgqlfrhxjstfa")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
     */
    @JvmName("kiwpgiwbikjbolfb")
    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("vlirpooorsitjruw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("vsonlhveomgsdwpi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("gvyhmqaryfmqlrbf")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AFDEndpointArgs = AFDEndpointArgs(
        autoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope,
        enabledState = enabledState,
        endpointName = endpointName,
        location = location,
        profileName = profileName,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy