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:
- Domain
Name string The domain that you want to add to WAF.
- Instance
Id string The ID of the WAF instance.
- Is
Access stringProduct 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<string> List of the IP address or domain of the origin server to which the specified domain points.
- Cluster
Type string The type of the WAF cluster. Valid values: “PhysicalCluster” and “VirtualCluster”. Default to “PhysicalCluster”.
- Connection
Time int The connection timeout for WAF exclusive clusters. Unit: seconds.
- Http2Ports List<string>
List of the HTTP 2.0 ports.
- Http
Ports List<string> List of the HTTP ports
- Http
To stringUser Ip 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<string> List of the HTTPS ports
- Https
Redirect string Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
- Load
Balancing string The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
- Log
Headers List<Pulumi.Ali Cloud. Waf. Inputs. Domain Log Header Args> 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 int The read timeout of a WAF exclusive cluster. Unit: seconds.
- Resource
Group stringId 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 int The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- Domain string
The domain that you want to add to WAF.
- Instance
Id string The ID of the WAF instance.
- Is
Access stringProduct 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 []string List of the IP address or domain of the origin server to which the specified domain points.
- Cluster
Type string The type of the WAF cluster. Valid values: “PhysicalCluster” and “VirtualCluster”. Default to “PhysicalCluster”.
- Connection
Time int The connection timeout for WAF exclusive clusters. Unit: seconds.
- Http2Ports []string
List of the HTTP 2.0 ports.
- Http
Ports []string List of the HTTP ports
- Http
To stringUser Ip 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 []string List of the HTTPS ports
- Https
Redirect string Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
- Load
Balancing string The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
- Log
Headers []DomainLog Header 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 int The read timeout of a WAF exclusive cluster. Unit: seconds.
- Resource
Group stringId 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 int The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- domain string
The domain that you want to add to WAF.
- instance
Id string The ID of the WAF instance.
- is
Access stringProduct 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 string[] List of the IP address or domain of the origin server to which the specified domain points.
- cluster
Type string The type of the WAF cluster. Valid values: “PhysicalCluster” and “VirtualCluster”. Default to “PhysicalCluster”.
- connection
Time number The connection timeout for WAF exclusive clusters. Unit: seconds.
- http2Ports string[]
List of the HTTP 2.0 ports.
- http
Ports string[] List of the HTTP ports
- http
To stringUser Ip 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 string[] List of the HTTPS ports
- https
Redirect string Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
- load
Balancing string The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
- log
Headers DomainLog Header[] 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 number The read timeout of a WAF exclusive cluster. Unit: seconds.
- resource
Group stringId 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 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_ strproduct 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_ struser_ ip 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[DomainLog Header] 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_ strid 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:
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): Domainstatic 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:
- Cluster
Type 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.
- Connection
Time int The connection timeout for WAF exclusive clusters. Unit: seconds.
- Domain
Name string The domain that you want to add to WAF.
- Http2Ports List<string>
List of the HTTP 2.0 ports.
- Http
Ports List<string> List of the HTTP ports
- Http
To stringUser Ip 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<string> List of the HTTPS ports
- Https
Redirect string Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
- Instance
Id string The ID of the WAF instance.
- Is
Access stringProduct 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 string The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
- Log
Headers List<Pulumi.Ali Cloud. Waf. Inputs. Domain Log Header Args> 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 int The read timeout of a WAF exclusive cluster. Unit: seconds.
- Resource
Group stringId 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<string> List of the IP address or domain of the origin server to which the specified domain points.
- Status int
- Write
Time int The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- Cluster
Type 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.
- Connection
Time 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.
- Http
Ports []string List of the HTTP ports
- Http
To stringUser Ip 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 []string List of the HTTPS ports
- Https
Redirect string Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
- Instance
Id string The ID of the WAF instance.
- Is
Access stringProduct 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 string The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
- Log
Headers []DomainLog Header 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 int The read timeout of a WAF exclusive cluster. Unit: seconds.
- Resource
Group stringId 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 []string List of the IP address or domain of the origin server to which the specified domain points.
- Status int
- Write
Time int The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- cluster
Type 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.
- connection
Time 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.
- http
Ports string[] List of the HTTP ports
- http
To stringUser Ip 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 string[] List of the HTTPS ports
- https
Redirect string Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: “On” and “Off”. Default to “Off”.
- instance
Id string The ID of the WAF instance.
- is
Access stringProduct 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 string The load balancing algorithm that is used to forward requests to the origin. Valid values: “IpHash” and “RoundRobin”. Default to “IpHash”.
- log
Headers DomainLog Header[] 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 number The read timeout of a WAF exclusive cluster. Unit: seconds.
- resource
Group stringId 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 string[] List of the IP address or domain of the origin server to which the specified domain points.
- status number
- write
Time 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_ struser_ ip 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_ strproduct 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[DomainLog Header] 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_ strid 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
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.