Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.waf.getDomains
Explore with Pulumi AI
Provides a WAF datasource to retrieve domains.
For information about WAF and how to use it, see What is Alibaba Cloud WAF.
NOTE: Available since v1.86.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.waf.getInstances({});
const defaultGetDomains = _default.then(_default => alicloud.waf.getDomains({
    instanceId: _default.ids?.[0],
}));
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.waf.get_instances()
default_get_domains = alicloud.waf.get_domains(instance_id=default.ids[0])
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 {
		_default, err := waf.GetInstances(ctx, &waf.GetInstancesArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = waf.GetDomains(ctx, &waf.GetDomainsArgs{
			InstanceId: _default.Ids[0],
		}, nil)
		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 @default = AliCloud.Waf.GetInstances.Invoke();
    var defaultGetDomains = AliCloud.Waf.GetDomains.Invoke(new()
    {
        InstanceId = @default.Apply(getInstancesResult => getInstancesResult.Ids[0]),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.waf.WafFunctions;
import com.pulumi.alicloud.waf.inputs.GetInstancesArgs;
import com.pulumi.alicloud.waf.inputs.GetDomainsArgs;
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) {
        final var default = WafFunctions.getInstances();
        final var defaultGetDomains = WafFunctions.getDomains(GetDomainsArgs.builder()
            .instanceId(default_.ids()[0])
            .build());
    }
}
variables:
  default:
    fn::invoke:
      function: alicloud:waf:getInstances
      arguments: {}
  defaultGetDomains:
    fn::invoke:
      function: alicloud:waf:getDomains
      arguments:
        instanceId: ${default.ids[0]}
Using getDomains
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDomains(args: GetDomainsArgs, opts?: InvokeOptions): Promise<GetDomainsResult>
function getDomainsOutput(args: GetDomainsOutputArgs, opts?: InvokeOptions): Output<GetDomainsResult>def get_domains(enable_details: Optional[bool] = None,
                ids: Optional[Sequence[str]] = None,
                instance_id: Optional[str] = None,
                name_regex: Optional[str] = None,
                output_file: Optional[str] = None,
                resource_group_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetDomainsResult
def get_domains_output(enable_details: Optional[pulumi.Input[bool]] = None,
                ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                instance_id: Optional[pulumi.Input[str]] = None,
                name_regex: Optional[pulumi.Input[str]] = None,
                output_file: Optional[pulumi.Input[str]] = None,
                resource_group_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetDomainsResult]func GetDomains(ctx *Context, args *GetDomainsArgs, opts ...InvokeOption) (*GetDomainsResult, error)
func GetDomainsOutput(ctx *Context, args *GetDomainsOutputArgs, opts ...InvokeOption) GetDomainsResultOutput> Note: This function is named GetDomains in the Go SDK.
public static class GetDomains 
{
    public static Task<GetDomainsResult> InvokeAsync(GetDomainsArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainsResult> Invoke(GetDomainsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
public static Output<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:waf/getDomains:getDomains
  arguments:
    # arguments dictionaryThe following arguments are supported:
- InstanceId string
- The Id of waf instance to which waf domain belongs.
- EnableDetails bool
- Default to false and only output id,domain_name. Set it to true can output more details.
- Ids List<string>
- A list of WAF domain names. Each item is domain name.
- NameRegex string
- A regex string to filter results by domain name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- InstanceId string
- The Id of waf instance to which waf domain belongs.
- EnableDetails bool
- Default to false and only output id,domain_name. Set it to true can output more details.
- Ids []string
- A list of WAF domain names. Each item is domain name.
- NameRegex string
- A regex string to filter results by domain name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- instanceId String
- The Id of waf instance to which waf domain belongs.
- enableDetails Boolean
- Default to false and only output id,domain_name. Set it to true can output more details.
- ids List<String>
- A list of WAF domain names. Each item is domain name.
- nameRegex String
- A regex string to filter results by domain name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- instanceId string
- The Id of waf instance to which waf domain belongs.
- enableDetails boolean
- Default to false and only output id,domain_name. Set it to true can output more details.
- ids string[]
- A list of WAF domain names. Each item is domain name.
- nameRegex string
- A regex string to filter results by domain name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- resourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- instance_id str
- The Id of waf instance to which waf domain belongs.
- enable_details bool
- Default to false and only output id,domain_name. Set it to true can output more details.
- ids Sequence[str]
- A list of WAF domain names. Each item is domain name.
- name_regex str
- A regex string to filter results by domain name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- resource_group_ strid 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- instanceId String
- The Id of waf instance to which waf domain belongs.
- enableDetails Boolean
- Default to false and only output id,domain_name. Set it to true can output more details.
- ids List<String>
- A list of WAF domain names. Each item is domain name.
- nameRegex String
- A regex string to filter results by domain name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
getDomains Result
The following output properties are available:
- Domains
List<Pulumi.Ali Cloud. Waf. Outputs. Get Domains Domain> 
- A list of Domains. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of WAF domain self ID, value as domain_name.
- InstanceId string
- Names List<string>
- A list of WAF domain names.
- EnableDetails bool
- NameRegex string
- OutputFile string
- ResourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- Domains
[]GetDomains Domain 
- A list of Domains. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of WAF domain self ID, value as domain_name.
- InstanceId string
- Names []string
- A list of WAF domain names.
- EnableDetails bool
- NameRegex string
- OutputFile string
- ResourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- domains
List<GetDomains Domain> 
- A list of Domains. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of WAF domain self ID, value as domain_name.
- instanceId String
- names List<String>
- A list of WAF domain names.
- enableDetails Boolean
- nameRegex String
- outputFile String
- resourceGroup StringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- domains
GetDomains Domain[] 
- A list of Domains. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of WAF domain self ID, value as domain_name.
- instanceId string
- names string[]
- A list of WAF domain names.
- enableDetails boolean
- nameRegex string
- outputFile string
- resourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- domains
Sequence[GetDomains Domain] 
- A list of Domains. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of WAF domain self ID, value as domain_name.
- instance_id str
- names Sequence[str]
- A list of WAF domain names.
- enable_details bool
- name_regex str
- output_file str
- resource_group_ strid 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- domains List<Property Map>
- A list of Domains. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of WAF domain self ID, value as domain_name.
- instanceId String
- names List<String>
- A list of WAF domain names.
- enableDetails Boolean
- nameRegex String
- outputFile String
- resourceGroup StringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
Supporting Types
GetDomainsDomain  
- ClusterType string
- The type of the WAF cluster.
- Cname string
- The CNAME record assigned by the WAF instance to the specified domain.
- ConnectionTime int
- The connection timeout for WAF exclusive clusters. Valid values: PhysicalClusterandVirtualCluster. Default toPhysicalCluster.
- Domain string
- Field domainhas been deprecated from version 1.94.0. Usedomain_nameinstead.
- DomainName string
- Name of the domain.
- Http2Ports List<string>
- List of the HTTP 2.0 ports.
- HttpPorts List<string>
- List of the HTTP ports.
- HttpTo 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.
- HttpsPorts List<string>
- List of the HTTPS ports.
- HttpsRedirect string
- Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: OnandOff. Default toOff.
- Id string
- The ID of domain self ID, value as domain_name.
- IsAccess 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: Onand "Off". Default toOff.
- LoadBalancing string
- The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHashandRoundRobin. Default toIpHash.
- LogHeaders List<Pulumi.Ali Cloud. Waf. Inputs. Get Domains 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:
- ReadTime int
- The read timeout of a WAF exclusive cluster. Unit: seconds.
- ResourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- SourceIps List<string>
- List of the IP address or domain of the origin server to which the specified domain points.
- Version int
- The system data identifier that is used to control optimistic locking.
- WriteTime int
- The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- ClusterType string
- The type of the WAF cluster.
- Cname string
- The CNAME record assigned by the WAF instance to the specified domain.
- ConnectionTime int
- The connection timeout for WAF exclusive clusters. Valid values: PhysicalClusterandVirtualCluster. Default toPhysicalCluster.
- Domain string
- Field domainhas been deprecated from version 1.94.0. Usedomain_nameinstead.
- DomainName string
- Name of the domain.
- Http2Ports []string
- List of the HTTP 2.0 ports.
- HttpPorts []string
- List of the HTTP ports.
- HttpTo 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.
- HttpsPorts []string
- List of the HTTPS ports.
- HttpsRedirect string
- Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: OnandOff. Default toOff.
- Id string
- The ID of domain self ID, value as domain_name.
- IsAccess 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: Onand "Off". Default toOff.
- LoadBalancing string
- The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHashandRoundRobin. Default toIpHash.
- LogHeaders []GetDomains 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:
- ReadTime int
- The read timeout of a WAF exclusive cluster. Unit: seconds.
- ResourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- SourceIps []string
- List of the IP address or domain of the origin server to which the specified domain points.
- Version int
- The system data identifier that is used to control optimistic locking.
- WriteTime int
- The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- clusterType String
- The type of the WAF cluster.
- cname String
- The CNAME record assigned by the WAF instance to the specified domain.
- connectionTime Integer
- The connection timeout for WAF exclusive clusters. Valid values: PhysicalClusterandVirtualCluster. Default toPhysicalCluster.
- domain String
- Field domainhas been deprecated from version 1.94.0. Usedomain_nameinstead.
- domainName String
- Name of the domain.
- http2Ports List<String>
- List of the HTTP 2.0 ports.
- httpPorts List<String>
- List of the HTTP ports.
- httpTo 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.
- httpsPorts List<String>
- List of the HTTPS ports.
- httpsRedirect String
- Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: OnandOff. Default toOff.
- id String
- The ID of domain self ID, value as domain_name.
- isAccess 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: Onand "Off". Default toOff.
- loadBalancing String
- The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHashandRoundRobin. Default toIpHash.
- logHeaders List<GetDomains 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:
- readTime Integer
- The read timeout of a WAF exclusive cluster. Unit: seconds.
- resourceGroup StringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- sourceIps List<String>
- List of the IP address or domain of the origin server to which the specified domain points.
- version Integer
- The system data identifier that is used to control optimistic locking.
- writeTime Integer
- The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- clusterType string
- The type of the WAF cluster.
- cname string
- The CNAME record assigned by the WAF instance to the specified domain.
- connectionTime number
- The connection timeout for WAF exclusive clusters. Valid values: PhysicalClusterandVirtualCluster. Default toPhysicalCluster.
- domain string
- Field domainhas been deprecated from version 1.94.0. Usedomain_nameinstead.
- domainName string
- Name of the domain.
- http2Ports string[]
- List of the HTTP 2.0 ports.
- httpPorts string[]
- List of the HTTP ports.
- httpTo 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.
- httpsPorts string[]
- List of the HTTPS ports.
- httpsRedirect string
- Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: OnandOff. Default toOff.
- id string
- The ID of domain self ID, value as domain_name.
- isAccess 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: Onand "Off". Default toOff.
- loadBalancing string
- The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHashandRoundRobin. Default toIpHash.
- logHeaders GetDomains 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:
- readTime number
- The read timeout of a WAF exclusive cluster. Unit: seconds.
- resourceGroup stringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- sourceIps string[]
- List of the IP address or domain of the origin server to which the specified domain points.
- version number
- The system data identifier that is used to control optimistic locking.
- writeTime number
- The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- cluster_type str
- The type of the WAF cluster.
- cname str
- The CNAME record assigned by the WAF instance to the specified domain.
- connection_time int
- The connection timeout for WAF exclusive clusters. Valid values: PhysicalClusterandVirtualCluster. Default toPhysicalCluster.
- domain str
- Field domainhas been deprecated from version 1.94.0. Usedomain_nameinstead.
- domain_name str
- Name of the domain.
- 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.
- https_ports Sequence[str]
- List of the HTTPS ports.
- https_redirect str
- Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: OnandOff. Default toOff.
- id str
- The ID of domain self ID, value as domain_name.
- 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: Onand "Off". Default toOff.
- load_balancing str
- The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHashandRoundRobin. Default toIpHash.
- log_headers Sequence[GetDomains 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:
- 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.
- source_ips Sequence[str]
- List of the IP address or domain of the origin server to which the specified domain points.
- version int
- The system data identifier that is used to control optimistic locking.
- write_time int
- The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
- clusterType String
- The type of the WAF cluster.
- cname String
- The CNAME record assigned by the WAF instance to the specified domain.
- connectionTime Number
- The connection timeout for WAF exclusive clusters. Valid values: PhysicalClusterandVirtualCluster. Default toPhysicalCluster.
- domain String
- Field domainhas been deprecated from version 1.94.0. Usedomain_nameinstead.
- domainName String
- Name of the domain.
- http2Ports List<String>
- List of the HTTP 2.0 ports.
- httpPorts List<String>
- List of the HTTP ports.
- httpTo 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.
- httpsPorts List<String>
- List of the HTTPS ports.
- httpsRedirect String
- Specifies whether to redirect HTTP requests as HTTPS requests. Valid values: OnandOff. Default toOff.
- id String
- The ID of domain self ID, value as domain_name.
- isAccess 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: Onand "Off". Default toOff.
- loadBalancing String
- The load balancing algorithm that is used to forward requests to the origin. Valid values: IpHashandRoundRobin. Default toIpHash.
- 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:
- readTime Number
- The read timeout of a WAF exclusive cluster. Unit: seconds.
- resourceGroup StringId 
- The ID of the resource group to which the queried domain belongs in Resource Management.
- sourceIps List<String>
- List of the IP address or domain of the origin server to which the specified domain points.
- version Number
- The system data identifier that is used to control optimistic locking.
- writeTime Number
- The timeout period for a WAF exclusive cluster write connection. Unit: seconds.
GetDomainsDomainLogHeader    
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.