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

com.pulumi.aws.route53.ResolverFirewallRule Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.66.3
Show newest version
// *** 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.route53;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.route53.ResolverFirewallRuleArgs;
import com.pulumi.aws.route53.inputs.ResolverFirewallRuleState;
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.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a Route 53 Resolver DNS Firewall rule 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.route53.ResolverFirewallDomainList;
 * import com.pulumi.aws.route53.ResolverFirewallDomainListArgs;
 * import com.pulumi.aws.route53.ResolverFirewallRuleGroup;
 * import com.pulumi.aws.route53.ResolverFirewallRuleGroupArgs;
 * import com.pulumi.aws.route53.ResolverFirewallRule;
 * import com.pulumi.aws.route53.ResolverFirewallRuleArgs;
 * 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 ResolverFirewallDomainList("example", ResolverFirewallDomainListArgs.builder()
 *             .name("example")
 *             .domains("example.com")
 *             .tags()
 *             .build());
 * 
 *         var exampleResolverFirewallRuleGroup = new ResolverFirewallRuleGroup("exampleResolverFirewallRuleGroup", ResolverFirewallRuleGroupArgs.builder()
 *             .name("example")
 *             .tags()
 *             .build());
 * 
 *         var exampleResolverFirewallRule = new ResolverFirewallRule("exampleResolverFirewallRule", ResolverFirewallRuleArgs.builder()
 *             .name("example")
 *             .action("BLOCK")
 *             .blockOverrideDnsType("CNAME")
 *             .blockOverrideDomain("example.com")
 *             .blockOverrideTtl(1)
 *             .blockResponse("OVERRIDE")
 *             .firewallDomainListId(example.id())
 *             .firewallRuleGroupId(exampleResolverFirewallRuleGroup.id())
 *             .priority(100)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import Route 53 Resolver DNS Firewall rules using the Route 53 Resolver DNS Firewall rule group ID and domain list ID separated by ':'. For example: * * ```sh * $ pulumi import aws:route53/resolverFirewallRule:ResolverFirewallRule example rslvr-frg-0123456789abcdef:rslvr-fdl-0123456789abcdef * ``` * */ @ResourceType(type="aws:route53/resolverFirewallRule:ResolverFirewallRule") public class ResolverFirewallRule extends com.pulumi.resources.CustomResource { /** * The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. Valid values: `ALLOW`, `BLOCK`, `ALERT`. * */ @Export(name="action", refs={String.class}, tree="[0]") private Output action; /** * @return The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. Valid values: `ALLOW`, `BLOCK`, `ALERT`. * */ public Output action() { return this.action; } /** * The DNS record's type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: `CNAME`. * */ @Export(name="blockOverrideDnsType", refs={String.class}, tree="[0]") private Output blockOverrideDnsType; /** * @return The DNS record's type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: `CNAME`. * */ public Output> blockOverrideDnsType() { return Codegen.optional(this.blockOverrideDnsType); } /** * The custom DNS record to send back in response to the query. * */ @Export(name="blockOverrideDomain", refs={String.class}, tree="[0]") private Output blockOverrideDomain; /** * @return The custom DNS record to send back in response to the query. * */ public Output> blockOverrideDomain() { return Codegen.optional(this.blockOverrideDomain); } /** * The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800. * */ @Export(name="blockOverrideTtl", refs={Integer.class}, tree="[0]") private Output blockOverrideTtl; /** * @return The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800. * */ public Output> blockOverrideTtl() { return Codegen.optional(this.blockOverrideTtl); } /** * The way that you want DNS Firewall to block the request. Valid values: `NODATA`, `NXDOMAIN`, `OVERRIDE`. * */ @Export(name="blockResponse", refs={String.class}, tree="[0]") private Output blockResponse; /** * @return The way that you want DNS Firewall to block the request. Valid values: `NODATA`, `NXDOMAIN`, `OVERRIDE`. * */ public Output> blockResponse() { return Codegen.optional(this.blockResponse); } /** * The ID of the domain list that you want to use in the rule. * */ @Export(name="firewallDomainListId", refs={String.class}, tree="[0]") private Output firewallDomainListId; /** * @return The ID of the domain list that you want to use in the rule. * */ public Output firewallDomainListId() { return this.firewallDomainListId; } /** * Evaluate DNS redirection in the DNS redirection chain, such as CNAME, DNAME, ot ALIAS. Valid values are `INSPECT_REDIRECTION_DOMAIN` and `TRUST_REDIRECTION_DOMAIN`. Default value is `INSPECT_REDIRECTION_DOMAIN`. * */ @Export(name="firewallDomainRedirectionAction", refs={String.class}, tree="[0]") private Output firewallDomainRedirectionAction; /** * @return Evaluate DNS redirection in the DNS redirection chain, such as CNAME, DNAME, ot ALIAS. Valid values are `INSPECT_REDIRECTION_DOMAIN` and `TRUST_REDIRECTION_DOMAIN`. Default value is `INSPECT_REDIRECTION_DOMAIN`. * */ public Output> firewallDomainRedirectionAction() { return Codegen.optional(this.firewallDomainRedirectionAction); } /** * The unique identifier of the firewall rule group where you want to create the rule. * */ @Export(name="firewallRuleGroupId", refs={String.class}, tree="[0]") private Output firewallRuleGroupId; /** * @return The unique identifier of the firewall rule group where you want to create the rule. * */ public Output firewallRuleGroupId() { return this.firewallRuleGroupId; } /** * A name that lets you identify the rule, to manage and use it. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return A name that lets you identify the rule, to manage and use it. * */ public Output name() { return this.name; } /** * The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting. * */ @Export(name="priority", refs={Integer.class}, tree="[0]") private Output priority; /** * @return The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting. * */ public Output priority() { return this.priority; } /** * The query type you want the rule to evaluate. Additional details can be found [here](https://en.wikipedia.org/wiki/List_of_DNS_record_types) * */ @Export(name="qType", refs={String.class}, tree="[0]") private Output qType; /** * @return The query type you want the rule to evaluate. Additional details can be found [here](https://en.wikipedia.org/wiki/List_of_DNS_record_types) * */ public Output> qType() { return Codegen.optional(this.qType); } /** * * @param name The _unique_ name of the resulting resource. */ public ResolverFirewallRule(java.lang.String name) { this(name, ResolverFirewallRuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ResolverFirewallRule(java.lang.String name, ResolverFirewallRuleArgs 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 ResolverFirewallRule(java.lang.String name, ResolverFirewallRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:route53/resolverFirewallRule:ResolverFirewallRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ResolverFirewallRule(java.lang.String name, Output id, @Nullable ResolverFirewallRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:route53/resolverFirewallRule:ResolverFirewallRule", name, state, makeResourceOptions(options, id), false); } private static ResolverFirewallRuleArgs makeArgs(ResolverFirewallRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ResolverFirewallRuleArgs.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 ResolverFirewallRule get(java.lang.String name, Output id, @Nullable ResolverFirewallRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ResolverFirewallRule(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy