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

com.pulumi.azure.network.ApplicationGateway 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.azure.network;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.ApplicationGatewayArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayState;
import com.pulumi.azure.network.outputs.ApplicationGatewayAuthenticationCertificate;
import com.pulumi.azure.network.outputs.ApplicationGatewayAutoscaleConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayBackendAddressPool;
import com.pulumi.azure.network.outputs.ApplicationGatewayBackendHttpSetting;
import com.pulumi.azure.network.outputs.ApplicationGatewayCustomErrorConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayFrontendIpConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayFrontendPort;
import com.pulumi.azure.network.outputs.ApplicationGatewayGatewayIpConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayGlobal;
import com.pulumi.azure.network.outputs.ApplicationGatewayHttpListener;
import com.pulumi.azure.network.outputs.ApplicationGatewayIdentity;
import com.pulumi.azure.network.outputs.ApplicationGatewayPrivateEndpointConnection;
import com.pulumi.azure.network.outputs.ApplicationGatewayPrivateLinkConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayProbe;
import com.pulumi.azure.network.outputs.ApplicationGatewayRedirectConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayRequestRoutingRule;
import com.pulumi.azure.network.outputs.ApplicationGatewayRewriteRuleSet;
import com.pulumi.azure.network.outputs.ApplicationGatewaySku;
import com.pulumi.azure.network.outputs.ApplicationGatewaySslCertificate;
import com.pulumi.azure.network.outputs.ApplicationGatewaySslPolicy;
import com.pulumi.azure.network.outputs.ApplicationGatewaySslProfile;
import com.pulumi.azure.network.outputs.ApplicationGatewayTrustedClientCertificate;
import com.pulumi.azure.network.outputs.ApplicationGatewayTrustedRootCertificate;
import com.pulumi.azure.network.outputs.ApplicationGatewayUrlPathMap;
import com.pulumi.azure.network.outputs.ApplicationGatewayWafConfiguration;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.network.ApplicationGateway;
 * import com.pulumi.azure.network.ApplicationGatewayArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewaySkuArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayGatewayIpConfigurationArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayFrontendPortArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayFrontendIpConfigurationArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayBackendAddressPoolArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayBackendHttpSettingArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayHttpListenerArgs;
 * import com.pulumi.azure.network.inputs.ApplicationGatewayRequestRoutingRuleArgs;
 * 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-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-network")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .addressSpaces("10.254.0.0/16")
 *             .build());
 * 
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.254.0.0/24")
 *             .build());
 * 
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("example-pip")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .allocationMethod("Static")
 *             .build());
 * 
 *         final var backendAddressPoolName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-beap", name));
 * 
 *         final var frontendPortName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-feport", name));
 * 
 *         final var frontendIpConfigurationName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-feip", name));
 * 
 *         final var httpSettingName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-be-htst", name));
 * 
 *         final var listenerName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-httplstn", name));
 * 
 *         final var requestRoutingRuleName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-rqrt", name));
 * 
 *         final var redirectConfigurationName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-rdrcfg", name));
 * 
 *         var network = new ApplicationGateway("network", ApplicationGatewayArgs.builder()
 *             .name("example-appgateway")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .sku(ApplicationGatewaySkuArgs.builder()
 *                 .name("Standard_v2")
 *                 .tier("Standard_v2")
 *                 .capacity(2)
 *                 .build())
 *             .gatewayIpConfigurations(ApplicationGatewayGatewayIpConfigurationArgs.builder()
 *                 .name("my-gateway-ip-configuration")
 *                 .subnetId(exampleSubnet.id())
 *                 .build())
 *             .frontendPorts(ApplicationGatewayFrontendPortArgs.builder()
 *                 .name(frontendPortName)
 *                 .port(80)
 *                 .build())
 *             .frontendIpConfigurations(ApplicationGatewayFrontendIpConfigurationArgs.builder()
 *                 .name(frontendIpConfigurationName)
 *                 .publicIpAddressId(examplePublicIp.id())
 *                 .build())
 *             .backendAddressPools(ApplicationGatewayBackendAddressPoolArgs.builder()
 *                 .name(backendAddressPoolName)
 *                 .build())
 *             .backendHttpSettings(ApplicationGatewayBackendHttpSettingArgs.builder()
 *                 .name(httpSettingName)
 *                 .cookieBasedAffinity("Disabled")
 *                 .path("/path1/")
 *                 .port(80)
 *                 .protocol("Http")
 *                 .requestTimeout(60)
 *                 .build())
 *             .httpListeners(ApplicationGatewayHttpListenerArgs.builder()
 *                 .name(listenerName)
 *                 .frontendIpConfigurationName(frontendIpConfigurationName)
 *                 .frontendPortName(frontendPortName)
 *                 .protocol("Http")
 *                 .build())
 *             .requestRoutingRules(ApplicationGatewayRequestRoutingRuleArgs.builder()
 *                 .name(requestRoutingRuleName)
 *                 .priority(9)
 *                 .ruleType("Basic")
 *                 .httpListenerName(listenerName)
 *                 .backendAddressPoolName(backendAddressPoolName)
 *                 .backendHttpSettingsName(httpSettingName)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Application Gateway's can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/applicationGateway:ApplicationGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/applicationGateways/myGateway1 * ``` * */ @ResourceType(type="azure:network/applicationGateway:ApplicationGateway") public class ApplicationGateway extends com.pulumi.resources.CustomResource { /** * One or more `authentication_certificate` blocks as defined below. * */ @Export(name="authenticationCertificates", refs={List.class,ApplicationGatewayAuthenticationCertificate.class}, tree="[0,1]") private Output> authenticationCertificates; /** * @return One or more `authentication_certificate` blocks as defined below. * */ public Output>> authenticationCertificates() { return Codegen.optional(this.authenticationCertificates); } /** * An `autoscale_configuration` block as defined below. * */ @Export(name="autoscaleConfiguration", refs={ApplicationGatewayAutoscaleConfiguration.class}, tree="[0]") private Output autoscaleConfiguration; /** * @return An `autoscale_configuration` block as defined below. * */ public Output> autoscaleConfiguration() { return Codegen.optional(this.autoscaleConfiguration); } /** * One or more `backend_address_pool` blocks as defined below. * */ @Export(name="backendAddressPools", refs={List.class,ApplicationGatewayBackendAddressPool.class}, tree="[0,1]") private Output> backendAddressPools; /** * @return One or more `backend_address_pool` blocks as defined below. * */ public Output> backendAddressPools() { return this.backendAddressPools; } /** * One or more `backend_http_settings` blocks as defined below. * */ @Export(name="backendHttpSettings", refs={List.class,ApplicationGatewayBackendHttpSetting.class}, tree="[0,1]") private Output> backendHttpSettings; /** * @return One or more `backend_http_settings` blocks as defined below. * */ public Output> backendHttpSettings() { return this.backendHttpSettings; } /** * One or more `custom_error_configuration` blocks as defined below. * */ @Export(name="customErrorConfigurations", refs={List.class,ApplicationGatewayCustomErrorConfiguration.class}, tree="[0,1]") private Output> customErrorConfigurations; /** * @return One or more `custom_error_configuration` blocks as defined below. * */ public Output>> customErrorConfigurations() { return Codegen.optional(this.customErrorConfigurations); } /** * Is HTTP2 enabled on the application gateway resource? Defaults to `false`. * */ @Export(name="enableHttp2", refs={Boolean.class}, tree="[0]") private Output enableHttp2; /** * @return Is HTTP2 enabled on the application gateway resource? Defaults to `false`. * */ public Output> enableHttp2() { return Codegen.optional(this.enableHttp2); } /** * Is FIPS enabled on the Application Gateway? * */ @Export(name="fipsEnabled", refs={Boolean.class}, tree="[0]") private Output fipsEnabled; /** * @return Is FIPS enabled on the Application Gateway? * */ public Output> fipsEnabled() { return Codegen.optional(this.fipsEnabled); } /** * The ID of the Web Application Firewall Policy. * */ @Export(name="firewallPolicyId", refs={String.class}, tree="[0]") private Output firewallPolicyId; /** * @return The ID of the Web Application Firewall Policy. * */ public Output> firewallPolicyId() { return Codegen.optional(this.firewallPolicyId); } /** * Is the Firewall Policy associated with the Application Gateway? * */ @Export(name="forceFirewallPolicyAssociation", refs={Boolean.class}, tree="[0]") private Output forceFirewallPolicyAssociation; /** * @return Is the Firewall Policy associated with the Application Gateway? * */ public Output> forceFirewallPolicyAssociation() { return Codegen.optional(this.forceFirewallPolicyAssociation); } /** * One or more `frontend_ip_configuration` blocks as defined below. * */ @Export(name="frontendIpConfigurations", refs={List.class,ApplicationGatewayFrontendIpConfiguration.class}, tree="[0,1]") private Output> frontendIpConfigurations; /** * @return One or more `frontend_ip_configuration` blocks as defined below. * */ public Output> frontendIpConfigurations() { return this.frontendIpConfigurations; } /** * One or more `frontend_port` blocks as defined below. * */ @Export(name="frontendPorts", refs={List.class,ApplicationGatewayFrontendPort.class}, tree="[0,1]") private Output> frontendPorts; /** * @return One or more `frontend_port` blocks as defined below. * */ public Output> frontendPorts() { return this.frontendPorts; } /** * One or more `gateway_ip_configuration` blocks as defined below. * */ @Export(name="gatewayIpConfigurations", refs={List.class,ApplicationGatewayGatewayIpConfiguration.class}, tree="[0,1]") private Output> gatewayIpConfigurations; /** * @return One or more `gateway_ip_configuration` blocks as defined below. * */ public Output> gatewayIpConfigurations() { return this.gatewayIpConfigurations; } /** * A `global` block as defined below. * */ @Export(name="global", refs={ApplicationGatewayGlobal.class}, tree="[0]") private Output global; /** * @return A `global` block as defined below. * */ public Output> global() { return Codegen.optional(this.global); } /** * One or more `http_listener` blocks as defined below. * */ @Export(name="httpListeners", refs={List.class,ApplicationGatewayHttpListener.class}, tree="[0,1]") private Output> httpListeners; /** * @return One or more `http_listener` blocks as defined below. * */ public Output> httpListeners() { return this.httpListeners; } /** * An `identity` block as defined below. * */ @Export(name="identity", refs={ApplicationGatewayIdentity.class}, tree="[0]") private Output identity; /** * @return An `identity` block as defined below. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * The name of the Application Gateway. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the Application Gateway. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A list of `private_endpoint_connection` blocks as defined below. * */ @Export(name="privateEndpointConnections", refs={List.class,ApplicationGatewayPrivateEndpointConnection.class}, tree="[0,1]") private Output> privateEndpointConnections; /** * @return A list of `private_endpoint_connection` blocks as defined below. * */ public Output> privateEndpointConnections() { return this.privateEndpointConnections; } /** * One or more `private_link_configuration` blocks as defined below. * */ @Export(name="privateLinkConfigurations", refs={List.class,ApplicationGatewayPrivateLinkConfiguration.class}, tree="[0,1]") private Output> privateLinkConfigurations; /** * @return One or more `private_link_configuration` blocks as defined below. * */ public Output>> privateLinkConfigurations() { return Codegen.optional(this.privateLinkConfigurations); } /** * One or more `probe` blocks as defined below. * */ @Export(name="probes", refs={List.class,ApplicationGatewayProbe.class}, tree="[0,1]") private Output> probes; /** * @return One or more `probe` blocks as defined below. * */ public Output>> probes() { return Codegen.optional(this.probes); } /** * One or more `redirect_configuration` blocks as defined below. * */ @Export(name="redirectConfigurations", refs={List.class,ApplicationGatewayRedirectConfiguration.class}, tree="[0,1]") private Output> redirectConfigurations; /** * @return One or more `redirect_configuration` blocks as defined below. * */ public Output>> redirectConfigurations() { return Codegen.optional(this.redirectConfigurations); } /** * One or more `request_routing_rule` blocks as defined below. * */ @Export(name="requestRoutingRules", refs={List.class,ApplicationGatewayRequestRoutingRule.class}, tree="[0,1]") private Output> requestRoutingRules; /** * @return One or more `request_routing_rule` blocks as defined below. * */ public Output> requestRoutingRules() { return this.requestRoutingRules; } /** * The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * One or more `rewrite_rule_set` blocks as defined below. Only valid for v2 SKUs. * */ @Export(name="rewriteRuleSets", refs={List.class,ApplicationGatewayRewriteRuleSet.class}, tree="[0,1]") private Output> rewriteRuleSets; /** * @return One or more `rewrite_rule_set` blocks as defined below. Only valid for v2 SKUs. * */ public Output>> rewriteRuleSets() { return Codegen.optional(this.rewriteRuleSets); } /** * A `sku` block as defined below. * */ @Export(name="sku", refs={ApplicationGatewaySku.class}, tree="[0]") private Output sku; /** * @return A `sku` block as defined below. * */ public Output sku() { return this.sku; } /** * One or more `ssl_certificate` blocks as defined below. * */ @Export(name="sslCertificates", refs={List.class,ApplicationGatewaySslCertificate.class}, tree="[0,1]") private Output> sslCertificates; /** * @return One or more `ssl_certificate` blocks as defined below. * */ public Output>> sslCertificates() { return Codegen.optional(this.sslCertificates); } /** * a `ssl_policy` block as defined below. * */ @Export(name="sslPolicy", refs={ApplicationGatewaySslPolicy.class}, tree="[0]") private Output sslPolicy; /** * @return a `ssl_policy` block as defined below. * */ public Output sslPolicy() { return this.sslPolicy; } /** * One or more `ssl_profile` blocks as defined below. * */ @Export(name="sslProfiles", refs={List.class,ApplicationGatewaySslProfile.class}, tree="[0,1]") private Output> sslProfiles; /** * @return One or more `ssl_profile` blocks as defined below. * */ public Output>> sslProfiles() { return Codegen.optional(this.sslProfiles); } /** * A mapping of tags to assign to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * One or more `trusted_client_certificate` blocks as defined below. * */ @Export(name="trustedClientCertificates", refs={List.class,ApplicationGatewayTrustedClientCertificate.class}, tree="[0,1]") private Output> trustedClientCertificates; /** * @return One or more `trusted_client_certificate` blocks as defined below. * */ public Output>> trustedClientCertificates() { return Codegen.optional(this.trustedClientCertificates); } /** * One or more `trusted_root_certificate` blocks as defined below. * */ @Export(name="trustedRootCertificates", refs={List.class,ApplicationGatewayTrustedRootCertificate.class}, tree="[0,1]") private Output> trustedRootCertificates; /** * @return One or more `trusted_root_certificate` blocks as defined below. * */ public Output>> trustedRootCertificates() { return Codegen.optional(this.trustedRootCertificates); } /** * One or more `url_path_map` blocks as defined below. * */ @Export(name="urlPathMaps", refs={List.class,ApplicationGatewayUrlPathMap.class}, tree="[0,1]") private Output> urlPathMaps; /** * @return One or more `url_path_map` blocks as defined below. * */ public Output>> urlPathMaps() { return Codegen.optional(this.urlPathMaps); } /** * A `waf_configuration` block as defined below. * */ @Export(name="wafConfiguration", refs={ApplicationGatewayWafConfiguration.class}, tree="[0]") private Output wafConfiguration; /** * @return A `waf_configuration` block as defined below. * */ public Output> wafConfiguration() { return Codegen.optional(this.wafConfiguration); } /** * Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created. * * > **Please Note**: Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) * */ @Export(name="zones", refs={List.class,String.class}, tree="[0,1]") private Output> zones; /** * @return Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created. * * > **Please Note**: Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) * */ public Output>> zones() { return Codegen.optional(this.zones); } /** * * @param name The _unique_ name of the resulting resource. */ public ApplicationGateway(java.lang.String name) { this(name, ApplicationGatewayArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ApplicationGateway(java.lang.String name, ApplicationGatewayArgs 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 ApplicationGateway(java.lang.String name, ApplicationGatewayArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:network/applicationGateway:ApplicationGateway", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ApplicationGateway(java.lang.String name, Output id, @Nullable ApplicationGatewayState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:network/applicationGateway:ApplicationGateway", name, state, makeResourceOptions(options, id), false); } private static ApplicationGatewayArgs makeArgs(ApplicationGatewayArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ApplicationGatewayArgs.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()) .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 state * @param options Optional settings to control the behavior of the CustomResource. */ public static ApplicationGateway get(java.lang.String name, Output id, @Nullable ApplicationGatewayState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ApplicationGateway(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy