1. Packages
  2. Volcengine
  3. API Docs
  4. cloud_firewall
  5. CfwDnsControlPolicies
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

volcengine.cloud_firewall.CfwDnsControlPolicies

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.29 published on Tuesday, Apr 29, 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.CfwDnsControlPoliciesOutput({
        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.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.CfwDnsControlPoliciesOutput(ctx, cloud_firewall.CfwDnsControlPoliciesOutputArgs{
    			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.CfwDnsControlPolicies.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.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());
    
        }
    }
    
    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}
    

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

    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 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.
    DestinationGroupLists List<string>
    The destination group list of the dns control policy.
    DestinationType string
    The destination type of the dns control policy.
    DomainLists List<string>
    The destination domain list of the dns control policy.
    HitCnt int
    The hit count of the dns control policy.
    Id string
    The id of the dns control policy.
    LastHitTime int
    The last hit time of the dns control policy. Unix timestamp.
    RuleId string
    The id of the dns control policy.
    Sources List<CfwDnsControlPoliciesDnsControlPolicySource>
    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.
    UseCount int
    The use count of the dns control policy.
    AccountId 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.
    DestinationGroupLists []string
    The destination group list of the dns control policy.
    DestinationType string
    The destination type of the dns control policy.
    DomainLists []string
    The destination domain list of the dns control policy.
    HitCnt int
    The hit count of the dns control policy.
    Id string
    The id of the dns control policy.
    LastHitTime int
    The last hit time of the dns control policy. Unix timestamp.
    RuleId string
    The id of the dns control policy.
    Sources []CfwDnsControlPoliciesDnsControlPolicySource
    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.
    UseCount int
    The use count of the dns control policy.
    accountId 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.
    destinationGroupLists List<String>
    The destination group list of the dns control policy.
    destinationType String
    The destination type of the dns control policy.
    domainLists List<String>
    The destination domain list of the dns control policy.
    hitCnt Integer
    The hit count of the dns control policy.
    id String
    The id of the dns control policy.
    lastHitTime Integer
    The last hit time of the dns control policy. Unix timestamp.
    ruleId String
    The id of the dns control policy.
    sources List<CfwDnsControlPoliciesDnsControlPolicySource>
    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.
    useCount Integer
    The use count of the dns control policy.
    accountId 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.
    destinationGroupLists string[]
    The destination group list of the dns control policy.
    destinationType string
    The destination type of the dns control policy.
    domainLists string[]
    The destination domain list of the dns control policy.
    hitCnt number
    The hit count of the dns control policy.
    id string
    The id of the dns control policy.
    lastHitTime number
    The last hit time of the dns control policy. Unix timestamp.
    ruleId string
    The id of the dns control policy.
    sources CfwDnsControlPoliciesDnsControlPolicySource[]
    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.
    useCount 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_lists Sequence[str]
    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_time int
    The last hit time of the dns control policy. Unix timestamp.
    rule_id str
    The id of the dns control policy.
    sources Sequence[CfwDnsControlPoliciesDnsControlPolicySource]
    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.
    accountId 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.
    destinationGroupLists List<String>
    The destination group list of the dns control policy.
    destinationType String
    The destination type of the dns control policy.
    domainLists List<String>
    The destination domain list of the dns control policy.
    hitCnt Number
    The hit count of the dns control policy.
    id String
    The id of the dns control policy.
    lastHitTime Number
    The last hit time of the dns control policy. Unix timestamp.
    ruleId 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.
    useCount Number
    The use count of the dns control policy.

    CfwDnsControlPoliciesDnsControlPolicySource

    Region string
    The region of the source vpc.
    VpcId string
    The id of the source vpc.
    Region string
    The region of the source vpc.
    VpcId string
    The id of the source vpc.
    region String
    The region of the source vpc.
    vpcId String
    The id of the source vpc.
    region string
    The region of the source vpc.
    vpcId string
    The id of the source vpc.
    region str
    The region of the source vpc.
    vpc_id str
    The id of the source vpc.
    region String
    The region of the source vpc.
    vpcId 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.
    volcengine logo
    Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine