com.pulumi.aws.networkfirewall.FirewallPolicy 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.aws.networkfirewall;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.networkfirewall.FirewallPolicyArgs;
import com.pulumi.aws.networkfirewall.inputs.FirewallPolicyState;
import com.pulumi.aws.networkfirewall.outputs.FirewallPolicyEncryptionConfiguration;
import com.pulumi.aws.networkfirewall.outputs.FirewallPolicyFirewallPolicy;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides an AWS Network Firewall Firewall Policy Resource
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.networkfirewall.FirewallPolicy;
* import com.pulumi.aws.networkfirewall.FirewallPolicyArgs;
* import com.pulumi.aws.networkfirewall.inputs.FirewallPolicyFirewallPolicyArgs;
* 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 FirewallPolicy("example", FirewallPolicyArgs.builder()
* .name("example")
* .firewallPolicy(FirewallPolicyFirewallPolicyArgs.builder()
* .statelessDefaultActions("aws:pass")
* .statelessFragmentDefaultActions("aws:drop")
* .statelessRuleGroupReferences(FirewallPolicyFirewallPolicyStatelessRuleGroupReferenceArgs.builder()
* .priority(1)
* .resourceArn(exampleAwsNetworkfirewallRuleGroup.arn())
* .build())
* .tlsInspectionConfigurationArn("arn:aws:network-firewall:REGION:ACCT:tls-configuration/example")
* .build())
* .tags(Map.ofEntries(
* Map.entry("Tag1", "Value1"),
* Map.entry("Tag2", "Value2")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Policy with a HOME_NET Override
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.networkfirewall.FirewallPolicy;
* import com.pulumi.aws.networkfirewall.FirewallPolicyArgs;
* import com.pulumi.aws.networkfirewall.inputs.FirewallPolicyFirewallPolicyArgs;
* import com.pulumi.aws.networkfirewall.inputs.FirewallPolicyFirewallPolicyPolicyVariablesArgs;
* 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 FirewallPolicy("example", FirewallPolicyArgs.builder()
* .name("example")
* .firewallPolicy(FirewallPolicyFirewallPolicyArgs.builder()
* .policyVariables(FirewallPolicyFirewallPolicyPolicyVariablesArgs.builder()
* .ruleVariables(FirewallPolicyFirewallPolicyPolicyVariablesRuleVariableArgs.builder()
* .key("HOME_NET")
* .ipSet(FirewallPolicyFirewallPolicyPolicyVariablesRuleVariableIpSetArgs.builder()
* .definitions(
* "10.0.0.0/16",
* "10.1.0.0/24")
* .build())
* .build())
* .build())
* .statelessDefaultActions("aws:pass")
* .statelessFragmentDefaultActions("aws:drop")
* .statelessRuleGroupReferences(FirewallPolicyFirewallPolicyStatelessRuleGroupReferenceArgs.builder()
* .priority(1)
* .resourceArn(exampleAwsNetworkfirewallRuleGroup.arn())
* .build())
* .build())
* .tags(Map.ofEntries(
* Map.entry("Tag1", "Value1"),
* Map.entry("Tag2", "Value2")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Policy with a Custom Action for Stateless Inspection
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.networkfirewall.FirewallPolicy;
* import com.pulumi.aws.networkfirewall.FirewallPolicyArgs;
* import com.pulumi.aws.networkfirewall.inputs.FirewallPolicyFirewallPolicyArgs;
* 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 test = new FirewallPolicy("test", FirewallPolicyArgs.builder()
* .name("example")
* .firewallPolicy(FirewallPolicyFirewallPolicyArgs.builder()
* .statelessDefaultActions(
* "aws:pass",
* "ExampleCustomAction")
* .statelessFragmentDefaultActions("aws:drop")
* .statelessCustomActions(FirewallPolicyFirewallPolicyStatelessCustomActionArgs.builder()
* .actionDefinition(FirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionArgs.builder()
* .publishMetricAction(FirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionPublishMetricActionArgs.builder()
* .dimensions(FirewallPolicyFirewallPolicyStatelessCustomActionActionDefinitionPublishMetricActionDimensionArgs.builder()
* .value("1")
* .build())
* .build())
* .build())
* .actionName("ExampleCustomAction")
* .build())
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import Network Firewall Policies using their `arn`. For example:
*
* ```sh
* $ pulumi import aws:networkfirewall/firewallPolicy:FirewallPolicy example arn:aws:network-firewall:us-west-1:123456789012:firewall-policy/example
* ```
*
*/
@ResourceType(type="aws:networkfirewall/firewallPolicy:FirewallPolicy")
public class FirewallPolicy extends com.pulumi.resources.CustomResource {
/**
* The Amazon Resource Name (ARN) that identifies the firewall policy.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The Amazon Resource Name (ARN) that identifies the firewall policy.
*
*/
public Output arn() {
return this.arn;
}
/**
* A friendly description of the firewall policy.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return A friendly description of the firewall policy.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* KMS encryption configuration settings. See Encryption Configuration below for details.
*
*/
@Export(name="encryptionConfiguration", refs={FirewallPolicyEncryptionConfiguration.class}, tree="[0]")
private Output* @Nullable */ FirewallPolicyEncryptionConfiguration> encryptionConfiguration;
/**
* @return KMS encryption configuration settings. See Encryption Configuration below for details.
*
*/
public Output> encryptionConfiguration() {
return Codegen.optional(this.encryptionConfiguration);
}
/**
* A configuration block describing the rule groups and policy actions to use in the firewall policy. See Firewall Policy below for details.
*
*/
@Export(name="firewallPolicy", refs={FirewallPolicyFirewallPolicy.class}, tree="[0]")
private Output firewallPolicy;
/**
* @return A configuration block describing the rule groups and policy actions to use in the firewall policy. See Firewall Policy below for details.
*
*/
public Output firewallPolicy() {
return this.firewallPolicy;
}
/**
* A friendly name of the firewall policy.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return A friendly name of the firewall policy.
*
*/
public Output name() {
return this.name;
}
/**
* Map of resource tags to associate with the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Map of resource tags to associate with the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy