1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dcdn
  5. getWafDomains
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.dcdn.getWafDomains

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the Dcdn Waf Domains of the current Alibaba Cloud user.

    NOTE: Available in v1.185.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.dcdn.getWafDomains({});
    export const dcdnWafDomainId1 = ids.then(ids => ids.domains?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.dcdn.get_waf_domains()
    pulumi.export("dcdnWafDomainId1", ids.domains[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := dcdn.GetWafDomains(ctx, &dcdn.GetWafDomainsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("dcdnWafDomainId1", ids.Domains[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Dcdn.GetWafDomains.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["dcdnWafDomainId1"] = ids.Apply(getWafDomainsResult => getWafDomainsResult.Domains[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.dcdn.DcdnFunctions;
    import com.pulumi.alicloud.dcdn.inputs.GetWafDomainsArgs;
    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 ids = DcdnFunctions.getWafDomains();
    
            ctx.export("dcdnWafDomainId1", ids.applyValue(getWafDomainsResult -> getWafDomainsResult.domains()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:dcdn:getWafDomains
          Arguments: {}
    outputs:
      dcdnWafDomainId1: ${ids.domains[0].id}
    

    Using getWafDomains

    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 getWafDomains(args: GetWafDomainsArgs, opts?: InvokeOptions): Promise<GetWafDomainsResult>
    function getWafDomainsOutput(args: GetWafDomainsOutputArgs, opts?: InvokeOptions): Output<GetWafDomainsResult>
    def get_waf_domains(enable_details: Optional[bool] = None,
                        ids: Optional[Sequence[str]] = None,
                        output_file: Optional[str] = None,
                        query_args: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetWafDomainsResult
    def get_waf_domains_output(enable_details: Optional[pulumi.Input[bool]] = None,
                        ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        query_args: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetWafDomainsResult]
    func GetWafDomains(ctx *Context, args *GetWafDomainsArgs, opts ...InvokeOption) (*GetWafDomainsResult, error)
    func GetWafDomainsOutput(ctx *Context, args *GetWafDomainsOutputArgs, opts ...InvokeOption) GetWafDomainsResultOutput

    > Note: This function is named GetWafDomains in the Go SDK.

    public static class GetWafDomains 
    {
        public static Task<GetWafDomainsResult> InvokeAsync(GetWafDomainsArgs args, InvokeOptions? opts = null)
        public static Output<GetWafDomainsResult> Invoke(GetWafDomainsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWafDomainsResult> getWafDomains(GetWafDomainsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:dcdn/getWafDomains:getWafDomains
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of Waf Domain IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QueryArgs string
    The query conditions. You can filter domain names by name. Fuzzy match is supported QueryArgs={"DomainName":"Accelerated domain name"}.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Waf Domain IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    QueryArgs string
    The query conditions. You can filter domain names by name. Fuzzy match is supported QueryArgs={"DomainName":"Accelerated domain name"}.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Waf Domain IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    queryArgs String
    The query conditions. You can filter domain names by name. Fuzzy match is supported QueryArgs={"DomainName":"Accelerated domain name"}.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Waf Domain IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    queryArgs string
    The query conditions. You can filter domain names by name. Fuzzy match is supported QueryArgs={"DomainName":"Accelerated domain name"}.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of Waf Domain IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    query_args str
    The query conditions. You can filter domain names by name. Fuzzy match is supported QueryArgs={"DomainName":"Accelerated domain name"}.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Waf Domain IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    queryArgs String
    The query conditions. You can filter domain names by name. Fuzzy match is supported QueryArgs={"DomainName":"Accelerated domain name"}.

    getWafDomains Result

    The following output properties are available:

    Domains List<Pulumi.AliCloud.Dcdn.Outputs.GetWafDomainsDomain>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    EnableDetails bool
    OutputFile string
    QueryArgs string
    Domains []GetWafDomainsDomain
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    EnableDetails bool
    OutputFile string
    QueryArgs string
    domains List<GetWafDomainsDomain>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    enableDetails Boolean
    outputFile String
    queryArgs String
    domains GetWafDomainsDomain[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    enableDetails boolean
    outputFile string
    queryArgs string
    domains Sequence[GetWafDomainsDomain]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    enable_details bool
    output_file str
    query_args str
    domains List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    enableDetails Boolean
    outputFile String
    queryArgs String

    Supporting Types

    GetWafDomainsDomain

    ClientIpTag string
    The client ip tag.
    DefenseScenes List<Pulumi.AliCloud.Dcdn.Inputs.GetWafDomainsDomainDefenseScene>
    Protection policy type.
    DomainName string
    The accelerated domain name.
    Id string
    The ID of the Waf Domain.
    ClientIpTag string
    The client ip tag.
    DefenseScenes []GetWafDomainsDomainDefenseScene
    Protection policy type.
    DomainName string
    The accelerated domain name.
    Id string
    The ID of the Waf Domain.
    clientIpTag String
    The client ip tag.
    defenseScenes List<GetWafDomainsDomainDefenseScene>
    Protection policy type.
    domainName String
    The accelerated domain name.
    id String
    The ID of the Waf Domain.
    clientIpTag string
    The client ip tag.
    defenseScenes GetWafDomainsDomainDefenseScene[]
    Protection policy type.
    domainName string
    The accelerated domain name.
    id string
    The ID of the Waf Domain.
    client_ip_tag str
    The client ip tag.
    defense_scenes Sequence[GetWafDomainsDomainDefenseScene]
    Protection policy type.
    domain_name str
    The accelerated domain name.
    id str
    The ID of the Waf Domain.
    clientIpTag String
    The client ip tag.
    defenseScenes List<Property Map>
    Protection policy type.
    domainName String
    The accelerated domain name.
    id String
    The ID of the Waf Domain.

    GetWafDomainsDomainDefenseScene

    DefenseScene string
    The type of protection policy.
    PolicyId string
    The protection policy ID.
    DefenseScene string
    The type of protection policy.
    PolicyId string
    The protection policy ID.
    defenseScene String
    The type of protection policy.
    policyId String
    The protection policy ID.
    defenseScene string
    The type of protection policy.
    policyId string
    The protection policy ID.
    defense_scene str
    The type of protection policy.
    policy_id str
    The protection policy ID.
    defenseScene String
    The type of protection policy.
    policyId String
    The protection policy ID.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi