ProtectionModuleArgs

data class ProtectionModuleArgs(val defenseType: Output<String>? = null, val domain: Output<String>? = null, val instanceId: Output<String>? = null, val mode: Output<Int>? = null, val status: Output<Int>? = null) : ConvertibleToJava<ProtectionModuleArgs>

Provides a Web Application Firewall(WAF) Protection Module resource. For information about Web Application Firewall(WAF) Protection Module and how to use it, see What is Protection Module.

NOTE: Available in v1.141.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.waf.WafFunctions;
import com.pulumi.alicloud.waf.inputs.GetInstancesArgs;
import com.pulumi.alicloud.waf.Domain;
import com.pulumi.alicloud.waf.DomainArgs;
import com.pulumi.alicloud.waf.inputs.DomainLogHeaderArgs;
import com.pulumi.alicloud.waf.ProtectionModule;
import com.pulumi.alicloud.waf.ProtectionModuleArgs;
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) {
final var defaultInstances = WafFunctions.getInstances();
var defaultDomain = new Domain("defaultDomain", DomainArgs.builder()
.domainName("you domain")
.instanceId(defaultInstances.applyValue(getInstancesResult -> getInstancesResult.ids()[0]))
.isAccessProduct("On")
.sourceIps("1.1.1.1")
.clusterType("PhysicalCluster")
.http2Ports(443)
.httpPorts(80)
.httpsPorts(443)
.httpToUserIp("Off")
.httpsRedirect("Off")
.loadBalancing("IpHash")
.logHeaders(DomainLogHeaderArgs.builder()
.key("foo")
.value("http")
.build())
.build());
var defaultProtectionModule = new ProtectionModule("defaultProtectionModule", ProtectionModuleArgs.builder()
.instanceId(defaultInstances.applyValue(getInstancesResult -> getInstancesResult.ids()[0]))
.domain(defaultDomain.domainName())
.defenseType("ac_cc")
.mode(0)
.status(0)
.build());
}
}

Import

Web Application Firewall(WAF) Protection Module can be imported using the id, e.g.

$ pulumi import alicloud:waf/protectionModule:ProtectionModule example <instance_id>:<domain>:<defense_type>

Constructors

Link copied to clipboard
fun ProtectionModuleArgs(defenseType: Output<String>? = null, domain: Output<String>? = null, instanceId: Output<String>? = null, mode: Output<Int>? = null, status: Output<Int>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ProtectionModuleArgs

Properties

Link copied to clipboard
val defenseType: Output<String>? = null

The Protection Module. Valid values: ac_cc, antifraud, dld, normalized, waf.

Link copied to clipboard
val domain: Output<String>? = null

The domain name that is added to WAF.

Link copied to clipboard
val instanceId: Output<String>? = null

The ID of the WAF instance.

Link copied to clipboard
val mode: Output<Int>? = null

The protection mode of the specified protection module. NOTE: The value of the Mode parameter varies based on the value of the defense_type parameter.

Link copied to clipboard
val status: Output<Int>? = null

The status of the resource. Valid values: 0, 1.