Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.dcdn.getWafPolicies
Explore with Pulumi AI
This data source provides the Dcdn Waf Policies of the current Alibaba Cloud user.
NOTE: Available since v1.184.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.dcdn.getWafPolicies({});
export const dcdnWafPolicyId1 = ids.then(ids => ids.policies?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.dcdn.get_waf_policies()
pulumi.export("dcdnWafPolicyId1", ids.policies[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.GetWafPolicies(ctx, &dcdn.GetWafPoliciesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("dcdnWafPolicyId1", ids.Policies[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.GetWafPolicies.Invoke();
return new Dictionary<string, object?>
{
["dcdnWafPolicyId1"] = ids.Apply(getWafPoliciesResult => getWafPoliciesResult.Policies[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.GetWafPoliciesArgs;
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.getWafPolicies();
ctx.export("dcdnWafPolicyId1", ids.applyValue(getWafPoliciesResult -> getWafPoliciesResult.policies()[0].id()));
}
}
variables:
ids:
fn::invoke:
function: alicloud:dcdn:getWafPolicies
arguments: {}
outputs:
dcdnWafPolicyId1: ${ids.policies[0].id}
Using getWafPolicies
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 getWafPolicies(args: GetWafPoliciesArgs, opts?: InvokeOptions): Promise<GetWafPoliciesResult>
function getWafPoliciesOutput(args: GetWafPoliciesOutputArgs, opts?: InvokeOptions): Output<GetWafPoliciesResult>
def get_waf_policies(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
query_args: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWafPoliciesResult
def get_waf_policies_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
query_args: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetWafPoliciesResult]
func GetWafPolicies(ctx *Context, args *GetWafPoliciesArgs, opts ...InvokeOption) (*GetWafPoliciesResult, error)
func GetWafPoliciesOutput(ctx *Context, args *GetWafPoliciesOutputArgs, opts ...InvokeOption) GetWafPoliciesResultOutput
> Note: This function is named GetWafPolicies
in the Go SDK.
public static class GetWafPolicies
{
public static Task<GetWafPoliciesResult> InvokeAsync(GetWafPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetWafPoliciesResult> Invoke(GetWafPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetWafPoliciesResult> getWafPolicies(GetWafPoliciesArgs args, InvokeOptions options)
public static Output<GetWafPoliciesResult> getWafPolicies(GetWafPoliciesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:dcdn/getWafPolicies:getWafPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Ids
Changes to this property will trigger replacement.
- A list of Waf Policy IDs.
- Name
Regex string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Query
Args Changes to this property will trigger replacement.
- The query conditions. The value is a string in the JSON format. Format:
{"PolicyIds":"The ID of the proteuleIds":"Thection policy","R range of protection rule IDs","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}
. - Status
Changes to this property will trigger replacement.
- The status of the resource. Valid values:
on
,off
.
- Ids
Changes to this property will trigger replacement.
- A list of Waf Policy IDs.
- Name
Regex string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Query
Args Changes to this property will trigger replacement.
- The query conditions. The value is a string in the JSON format. Format:
{"PolicyIds":"The ID of the proteuleIds":"Thection policy","R range of protection rule IDs","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}
. - Status
Changes to this property will trigger replacement.
- The status of the resource. Valid values:
on
,off
.
- ids
Changes to this property will trigger replacement.
- A list of Waf Policy IDs.
- name
Regex String - output
File String - File name where to save data source results (after running
pulumi preview
). - query
Args Changes to this property will trigger replacement.
- The query conditions. The value is a string in the JSON format. Format:
{"PolicyIds":"The ID of the proteuleIds":"Thection policy","R range of protection rule IDs","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}
. - status
Changes to this property will trigger replacement.
- The status of the resource. Valid values:
on
,off
.
- ids
Changes to this property will trigger replacement.
- A list of Waf Policy IDs.
- name
Regex string - output
File string - File name where to save data source results (after running
pulumi preview
). - query
Args Changes to this property will trigger replacement.
- The query conditions. The value is a string in the JSON format. Format:
{"PolicyIds":"The ID of the proteuleIds":"Thection policy","R range of protection rule IDs","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}
. - status
Changes to this property will trigger replacement.
- The status of the resource. Valid values:
on
,off
.
- ids
Changes to this property will trigger replacement.
- A list of Waf Policy IDs.
- name_
regex str - output_
file str - File name where to save data source results (after running
pulumi preview
). - query_
args Changes to this property will trigger replacement.
- The query conditions. The value is a string in the JSON format. Format:
{"PolicyIds":"The ID of the proteuleIds":"Thection policy","R range of protection rule IDs","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}
. - status
Changes to this property will trigger replacement.
- The status of the resource. Valid values:
on
,off
.
- ids
Changes to this property will trigger replacement.
- A list of Waf Policy IDs.
- name
Regex String - output
File String - File name where to save data source results (after running
pulumi preview
). - query
Args Changes to this property will trigger replacement.
- The query conditions. The value is a string in the JSON format. Format:
{"PolicyIds":"The ID of the proteuleIds":"Thection policy","R range of protection rule IDs","PolicyNameLike":"The name of the protection policy","DomainNames":"The protected domain names","PolicyType":"default","DefenseScenes":"waf_group","PolicyStatus":"on","OrderBy":"GmtModified","Desc":"false"}
. - status
Changes to this property will trigger replacement.
- The status of the resource. Valid values:
on
,off
.
getWafPolicies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Policies
List<Pulumi.
Ali Cloud. Dcdn. Outputs. Get Waf Policies Policy> - A list of Dcdn Waf Policies. Each element contains the following attributes:
- Name
Regex string - Output
File string - Query
Args string - Status string
- The status of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Policies
[]Get
Waf Policies Policy - A list of Dcdn Waf Policies. Each element contains the following attributes:
- Name
Regex string - Output
File string - Query
Args string - Status string
- The status of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- policies
List<Get
Waf Policies Policy> - A list of Dcdn Waf Policies. Each element contains the following attributes:
- name
Regex String - output
File String - query
Args String - status String
- The status of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- policies
Get
Waf Policies Policy[] - A list of Dcdn Waf Policies. Each element contains the following attributes:
- name
Regex string - output
File string - query
Args string - status string
- The status of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- policies
Sequence[Get
Waf Policies Policy] - A list of Dcdn Waf Policies. Each element contains the following attributes:
- name_
regex str - output_
file str - query_
args str - status str
- The status of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- policies List<Property Map>
- A list of Dcdn Waf Policies. Each element contains the following attributes:
- name
Regex String - output
File String - query
Args String - status String
- The status of the resource.
Supporting Types
GetWafPoliciesPolicy
- Dcdn
Waf Policy Id This property is required. string - The first ID of the resource.
- Defense
Scene This property is required. string - The type of protection policy.
- Domain
Count This property is required. int - The number of domain names that use this protection policy.
- Gmt
Modified This property is required. string - The time when the protection policy was modified.
- Id
This property is required. string - The ID of the Waf Policy.
- Policy
Name This property is required. string - The name of the protection policy.
- Policy
Type This property is required. string - The type of the protection policy.
- Rule
Count This property is required. string - The number of protection rules in this protection policy.
- Status
This property is required. string - The status of the resource. Valid values:
on
,off
.
- Dcdn
Waf Policy Id This property is required. string - The first ID of the resource.
- Defense
Scene This property is required. string - The type of protection policy.
- Domain
Count This property is required. int - The number of domain names that use this protection policy.
- Gmt
Modified This property is required. string - The time when the protection policy was modified.
- Id
This property is required. string - The ID of the Waf Policy.
- Policy
Name This property is required. string - The name of the protection policy.
- Policy
Type This property is required. string - The type of the protection policy.
- Rule
Count This property is required. string - The number of protection rules in this protection policy.
- Status
This property is required. string - The status of the resource. Valid values:
on
,off
.
- dcdn
Waf Policy Id This property is required. String - The first ID of the resource.
- defense
Scene This property is required. String - The type of protection policy.
- domain
Count This property is required. Integer - The number of domain names that use this protection policy.
- gmt
Modified This property is required. String - The time when the protection policy was modified.
- id
This property is required. String - The ID of the Waf Policy.
- policy
Name This property is required. String - The name of the protection policy.
- policy
Type This property is required. String - The type of the protection policy.
- rule
Count This property is required. String - The number of protection rules in this protection policy.
- status
This property is required. String - The status of the resource. Valid values:
on
,off
.
- dcdn
Waf Policy Id This property is required. string - The first ID of the resource.
- defense
Scene This property is required. string - The type of protection policy.
- domain
Count This property is required. number - The number of domain names that use this protection policy.
- gmt
Modified This property is required. string - The time when the protection policy was modified.
- id
This property is required. string - The ID of the Waf Policy.
- policy
Name This property is required. string - The name of the protection policy.
- policy
Type This property is required. string - The type of the protection policy.
- rule
Count This property is required. string - The number of protection rules in this protection policy.
- status
This property is required. string - The status of the resource. Valid values:
on
,off
.
- dcdn_
waf_ policy_ id This property is required. str - The first ID of the resource.
- defense_
scene This property is required. str - The type of protection policy.
- domain_
count This property is required. int - The number of domain names that use this protection policy.
- gmt_
modified This property is required. str - The time when the protection policy was modified.
- id
This property is required. str - The ID of the Waf Policy.
- policy_
name This property is required. str - The name of the protection policy.
- policy_
type This property is required. str - The type of the protection policy.
- rule_
count This property is required. str - The number of protection rules in this protection policy.
- status
This property is required. str - The status of the resource. Valid values:
on
,off
.
- dcdn
Waf Policy Id This property is required. String - The first ID of the resource.
- defense
Scene This property is required. String - The type of protection policy.
- domain
Count This property is required. Number - The number of domain names that use this protection policy.
- gmt
Modified This property is required. String - The time when the protection policy was modified.
- id
This property is required. String - The ID of the Waf Policy.
- policy
Name This property is required. String - The name of the protection policy.
- policy
Type This property is required. String - The type of the protection policy.
- rule
Count This property is required. String - The number of protection rules in this protection policy.
- status
This property is required. String - The status of the resource. Valid values:
on
,off
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.