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

com.pulumi.azurenative.network.kotlin.FrontDoor.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.network.kotlin

import com.pulumi.azurenative.network.kotlin.outputs.BackendPoolResponse
import com.pulumi.azurenative.network.kotlin.outputs.BackendPoolsSettingsResponse
import com.pulumi.azurenative.network.kotlin.outputs.FrontendEndpointResponse
import com.pulumi.azurenative.network.kotlin.outputs.HealthProbeSettingsModelResponse
import com.pulumi.azurenative.network.kotlin.outputs.LoadBalancingSettingsModelResponse
import com.pulumi.azurenative.network.kotlin.outputs.RoutingRuleResponse
import com.pulumi.azurenative.network.kotlin.outputs.RulesEngineResponse
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azurenative.network.kotlin.outputs.BackendPoolResponse.Companion.toKotlin as backendPoolResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.BackendPoolsSettingsResponse.Companion.toKotlin as backendPoolsSettingsResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.FrontendEndpointResponse.Companion.toKotlin as frontendEndpointResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.HealthProbeSettingsModelResponse.Companion.toKotlin as healthProbeSettingsModelResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.LoadBalancingSettingsModelResponse.Companion.toKotlin as loadBalancingSettingsModelResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.RoutingRuleResponse.Companion.toKotlin as routingRuleResponseToKotlin
import com.pulumi.azurenative.network.kotlin.outputs.RulesEngineResponse.Companion.toKotlin as rulesEngineResponseToKotlin

/**
 * Builder for [FrontDoor].
 */
@PulumiTagMarker
public class FrontDoorResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: FrontDoorArgs = FrontDoorArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend FrontDoorArgsBuilder.() -> Unit) {
        val builder = FrontDoorArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): FrontDoor {
        val builtJavaResource = com.pulumi.azurenative.network.FrontDoor(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return FrontDoor(builtJavaResource)
    }
}

/**
 * Front Door represents a collection of backend endpoints to route traffic to along with rules that specify how traffic is sent there.
 * Azure REST API version: 2021-06-01. Prior API version in Azure Native 1.x: 2020-05-01.
 * ## Example Usage
 * ### Create or update specific Front Door
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var frontDoor = new AzureNative.Network.FrontDoor("frontDoor", new()
 *     {
 *         BackendPools = new[]
 *         {
 *             new AzureNative.Network.Inputs.BackendPoolArgs
 *             {
 *                 Backends = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.BackendArgs
 *                     {
 *                         Address = "w3.contoso.com",
 *                         HttpPort = 80,
 *                         HttpsPort = 443,
 *                         Priority = 2,
 *                         Weight = 1,
 *                     },
 *                     new AzureNative.Network.Inputs.BackendArgs
 *                     {
 *                         Address = "contoso.com.website-us-west-2.othercloud.net",
 *                         HttpPort = 80,
 *                         HttpsPort = 443,
 *                         Priority = 1,
 *                         PrivateLinkApprovalMessage = "Please approve the connection request for this Private Link",
 *                         PrivateLinkLocation = "eastus",
 *                         PrivateLinkResourceId = "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1",
 *                         Weight = 2,
 *                     },
 *                     new AzureNative.Network.Inputs.BackendArgs
 *                     {
 *                         Address = "10.0.1.5",
 *                         HttpPort = 80,
 *                         HttpsPort = 443,
 *                         Priority = 1,
 *                         PrivateLinkAlias = "APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice",
 *                         PrivateLinkApprovalMessage = "Please approve this request to connect to the Private Link",
 *                         Weight = 1,
 *                     },
 *                 },
 *                 HealthProbeSettings = new AzureNative.Network.Inputs.SubResourceArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1",
 *                 },
 *                 LoadBalancingSettings = new AzureNative.Network.Inputs.SubResourceArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1",
 *                 },
 *                 Name = "backendPool1",
 *             },
 *         },
 *         BackendPoolsSettings = new AzureNative.Network.Inputs.BackendPoolsSettingsArgs
 *         {
 *             EnforceCertificateNameCheck = AzureNative.Network.EnforceCertificateNameCheckEnabledState.Enabled,
 *             SendRecvTimeoutSeconds = 60,
 *         },
 *         EnabledState = AzureNative.Network.FrontDoorEnabledState.Enabled,
 *         FrontDoorName = "frontDoor1",
 *         FrontendEndpoints = new[]
 *         {
 *             new AzureNative.Network.Inputs.FrontendEndpointArgs
 *             {
 *                 HostName = "www.contoso.com",
 *                 Name = "frontendEndpoint1",
 *                 SessionAffinityEnabledState = AzureNative.Network.SessionAffinityEnabledState.Enabled,
 *                 SessionAffinityTtlSeconds = 60,
 *                 WebApplicationFirewallPolicyLink = new AzureNative.Network.Inputs.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1",
 *                 },
 *             },
 *             new AzureNative.Network.Inputs.FrontendEndpointArgs
 *             {
 *                 HostName = "frontDoor1.azurefd.net",
 *                 Name = "default",
 *             },
 *         },
 *         HealthProbeSettings = new[]
 *         {
 *             new AzureNative.Network.Inputs.HealthProbeSettingsModelArgs
 *             {
 *                 EnabledState = AzureNative.Network.HealthProbeEnabled.Enabled,
 *                 HealthProbeMethod = AzureNative.Network.FrontDoorHealthProbeMethod.HEAD,
 *                 IntervalInSeconds = 120,
 *                 Name = "healthProbeSettings1",
 *                 Path = "/",
 *                 Protocol = AzureNative.Network.FrontDoorProtocol.Http,
 *             },
 *         },
 *         LoadBalancingSettings = new[]
 *         {
 *             new AzureNative.Network.Inputs.LoadBalancingSettingsModelArgs
 *             {
 *                 Name = "loadBalancingSettings1",
 *                 SampleSize = 4,
 *                 SuccessfulSamplesRequired = 2,
 *             },
 *         },
 *         Location = "westus",
 *         ResourceGroupName = "rg1",
 *         RoutingRules = new[]
 *         {
 *             new AzureNative.Network.Inputs.RoutingRuleArgs
 *             {
 *                 AcceptedProtocols = new[]
 *                 {
 *                     AzureNative.Network.FrontDoorProtocol.Http,
 *                 },
 *                 EnabledState = AzureNative.Network.RoutingRuleEnabledState.Enabled,
 *                 FrontendEndpoints = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.SubResourceArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1",
 *                     },
 *                     new AzureNative.Network.Inputs.SubResourceArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default",
 *                     },
 *                 },
 *                 Name = "routingRule1",
 *                 PatternsToMatch = new[]
 *                 {
 *                     "/*",
 *                 },
 *                 RouteConfiguration = new AzureNative.Network.Inputs.ForwardingConfigurationArgs
 *                 {
 *                     BackendPool = new AzureNative.Network.Inputs.SubResourceArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1",
 *                     },
 *                     OdataType = "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration",
 *                 },
 *                 RulesEngine = new AzureNative.Network.Inputs.SubResourceArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1",
 *                 },
 *                 WebApplicationFirewallPolicyLink = new AzureNative.Network.Inputs.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1",
 *                 },
 *             },
 *         },
 *         Tags =
 *         {
 *             { "tag1", "value1" },
 *             { "tag2", "value2" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := network.NewFrontDoor(ctx, "frontDoor", &network.FrontDoorArgs{
 * 			BackendPools: network.BackendPoolArray{
 * 				&network.BackendPoolArgs{
 * 					Backends: network.BackendArray{
 * 						&network.BackendArgs{
 * 							Address:   pulumi.String("w3.contoso.com"),
 * 							HttpPort:  pulumi.Int(80),
 * 							HttpsPort: pulumi.Int(443),
 * 							Priority:  pulumi.Int(2),
 * 							Weight:    pulumi.Int(1),
 * 						},
 * 						&network.BackendArgs{
 * 							Address:                    pulumi.String("contoso.com.website-us-west-2.othercloud.net"),
 * 							HttpPort:                   pulumi.Int(80),
 * 							HttpsPort:                  pulumi.Int(443),
 * 							Priority:                   pulumi.Int(1),
 * 							PrivateLinkApprovalMessage: pulumi.String("Please approve the connection request for this Private Link"),
 * 							PrivateLinkLocation:        pulumi.String("eastus"),
 * 							PrivateLinkResourceId:      pulumi.String("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1"),
 * 							Weight:                     pulumi.Int(2),
 * 						},
 * 						&network.BackendArgs{
 * 							Address:                    pulumi.String("10.0.1.5"),
 * 							HttpPort:                   pulumi.Int(80),
 * 							HttpsPort:                  pulumi.Int(443),
 * 							Priority:                   pulumi.Int(1),
 * 							PrivateLinkAlias:           pulumi.String("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice"),
 * 							PrivateLinkApprovalMessage: pulumi.String("Please approve this request to connect to the Private Link"),
 * 							Weight:                     pulumi.Int(1),
 * 						},
 * 					},
 * 					HealthProbeSettings: &network.SubResourceArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1"),
 * 					},
 * 					LoadBalancingSettings: &network.SubResourceArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1"),
 * 					},
 * 					Name: pulumi.String("backendPool1"),
 * 				},
 * 			},
 * 			BackendPoolsSettings: &network.BackendPoolsSettingsArgs{
 * 				EnforceCertificateNameCheck: pulumi.String(network.EnforceCertificateNameCheckEnabledStateEnabled),
 * 				SendRecvTimeoutSeconds:      pulumi.Int(60),
 * 			},
 * 			EnabledState:  pulumi.String(network.FrontDoorEnabledStateEnabled),
 * 			FrontDoorName: pulumi.String("frontDoor1"),
 * 			FrontendEndpoints: network.FrontendEndpointArray{
 * 				&network.FrontendEndpointArgs{
 * 					HostName:                    pulumi.String("www.contoso.com"),
 * 					Name:                        pulumi.String("frontendEndpoint1"),
 * 					SessionAffinityEnabledState: pulumi.String(network.SessionAffinityEnabledStateEnabled),
 * 					SessionAffinityTtlSeconds:   pulumi.Int(60),
 * 					WebApplicationFirewallPolicyLink: &network.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
 * 					},
 * 				},
 * 				&network.FrontendEndpointArgs{
 * 					HostName: pulumi.String("frontDoor1.azurefd.net"),
 * 					Name:     pulumi.String("default"),
 * 				},
 * 			},
 * 			HealthProbeSettings: network.HealthProbeSettingsModelArray{
 * 				&network.HealthProbeSettingsModelArgs{
 * 					EnabledState:      pulumi.String(network.HealthProbeEnabledEnabled),
 * 					HealthProbeMethod: pulumi.String(network.FrontDoorHealthProbeMethodHEAD),
 * 					IntervalInSeconds: pulumi.Int(120),
 * 					Name:              pulumi.String("healthProbeSettings1"),
 * 					Path:              pulumi.String("/"),
 * 					Protocol:          pulumi.String(network.FrontDoorProtocolHttp),
 * 				},
 * 			},
 * 			LoadBalancingSettings: network.LoadBalancingSettingsModelArray{
 * 				&network.LoadBalancingSettingsModelArgs{
 * 					Name:                      pulumi.String("loadBalancingSettings1"),
 * 					SampleSize:                pulumi.Int(4),
 * 					SuccessfulSamplesRequired: pulumi.Int(2),
 * 				},
 * 			},
 * 			Location:          pulumi.String("westus"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			RoutingRules: network.RoutingRuleArray{
 * 				&network.RoutingRuleArgs{
 * 					AcceptedProtocols: pulumi.StringArray{
 * 						pulumi.String(network.FrontDoorProtocolHttp),
 * 					},
 * 					EnabledState: pulumi.String(network.RoutingRuleEnabledStateEnabled),
 * 					FrontendEndpoints: network.SubResourceArray{
 * 						&network.SubResourceArgs{
 * 							Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1"),
 * 						},
 * 						&network.SubResourceArgs{
 * 							Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default"),
 * 						},
 * 					},
 * 					Name: pulumi.String("routingRule1"),
 * 					PatternsToMatch: pulumi.StringArray{
 * 						pulumi.String("/*"),
 * 					},
 * 					RouteConfiguration: network.ForwardingConfiguration{
 * 						BackendPool: network.SubResource{
 * 							Id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1",
 * 						},
 * 						OdataType: "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration",
 * 					},
 * 					RulesEngine: &network.SubResourceArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"),
 * 					},
 * 					WebApplicationFirewallPolicyLink: &network.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"),
 * 					},
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"tag1": pulumi.String("value1"),
 * 				"tag2": pulumi.String("value2"),
 * 			},
 * 		})
 * 		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.network.FrontDoor;
 * import com.pulumi.azurenative.network.FrontDoorArgs;
 * import com.pulumi.azurenative.network.inputs.BackendPoolArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * import com.pulumi.azurenative.network.inputs.BackendPoolsSettingsArgs;
 * import com.pulumi.azurenative.network.inputs.FrontendEndpointArgs;
 * import com.pulumi.azurenative.network.inputs.FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgs;
 * import com.pulumi.azurenative.network.inputs.HealthProbeSettingsModelArgs;
 * import com.pulumi.azurenative.network.inputs.LoadBalancingSettingsModelArgs;
 * import com.pulumi.azurenative.network.inputs.RoutingRuleArgs;
 * import com.pulumi.azurenative.network.inputs.RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkArgs;
 * 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 frontDoor = new FrontDoor("frontDoor", FrontDoorArgs.builder()
 *             .backendPools(BackendPoolArgs.builder()
 *                 .backends(
 *                     BackendArgs.builder()
 *                         .address("w3.contoso.com")
 *                         .httpPort(80)
 *                         .httpsPort(443)
 *                         .priority(2)
 *                         .weight(1)
 *                         .build(),
 *                     BackendArgs.builder()
 *                         .address("contoso.com.website-us-west-2.othercloud.net")
 *                         .httpPort(80)
 *                         .httpsPort(443)
 *                         .priority(1)
 *                         .privateLinkApprovalMessage("Please approve the connection request for this Private Link")
 *                         .privateLinkLocation("eastus")
 *                         .privateLinkResourceId("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/privateLinkServices/pls1")
 *                         .weight(2)
 *                         .build(),
 *                     BackendArgs.builder()
 *                         .address("10.0.1.5")
 *                         .httpPort(80)
 *                         .httpsPort(443)
 *                         .priority(1)
 *                         .privateLinkAlias("APPSERVER.d84e61f0-0870-4d24-9746-7438fa0019d1.westus2.azure.privatelinkservice")
 *                         .privateLinkApprovalMessage("Please approve this request to connect to the Private Link")
 *                         .weight(1)
 *                         .build())
 *                 .healthProbeSettings(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/healthProbeSettings/healthProbeSettings1")
 *                     .build())
 *                 .loadBalancingSettings(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/loadBalancingSettings/loadBalancingSettings1")
 *                     .build())
 *                 .name("backendPool1")
 *                 .build())
 *             .backendPoolsSettings(BackendPoolsSettingsArgs.builder()
 *                 .enforceCertificateNameCheck("Enabled")
 *                 .sendRecvTimeoutSeconds(60)
 *                 .build())
 *             .enabledState("Enabled")
 *             .frontDoorName("frontDoor1")
 *             .frontendEndpoints(
 *                 FrontendEndpointArgs.builder()
 *                     .hostName("www.contoso.com")
 *                     .name("frontendEndpoint1")
 *                     .sessionAffinityEnabledState("Enabled")
 *                     .sessionAffinityTtlSeconds(60)
 *                     .webApplicationFirewallPolicyLink(FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgs.builder()
 *                         .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1")
 *                         .build())
 *                     .build(),
 *                 FrontendEndpointArgs.builder()
 *                     .hostName("frontDoor1.azurefd.net")
 *                     .name("default")
 *                     .build())
 *             .healthProbeSettings(HealthProbeSettingsModelArgs.builder()
 *                 .enabledState("Enabled")
 *                 .healthProbeMethod("HEAD")
 *                 .intervalInSeconds(120)
 *                 .name("healthProbeSettings1")
 *                 .path("/")
 *                 .protocol("Http")
 *                 .build())
 *             .loadBalancingSettings(LoadBalancingSettingsModelArgs.builder()
 *                 .name("loadBalancingSettings1")
 *                 .sampleSize(4)
 *                 .successfulSamplesRequired(2)
 *                 .build())
 *             .location("westus")
 *             .resourceGroupName("rg1")
 *             .routingRules(RoutingRuleArgs.builder()
 *                 .acceptedProtocols("Http")
 *                 .enabledState("Enabled")
 *                 .frontendEndpoints(
 *                     SubResourceArgs.builder()
 *                         .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/frontendEndpoint1")
 *                         .build(),
 *                     SubResourceArgs.builder()
 *                         .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/frontendEndpoints/default")
 *                         .build())
 *                 .name("routingRule1")
 *                 .patternsToMatch("/*")
 *                 .routeConfiguration(ForwardingConfigurationArgs.builder()
 *                     .backendPool(SubResourceArgs.builder()
 *                         .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1")
 *                         .build())
 *                     .odataType("#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration")
 *                     .build())
 *                 .rulesEngine(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1")
 *                     .build())
 *                 .webApplicationFirewallPolicyLink(RoutingRuleUpdateParametersWebApplicationFirewallPolicyLinkArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1")
 *                     .build())
 *                 .build())
 *             .tags(Map.ofEntries(
 *                 Map.entry("tag1", "value1"),
 *                 Map.entry("tag2", "value2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:FrontDoor frontDoor1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}
 * ```
 * */*/*/
 */
public class FrontDoor internal constructor(
    override val javaResource: com.pulumi.azurenative.network.FrontDoor,
) : KotlinCustomResource(javaResource, FrontDoorMapper) {
    /**
     * Backend pools available to routing rules.
     */
    public val backendPools: Output>?
        get() = javaResource.backendPools().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> backendPoolResponseToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Settings for all backendPools
     */
    public val backendPoolsSettings: Output?
        get() = javaResource.backendPoolsSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> backendPoolsSettingsResponseToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The host that each frontendEndpoint must CNAME to.
     */
    public val cname: Output
        get() = javaResource.cname().applyValue({ args0 -> args0 })

    /**
     * Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'
     */
    public val enabledState: Output?
        get() = javaResource.enabledState().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Key-Value pair representing additional properties for frontdoor.
     */
    public val extendedProperties: Output>
        get() = javaResource.extendedProperties().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * A friendly name for the frontDoor
     */
    public val friendlyName: Output?
        get() = javaResource.friendlyName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Id of the frontdoor.
     */
    public val frontdoorId: Output
        get() = javaResource.frontdoorId().applyValue({ args0 -> args0 })

    /**
     * Frontend endpoints available to routing rules.
     */
    public val frontendEndpoints: Output>?
        get() = javaResource.frontendEndpoints().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        frontendEndpointResponseToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Health probe settings associated with this Front Door instance.
     */
    public val healthProbeSettings: Output>?
        get() = javaResource.healthProbeSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        healthProbeSettingsModelResponseToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Load balancing settings associated with this Front Door instance.
     */
    public val loadBalancingSettings: Output>?
        get() = javaResource.loadBalancingSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        loadBalancingSettingsModelResponseToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Resource location.
     */
    public val location: Output?
        get() = javaResource.location().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Resource name.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Provisioning state of the Front Door.
     */
    public val provisioningState: Output
        get() = javaResource.provisioningState().applyValue({ args0 -> args0 })

    /**
     * Resource status of the Front Door.
     */
    public val resourceState: Output
        get() = javaResource.resourceState().applyValue({ args0 -> args0 })

    /**
     * Routing rules associated with this Front Door.
     */
    public val routingRules: Output>?
        get() = javaResource.routingRules().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> routingRuleResponseToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Rules Engine Configurations available to routing rules.
     */
    public val rulesEngines: Output>
        get() = javaResource.rulesEngines().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    rulesEngineResponseToKotlin(args0)
                })
            })
        })

    /**
     * Resource tags.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Resource type.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })
}

public object FrontDoorMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azurenative.network.FrontDoor::class == javaResource::class

    override fun map(javaResource: Resource): FrontDoor = FrontDoor(
        javaResource as
            com.pulumi.azurenative.network.FrontDoor,
    )
}

/**
 * @see [FrontDoor].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [FrontDoor].
 */
public suspend fun frontDoor(name: String, block: suspend FrontDoorResourceBuilder.() -> Unit): FrontDoor {
    val builder = FrontDoorResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [FrontDoor].
 * @param name The _unique_ name of the resulting resource.
 */
public fun frontDoor(name: String): FrontDoor {
    val builder = FrontDoorResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy