1. Packages
  2. Volcengine
  3. API Docs
  4. cloud_firewall
  5. CfwDnsControlPolicies
Volcengine v0.0.28 published on Thursday, Apr 24, 2025 by Volcengine

volcengine.cloud_firewall.CfwDnsControlPolicies

Explore with Pulumi AI

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.CfwDnsControlPoliciesOutput({
    ids: [fooCfwDnsControlPolicy.id],
});
Copy
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.cfw_dns_control_policies_output(ids=[foo_cfw_dns_control_policy.id])
Copy
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.CfwDnsControlPoliciesOutput(ctx, cloud_firewall.CfwDnsControlPoliciesOutputArgs{
			Ids: pulumi.StringArray{
				fooCfwDnsControlPolicy.ID(),
			},
		}, nil)
		return nil
	})
}
Copy
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.CfwDnsControlPolicies.Invoke(new()
    {
        Ids = new[]
        {
            fooCfwDnsControlPolicy.Id,
        },
    });

});
Copy
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.CfwDnsControlPoliciesArgs;
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.CfwDnsControlPolicies(CfwDnsControlPoliciesArgs.builder()
            .ids(fooCfwDnsControlPolicy.id())
            .build());

    }
}
Copy
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:CfwDnsControlPolicies
      Arguments:
        ids:
          - ${fooCfwDnsControlPolicy.id}
Copy

Using CfwDnsControlPolicies

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 cfwDnsControlPolicies(args: CfwDnsControlPoliciesArgs, opts?: InvokeOptions): Promise<CfwDnsControlPoliciesResult>
function cfwDnsControlPoliciesOutput(args: CfwDnsControlPoliciesOutputArgs, opts?: InvokeOptions): Output<CfwDnsControlPoliciesResult>
Copy
def 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) -> CfwDnsControlPoliciesResult
def 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[CfwDnsControlPoliciesResult]
Copy
func CfwDnsControlPolicies(ctx *Context, args *CfwDnsControlPoliciesArgs, opts ...InvokeOption) (*CfwDnsControlPoliciesResult, error)
func CfwDnsControlPoliciesOutput(ctx *Context, args *CfwDnsControlPoliciesOutputArgs, opts ...InvokeOption) CfwDnsControlPoliciesResultOutput
Copy
public static class CfwDnsControlPolicies 
{
    public static Task<CfwDnsControlPoliciesResult> InvokeAsync(CfwDnsControlPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<CfwDnsControlPoliciesResult> Invoke(CfwDnsControlPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<CfwDnsControlPoliciesResult> cfwDnsControlPolicies(CfwDnsControlPoliciesArgs args, InvokeOptions options)
public static Output<CfwDnsControlPoliciesResult> cfwDnsControlPolicies(CfwDnsControlPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: volcengine:cloud_firewall:CfwDnsControlPolicies
  arguments:
    # arguments dictionary
Copy

The 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.
InternetFirewallId string
The internet firewall id of the dns control policy.
OutputFile 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.
InternetFirewallId string
The internet firewall id of the dns control policy.
OutputFile 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.
internetFirewallId String
The internet firewall id of the dns control policy.
outputFile 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.
internetFirewallId string
The internet firewall id of the dns control policy.
outputFile 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_id str
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.
internetFirewallId String
The internet firewall id of the dns control policy.
outputFile 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.

CfwDnsControlPolicies Result

The following output properties are available:

DnsControlPolicies List<CfwDnsControlPoliciesDnsControlPolicy>
The collection of query.
Id string
The provider-assigned unique ID for this managed resource.
TotalCount 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>
InternetFirewallId string
OutputFile string
Sources List<string>
The source vpc list of the dns control policy.
Statuses List<bool>
Whether to enable the dns control policy.
DnsControlPolicies []CfwDnsControlPoliciesDnsControlPolicy
The collection of query.
Id string
The provider-assigned unique ID for this managed resource.
TotalCount 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
InternetFirewallId string
OutputFile string
Sources []string
The source vpc list of the dns control policy.
Statuses []bool
Whether to enable the dns control policy.
dnsControlPolicies List<CfwDnsControlPoliciesDnsControlPolicy>
The collection of query.
id String
The provider-assigned unique ID for this managed resource.
totalCount 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>
internetFirewallId String
outputFile String
sources List<String>
The source vpc list of the dns control policy.
statuses List<Boolean>
Whether to enable the dns control policy.
dnsControlPolicies CfwDnsControlPoliciesDnsControlPolicy[]
The collection of query.
id string
The provider-assigned unique ID for this managed resource.
totalCount 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[]
internetFirewallId string
outputFile string
sources string[]
The source vpc list of the dns control policy.
statuses boolean[]
Whether to enable the dns control policy.
dns_control_policies Sequence[CfwDnsControlPoliciesDnsControlPolicy]
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_id str
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.
dnsControlPolicies List<Property Map>
The collection of query.
id String
The provider-assigned unique ID for this managed resource.
totalCount 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>
internetFirewallId String
outputFile 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

CfwDnsControlPoliciesDnsControlPolicy

AccountId This property is required. string
The account id of the dns control policy.
Description This property is required. string
The description of the dns control policy. This field support fuzzy query.
Destination This property is required. string
The destination list of the dns control policy. This field support fuzzy query.
DestinationGroupLists This property is required. List<string>
The destination group list of the dns control policy.
DestinationType This property is required. string
The destination type of the dns control policy.
DomainLists This property is required. List<string>
The destination domain list of the dns control policy.
HitCnt This property is required. int
The hit count of the dns control policy.
Id This property is required. string
The id of the dns control policy.
LastHitTime This property is required. int
The last hit time of the dns control policy. Unix timestamp.
RuleId This property is required. string
The id of the dns control policy.
Sources This property is required. List<CfwDnsControlPoliciesDnsControlPolicySource>
The source list of the dns control policy. This field support fuzzy query.
Status This property is required. bool
The enable status list of the dns control policy. This field support fuzzy query.
UseCount This property is required. int
The use count of the dns control policy.
AccountId This property is required. string
The account id of the dns control policy.
Description This property is required. string
The description of the dns control policy. This field support fuzzy query.
Destination This property is required. string
The destination list of the dns control policy. This field support fuzzy query.
DestinationGroupLists This property is required. []string
The destination group list of the dns control policy.
DestinationType This property is required. string
The destination type of the dns control policy.
DomainLists This property is required. []string
The destination domain list of the dns control policy.
HitCnt This property is required. int
The hit count of the dns control policy.
Id This property is required. string
The id of the dns control policy.
LastHitTime This property is required. int
The last hit time of the dns control policy. Unix timestamp.
RuleId This property is required. string
The id of the dns control policy.
Sources This property is required. []CfwDnsControlPoliciesDnsControlPolicySource
The source list of the dns control policy. This field support fuzzy query.
Status This property is required. bool
The enable status list of the dns control policy. This field support fuzzy query.
UseCount This property is required. int
The use count of the dns control policy.
accountId This property is required. String
The account id of the dns control policy.
description This property is required. String
The description of the dns control policy. This field support fuzzy query.
destination This property is required. String
The destination list of the dns control policy. This field support fuzzy query.
destinationGroupLists This property is required. List<String>
The destination group list of the dns control policy.
destinationType This property is required. String
The destination type of the dns control policy.
domainLists This property is required. List<String>
The destination domain list of the dns control policy.
hitCnt This property is required. Integer
The hit count of the dns control policy.
id This property is required. String
The id of the dns control policy.
lastHitTime This property is required. Integer
The last hit time of the dns control policy. Unix timestamp.
ruleId This property is required. String
The id of the dns control policy.
sources This property is required. List<CfwDnsControlPoliciesDnsControlPolicySource>
The source list of the dns control policy. This field support fuzzy query.
status This property is required. Boolean
The enable status list of the dns control policy. This field support fuzzy query.
useCount This property is required. Integer
The use count of the dns control policy.
accountId This property is required. string
The account id of the dns control policy.
description This property is required. string
The description of the dns control policy. This field support fuzzy query.
destination This property is required. string
The destination list of the dns control policy. This field support fuzzy query.
destinationGroupLists This property is required. string[]
The destination group list of the dns control policy.
destinationType This property is required. string
The destination type of the dns control policy.
domainLists This property is required. string[]
The destination domain list of the dns control policy.
hitCnt This property is required. number
The hit count of the dns control policy.
id This property is required. string
The id of the dns control policy.
lastHitTime This property is required. number
The last hit time of the dns control policy. Unix timestamp.
ruleId This property is required. string
The id of the dns control policy.
sources This property is required. CfwDnsControlPoliciesDnsControlPolicySource[]
The source list of the dns control policy. This field support fuzzy query.
status This property is required. boolean
The enable status list of the dns control policy. This field support fuzzy query.
useCount This property is required. number
The use count of the dns control policy.
account_id This property is required. str
The account id of the dns control policy.
description This property is required. str
The description of the dns control policy. This field support fuzzy query.
destination This property is required. str
The destination list of the dns control policy. This field support fuzzy query.
destination_group_lists This property is required. Sequence[str]
The destination group list of the dns control policy.
destination_type This property is required. str
The destination type of the dns control policy.
domain_lists This property is required. Sequence[str]
The destination domain list of the dns control policy.
hit_cnt This property is required. int
The hit count of the dns control policy.
id This property is required. str
The id of the dns control policy.
last_hit_time This property is required. int
The last hit time of the dns control policy. Unix timestamp.
rule_id This property is required. str
The id of the dns control policy.
sources This property is required. Sequence[CfwDnsControlPoliciesDnsControlPolicySource]
The source list of the dns control policy. This field support fuzzy query.
status This property is required. bool
The enable status list of the dns control policy. This field support fuzzy query.
use_count This property is required. int
The use count of the dns control policy.
accountId This property is required. String
The account id of the dns control policy.
description This property is required. String
The description of the dns control policy. This field support fuzzy query.
destination This property is required. String
The destination list of the dns control policy. This field support fuzzy query.
destinationGroupLists This property is required. List<String>
The destination group list of the dns control policy.
destinationType This property is required. String
The destination type of the dns control policy.
domainLists This property is required. List<String>
The destination domain list of the dns control policy.
hitCnt This property is required. Number
The hit count of the dns control policy.
id This property is required. String
The id of the dns control policy.
lastHitTime This property is required. Number
The last hit time of the dns control policy. Unix timestamp.
ruleId This property is required. String
The id of the dns control policy.
sources This property is required. List<Property Map>
The source list of the dns control policy. This field support fuzzy query.
status This property is required. Boolean
The enable status list of the dns control policy. This field support fuzzy query.
useCount This property is required. Number
The use count of the dns control policy.

CfwDnsControlPoliciesDnsControlPolicySource

Region This property is required. string
The region of the source vpc.
VpcId This property is required. string
The id of the source vpc.
Region This property is required. string
The region of the source vpc.
VpcId This property is required. string
The id of the source vpc.
region This property is required. String
The region of the source vpc.
vpcId This property is required. String
The id of the source vpc.
region This property is required. string
The region of the source vpc.
vpcId This property is required. string
The id of the source vpc.
region This property is required. str
The region of the source vpc.
vpc_id This property is required. str
The id of the source vpc.
region This property is required. String
The region of the source vpc.
vpcId This property is required. String
The id of the source vpc.

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.