@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
189 lines • 8.03 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Floorsetting = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* Model Armor floor settings define rules that dictate minimum requirements for all Model Armor templates created at a specific point in the Google Cloud resource hierarchy (that is, at an organization, folder, or project level). If there are
* multiple floor settings that conflict with each other, the settings lower in the resource hierarchy take precedence
* For more information, checkout https://cloud.google.com/security-command-center/docs/model_armor_floor_settings
*
* ## Example Usage
*
* ### Modelarmor Floorsetting Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const floorsetting_basic = new gcp.modelarmor.Floorsetting("floorsetting-basic", {
* parent: "projects/my-project-name",
* location: "global",
* filterConfig: {},
* });
* ```
* ### Modelarmor Floorsetting Filter Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const floorsetting_filter_config = new gcp.modelarmor.Floorsetting("floorsetting-filter-config", {
* location: "global",
* parent: "project/my-project-name",
* filterConfig: {
* raiSettings: {
* raiFilters: [{
* filterType: "DANGEROUS",
* confidenceLevel: "MEDIUM_AND_ABOVE",
* }],
* },
* sdpSettings: {
* basicConfig: {
* filterEnforcement: "ENABLED",
* },
* },
* piAndJailbreakFilterSettings: {
* filterEnforcement: "ENABLED",
* confidenceLevel: "HIGH",
* },
* maliciousUriFilterSettings: {
* filterEnforcement: "ENABLED",
* },
* },
* enableFloorSettingEnforcement: true,
* });
* ```
* ### Modelarmor Floorsetting Ai Platform Metadata
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const floorsetting_integrated_metadata = new gcp.modelarmor.Floorsetting("floorsetting-integrated-metadata", {
* location: "global",
* parent: "projects/my-project-name",
* filterConfig: {},
* enableFloorSettingEnforcement: false,
* aiPlatformFloorSetting: {
* inspectOnly: true,
* enableCloudLogging: true,
* },
* floorSettingMetadata: {
* multiLanguageDetection: {
* enableMultiLanguageDetection: false,
* },
* },
* });
* ```
*
* ## Import
*
* Floorsetting can be imported using any of these accepted formats:
*
* * `{{parent}}/locations/{{location}}/floorSetting`
* * `{{parent}}/{{location}}`
*
* When using the `pulumi import` command, Floorsetting can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:modelarmor/floorsetting:Floorsetting default {{parent}}/locations/{{location}}/floorSetting
* $ pulumi import gcp:modelarmor/floorsetting:Floorsetting default {{parent}}/{{location}}
* ```
*/
class Floorsetting extends pulumi.CustomResource {
/**
* Get an existing Floorsetting 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 Floorsetting(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:modelarmor/floorsetting:Floorsetting';
/**
* Returns true if the given object is an instance of Floorsetting. 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'] === Floorsetting.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aiPlatformFloorSetting"] = state?.aiPlatformFloorSetting;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["enableFloorSettingEnforcement"] = state?.enableFloorSettingEnforcement;
resourceInputs["filterConfig"] = state?.filterConfig;
resourceInputs["floorSettingMetadata"] = state?.floorSettingMetadata;
resourceInputs["googleMcpServerFloorSetting"] = state?.googleMcpServerFloorSetting;
resourceInputs["integratedServices"] = state?.integratedServices;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["parent"] = state?.parent;
resourceInputs["updateTime"] = state?.updateTime;
}
else {
const args = argsOrState;
if (args?.filterConfig === undefined && !opts.urn) {
throw new Error("Missing required property 'filterConfig'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if (args?.parent === undefined && !opts.urn) {
throw new Error("Missing required property 'parent'");
}
resourceInputs["aiPlatformFloorSetting"] = args?.aiPlatformFloorSetting;
resourceInputs["enableFloorSettingEnforcement"] = args?.enableFloorSettingEnforcement;
resourceInputs["filterConfig"] = args?.filterConfig;
resourceInputs["floorSettingMetadata"] = args?.floorSettingMetadata;
resourceInputs["googleMcpServerFloorSetting"] = args?.googleMcpServerFloorSetting;
resourceInputs["integratedServices"] = args?.integratedServices;
resourceInputs["location"] = args?.location;
resourceInputs["parent"] = args?.parent;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Floorsetting.__pulumiType, name, resourceInputs, opts);
}
}
exports.Floorsetting = Floorsetting;
//# sourceMappingURL=floorsetting.js.map