com.pulumi.azurenative.network.FirewallPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.FirewallPolicyArgs;
import com.pulumi.azurenative.network.outputs.DnsSettingsResponse;
import com.pulumi.azurenative.network.outputs.ExplicitProxyResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicyInsightsResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicyIntrusionDetectionResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicySNATResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicySQLResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicySkuResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicyThreatIntelWhitelistResponse;
import com.pulumi.azurenative.network.outputs.FirewallPolicyTransportSecurityResponse;
import com.pulumi.azurenative.network.outputs.ManagedServiceIdentityResponse;
import com.pulumi.azurenative.network.outputs.SubResourceResponse;
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;
/**
* FirewallPolicy Resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
*
* Other available API versions: 2020-04-01, 2021-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01.
*
* ## Example Usage
* ### Create FirewallPolicy
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.FirewallPolicy;
* import com.pulumi.azurenative.network.FirewallPolicyArgs;
* import com.pulumi.azurenative.network.inputs.DnsSettingsArgs;
* import com.pulumi.azurenative.network.inputs.ExplicitProxyArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyInsightsArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyLogAnalyticsResourcesArgs;
* import com.pulumi.azurenative.network.inputs.SubResourceArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyIntrusionDetectionArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyIntrusionDetectionConfigurationArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicySkuArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicySNATArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicySQLArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyThreatIntelWhitelistArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyTransportSecurityArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyCertificateAuthorityArgs;
* 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 firewallPolicy = new FirewallPolicy("firewallPolicy", FirewallPolicyArgs.builder()
* .dnsSettings(DnsSettingsArgs.builder()
* .enableProxy(true)
* .requireProxyForNetworkRules(false)
* .servers("30.3.4.5")
* .build())
* .explicitProxy(ExplicitProxyArgs.builder()
* .enableExplicitProxy(true)
* .enablePacFile(true)
* .httpPort(8087)
* .httpsPort(8087)
* .pacFile("https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D")
* .pacFilePort(8087)
* .build())
* .firewallPolicyName("firewallPolicy")
* .insights(FirewallPolicyInsightsArgs.builder()
* .isEnabled(true)
* .logAnalyticsResources(FirewallPolicyLogAnalyticsResourcesArgs.builder()
* .defaultWorkspaceId(SubResourceArgs.builder()
* .id("/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace")
* .build())
* .workspaces(
* FirewallPolicyLogAnalyticsWorkspaceArgs.builder()
* .region("westus")
* .workspaceId(SubResourceArgs.builder()
* .id("/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1")
* .build())
* .build(),
* FirewallPolicyLogAnalyticsWorkspaceArgs.builder()
* .region("eastus")
* .workspaceId(SubResourceArgs.builder()
* .id("/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2")
* .build())
* .build())
* .build())
* .retentionDays(100)
* .build())
* .intrusionDetection(FirewallPolicyIntrusionDetectionArgs.builder()
* .configuration(FirewallPolicyIntrusionDetectionConfigurationArgs.builder()
* .bypassTrafficSettings(FirewallPolicyIntrusionDetectionBypassTrafficSpecificationsArgs.builder()
* .description("Rule 1")
* .destinationAddresses("5.6.7.8")
* .destinationPorts("*")
* .name("bypassRule1")
* .protocol("TCP")
* .sourceAddresses("1.2.3.4")
* .build())
* .signatureOverrides(FirewallPolicyIntrusionDetectionSignatureSpecificationArgs.builder()
* .id("2525004")
* .mode("Deny")
* .build())
* .build())
* .mode("Alert")
* .build())
* .location("West US")
* .resourceGroupName("rg1")
* .sku(FirewallPolicySkuArgs.builder()
* .tier("Premium")
* .build())
* .snat(FirewallPolicySNATArgs.builder()
* .privateRanges("IANAPrivateRanges")
* .build())
* .sql(FirewallPolicySQLArgs.builder()
* .allowSqlRedirect(true)
* .build())
* .tags(Map.of("key1", "value1"))
* .threatIntelMode("Alert")
* .threatIntelWhitelist(FirewallPolicyThreatIntelWhitelistArgs.builder()
* .fqdns("*.microsoft.com")
* .ipAddresses("20.3.4.5")
* .build())
* .transportSecurity(FirewallPolicyTransportSecurityArgs.builder()
* .certificateAuthority(FirewallPolicyCertificateAuthorityArgs.builder()
* .keyVaultSecretId("https://kv/secret")
* .name("clientcert")
* .build())
* .build())
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:network:FirewallPolicy firewallPolicy /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}
* ```
*
*/
@ResourceType(type="azure-native:network:FirewallPolicy")
public class FirewallPolicy extends com.pulumi.resources.CustomResource {
/**
* The parent firewall policy from which rules are inherited.
*
*/
@Export(name="basePolicy", refs={SubResourceResponse.class}, tree="[0]")
private Output* @Nullable */ SubResourceResponse> basePolicy;
/**
* @return The parent firewall policy from which rules are inherited.
*
*/
public Output> basePolicy() {
return Codegen.optional(this.basePolicy);
}
/**
* List of references to Child Firewall Policies.
*
*/
@Export(name="childPolicies", refs={List.class,SubResourceResponse.class}, tree="[0,1]")
private Output> childPolicies;
/**
* @return List of references to Child Firewall Policies.
*
*/
public Output> childPolicies() {
return this.childPolicies;
}
/**
* DNS Proxy Settings definition.
*
*/
@Export(name="dnsSettings", refs={DnsSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ DnsSettingsResponse> dnsSettings;
/**
* @return DNS Proxy Settings definition.
*
*/
public Output> dnsSettings() {
return Codegen.optional(this.dnsSettings);
}
/**
* A unique read-only string that changes whenever the resource is updated.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output etag;
/**
* @return A unique read-only string that changes whenever the resource is updated.
*
*/
public Output etag() {
return this.etag;
}
/**
* Explicit Proxy Settings definition.
*
*/
@Export(name="explicitProxy", refs={ExplicitProxyResponse.class}, tree="[0]")
private Output* @Nullable */ ExplicitProxyResponse> explicitProxy;
/**
* @return Explicit Proxy Settings definition.
*
*/
public Output> explicitProxy() {
return Codegen.optional(this.explicitProxy);
}
/**
* List of references to Azure Firewalls that this Firewall Policy is associated with.
*
*/
@Export(name="firewalls", refs={List.class,SubResourceResponse.class}, tree="[0,1]")
private Output> firewalls;
/**
* @return List of references to Azure Firewalls that this Firewall Policy is associated with.
*
*/
public Output> firewalls() {
return this.firewalls;
}
/**
* The identity of the firewall policy.
*
*/
@Export(name="identity", refs={ManagedServiceIdentityResponse.class}, tree="[0]")
private Output* @Nullable */ ManagedServiceIdentityResponse> identity;
/**
* @return The identity of the firewall policy.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Insights on Firewall Policy.
*
*/
@Export(name="insights", refs={FirewallPolicyInsightsResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicyInsightsResponse> insights;
/**
* @return Insights on Firewall Policy.
*
*/
public Output> insights() {
return Codegen.optional(this.insights);
}
/**
* The configuration for Intrusion detection.
*
*/
@Export(name="intrusionDetection", refs={FirewallPolicyIntrusionDetectionResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicyIntrusionDetectionResponse> intrusionDetection;
/**
* @return The configuration for Intrusion detection.
*
*/
public Output> intrusionDetection() {
return Codegen.optional(this.intrusionDetection);
}
/**
* Resource location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> 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;
}
/**
* The provisioning state of the firewall policy resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the firewall policy resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* List of references to FirewallPolicyRuleCollectionGroups.
*
*/
@Export(name="ruleCollectionGroups", refs={List.class,SubResourceResponse.class}, tree="[0,1]")
private Output> ruleCollectionGroups;
/**
* @return List of references to FirewallPolicyRuleCollectionGroups.
*
*/
public Output> ruleCollectionGroups() {
return this.ruleCollectionGroups;
}
/**
* The Firewall Policy SKU.
*
*/
@Export(name="sku", refs={FirewallPolicySkuResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicySkuResponse> sku;
/**
* @return The Firewall Policy SKU.
*
*/
public Output> sku() {
return Codegen.optional(this.sku);
}
/**
* The private IP addresses/IP ranges to which traffic will not be SNAT.
*
*/
@Export(name="snat", refs={FirewallPolicySNATResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicySNATResponse> snat;
/**
* @return The private IP addresses/IP ranges to which traffic will not be SNAT.
*
*/
public Output> snat() {
return Codegen.optional(this.snat);
}
/**
* SQL Settings definition.
*
*/
@Export(name="sql", refs={FirewallPolicySQLResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicySQLResponse> sql;
/**
* @return SQL Settings definition.
*
*/
public Output> sql() {
return Codegen.optional(this.sql);
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The operation mode for Threat Intelligence.
*
*/
@Export(name="threatIntelMode", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> threatIntelMode;
/**
* @return The operation mode for Threat Intelligence.
*
*/
public Output> threatIntelMode() {
return Codegen.optional(this.threatIntelMode);
}
/**
* ThreatIntel Whitelist for Firewall Policy.
*
*/
@Export(name="threatIntelWhitelist", refs={FirewallPolicyThreatIntelWhitelistResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicyThreatIntelWhitelistResponse> threatIntelWhitelist;
/**
* @return ThreatIntel Whitelist for Firewall Policy.
*
*/
public Output> threatIntelWhitelist() {
return Codegen.optional(this.threatIntelWhitelist);
}
/**
* TLS Configuration definition.
*
*/
@Export(name="transportSecurity", refs={FirewallPolicyTransportSecurityResponse.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicyTransportSecurityResponse> transportSecurity;
/**
* @return TLS Configuration definition.
*
*/
public Output> transportSecurity() {
return Codegen.optional(this.transportSecurity);
}
/**
* 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 FirewallPolicy(java.lang.String name) {
this(name, FirewallPolicyArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public FirewallPolicy(java.lang.String name, FirewallPolicyArgs 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 FirewallPolicy(java.lang.String name, FirewallPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:FirewallPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private FirewallPolicy(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:FirewallPolicy", name, null, makeResourceOptions(options, id), false);
}
private static FirewallPolicyArgs makeArgs(FirewallPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? FirewallPolicyArgs.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/v20190601:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20190701:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20190801:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20190901:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20191101:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20191201:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20200301:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20200401:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20200501:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20200601:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20200701:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20200801:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20201101:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20210201:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20210301:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20210501:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20210801:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20220101:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20220501:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20220701:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20220901:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20221101:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20230201:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20230401:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20230501:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20230601:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20230901:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20231101:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20240101:FirewallPolicy").build()),
Output.of(Alias.builder().type("azure-native:network/v20240301:FirewallPolicy").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 FirewallPolicy get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new FirewallPolicy(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy