DomainArgs

data class DomainArgs(val clusterType: Output<String>? = null, val connectionTime: Output<Int>? = null, val domain: Output<String>? = null, val domainName: Output<String>? = null, val http2Ports: Output<List<String>>? = null, val httpPorts: Output<List<String>>? = null, val httpToUserIp: Output<String>? = null, val httpsPorts: Output<List<String>>? = null, val httpsRedirect: Output<String>? = null, val instanceId: Output<String>? = null, val isAccessProduct: Output<String>? = null, val loadBalancing: Output<String>? = null, val logHeaders: Output<List<DomainLogHeaderArgs>>? = null, val readTime: Output<Int>? = null, val resourceGroupId: Output<String>? = null, val sourceIps: Output<List<String>>? = null, val writeTime: Output<Int>? = null) : ConvertibleToJava<DomainArgs>

DEPRECATED: This resource has been deprecated and using alicloud.wafv3.Domain instead. Provides a WAF Domain resource to create domain in the Web Application Firewall. For information about WAF and how to use it, see What is Alibaba Cloud WAF. NOTE: Available since v1.82.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const domain = new alicloud.waf.Domain("domain", {
domainName: "alicloud-provider.cn",
instanceId: "waf-123455",
isAccessProduct: "On",
sourceIps: ["1&#46;1&#46;1&#46;1"],
clusterType: "PhysicalCluster",
http2Ports: ["443"],
httpPorts: ["80"],
httpsPorts: ["443"],
httpToUserIp: "Off",
httpsRedirect: "Off",
loadBalancing: "IpHash",
logHeaders: [{
key: "foo",
value: "http",
}],
});
import pulumi
import pulumi_alicloud as alicloud
domain = alicloud.waf.Domain("domain",
domain_name="alicloud-provider.cn",
instance_id="waf-123455",
is_access_product="On",
source_ips=["1&#46;1&#46;1&#46;1"],
cluster_type="PhysicalCluster",
http2_ports=["443"],
http_ports=["80"],
https_ports=["443"],
http_to_user_ip="Off",
https_redirect="Off",
load_balancing="IpHash",
log_headers=[{
"key": "foo",
"value": "http",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var domain = new AliCloud.Waf.Domain("domain", new()
{
DomainName = "alicloud-provider.cn",
InstanceId = "waf-123455",
IsAccessProduct = "On",
SourceIps = new[]
{
"1.1.1.1",
},
ClusterType = "PhysicalCluster",
Http2Ports = new[]
{
"443",
},
HttpPorts = new[]
{
"80",
},
HttpsPorts = new[]
{
"443",
},
HttpToUserIp = "Off",
HttpsRedirect = "Off",
LoadBalancing = "IpHash",
LogHeaders = new[]
{
new AliCloud.Waf.Inputs.DomainLogHeaderArgs
{
Key = "foo",
Value = "http",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/waf"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := waf.NewDomain(ctx, "domain", &waf.DomainArgs{
DomainName: pulumi.String("alicloud-provider.cn"),
InstanceId: pulumi.String("waf-123455"),
IsAccessProduct: pulumi.String("On"),
SourceIps: pulumi.StringArray{
pulumi.String("1.1.1.1"),
},
ClusterType: pulumi.String("PhysicalCluster"),
Http2Ports: pulumi.StringArray{
pulumi.String("443"),
},
HttpPorts: pulumi.StringArray{
pulumi.String("80"),
},
HttpsPorts: pulumi.StringArray{
pulumi.String("443"),
},
HttpToUserIp: pulumi.String("Off"),
HttpsRedirect: pulumi.String("Off"),
LoadBalancing: pulumi.String("IpHash"),
LogHeaders: waf.DomainLogHeaderArray{
&waf.DomainLogHeaderArgs{
Key: pulumi.String("foo"),
Value: pulumi.String("http"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.waf.Domain;
import com.pulumi.alicloud.waf.DomainArgs;
import com.pulumi.alicloud.waf.inputs.DomainLogHeaderArgs;
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 domain = new Domain("domain", DomainArgs.builder()
.domainName("alicloud-provider.cn")
.instanceId("waf-123455")
.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());
}
}
resources:
domain:
type: alicloud:waf:Domain
properties:
domainName: alicloud-provider.cn
instanceId: waf-123455
isAccessProduct: On
sourceIps:
- 1.1.1.1
clusterType: PhysicalCluster
http2Ports:
- 443
httpPorts:
- 80
httpsPorts:
- 443
httpToUserIp: Off
httpsRedirect: Off
loadBalancing: IpHash
logHeaders:
- key: foo
value: http

Import

WAF domain can be imported using the id, e.g.

$ pulumi import alicloud:waf/domain:Domain domain waf-132435:www.domain.com

Constructors

Link copied to clipboard
constructor(clusterType: Output<String>? = null, connectionTime: Output<Int>? = null, domain: Output<String>? = null, domainName: Output<String>? = null, http2Ports: Output<List<String>>? = null, httpPorts: Output<List<String>>? = null, httpToUserIp: Output<String>? = null, httpsPorts: Output<List<String>>? = null, httpsRedirect: Output<String>? = null, instanceId: Output<String>? = null, isAccessProduct: Output<String>? = null, loadBalancing: Output<String>? = null, logHeaders: Output<List<DomainLogHeaderArgs>>? = null, readTime: Output<Int>? = null, resourceGroupId: Output<String>? = null, sourceIps: Output<List<String>>? = null, writeTime: Output<Int>? = null)

Properties

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

The type of the WAF cluster. Valid values: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.

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

The connection timeout for WAF exclusive clusters. Unit: seconds.

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

Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.

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

List of the HTTP 2.0 ports.

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

List of the HTTP ports.

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

List of the HTTPS ports.

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

Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: "On" and Off. Default to Off.

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

Specifies whether to enable the HTTP back-to-origin feature. After this feature is enabled, the WAF instance can use HTTP to forward HTTPS requests to the origin server. By default, port 80 is used to forward the requests to the origin server. Valid values: On and Off. Default to Off.

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

The ID of the WAF instance.

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

Specifies whether to configure a Layer-7 proxy, such as Anti-DDoS Pro or CDN, to filter the inbound traffic before it is forwarded to WAF. Valid values: On and Off. Default to Off.

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

The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHash and RoundRobin. Default to IpHash.

Link copied to clipboard
val logHeaders: Output<List<DomainLogHeaderArgs>>? = null

The key-value pair that is used to mark the traffic that flows through WAF to the domain. Each item contains two field:

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

The read timeout of a WAF exclusive cluster. Unit: seconds.

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

The ID of the resource group to which the queried domain belongs in Resource Management. By default, no value is specified, indicating that the domain belongs to the default resource group.

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

List of the IP address or domain of the origin server to which the specified domain points.

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

The timeout period for a WAF exclusive cluster write connection. Unit: seconds.

Functions

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