Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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 in 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, nil, 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dcdn/getWafPolicies:getWafPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- 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 string - 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 string
- The status of the resource. Valid values:
on
,off
.
- Ids []string
- 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 string - 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 string
- The status of the resource. Valid values:
on
,off
.
- ids List<String>
- 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 String - 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 String
- The status of the resource. Valid values:
on
,off
.
- ids string[]
- 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 string - 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 string
- The status of the resource. Valid values:
on
,off
.
- ids Sequence[str]
- 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 str - 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 str
- The status of the resource. Valid values:
on
,off
.
- ids List<String>
- 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 String - 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 String
- 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> - Name
Regex string - Output
File string - Query
Args string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Policies
[]Get
Waf Policies Policy - Name
Regex string - Output
File string - Query
Args string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- policies
List<Get
Waf Policies Policy> - name
Regex String - output
File String - query
Args String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- policies
Get
Waf Policies Policy[] - name
Regex string - output
File string - query
Args string - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- policies
Sequence[Get
Waf Policies Policy] - name_
regex str - output_
file str - query_
args str - status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- policies List<Property Map>
- name
Regex String - output
File String - query
Args String - status String
Supporting Types
GetWafPoliciesPolicy
- Dcdn
Waf stringPolicy Id - The first ID of the resource.
- Defense
Scene string - The type of protection policy.
- Domain
Count int - The number of domain names that use this protection policy.
- Gmt
Modified string - The time when the protection policy was modified.
- Id string
- The ID of the Waf Policy.
- Policy
Name string - The name of the protection policy.
- Policy
Type string - The type of the protection policy.
- Rule
Count string - The number of protection rules in this protection policy.
- Status string
- The status of the resource.
- Dcdn
Waf stringPolicy Id - The first ID of the resource.
- Defense
Scene string - The type of protection policy.
- Domain
Count int - The number of domain names that use this protection policy.
- Gmt
Modified string - The time when the protection policy was modified.
- Id string
- The ID of the Waf Policy.
- Policy
Name string - The name of the protection policy.
- Policy
Type string - The type of the protection policy.
- Rule
Count string - The number of protection rules in this protection policy.
- Status string
- The status of the resource.
- dcdn
Waf StringPolicy Id - The first ID of the resource.
- defense
Scene String - The type of protection policy.
- domain
Count Integer - The number of domain names that use this protection policy.
- gmt
Modified String - The time when the protection policy was modified.
- id String
- The ID of the Waf Policy.
- policy
Name String - The name of the protection policy.
- policy
Type String - The type of the protection policy.
- rule
Count String - The number of protection rules in this protection policy.
- status String
- The status of the resource.
- dcdn
Waf stringPolicy Id - The first ID of the resource.
- defense
Scene string - The type of protection policy.
- domain
Count number - The number of domain names that use this protection policy.
- gmt
Modified string - The time when the protection policy was modified.
- id string
- The ID of the Waf Policy.
- policy
Name string - The name of the protection policy.
- policy
Type string - The type of the protection policy.
- rule
Count string - The number of protection rules in this protection policy.
- status string
- The status of the resource.
- dcdn_
waf_ strpolicy_ id - The first ID of the resource.
- defense_
scene str - The type of protection policy.
- domain_
count int - The number of domain names that use this protection policy.
- gmt_
modified str - The time when the protection policy was modified.
- id str
- The ID of the Waf Policy.
- policy_
name str - The name of the protection policy.
- policy_
type str - The type of the protection policy.
- rule_
count str - The number of protection rules in this protection policy.
- status str
- The status of the resource.
- dcdn
Waf StringPolicy Id - The first ID of the resource.
- defense
Scene String - The type of protection policy.
- domain
Count Number - The number of domain names that use this protection policy.
- gmt
Modified String - The time when the protection policy was modified.
- id String
- The ID of the Waf Policy.
- policy
Name String - The name of the protection policy.
- policy
Type String - The type of the protection policy.
- rule
Count String - The number of protection rules in this protection policy.
- status String
- The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.