@crowdstrike/pulumi
Version:
A Pulumi package for creating and managing CrowdStrike resources. Based on terraform-provider-crowdstrike: version v0.0.4
91 lines • 3.96 kB
JavaScript
;
// *** 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.PreventionPolicyPrecedence = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource allows you set the precedence of Prevention Policies based on the order of IDs.
*
* ## API Scopes
*
* The following API scopes are required:
*
* - Prevention policies | Read & Write
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as crowdstrike from "@crowdstrike/pulumi";
*
* const example = new crowdstrike.PreventionPolicyPrecedence("example", {
* ids: [
* "a1j09y3yq0wnrpb5o6jlij9e4f40k6lq",
* "2asia54xti93bg0jbr5hfpqqbhxbyeoa",
* "xuzq8hs1uyc2s7zdar3fli0shiyl22vc",
* ],
* platformName: "linux",
* enforcement: "dynamic",
* });
* export const preventionPolicyPrecedence = example;
* ```
*/
class PreventionPolicyPrecedence extends pulumi.CustomResource {
/**
* Get an existing PreventionPolicyPrecedence 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 PreventionPolicyPrecedence(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PreventionPolicyPrecedence. 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'] === PreventionPolicyPrecedence.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["enforcement"] = state ? state.enforcement : undefined;
resourceInputs["ids"] = state ? state.ids : undefined;
resourceInputs["lastUpdated"] = state ? state.lastUpdated : undefined;
resourceInputs["platformName"] = state ? state.platformName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.enforcement === undefined) && !opts.urn) {
throw new Error("Missing required property 'enforcement'");
}
if ((!args || args.ids === undefined) && !opts.urn) {
throw new Error("Missing required property 'ids'");
}
if ((!args || args.platformName === undefined) && !opts.urn) {
throw new Error("Missing required property 'platformName'");
}
resourceInputs["enforcement"] = args ? args.enforcement : undefined;
resourceInputs["ids"] = args ? args.ids : undefined;
resourceInputs["platformName"] = args ? args.platformName : undefined;
resourceInputs["lastUpdated"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PreventionPolicyPrecedence.__pulumiType, name, resourceInputs, opts);
}
}
exports.PreventionPolicyPrecedence = PreventionPolicyPrecedence;
/** @internal */
PreventionPolicyPrecedence.__pulumiType = 'crowdstrike:index/preventionPolicyPrecedence:PreventionPolicyPrecedence';
//# sourceMappingURL=preventionPolicyPrecedence.js.map