@crowdstrike/pulumi
Version:
A Pulumi package for creating and managing CrowdStrike resources. Based on terraform-provider-crowdstrike: version v0.0.4
86 lines • 4.02 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.SensorUpdatePolicyHostGroupAttachment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource allows managing the host groups attached to a sensor update policy. This resource takes exclusive ownership over the host groups assigned to a sensor update policy. If you want to fully create or manage a sensor update policy please use the `sensorUpdatePolicy` resource.
*
* ## API Scopes
*
* The following API scopes are required:
*
* - Sensor update policies | Read & Write
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as crowdstrike from "@crowdstrike/pulumi";
*
* const example = new crowdstrike.SensorUpdatePolicyHostGroupAttachment("example", {
* idProperty: "34ef8e65eb1b4642861e389da3f7e82f",
* hostGroups: ["ff1ca3nfr7899j1abf61c0448db28be5"],
* });
* export const sensorUpdatePolicyHostGroupAttachment = example;
* ```
*
* ## Import
*
* Sensor Update Policy Host Group Attachment can be imported by specifying the id.
*
* ```sh
* $ pulumi import crowdstrike:index/sensorUpdatePolicyHostGroupAttachment:SensorUpdatePolicyHostGroupAttachment example 7fb858a949034a0cbca175f660f1e769
* ```
*/
class SensorUpdatePolicyHostGroupAttachment extends pulumi.CustomResource {
/**
* Get an existing SensorUpdatePolicyHostGroupAttachment 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 SensorUpdatePolicyHostGroupAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SensorUpdatePolicyHostGroupAttachment. 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'] === SensorUpdatePolicyHostGroupAttachment.__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["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["lastUpdated"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SensorUpdatePolicyHostGroupAttachment.__pulumiType, name, resourceInputs, opts);
}
}
exports.SensorUpdatePolicyHostGroupAttachment = SensorUpdatePolicyHostGroupAttachment;
/** @internal */
SensorUpdatePolicyHostGroupAttachment.__pulumiType = 'crowdstrike:index/sensorUpdatePolicyHostGroupAttachment:SensorUpdatePolicyHostGroupAttachment';
//# sourceMappingURL=sensorUpdatePolicyHostGroupAttachment.js.map