@twingate/pulumi-twingate
Version:
A Pulumi package for creating and managing Twingate cloud resources.
77 lines • 4.36 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.TwingateDNSFilteringProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* DNS filtering gives you the ability to control what websites your users can access. DNS filtering is only available on certain plans. For more information, see Twingate's [documentation](https://www.twingate.com/docs/dns-filtering). DNS filtering must be enabled for this resources to work. If DNS filtering isn't enabled, the provider will throw an error.
*
* ## Import
*
* ```sh
* $ pulumi import twingate:index/twingateDNSFilteringProfile:TwingateDNSFilteringProfile example RG5zRmlsdGVyaW5nUHJvZmlsZToxY2I4YzM0YTc0
* ```
*/
class TwingateDNSFilteringProfile extends pulumi.CustomResource {
/**
* Get an existing TwingateDNSFilteringProfile 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 TwingateDNSFilteringProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of TwingateDNSFilteringProfile. 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'] === TwingateDNSFilteringProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowedDomains"] = state ? state.allowedDomains : undefined;
resourceInputs["contentCategories"] = state ? state.contentCategories : undefined;
resourceInputs["deniedDomains"] = state ? state.deniedDomains : undefined;
resourceInputs["fallbackMethod"] = state ? state.fallbackMethod : undefined;
resourceInputs["groups"] = state ? state.groups : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["priority"] = state ? state.priority : undefined;
resourceInputs["privacyCategories"] = state ? state.privacyCategories : undefined;
resourceInputs["securityCategories"] = state ? state.securityCategories : undefined;
}
else {
const args = argsOrState;
if ((!args || args.priority === undefined) && !opts.urn) {
throw new Error("Missing required property 'priority'");
}
resourceInputs["allowedDomains"] = args ? args.allowedDomains : undefined;
resourceInputs["contentCategories"] = args ? args.contentCategories : undefined;
resourceInputs["deniedDomains"] = args ? args.deniedDomains : undefined;
resourceInputs["fallbackMethod"] = args ? args.fallbackMethod : undefined;
resourceInputs["groups"] = args ? args.groups : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["priority"] = args ? args.priority : undefined;
resourceInputs["privacyCategories"] = args ? args.privacyCategories : undefined;
resourceInputs["securityCategories"] = args ? args.securityCategories : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TwingateDNSFilteringProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.TwingateDNSFilteringProfile = TwingateDNSFilteringProfile;
/** @internal */
TwingateDNSFilteringProfile.__pulumiType = 'twingate:index/twingateDNSFilteringProfile:TwingateDNSFilteringProfile';
//# sourceMappingURL=twingateDNSFilteringProfile.js.map