UNPKG

@crowdstrike/pulumi

Version:

A Pulumi package for creating and managing CrowdStrike resources. Based on terraform-provider-crowdstrike: version v0.0.4

118 lines 4.66 kB
"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.HostGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to manage host groups in the CrowdStrike Falcon Platform. * * ## API Scopes * * The following API scopes are required: * * - Host groups | Read & Write * - Firewall management | Read & Write * - Prevention policies | Read & Write * - Response policies | Read & Write * - Sensor update policies | Read & Write * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as crowdstrike from "@crowdstrike/pulumi"; * * const dynamic = new crowdstrike.HostGroup("dynamic", { * assignmentRule: "tags:'SensorGroupingTags/molecule'+os_version:'Debian GNU 11'", * description: "Made with Pulumi", * type: "dynamic", * }); * const static = new crowdstrike.HostGroup("static", { * description: "Made with Pulumi", * type: "staticByID", * hostIds: [ * "host1", * "host2", * ], * }); * const staticByID = new crowdstrike.HostGroup("staticByID", { * description: "Made with Pulumi", * type: "staticByID", * hostIds: [ * "123123", * "124124", * ], * }); * export const hostGroup = dynamic; * ``` * * ## Import * * host group can be imported by specifying the policy id. * * ```sh * $ pulumi import crowdstrike:index/hostGroup:HostGroup example 7fb858a949034a0cbca175f660f1e769 * ``` */ class HostGroup extends pulumi.CustomResource { /** * Get an existing HostGroup 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 HostGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of HostGroup. 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'] === HostGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["assignmentRule"] = state ? state.assignmentRule : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["hostIds"] = state ? state.hostIds : undefined; resourceInputs["hostnames"] = state ? state.hostnames : undefined; resourceInputs["lastUpdated"] = state ? state.lastUpdated : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.description === undefined) && !opts.urn) { throw new Error("Missing required property 'description'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["assignmentRule"] = args ? args.assignmentRule : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["hostIds"] = args ? args.hostIds : undefined; resourceInputs["hostnames"] = args ? args.hostnames : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["lastUpdated"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(HostGroup.__pulumiType, name, resourceInputs, opts); } } exports.HostGroup = HostGroup; /** @internal */ HostGroup.__pulumiType = 'crowdstrike:index/hostGroup:HostGroup'; //# sourceMappingURL=hostGroup.js.map