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

com.pulumi.azure.cdn.kotlin.FrontdoorEndpointArgs.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.cdn.kotlin

import com.pulumi.azure.cdn.FrontdoorEndpointArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Front Door (standard/premium) Endpoint.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-cdn-frontdoor",
 *     location: "West Europe",
 * });
 * const exampleFrontdoorProfile = new azure.cdn.FrontdoorProfile("example", {
 *     name: "example-profile",
 *     resourceGroupName: example.name,
 *     skuName: "Standard_AzureFrontDoor",
 * });
 * const exampleFrontdoorEndpoint = new azure.cdn.FrontdoorEndpoint("example", {
 *     name: "example-endpoint",
 *     cdnFrontdoorProfileId: exampleFrontdoorProfile.id,
 *     tags: {
 *         ENV: "example",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-cdn-frontdoor",
 *     location="West Europe")
 * example_frontdoor_profile = azure.cdn.FrontdoorProfile("example",
 *     name="example-profile",
 *     resource_group_name=example.name,
 *     sku_name="Standard_AzureFrontDoor")
 * example_frontdoor_endpoint = azure.cdn.FrontdoorEndpoint("example",
 *     name="example-endpoint",
 *     cdn_frontdoor_profile_id=example_frontdoor_profile.id,
 *     tags={
 *         "ENV": "example",
 *     })
 * ```
 * ```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-cdn-frontdoor",
 *         Location = "West Europe",
 *     });
 *     var exampleFrontdoorProfile = new Azure.Cdn.FrontdoorProfile("example", new()
 *     {
 *         Name = "example-profile",
 *         ResourceGroupName = example.Name,
 *         SkuName = "Standard_AzureFrontDoor",
 *     });
 *     var exampleFrontdoorEndpoint = new Azure.Cdn.FrontdoorEndpoint("example", new()
 *     {
 *         Name = "example-endpoint",
 *         CdnFrontdoorProfileId = exampleFrontdoorProfile.Id,
 *         Tags =
 *         {
 *             { "ENV", "example" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cdn"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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-cdn-frontdoor"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleFrontdoorProfile, err := cdn.NewFrontdoorProfile(ctx, "example", &cdn.FrontdoorProfileArgs{
 * 			Name:              pulumi.String("example-profile"),
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("Standard_AzureFrontDoor"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cdn.NewFrontdoorEndpoint(ctx, "example", &cdn.FrontdoorEndpointArgs{
 * 			Name:                  pulumi.String("example-endpoint"),
 * 			CdnFrontdoorProfileId: exampleFrontdoorProfile.ID(),
 * 			Tags: pulumi.StringMap{
 * 				"ENV": pulumi.String("example"),
 * 			},
 * 		})
 * 		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.cdn.FrontdoorProfile;
 * import com.pulumi.azure.cdn.FrontdoorProfileArgs;
 * import com.pulumi.azure.cdn.FrontdoorEndpoint;
 * import com.pulumi.azure.cdn.FrontdoorEndpointArgs;
 * 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-cdn-frontdoor")
 *             .location("West Europe")
 *             .build());
 *         var exampleFrontdoorProfile = new FrontdoorProfile("exampleFrontdoorProfile", FrontdoorProfileArgs.builder()
 *             .name("example-profile")
 *             .resourceGroupName(example.name())
 *             .skuName("Standard_AzureFrontDoor")
 *             .build());
 *         var exampleFrontdoorEndpoint = new FrontdoorEndpoint("exampleFrontdoorEndpoint", FrontdoorEndpointArgs.builder()
 *             .name("example-endpoint")
 *             .cdnFrontdoorProfileId(exampleFrontdoorProfile.id())
 *             .tags(Map.of("ENV", "example"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-cdn-frontdoor
 *       location: West Europe
 *   exampleFrontdoorProfile:
 *     type: azure:cdn:FrontdoorProfile
 *     name: example
 *     properties:
 *       name: example-profile
 *       resourceGroupName: ${example.name}
 *       skuName: Standard_AzureFrontDoor
 *   exampleFrontdoorEndpoint:
 *     type: azure:cdn:FrontdoorEndpoint
 *     name: example
 *     properties:
 *       name: example-endpoint
 *       cdnFrontdoorProfileId: ${exampleFrontdoorProfile.id}
 *       tags:
 *         ENV: example
 * ```
 * 
 * ## Import
 * Front Door Endpoints can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:cdn/frontdoorEndpoint:FrontdoorEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Cdn/profiles/profile1/afdEndpoints/endpoint1
 * ```
 * @property cdnFrontdoorProfileId The ID of the Front Door Profile within which this Front Door Endpoint should exist. Changing this forces a new Front Door Endpoint to be created.
 * @property enabled Specifies if this Front Door Endpoint is enabled? Defaults to `true`.
 * @property name The name which should be used for this Front Door Endpoint. Changing this forces a new Front Door Endpoint to be created.
 * @property tags Specifies a mapping of tags which should be assigned to the Front Door Endpoint.
 */
public data class FrontdoorEndpointArgs(
    public val cdnFrontdoorProfileId: Output? = null,
    public val enabled: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cdn.FrontdoorEndpointArgs =
        com.pulumi.azure.cdn.FrontdoorEndpointArgs.builder()
            .cdnFrontdoorProfileId(cdnFrontdoorProfileId?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [FrontdoorEndpointArgs].
 */
@PulumiTagMarker
public class FrontdoorEndpointArgsBuilder internal constructor() {
    private var cdnFrontdoorProfileId: Output? = null

    private var enabled: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The ID of the Front Door Profile within which this Front Door Endpoint should exist. Changing this forces a new Front Door Endpoint to be created.
     */
    @JvmName("pojmlaklldmouimd")
    public suspend fun cdnFrontdoorProfileId(`value`: Output) {
        this.cdnFrontdoorProfileId = value
    }

    /**
     * @param value Specifies if this Front Door Endpoint is enabled? Defaults to `true`.
     */
    @JvmName("swboksgrysmnlopj")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The name which should be used for this Front Door Endpoint. Changing this forces a new Front Door Endpoint to be created.
     */
    @JvmName("cxtydluluvhlvsxh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies a mapping of tags which should be assigned to the Front Door Endpoint.
     */
    @JvmName("icxxbcyufamkwrxk")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID of the Front Door Profile within which this Front Door Endpoint should exist. Changing this forces a new Front Door Endpoint to be created.
     */
    @JvmName("wptugiddsfdywgig")
    public suspend fun cdnFrontdoorProfileId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cdnFrontdoorProfileId = mapped
    }

    /**
     * @param value Specifies if this Front Door Endpoint is enabled? Defaults to `true`.
     */
    @JvmName("awgxvwnliutksjdl")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The name which should be used for this Front Door Endpoint. Changing this forces a new Front Door Endpoint to be created.
     */
    @JvmName("iwoetoumbnaxbkoa")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies a mapping of tags which should be assigned to the Front Door Endpoint.
     */
    @JvmName("uxeelxpsmyagpnwi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Specifies a mapping of tags which should be assigned to the Front Door Endpoint.
     */
    @JvmName("ckvpxtysnlkfigfb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): FrontdoorEndpointArgs = FrontdoorEndpointArgs(
        cdnFrontdoorProfileId = cdnFrontdoorProfileId,
        enabled = enabled,
        name = name,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy