UNPKG

@gtheocrwd/pulumi-crowdstrike

Version:

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

98 lines 3.96 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 "@gtheocrwd/pulumi-crowdstrike"; * * const example = new crowdstrike.HostGroup("example", { * description: "Made with Pulumi", * type: "dynamic", * assignmentRule: "tags:'SensorGroupingTags/cloud-lab'+os_version:'Amazon Linux 2'", * }); * export const hostGroup = example; * ``` * * ## 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["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["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