@crowdstrike/pulumi
Version:
A Pulumi package for creating and managing CrowdStrike resources. Based on terraform-provider-crowdstrike: version v0.0.4
89 lines • 4.11 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.PreventionPolicyAttachment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource allows managing the host groups and ioa rule groups attached to a prevention policy. This resource takes exclusive ownership over the host groups and ioa rule groups assigned to a prevention policy. If you want to fully create or manage a prevention policy please use the `prevention_policy_*` resource for the platform you want to manage.
*
* ## 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.PreventionPolicyAttachment("example", {
* idProperty: "16c0eecfeebb47ce95185fda2e5b3112",
* hostGroups: ["df868c936cd443e5a95b2603e2483602"],
* ioaRuleGroups: ["507117bc669d41bb93d0a009f557bb23"],
* });
* export const preventionPolicyAttachment = example;
* ```
*
* ## Import
*
* Prevention Policy Attachment can be imported by specifying the id.
*
* ```sh
* $ pulumi import crowdstrike:index/preventionPolicyAttachment:PreventionPolicyAttachment example 7fb858a949034a0cbca175f660f1e769
* ```
*/
class PreventionPolicyAttachment extends pulumi.CustomResource {
/**
* Get an existing PreventionPolicyAttachment 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 PreventionPolicyAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PreventionPolicyAttachment. 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'] === PreventionPolicyAttachment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["hostGroups"] = state ? state.hostGroups : undefined;
resourceInputs["idProperty"] = state ? state.idProperty : undefined;
resourceInputs["ioaRuleGroups"] = state ? state.ioaRuleGroups : undefined;
resourceInputs["lastUpdated"] = state ? state.lastUpdated : undefined;
}
else {
const args = argsOrState;
if ((!args || args.idProperty === undefined) && !opts.urn) {
throw new Error("Missing required property 'idProperty'");
}
resourceInputs["hostGroups"] = args ? args.hostGroups : undefined;
resourceInputs["idProperty"] = args ? args.idProperty : undefined;
resourceInputs["ioaRuleGroups"] = args ? args.ioaRuleGroups : undefined;
resourceInputs["lastUpdated"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PreventionPolicyAttachment.__pulumiType, name, resourceInputs, opts);
}
}
exports.PreventionPolicyAttachment = PreventionPolicyAttachment;
/** @internal */
PreventionPolicyAttachment.__pulumiType = 'crowdstrike:index/preventionPolicyAttachment:PreventionPolicyAttachment';
//# sourceMappingURL=preventionPolicyAttachment.js.map