UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

116 lines 5.13 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.MuteConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Mute Findings is a volume management feature in Security Command Center * that lets you manually or programmatically hide irrelevant findings, * and create filters to automatically silence existing and future * findings based on criteria you specify. * * To get more information about MuteConfig, see: * * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.muteConfigs) * * ## Example Usage * * ### Scc Mute Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.securitycenter.MuteConfig("default", { * muteConfigId: "my-config", * parent: "organizations/123456789", * filter: "category: \"OS_VULNERABILITY\"", * description: "My Mute Config", * type: "DYNAMIC", * expiryTime: "2215-02-03T15:01:23Z", * }); * ``` * * ## Import * * MuteConfig can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, MuteConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:securitycenter/muteConfig:MuteConfig default {{name}} * ``` */ class MuteConfig extends pulumi.CustomResource { /** * Get an existing MuteConfig 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 MuteConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MuteConfig. 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'] === MuteConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["expiryTime"] = state ? state.expiryTime : undefined; resourceInputs["filter"] = state ? state.filter : undefined; resourceInputs["mostRecentEditor"] = state ? state.mostRecentEditor : undefined; resourceInputs["muteConfigId"] = state ? state.muteConfigId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["parent"] = state ? state.parent : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.filter === undefined) && !opts.urn) { throw new Error("Missing required property 'filter'"); } if ((!args || args.muteConfigId === undefined) && !opts.urn) { throw new Error("Missing required property 'muteConfigId'"); } if ((!args || args.parent === undefined) && !opts.urn) { throw new Error("Missing required property 'parent'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["expiryTime"] = args ? args.expiryTime : undefined; resourceInputs["filter"] = args ? args.filter : undefined; resourceInputs["muteConfigId"] = args ? args.muteConfigId : undefined; resourceInputs["parent"] = args ? args.parent : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["mostRecentEditor"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MuteConfig.__pulumiType, name, resourceInputs, opts); } } exports.MuteConfig = MuteConfig; /** @internal */ MuteConfig.__pulumiType = 'gcp:securitycenter/muteConfig:MuteConfig'; //# sourceMappingURL=muteConfig.js.map