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

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 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 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> 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> tagsAll; /** * @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } /** * A string token used when updating a firewall policy. * */ @Export(name="updateToken", refs={String.class}, tree="[0]") private Output updateToken; /** * @return A string token used when updating a firewall policy. * */ public Output updateToken() { return this.updateToken; } /** * * @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("aws:networkfirewall/firewallPolicy:FirewallPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private FirewallPolicy(java.lang.String name, Output id, @Nullable FirewallPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:networkfirewall/firewallPolicy:FirewallPolicy", name, state, 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()) .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 FirewallPolicy get(java.lang.String name, Output id, @Nullable FirewallPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new FirewallPolicy(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy