"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CfwDnsControlPolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage cfw dns control policy
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * 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",
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * DnsControlPolicy can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:cloud_firewall/cfwDnsControlPolicy:CfwDnsControlPolicy default resource_id
 * ```
 */
class CfwDnsControlPolicy extends pulumi.CustomResource {
    /**
     * Get an existing CfwDnsControlPolicy resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new CfwDnsControlPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of CfwDnsControlPolicy.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === CfwDnsControlPolicy.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountId"] = state ? state.accountId : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["destination"] = state ? state.destination : undefined;
            resourceInputs["destinationType"] = state ? state.destinationType : undefined;
            resourceInputs["hitCnt"] = state ? state.hitCnt : undefined;
            resourceInputs["internetFirewallId"] = state ? state.internetFirewallId : undefined;
            resourceInputs["lastHitTime"] = state ? state.lastHitTime : undefined;
            resourceInputs["sources"] = state ? state.sources : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["useCount"] = state ? state.useCount : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.destination === undefined) && !opts.urn) {
                throw new Error("Missing required property 'destination'");
            }
            if ((!args || args.destinationType === undefined) && !opts.urn) {
                throw new Error("Missing required property 'destinationType'");
            }
            if ((!args || args.sources === undefined) && !opts.urn) {
                throw new Error("Missing required property 'sources'");
            }
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["destination"] = args ? args.destination : undefined;
            resourceInputs["destinationType"] = args ? args.destinationType : undefined;
            resourceInputs["internetFirewallId"] = args ? args.internetFirewallId : undefined;
            resourceInputs["sources"] = args ? args.sources : undefined;
            resourceInputs["status"] = args ? args.status : undefined;
            resourceInputs["accountId"] = undefined /*out*/;
            resourceInputs["hitCnt"] = undefined /*out*/;
            resourceInputs["lastHitTime"] = undefined /*out*/;
            resourceInputs["useCount"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CfwDnsControlPolicy.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CfwDnsControlPolicy = CfwDnsControlPolicy;
/** @internal */
CfwDnsControlPolicy.__pulumiType = 'volcengine:cloud_firewall/cfwDnsControlPolicy:CfwDnsControlPolicy';
//# sourceMappingURL=cfwDnsControlPolicy.js.map