
com.pulumi.azurenative.network.FirewallPolicyDraft 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.FirewallPolicyDraftArgs;
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.FirewallPolicyThreatIntelWhitelistResponse;
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-11-01.
*
* Other available API versions: 2024-01-01, 2024-03-01.
*
* ## Example Usage
* ### create or update firewall policy draft
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.FirewallPolicyDraft;
* import com.pulumi.azurenative.network.FirewallPolicyDraftArgs;
* 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.FirewallPolicySNATArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicySQLArgs;
* import com.pulumi.azurenative.network.inputs.FirewallPolicyThreatIntelWhitelistArgs;
* 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 firewallPolicyDraft = new FirewallPolicyDraft("firewallPolicyDraft", FirewallPolicyDraftArgs.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")
* .profile("Balanced")
* .build())
* .resourceGroupName("rg1")
* .snat(FirewallPolicySNATArgs.builder()
* .privateRanges("IANAPrivateRanges")
* .build())
* .sql(FirewallPolicySQLArgs.builder()
* .allowSqlRedirect(true)
* .build())
* .threatIntelMode("Alert")
* .threatIntelWhitelist(FirewallPolicyThreatIntelWhitelistArgs.builder()
* .fqdns("*.microsoft.com")
* .ipAddresses("20.3.4.5")
* .build())
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:network:FirewallPolicyDraft firewallPolicy /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default
* ```
*
*/
@ResourceType(type="azure-native:network:FirewallPolicyDraft")
public class FirewallPolicyDraft 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);
}
/**
* 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);
}
/**
* 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);
}
/**
* 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 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);
}
/**
* 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 FirewallPolicyDraft(java.lang.String name) {
this(name, FirewallPolicyDraftArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public FirewallPolicyDraft(java.lang.String name, FirewallPolicyDraftArgs 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 FirewallPolicyDraft(java.lang.String name, FirewallPolicyDraftArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:FirewallPolicyDraft", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private FirewallPolicyDraft(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:FirewallPolicyDraft", name, null, makeResourceOptions(options, id), false);
}
private static FirewallPolicyDraftArgs makeArgs(FirewallPolicyDraftArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? FirewallPolicyDraftArgs.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/v20231101:FirewallPolicyDraft").build()),
Output.of(Alias.builder().type("azure-native:network/v20240101:FirewallPolicyDraft").build()),
Output.of(Alias.builder().type("azure-native:network/v20240301:FirewallPolicyDraft").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 FirewallPolicyDraft get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new FirewallPolicyDraft(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy