1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. waf
  5. getDomains
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.waf.getDomains

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a WAF datasource to retrieve domains.

    For information about WAF and how to use it, see What is Alibaba Cloud WAF.

    NOTE: Available in 1.86.0+ .

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.waf.getDomains({
        instanceId: "waf-cf-xxxxx",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.waf.get_domains(instance_id="waf-cf-xxxxx")
    
    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.GetDomains(ctx, &waf.GetDomainsArgs{
    			InstanceId: "waf-cf-xxxxx",
    		}, 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.GetDomains.Invoke(new()
        {
            InstanceId = "waf-cf-xxxxx",
        });
    
    });
    
    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.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.getDomains(GetDomainsArgs.builder()
                .instanceId("waf-cf-xxxxx")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:waf:getDomains
          Arguments:
            instanceId: waf-cf-xxxxx
    

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:waf/getDomains:getDomains
      arguments:
        # arguments dictionary

    The 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).
    ResourceGroupId string
    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).
    ResourceGroupId string
    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).
    resourceGroupId String
    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).
    resourceGroupId string
    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_id str
    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).
    resourceGroupId String
    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.AliCloud.Waf.Outputs.GetDomainsDomain>
    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
    ResourceGroupId string
    The ID of the resource group to which the queried domain belongs in Resource Management.
    Domains []GetDomainsDomain
    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
    ResourceGroupId string
    The ID of the resource group to which the queried domain belongs in Resource Management.
    domains List<GetDomainsDomain>
    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
    resourceGroupId String
    The ID of the resource group to which the queried domain belongs in Resource Management.
    domains GetDomainsDomain[]
    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
    resourceGroupId string
    The ID of the resource group to which the queried domain belongs in Resource Management.
    domains Sequence[GetDomainsDomain]
    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_id str
    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
    resourceGroupId String
    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: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    Domain string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.
    DomainName string
    Name of the domain.
    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.
    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.
    Id string
    The ID of domain self ID, value as domain_name.
    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.GetDomainsDomainLogHeader>
    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.
    ResourceGroupId string
    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: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    Domain string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.
    DomainName string
    Name of the domain.
    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.
    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.
    Id string
    The ID of domain self ID, value as domain_name.
    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 []GetDomainsDomainLogHeader
    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.
    ResourceGroupId string
    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: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    domain String
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.
    domainName String
    Name of the domain.
    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.
    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.
    id String
    The ID of domain self ID, value as domain_name.
    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<GetDomainsDomainLogHeader>
    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.
    resourceGroupId String
    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: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    domain string
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.
    domainName string
    Name of the domain.
    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.
    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.
    id string
    The ID of domain self ID, value as domain_name.
    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 GetDomainsDomainLogHeader[]
    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.
    resourceGroupId string
    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: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    domain str
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.
    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_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.
    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.
    id str
    The ID of domain self ID, value as domain_name.
    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[GetDomainsDomainLogHeader]
    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_id str
    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: PhysicalCluster and VirtualCluster. Default to PhysicalCluster.
    domain String
    Field domain has been deprecated from version 1.94.0. Use domain_name instead.
    domainName String
    Name of the domain.
    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.
    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.
    id String
    The ID of domain self ID, value as domain_name.
    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:
    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.
    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

    Key string
    The key of label.
    Value string
    The value of label.
    Key string
    The key of label.
    Value string
    The value of label.
    key String
    The key of label.
    value String
    The value of label.
    key string
    The key of label.
    value string
    The value of label.
    key str
    The key of label.
    value str
    The value of label.
    key String
    The key of label.
    value String
    The value of label.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi