Domain

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 in 1.82.0+ .

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var domain = new AliCloud.Waf.Domain("domain", new AliCloud.Waf.DomainArgs
        {
            ClusterType = "PhysicalCluster",
            Domain = "www.aliyun.com",
            Http2Ports = 443,
            HttpPorts = 80,
            HttpToUserIp = "Off",
            HttpsPorts = 443,
            HttpsRedirect = "Off",
            InstanceId = "waf-123455",
            IsAccessProduct = "On",
            LoadBalancing = "IpHash",
            LogHeaders = 
            {
                new AliCloud.Waf.Inputs.DomainLogHeaderArgs
                {
                    Key = "foo",
                    Value = "http",
                },
            },
            SourceIps = 
            {
                "1.1.1.1",
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

domain = alicloud.waf.Domain("domain",
    cluster_type="PhysicalCluster",
    domain="www.aliyun.com",
    http2_ports=443,
    http_ports=80,
    http_to_user_ip="Off",
    https_ports=443,
    https_redirect="Off",
    instance_id="waf-123455",
    is_access_product="On",
    load_balancing="IpHash",
    log_headers=[{
        "key": "foo",
        "value": "http",
    }],
    source_ips=["1.1.1.1"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const domain = new alicloud.waf.Domain("domain", {
    clusterType: "PhysicalCluster",
    domain: "www.aliyun.com",
    http2Ports: "443",
    httpPorts: "80",
    httpToUserIp: "Off",
    httpsPorts: "443",
    httpsRedirect: "Off",
    instanceId: "waf-123455",
    isAccessProduct: "On",
    loadBalancing: "IpHash",
    logHeaders: [{
        key: "foo",
        value: "http",
    }],
    sourceIps: ["1.1.1.1"],
});

Create a Domain Resource

new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
def Domain(resource_name, opts=None, cluster_type=None, connection_time=None, domain=None, http2_ports=None, http_ports=None, http_to_user_ip=None, https_ports=None, https_redirect=None, instance_id=None, is_access_product=None, load_balancing=None, log_headers=None, read_time=None, resource_group_id=None, source_ips=None, write_time=None, __props__=None);
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Domain Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Domain resource accepts the following input properties:

DomainName string

The domain that you want to add to WAF.

InstanceId string

The ID of the WAF instance.

IsAccessProduct string

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”.

SourceIps List<string>

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

ClusterType string

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

ConnectionTime int

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

Http2Ports List<string>

List of the HTTP 2.0 ports.

HttpPorts List<string>

List of the HTTP ports

HttpToUserIp string

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”.

HttpsPorts List<string>

List of the HTTPS ports

HttpsRedirect string

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

LoadBalancing string

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

LogHeaders List<Pulumi.AliCloud.Waf.Inputs.DomainLogHeaderArgs>

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

ReadTime int

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

ResourceGroupId string

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.

WriteTime int

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

Domain string

The domain that you want to add to WAF.

InstanceId string

The ID of the WAF instance.

IsAccessProduct string

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”.

SourceIps []string

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

ClusterType string

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

ConnectionTime int

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

Http2Ports []string

List of the HTTP 2.0 ports.

HttpPorts []string

List of the HTTP ports

HttpToUserIp string

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”.

HttpsPorts []string

List of the HTTPS ports

HttpsRedirect string

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

LoadBalancing string

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

LogHeaders []DomainLogHeader

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

ReadTime int

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

ResourceGroupId string

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.

WriteTime int

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

domain string

The domain that you want to add to WAF.

instanceId string

The ID of the WAF instance.

isAccessProduct string

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”.

sourceIps string[]

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

clusterType string

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

connectionTime number

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

http2Ports string[]

List of the HTTP 2.0 ports.

httpPorts string[]

List of the HTTP ports

httpToUserIp string

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”.

httpsPorts string[]

List of the HTTPS ports

httpsRedirect string

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

loadBalancing string

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

logHeaders DomainLogHeader[]

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

readTime number

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

resourceGroupId string

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.

writeTime number

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

domain str

The domain that you want to add to WAF.

instance_id str

The ID of the WAF instance.

is_access_product str

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”.

source_ips List[str]

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

cluster_type str

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

connection_time float

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

http2_ports List[str]

List of the HTTP 2.0 ports.

http_ports List[str]

List of the HTTP ports

http_to_user_ip str

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”.

https_ports List[str]

List of the HTTPS ports

https_redirect str

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

load_balancing str

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

log_headers List[DomainLogHeader]

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

read_time float

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

resource_group_id str

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.

write_time float

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

Outputs

All input properties are implicitly available as output properties. Additionally, the Domain resource produces the following output properties:

Cname string

The CNAME record assigned by the WAF instance to the specified domain.

Id string
The provider-assigned unique ID for this managed resource.
Status int
Cname string

The CNAME record assigned by the WAF instance to the specified domain.

Id string
The provider-assigned unique ID for this managed resource.
Status int
cname string

The CNAME record assigned by the WAF instance to the specified domain.

id string
The provider-assigned unique ID for this managed resource.
status number
cname str

The CNAME record assigned by the WAF instance to the specified domain.

id str
The provider-assigned unique ID for this managed resource.
status float

Look up an Existing Domain Resource

Get an existing Domain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DomainState, opts?: CustomResourceOptions): Domain
static get(resource_name, id, opts=None, cluster_type=None, cname=None, connection_time=None, domain=None, http2_ports=None, http_ports=None, http_to_user_ip=None, https_ports=None, https_redirect=None, instance_id=None, is_access_product=None, load_balancing=None, log_headers=None, read_time=None, resource_group_id=None, source_ips=None, status=None, write_time=None, __props__=None);
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClusterType string

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

Cname string

The CNAME record assigned by the WAF instance to the specified domain.

ConnectionTime int

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

DomainName string

The domain that you want to add to WAF.

Http2Ports List<string>

List of the HTTP 2.0 ports.

HttpPorts List<string>

List of the HTTP ports

HttpToUserIp string

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”.

HttpsPorts List<string>

List of the HTTPS ports

HttpsRedirect string

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

InstanceId string

The ID of the WAF instance.

IsAccessProduct string

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”.

LoadBalancing string

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

LogHeaders List<Pulumi.AliCloud.Waf.Inputs.DomainLogHeaderArgs>

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

ReadTime int

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

ResourceGroupId string

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.

SourceIps List<string>

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

Status int
WriteTime int

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

ClusterType string

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

Cname string

The CNAME record assigned by the WAF instance to the specified domain.

ConnectionTime int

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

Domain string

The domain that you want to add to WAF.

Http2Ports []string

List of the HTTP 2.0 ports.

HttpPorts []string

List of the HTTP ports

HttpToUserIp string

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”.

HttpsPorts []string

List of the HTTPS ports

HttpsRedirect string

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

InstanceId string

The ID of the WAF instance.

IsAccessProduct string

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”.

LoadBalancing string

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

LogHeaders []DomainLogHeader

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

ReadTime int

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

ResourceGroupId string

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.

SourceIps []string

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

Status int
WriteTime int

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

clusterType string

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

cname string

The CNAME record assigned by the WAF instance to the specified domain.

connectionTime number

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

domain string

The domain that you want to add to WAF.

http2Ports string[]

List of the HTTP 2.0 ports.

httpPorts string[]

List of the HTTP ports

httpToUserIp string

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”.

httpsPorts string[]

List of the HTTPS ports

httpsRedirect string

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

instanceId string

The ID of the WAF instance.

isAccessProduct string

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”.

loadBalancing string

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

logHeaders DomainLogHeader[]

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

readTime number

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

resourceGroupId string

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.

sourceIps string[]

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

status number
writeTime number

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

cluster_type str

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

cname str

The CNAME record assigned by the WAF instance to the specified domain.

connection_time float

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

domain str

The domain that you want to add to WAF.

http2_ports List[str]

List of the HTTP 2.0 ports.

http_ports List[str]

List of the HTTP ports

http_to_user_ip str

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”.

https_ports List[str]

List of the HTTPS ports

https_redirect str

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

instance_id str

The ID of the WAF instance.

is_access_product str

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”.

load_balancing str

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

log_headers List[DomainLogHeader]

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

read_time float

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

resource_group_id str

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.

source_ips List[str]

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

status float
write_time float

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

Supporting Types

DomainLogHeader

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string
Value string
Key string
Value string
key string
value string
key str
value str

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.