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

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

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.network;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.network.FrontDoorArgs;
import com.pulumi.azurenative.network.outputs.BackendPoolResponse;
import com.pulumi.azurenative.network.outputs.BackendPoolsSettingsResponse;
import com.pulumi.azurenative.network.outputs.FrontendEndpointResponse;
import com.pulumi.azurenative.network.outputs.HealthProbeSettingsModelResponse;
import com.pulumi.azurenative.network.outputs.LoadBalancingSettingsModelResponse;
import com.pulumi.azurenative.network.outputs.RoutingRuleResponse;
import com.pulumi.azurenative.network.outputs.RulesEngineResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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
 * 
 * 
 * {@code
 * 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} * ``` * */ @ResourceType(type="azure-native:network:FrontDoor") public class FrontDoor extends com.pulumi.resources.CustomResource { /** * Backend pools available to routing rules. * */ @Export(name="backendPools", refs={List.class,BackendPoolResponse.class}, tree="[0,1]") private Output> backendPools; /** * @return Backend pools available to routing rules. * */ public Output>> backendPools() { return Codegen.optional(this.backendPools); } /** * Settings for all backendPools * */ @Export(name="backendPoolsSettings", refs={BackendPoolsSettingsResponse.class}, tree="[0]") private Output backendPoolsSettings; /** * @return Settings for all backendPools * */ public Output> backendPoolsSettings() { return Codegen.optional(this.backendPoolsSettings); } /** * The host that each frontendEndpoint must CNAME to. * */ @Export(name="cname", refs={String.class}, tree="[0]") private Output cname; /** * @return The host that each frontendEndpoint must CNAME to. * */ public Output cname() { return this.cname; } /** * Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled' * */ @Export(name="enabledState", refs={String.class}, tree="[0]") private Output enabledState; /** * @return Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled' * */ public Output> enabledState() { return Codegen.optional(this.enabledState); } /** * Key-Value pair representing additional properties for frontdoor. * */ @Export(name="extendedProperties", refs={Map.class,String.class}, tree="[0,1,1]") private Output> extendedProperties; /** * @return Key-Value pair representing additional properties for frontdoor. * */ public Output> extendedProperties() { return this.extendedProperties; } /** * A friendly name for the frontDoor * */ @Export(name="friendlyName", refs={String.class}, tree="[0]") private Output friendlyName; /** * @return A friendly name for the frontDoor * */ public Output> friendlyName() { return Codegen.optional(this.friendlyName); } /** * The Id of the frontdoor. * */ @Export(name="frontdoorId", refs={String.class}, tree="[0]") private Output frontdoorId; /** * @return The Id of the frontdoor. * */ public Output frontdoorId() { return this.frontdoorId; } /** * Frontend endpoints available to routing rules. * */ @Export(name="frontendEndpoints", refs={List.class,FrontendEndpointResponse.class}, tree="[0,1]") private Output> frontendEndpoints; /** * @return Frontend endpoints available to routing rules. * */ public Output>> frontendEndpoints() { return Codegen.optional(this.frontendEndpoints); } /** * Health probe settings associated with this Front Door instance. * */ @Export(name="healthProbeSettings", refs={List.class,HealthProbeSettingsModelResponse.class}, tree="[0,1]") private Output> healthProbeSettings; /** * @return Health probe settings associated with this Front Door instance. * */ public Output>> healthProbeSettings() { return Codegen.optional(this.healthProbeSettings); } /** * Load balancing settings associated with this Front Door instance. * */ @Export(name="loadBalancingSettings", refs={List.class,LoadBalancingSettingsModelResponse.class}, tree="[0,1]") private Output> loadBalancingSettings; /** * @return Load balancing settings associated with this Front Door instance. * */ public Output>> loadBalancingSettings() { return Codegen.optional(this.loadBalancingSettings); } /** * Resource location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location. * */ public Output> location() { return Codegen.optional(this.location); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * Provisioning state of the Front Door. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning state of the Front Door. * */ public Output provisioningState() { return this.provisioningState; } /** * Resource status of the Front Door. * */ @Export(name="resourceState", refs={String.class}, tree="[0]") private Output resourceState; /** * @return Resource status of the Front Door. * */ public Output resourceState() { return this.resourceState; } /** * Routing rules associated with this Front Door. * */ @Export(name="routingRules", refs={List.class,RoutingRuleResponse.class}, tree="[0,1]") private Output> routingRules; /** * @return Routing rules associated with this Front Door. * */ public Output>> routingRules() { return Codegen.optional(this.routingRules); } /** * Rules Engine Configurations available to routing rules. * */ @Export(name="rulesEngines", refs={List.class,RulesEngineResponse.class}, tree="[0,1]") private Output> rulesEngines; /** * @return Rules Engine Configurations available to routing rules. * */ public Output> rulesEngines() { return this.rulesEngines; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public FrontDoor(java.lang.String name) { this(name, FrontDoorArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public FrontDoor(java.lang.String name, FrontDoorArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public FrontDoor(java.lang.String name, FrontDoorArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:FrontDoor", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private FrontDoor(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:FrontDoor", name, null, makeResourceOptions(options, id), false); } private static FrontDoorArgs makeArgs(FrontDoorArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? FrontDoorArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:network/v20190401:FrontDoor").build()), Output.of(Alias.builder().type("azure-native:network/v20190501:FrontDoor").build()), Output.of(Alias.builder().type("azure-native:network/v20200101:FrontDoor").build()), Output.of(Alias.builder().type("azure-native:network/v20200401:FrontDoor").build()), Output.of(Alias.builder().type("azure-native:network/v20200501:FrontDoor").build()), Output.of(Alias.builder().type("azure-native:network/v20210601:FrontDoor").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static FrontDoor get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new FrontDoor(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy