Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of cfw dns control policies
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooCfwDnsControlPolicy = new volcengine.cloud_firewall.CfwDnsControlPolicy("fooCfwDnsControlPolicy", {
description: "acc-test-dns-control-policy",
destinationType: "domain",
destination: "www.test.com",
sources: [{
vpcId: fooVpc.id,
region: "cn-beijing",
}],
});
const fooCfwDnsControlPolicies = volcengine.cloud_firewall.getCfwDnsControlPoliciesOutput({
ids: [fooCfwDnsControlPolicy.id],
});
import pulumi
import pulumi_volcengine as volcengine
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_cfw_dns_control_policy = volcengine.cloud_firewall.CfwDnsControlPolicy("fooCfwDnsControlPolicy",
description="acc-test-dns-control-policy",
destination_type="domain",
destination="www.test.com",
sources=[volcengine.cloud_firewall.CfwDnsControlPolicySourceArgs(
vpc_id=foo_vpc.id,
region="cn-beijing",
)])
foo_cfw_dns_control_policies = volcengine.cloud_firewall.get_cfw_dns_control_policies_output(ids=[foo_cfw_dns_control_policy.id])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_firewall"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooCfwDnsControlPolicy, err := cloud_firewall.NewCfwDnsControlPolicy(ctx, "fooCfwDnsControlPolicy", &cloud_firewall.CfwDnsControlPolicyArgs{
Description: pulumi.String("acc-test-dns-control-policy"),
DestinationType: pulumi.String("domain"),
Destination: pulumi.String("www.test.com"),
Sources: cloud_firewall.CfwDnsControlPolicySourceArray{
&cloud_firewall.CfwDnsControlPolicySourceArgs{
VpcId: fooVpc.ID(),
Region: pulumi.String("cn-beijing"),
},
},
})
if err != nil {
return err
}
_ = cloud_firewall.GetCfwDnsControlPoliciesOutput(ctx, cloud_firewall.GetCfwDnsControlPoliciesOutputArgs{
Ids: pulumi.StringArray{
fooCfwDnsControlPolicy.ID(),
},
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooCfwDnsControlPolicy = new Volcengine.Cloud_firewall.CfwDnsControlPolicy("fooCfwDnsControlPolicy", new()
{
Description = "acc-test-dns-control-policy",
DestinationType = "domain",
Destination = "www.test.com",
Sources = new[]
{
new Volcengine.Cloud_firewall.Inputs.CfwDnsControlPolicySourceArgs
{
VpcId = fooVpc.Id,
Region = "cn-beijing",
},
},
});
var fooCfwDnsControlPolicies = Volcengine.Cloud_firewall.GetCfwDnsControlPolicies.Invoke(new()
{
Ids = new[]
{
fooCfwDnsControlPolicy.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.cloud_firewall.CfwDnsControlPolicy;
import com.pulumi.volcengine.cloud_firewall.CfwDnsControlPolicyArgs;
import com.pulumi.volcengine.cloud_firewall.inputs.CfwDnsControlPolicySourceArgs;
import com.pulumi.volcengine.cloud_firewall.Cloud_firewallFunctions;
import com.pulumi.volcengine.cloud_firewall.inputs.GetCfwDnsControlPoliciesArgs;
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) {
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooCfwDnsControlPolicy = new CfwDnsControlPolicy("fooCfwDnsControlPolicy", CfwDnsControlPolicyArgs.builder()
.description("acc-test-dns-control-policy")
.destinationType("domain")
.destination("www.test.com")
.sources(CfwDnsControlPolicySourceArgs.builder()
.vpcId(fooVpc.id())
.region("cn-beijing")
.build())
.build());
final var fooCfwDnsControlPolicies = Cloud_firewallFunctions.getCfwDnsControlPolicies(GetCfwDnsControlPoliciesArgs.builder()
.ids(fooCfwDnsControlPolicy.id())
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooCfwDnsControlPolicy:
type: volcengine:cloud_firewall:CfwDnsControlPolicy
properties:
description: acc-test-dns-control-policy
destinationType: domain
destination: www.test.com
sources:
- vpcId: ${fooVpc.id}
region: cn-beijing
variables:
fooCfwDnsControlPolicies:
fn::invoke:
Function: volcengine:cloud_firewall:getCfwDnsControlPolicies
Arguments:
ids:
- ${fooCfwDnsControlPolicy.id}
Using getCfwDnsControlPolicies
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 getCfwDnsControlPolicies(args: GetCfwDnsControlPoliciesArgs, opts?: InvokeOptions): Promise<GetCfwDnsControlPoliciesResult>
function getCfwDnsControlPoliciesOutput(args: GetCfwDnsControlPoliciesOutputArgs, opts?: InvokeOptions): Output<GetCfwDnsControlPoliciesResult>def get_cfw_dns_control_policies(description: Optional[str] = None,
destinations: Optional[Sequence[str]] = None,
ids: Optional[Sequence[str]] = None,
internet_firewall_id: Optional[str] = None,
output_file: Optional[str] = None,
sources: Optional[Sequence[str]] = None,
statuses: Optional[Sequence[bool]] = None,
opts: Optional[InvokeOptions] = None) -> GetCfwDnsControlPoliciesResult
def get_cfw_dns_control_policies_output(description: Optional[pulumi.Input[str]] = None,
destinations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
internet_firewall_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
statuses: Optional[pulumi.Input[Sequence[pulumi.Input[bool]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCfwDnsControlPoliciesResult]func GetCfwDnsControlPolicies(ctx *Context, args *GetCfwDnsControlPoliciesArgs, opts ...InvokeOption) (*GetCfwDnsControlPoliciesResult, error)
func GetCfwDnsControlPoliciesOutput(ctx *Context, args *GetCfwDnsControlPoliciesOutputArgs, opts ...InvokeOption) GetCfwDnsControlPoliciesResultOutput> Note: This function is named GetCfwDnsControlPolicies in the Go SDK.
public static class GetCfwDnsControlPolicies
{
public static Task<GetCfwDnsControlPoliciesResult> InvokeAsync(GetCfwDnsControlPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetCfwDnsControlPoliciesResult> Invoke(GetCfwDnsControlPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCfwDnsControlPoliciesResult> getCfwDnsControlPolicies(GetCfwDnsControlPoliciesArgs args, InvokeOptions options)
public static Output<GetCfwDnsControlPoliciesResult> getCfwDnsControlPolicies(GetCfwDnsControlPoliciesArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:cloud_firewall/getCfwDnsControlPolicies:getCfwDnsControlPolicies
arguments:
# arguments dictionaryThe following arguments are supported:
- Description string
- The description of the dns control policy. This field support fuzzy query.
- Destinations List<string>
- The destination list of the dns control policy. This field support fuzzy query.
- Ids List<string>
- The rule id list of the dns control policy. This field support fuzzy query.
- Internet
Firewall stringId - The internet firewall id of the dns control policy.
- Output
File string - File name where to save data source results.
- Sources List<string>
- The source list of the dns control policy. This field support fuzzy query.
- Statuses List<bool>
- The enable status list of the dns control policy. This field support fuzzy query.
- Description string
- The description of the dns control policy. This field support fuzzy query.
- Destinations []string
- The destination list of the dns control policy. This field support fuzzy query.
- Ids []string
- The rule id list of the dns control policy. This field support fuzzy query.
- Internet
Firewall stringId - The internet firewall id of the dns control policy.
- Output
File string - File name where to save data source results.
- Sources []string
- The source list of the dns control policy. This field support fuzzy query.
- Statuses []bool
- The enable status list of the dns control policy. This field support fuzzy query.
- description String
- The description of the dns control policy. This field support fuzzy query.
- destinations List<String>
- The destination list of the dns control policy. This field support fuzzy query.
- ids List<String>
- The rule id list of the dns control policy. This field support fuzzy query.
- internet
Firewall StringId - The internet firewall id of the dns control policy.
- output
File String - File name where to save data source results.
- sources List<String>
- The source list of the dns control policy. This field support fuzzy query.
- statuses List<Boolean>
- The enable status list of the dns control policy. This field support fuzzy query.
- description string
- The description of the dns control policy. This field support fuzzy query.
- destinations string[]
- The destination list of the dns control policy. This field support fuzzy query.
- ids string[]
- The rule id list of the dns control policy. This field support fuzzy query.
- internet
Firewall stringId - The internet firewall id of the dns control policy.
- output
File string - File name where to save data source results.
- sources string[]
- The source list of the dns control policy. This field support fuzzy query.
- statuses boolean[]
- The enable status list of the dns control policy. This field support fuzzy query.
- description str
- The description of the dns control policy. This field support fuzzy query.
- destinations Sequence[str]
- The destination list of the dns control policy. This field support fuzzy query.
- ids Sequence[str]
- The rule id list of the dns control policy. This field support fuzzy query.
- internet_
firewall_ strid - The internet firewall id of the dns control policy.
- output_
file str - File name where to save data source results.
- sources Sequence[str]
- The source list of the dns control policy. This field support fuzzy query.
- statuses Sequence[bool]
- The enable status list of the dns control policy. This field support fuzzy query.
- description String
- The description of the dns control policy. This field support fuzzy query.
- destinations List<String>
- The destination list of the dns control policy. This field support fuzzy query.
- ids List<String>
- The rule id list of the dns control policy. This field support fuzzy query.
- internet
Firewall StringId - The internet firewall id of the dns control policy.
- output
File String - File name where to save data source results.
- sources List<String>
- The source list of the dns control policy. This field support fuzzy query.
- statuses List<Boolean>
- The enable status list of the dns control policy. This field support fuzzy query.
getCfwDnsControlPolicies Result
The following output properties are available:
- Dns
Control List<GetPolicies Cfw Dns Control Policies Dns Control Policy> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Description string
- The description of the dns control policy.
- Destinations List<string>
- The destination of the dns control policy.
- Ids List<string>
- Internet
Firewall stringId - Output
File string - Sources List<string>
- The source vpc list of the dns control policy.
- Statuses List<bool>
- Whether to enable the dns control policy.
- Dns
Control []GetPolicies Cfw Dns Control Policies Dns Control Policy - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Description string
- The description of the dns control policy.
- Destinations []string
- The destination of the dns control policy.
- Ids []string
- Internet
Firewall stringId - Output
File string - Sources []string
- The source vpc list of the dns control policy.
- Statuses []bool
- Whether to enable the dns control policy.
- dns
Control List<GetPolicies Cfw Dns Control Policies Dns Control Policy> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- description String
- The description of the dns control policy.
- destinations List<String>
- The destination of the dns control policy.
- ids List<String>
- internet
Firewall StringId - output
File String - sources List<String>
- The source vpc list of the dns control policy.
- statuses List<Boolean>
- Whether to enable the dns control policy.
- dns
Control GetPolicies Cfw Dns Control Policies Dns Control Policy[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- description string
- The description of the dns control policy.
- destinations string[]
- The destination of the dns control policy.
- ids string[]
- internet
Firewall stringId - output
File string - sources string[]
- The source vpc list of the dns control policy.
- statuses boolean[]
- Whether to enable the dns control policy.
- dns_
control_ Sequence[Getpolicies Cfw Dns Control Policies Dns Control Policy] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- description str
- The description of the dns control policy.
- destinations Sequence[str]
- The destination of the dns control policy.
- ids Sequence[str]
- internet_
firewall_ strid - output_
file str - sources Sequence[str]
- The source vpc list of the dns control policy.
- statuses Sequence[bool]
- Whether to enable the dns control policy.
- dns
Control List<Property Map>Policies - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- description String
- The description of the dns control policy.
- destinations List<String>
- The destination of the dns control policy.
- ids List<String>
- internet
Firewall StringId - output
File String - sources List<String>
- The source vpc list of the dns control policy.
- statuses List<Boolean>
- Whether to enable the dns control policy.
Supporting Types
GetCfwDnsControlPoliciesDnsControlPolicy
- Account
Id string - The account id of the dns control policy.
- Description string
- The description of the dns control policy. This field support fuzzy query.
- Destination string
- The destination list of the dns control policy. This field support fuzzy query.
- Destination
Group List<string>Lists - The destination group list of the dns control policy.
- Destination
Type string - The destination type of the dns control policy.
- Domain
Lists List<string> - The destination domain list of the dns control policy.
- Hit
Cnt int - The hit count of the dns control policy.
- Id string
- The id of the dns control policy.
- Last
Hit intTime - The last hit time of the dns control policy. Unix timestamp.
- Rule
Id string - The id of the dns control policy.
- Sources
List<Get
Cfw Dns Control Policies Dns Control Policy Source> - The source list of the dns control policy. This field support fuzzy query.
- Status bool
- The enable status list of the dns control policy. This field support fuzzy query.
- Use
Count int - The use count of the dns control policy.
- Account
Id string - The account id of the dns control policy.
- Description string
- The description of the dns control policy. This field support fuzzy query.
- Destination string
- The destination list of the dns control policy. This field support fuzzy query.
- Destination
Group []stringLists - The destination group list of the dns control policy.
- Destination
Type string - The destination type of the dns control policy.
- Domain
Lists []string - The destination domain list of the dns control policy.
- Hit
Cnt int - The hit count of the dns control policy.
- Id string
- The id of the dns control policy.
- Last
Hit intTime - The last hit time of the dns control policy. Unix timestamp.
- Rule
Id string - The id of the dns control policy.
- Sources
[]Get
Cfw Dns Control Policies Dns Control Policy Source - The source list of the dns control policy. This field support fuzzy query.
- Status bool
- The enable status list of the dns control policy. This field support fuzzy query.
- Use
Count int - The use count of the dns control policy.
- account
Id String - The account id of the dns control policy.
- description String
- The description of the dns control policy. This field support fuzzy query.
- destination String
- The destination list of the dns control policy. This field support fuzzy query.
- destination
Group List<String>Lists - The destination group list of the dns control policy.
- destination
Type String - The destination type of the dns control policy.
- domain
Lists List<String> - The destination domain list of the dns control policy.
- hit
Cnt Integer - The hit count of the dns control policy.
- id String
- The id of the dns control policy.
- last
Hit IntegerTime - The last hit time of the dns control policy. Unix timestamp.
- rule
Id String - The id of the dns control policy.
- sources
List<Get
Cfw Dns Control Policies Dns Control Policy Source> - The source list of the dns control policy. This field support fuzzy query.
- status Boolean
- The enable status list of the dns control policy. This field support fuzzy query.
- use
Count Integer - The use count of the dns control policy.
- account
Id string - The account id of the dns control policy.
- description string
- The description of the dns control policy. This field support fuzzy query.
- destination string
- The destination list of the dns control policy. This field support fuzzy query.
- destination
Group string[]Lists - The destination group list of the dns control policy.
- destination
Type string - The destination type of the dns control policy.
- domain
Lists string[] - The destination domain list of the dns control policy.
- hit
Cnt number - The hit count of the dns control policy.
- id string
- The id of the dns control policy.
- last
Hit numberTime - The last hit time of the dns control policy. Unix timestamp.
- rule
Id string - The id of the dns control policy.
- sources
Get
Cfw Dns Control Policies Dns Control Policy Source[] - The source list of the dns control policy. This field support fuzzy query.
- status boolean
- The enable status list of the dns control policy. This field support fuzzy query.
- use
Count number - The use count of the dns control policy.
- account_
id str - The account id of the dns control policy.
- description str
- The description of the dns control policy. This field support fuzzy query.
- destination str
- The destination list of the dns control policy. This field support fuzzy query.
- destination_
group_ Sequence[str]lists - The destination group list of the dns control policy.
- destination_
type str - The destination type of the dns control policy.
- domain_
lists Sequence[str] - The destination domain list of the dns control policy.
- hit_
cnt int - The hit count of the dns control policy.
- id str
- The id of the dns control policy.
- last_
hit_ inttime - The last hit time of the dns control policy. Unix timestamp.
- rule_
id str - The id of the dns control policy.
- sources
Sequence[Get
Cfw Dns Control Policies Dns Control Policy Source] - The source list of the dns control policy. This field support fuzzy query.
- status bool
- The enable status list of the dns control policy. This field support fuzzy query.
- use_
count int - The use count of the dns control policy.
- account
Id String - The account id of the dns control policy.
- description String
- The description of the dns control policy. This field support fuzzy query.
- destination String
- The destination list of the dns control policy. This field support fuzzy query.
- destination
Group List<String>Lists - The destination group list of the dns control policy.
- destination
Type String - The destination type of the dns control policy.
- domain
Lists List<String> - The destination domain list of the dns control policy.
- hit
Cnt Number - The hit count of the dns control policy.
- id String
- The id of the dns control policy.
- last
Hit NumberTime - The last hit time of the dns control policy. Unix timestamp.
- rule
Id String - The id of the dns control policy.
- sources List<Property Map>
- The source list of the dns control policy. This field support fuzzy query.
- status Boolean
- The enable status list of the dns control policy. This field support fuzzy query.
- use
Count Number - The use count of the dns control policy.
GetCfwDnsControlPoliciesDnsControlPolicySource
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
