1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. waf
  5. Domain
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.waf.Domain

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    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", {
        clusterType: "PhysicalCluster",
        domainName: "alicloud-provider.cn",
        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"],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    domain = alicloud.waf.Domain("domain",
        cluster_type="PhysicalCluster",
        domain_name="alicloud-provider.cn",
        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=[alicloud.waf.DomainLogHeaderArgs(
            key="foo",
            value="http",
        )],
        source_ips=["1.1.1.1"])
    
    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{
    			ClusterType: pulumi.String("PhysicalCluster"),
    			DomainName:  pulumi.String("alicloud-provider.cn"),
    			Http2Ports: pulumi.StringArray{
    				pulumi.String("443"),
    			},
    			HttpPorts: pulumi.StringArray{
    				pulumi.String("80"),
    			},
    			HttpToUserIp: pulumi.String("Off"),
    			HttpsPorts: pulumi.StringArray{
    				pulumi.String("443"),
    			},
    			HttpsRedirect:   pulumi.String("Off"),
    			InstanceId:      pulumi.String("waf-123455"),
    			IsAccessProduct: pulumi.String("On"),
    			LoadBalancing:   pulumi.String("IpHash"),
    			LogHeaders: waf.DomainLogHeaderArray{
    				&waf.DomainLogHeaderArgs{
    					Key:   pulumi.String("foo"),
    					Value: pulumi.String("http"),
    				},
    			},
    			SourceIps: pulumi.StringArray{
    				pulumi.String("1.1.1.1"),
    			},
    		})
    		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()
        {
            ClusterType = "PhysicalCluster",
            DomainName = "alicloud-provider.cn",
            Http2Ports = new[]
            {
                "443",
            },
            HttpPorts = new[]
            {
                "80",
            },
            HttpToUserIp = "Off",
            HttpsPorts = new[]
            {
                "443",
            },
            HttpsRedirect = "Off",
            InstanceId = "waf-123455",
            IsAccessProduct = "On",
            LoadBalancing = "IpHash",
            LogHeaders = new[]
            {
                new AliCloud.Waf.Inputs.DomainLogHeaderArgs
                {
                    Key = "foo",
                    Value = "http",
                },
            },
            SourceIps = new[]
            {
                "1.1.1.1",
            },
        });
    
    });
    
    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()        
                .clusterType("PhysicalCluster")
                .domainName("alicloud-provider.cn")
                .http2Ports(443)
                .httpPorts(80)
                .httpToUserIp("Off")
                .httpsPorts(443)
                .httpsRedirect("Off")
                .instanceId("waf-123455")
                .isAccessProduct("On")
                .loadBalancing("IpHash")
                .logHeaders(DomainLogHeaderArgs.builder()
                    .key("foo")
                    .value("http")
                    .build())
                .sourceIps("1.1.1.1")
                .build());
    
        }
    }
    
    resources:
      domain:
        type: alicloud:waf:Domain
        properties:
          clusterType: PhysicalCluster
          domainName: alicloud-provider.cn
          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 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.

    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=[alicloud.waf.DomainLogHeaderArgs(
            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

    The Domain resource accepts the following input properties:

    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.
    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.
    DomainDeprecated string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    DomainName string
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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.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 List<string>
    List of the IP address or domain of the origin server to which the specified domain points.
    WriteTime int
    The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
    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.
    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.
    Domain string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    DomainName string
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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 []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 []string
    List of the IP address or domain of the origin server to which the specified domain points.
    WriteTime int
    The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
    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.
    clusterType String
    The type of the WAF cluster. Valid values: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    connectionTime Integer
    The connection timeout for WAF exclusive clusters. Unit: seconds.
    domain String
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domainName String
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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<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 Integer
    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.
    writeTime Integer
    The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
    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.
    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.
    domain string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domainName string
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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.
    sourceIps string[]
    List of the IP address or domain of the origin server to which the specified domain points.
    writeTime number
    The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
    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.
    cluster_type str
    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.
    domain str
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domain_name str
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    http2_ports Sequence[str]
    List of the HTTP 2.0 ports.
    http_ports Sequence[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 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 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 Sequence[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
    read_time int
    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 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.
    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.
    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.
    domain String
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domainName String
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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<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
    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 List<String>
    List of the IP address or domain of the origin server to which the specified domain points.
    writeTime 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:

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

    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.
    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.
    DomainDeprecated string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    DomainName string
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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.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 List<string>
    List of the IP address or domain of the origin server to which the specified domain points.
    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
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    DomainName string
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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 []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 []string
    List of the IP address or domain of the origin server to which the specified domain points.
    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 Integer
    The connection timeout for WAF exclusive clusters. Unit: seconds.
    domain String
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domainName String
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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<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 Integer
    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.
    writeTime Integer
    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
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domainName string
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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.
    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 int
    The connection timeout for WAF exclusive clusters. Unit: seconds.
    domain str
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domain_name str
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    http2_ports Sequence[str]
    List of the HTTP 2.0 ports.
    http_ports Sequence[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 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 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 Sequence[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
    read_time int
    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 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.
    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
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.

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

    domainName String
    The domain that you want to add to WAF. The domain_name is required when the value of the domain is Empty.
    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<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
    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 List<String>
    List of the IP address or domain of the origin server to which the specified domain points.
    writeTime Number
    The timeout period for a WAF exclusive cluster write connection. Unit: seconds.

    Supporting Types

    DomainLogHeader, DomainLogHeaderArgs

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

    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.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi