UNPKG

@pulumi/gcp

Version:

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

128 lines 5.83 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.V2ProjectMuteConfig = 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 ProjectMuteConfig, see: * * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v2/projects.muteConfigs) * * ## Example Usage * * ### Scc V2 Project Mute Config Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.securitycenter.V2ProjectMuteConfig("default", { * muteConfigId: "my-config", * project: "my-project-name", * location: "global", * description: "My custom Cloud Security Command Center Finding Project mute Configuration", * filter: "severity = \"HIGH\"", * type: "STATIC", * }); * ``` * * ## Import * * ProjectMuteConfig can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/muteConfigs/{{mute_config_id}}` * * * `{{project}}/{{location}}/{{mute_config_id}}` * * * `{{location}}/{{mute_config_id}}` * * When using the `pulumi import` command, ProjectMuteConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:securitycenter/v2ProjectMuteConfig:V2ProjectMuteConfig default projects/{{project}}/locations/{{location}}/muteConfigs/{{mute_config_id}} * ``` * * ```sh * $ pulumi import gcp:securitycenter/v2ProjectMuteConfig:V2ProjectMuteConfig default {{project}}/{{location}}/{{mute_config_id}} * ``` * * ```sh * $ pulumi import gcp:securitycenter/v2ProjectMuteConfig:V2ProjectMuteConfig default {{location}}/{{mute_config_id}} * ``` */ class V2ProjectMuteConfig extends pulumi.CustomResource { /** * Get an existing V2ProjectMuteConfig 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 V2ProjectMuteConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of V2ProjectMuteConfig. 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'] === V2ProjectMuteConfig.__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["filter"] = state ? state.filter : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["mostRecentEditor"] = state ? state.mostRecentEditor : undefined; resourceInputs["muteConfigId"] = state ? state.muteConfigId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : 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.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["filter"] = args ? args.filter : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["muteConfigId"] = args ? args.muteConfigId : undefined; resourceInputs["project"] = args ? args.project : 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(V2ProjectMuteConfig.__pulumiType, name, resourceInputs, opts); } } exports.V2ProjectMuteConfig = V2ProjectMuteConfig; /** @internal */ V2ProjectMuteConfig.__pulumiType = 'gcp:securitycenter/v2ProjectMuteConfig:V2ProjectMuteConfig'; //# sourceMappingURL=v2projectMuteConfig.js.map