alicloud.waf.Domain
Explore with Pulumi AI
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 in 1.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.1.1.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.1.1.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",
}])
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
})
}
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 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
Create Domain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
@overload
def Domain(resource_name: str,
args: DomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Domain(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
is_access_product: Optional[str] = None,
https_redirect: Optional[str] = None,
domain: Optional[str] = None,
http2_ports: Optional[Sequence[str]] = None,
http_ports: Optional[Sequence[str]] = None,
http_to_user_ip: Optional[str] = None,
https_ports: Optional[Sequence[str]] = None,
cluster_type: Optional[str] = None,
domain_name: Optional[str] = None,
connection_time: Optional[int] = None,
load_balancing: Optional[str] = None,
log_headers: Optional[Sequence[DomainLogHeaderArgs]] = None,
read_time: Optional[int] = None,
resource_group_id: Optional[str] = None,
source_ips: Optional[Sequence[str]] = None,
write_time: Optional[int] = None)
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: alicloud:waf:Domain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args DomainArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args DomainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampledomainResourceResourceFromWafdomain = new AliCloud.Waf.Domain("exampledomainResourceResourceFromWafdomain", new()
{
InstanceId = "string",
IsAccessProduct = "string",
HttpsRedirect = "string",
Http2Ports = new[]
{
"string",
},
HttpPorts = new[]
{
"string",
},
HttpToUserIp = "string",
HttpsPorts = new[]
{
"string",
},
ClusterType = "string",
DomainName = "string",
ConnectionTime = 0,
LoadBalancing = "string",
LogHeaders = new[]
{
new AliCloud.Waf.Inputs.DomainLogHeaderArgs
{
Key = "string",
Value = "string",
},
},
ReadTime = 0,
ResourceGroupId = "string",
SourceIps = new[]
{
"string",
},
WriteTime = 0,
});
example, err := waf.NewDomain(ctx, "exampledomainResourceResourceFromWafdomain", &waf.DomainArgs{
InstanceId: pulumi.String("string"),
IsAccessProduct: pulumi.String("string"),
HttpsRedirect: pulumi.String("string"),
Http2Ports: pulumi.StringArray{
pulumi.String("string"),
},
HttpPorts: pulumi.StringArray{
pulumi.String("string"),
},
HttpToUserIp: pulumi.String("string"),
HttpsPorts: pulumi.StringArray{
pulumi.String("string"),
},
ClusterType: pulumi.String("string"),
DomainName: pulumi.String("string"),
ConnectionTime: pulumi.Int(0),
LoadBalancing: pulumi.String("string"),
LogHeaders: waf.DomainLogHeaderArray{
&waf.DomainLogHeaderArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
ReadTime: pulumi.Int(0),
ResourceGroupId: pulumi.String("string"),
SourceIps: pulumi.StringArray{
pulumi.String("string"),
},
WriteTime: pulumi.Int(0),
})
var exampledomainResourceResourceFromWafdomain = new Domain("exampledomainResourceResourceFromWafdomain", DomainArgs.builder()
.instanceId("string")
.isAccessProduct("string")
.httpsRedirect("string")
.http2Ports("string")
.httpPorts("string")
.httpToUserIp("string")
.httpsPorts("string")
.clusterType("string")
.domainName("string")
.connectionTime(0)
.loadBalancing("string")
.logHeaders(DomainLogHeaderArgs.builder()
.key("string")
.value("string")
.build())
.readTime(0)
.resourceGroupId("string")
.sourceIps("string")
.writeTime(0)
.build());
exampledomain_resource_resource_from_wafdomain = alicloud.waf.Domain("exampledomainResourceResourceFromWafdomain",
instance_id="string",
is_access_product="string",
https_redirect="string",
http2_ports=["string"],
http_ports=["string"],
http_to_user_ip="string",
https_ports=["string"],
cluster_type="string",
domain_name="string",
connection_time=0,
load_balancing="string",
log_headers=[{
"key": "string",
"value": "string",
}],
read_time=0,
resource_group_id="string",
source_ips=["string"],
write_time=0)
const exampledomainResourceResourceFromWafdomain = new alicloud.waf.Domain("exampledomainResourceResourceFromWafdomain", {
instanceId: "string",
isAccessProduct: "string",
httpsRedirect: "string",
http2Ports: ["string"],
httpPorts: ["string"],
httpToUserIp: "string",
httpsPorts: ["string"],
clusterType: "string",
domainName: "string",
connectionTime: 0,
loadBalancing: "string",
logHeaders: [{
key: "string",
value: "string",
}],
readTime: 0,
resourceGroupId: "string",
sourceIps: ["string"],
writeTime: 0,
});
type: alicloud:waf:Domain
properties:
clusterType: string
connectionTime: 0
domainName: string
http2Ports:
- string
httpPorts:
- string
httpToUserIp: string
httpsPorts:
- string
httpsRedirect: string
instanceId: string
isAccessProduct: string
loadBalancing: string
logHeaders:
- key: string
value: string
readTime: 0
resourceGroupId: string
sourceIps:
- string
writeTime: 0
Domain Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Domain resource accepts the following input properties:
- 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
andOff
. Default toOff
. - Cluster
Type string - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - Connection
Time int - The connection timeout for WAF exclusive clusters. Unit: seconds.
- Domain
Deprecated string - Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - Domain
Name string - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - Load
Balancing string - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - Log
Headers List<Pulumi.Ali Cloud. Waf. Inputs. Domain Log 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 List<string> - List of the IP address or domain of the origin server to which the specified domain points.
- Write
Time int - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- 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
andOff
. Default toOff
. - Cluster
Type string - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - Connection
Time int - The connection timeout for WAF exclusive clusters. Unit: seconds.
- Domain string
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - Domain
Name string - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - Load
Balancing string - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - Log
Headers []DomainLog 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 []string - List of the IP address or domain of the origin server to which the specified domain points.
- Write
Time int - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- 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
andOff
. Default toOff
. - cluster
Type String - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - connection
Time Integer - The connection timeout for WAF exclusive clusters. Unit: seconds.
- domain String
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain
Name String - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - load
Balancing String - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - 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 Integer - 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.
- write
Time Integer - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- 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
andOff
. Default toOff
. - cluster
Type string - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - connection
Time number - The connection timeout for WAF exclusive clusters. Unit: seconds.
- domain string
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain
Name string - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - load
Balancing string - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - 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.
- write
Time number - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- 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
andOff
. Default toOff
. - cluster_
type str - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - connection_
time int - The connection timeout for WAF exclusive clusters. Unit: seconds.
- domain str
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain_
name str - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - http2_
ports Sequence[str] - List of the HTTP 2.0 ports.
- http_
ports Sequence[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
andOff
. Default toOff
. - https_
ports Sequence[str] - List of the HTTPS ports.
- https_
redirect str - Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: "On" and
Off
. Default toOff
. - load_
balancing str - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - log_
headers Sequence[DomainLog 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_ 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 Sequence[str] - List of the IP address or domain of the origin server to which the specified domain points.
- write_
time int - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- 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
andOff
. Default toOff
. - cluster
Type String - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - connection
Time Number - The connection timeout for WAF exclusive clusters. Unit: seconds.
- domain String
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain
Name String - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - load
Balancing String - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - log
Headers List<Property Map> - 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 List<String> - List of the IP address or domain of the origin server to which the specified domain points.
- write
Time Number - 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 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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_type: Optional[str] = None,
cname: Optional[str] = None,
connection_time: Optional[int] = None,
domain: Optional[str] = None,
domain_name: Optional[str] = None,
http2_ports: Optional[Sequence[str]] = None,
http_ports: Optional[Sequence[str]] = None,
http_to_user_ip: Optional[str] = None,
https_ports: Optional[Sequence[str]] = None,
https_redirect: Optional[str] = None,
instance_id: Optional[str] = None,
is_access_product: Optional[str] = None,
load_balancing: Optional[str] = None,
log_headers: Optional[Sequence[DomainLogHeaderArgs]] = None,
read_time: Optional[int] = None,
resource_group_id: Optional[str] = None,
source_ips: Optional[Sequence[str]] = None,
write_time: Optional[int] = None) -> Domain
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)
public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Cluster
Type string - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - 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
Deprecated string - Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - Domain
Name string - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - 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
andOff
. Default toOff
. - Load
Balancing string - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - Log
Headers List<Pulumi.Ali Cloud. Waf. Inputs. Domain Log 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 List<string> - List of the IP address or domain of the origin server to which the specified domain points.
- 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
andVirtualCluster
. Default toPhysicalCluster
. - 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
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - Domain
Name string - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - 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
andOff
. Default toOff
. - Load
Balancing string - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - Log
Headers []DomainLog 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 []string - List of the IP address or domain of the origin server to which the specified domain points.
- 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
andVirtualCluster
. Default toPhysicalCluster
. - cname String
- The CNAME record assigned by the WAF instance to the specified domain.
- connection
Time Integer - The connection timeout for WAF exclusive clusters. Unit: seconds.
- domain String
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain
Name String - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - 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
andOff
. Default toOff
. - load
Balancing String - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - 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 Integer - 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.
- write
Time Integer - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- cluster
Type string - The type of the WAF cluster. Valid values:
PhysicalCluster
andVirtualCluster
. Default toPhysicalCluster
. - 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
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain
Name string - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - 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
andOff
. Default toOff
. - load
Balancing string - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - 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.
- 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
andVirtualCluster
. Default toPhysicalCluster
. - cname str
- 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 str
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain_
name str - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - http2_
ports Sequence[str] - List of the HTTP 2.0 ports.
- http_
ports Sequence[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
andOff
. Default toOff
. - https_
ports Sequence[str] - List of the HTTPS ports.
- https_
redirect str - Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: "On" and
Off
. Default toOff
. - 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
andOff
. Default toOff
. - load_
balancing str - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - log_
headers Sequence[DomainLog 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_ 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 Sequence[str] - List of the IP address or domain of the origin server to which the specified domain points.
- 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
andVirtualCluster
. Default toPhysicalCluster
. - 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
- Field
domain
has been deprecated from version 1.94.0. Usedomain_name
instead. - domain
Name String - The domain that you want to add to WAF. The
domain_name
is required when the value of thedomain
is Empty. - 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
andOff
. Default toOff
. - 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 toOff
. - 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
andOff
. Default toOff
. - load
Balancing String - The load balancing algorithm that is used to forward requests to the origin. Valid values:
IpHash
andRoundRobin
. Default toIpHash
. - log
Headers List<Property Map> - 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 List<String> - List of the IP address or domain of the origin server to which the specified domain points.
- write
Time Number - The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
Supporting Types
DomainLogHeader, DomainLogHeaderArgs
Import
WAF domain can be imported using the id, e.g.
$ pulumi import alicloud:waf/domain:Domain domain waf-132435:www.domain.com
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.