UNPKG

@pulumi/gcp

Version:

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

203 lines • 9.13 kB
"use strict"; // *** 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.CxSecuritySettings = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Represents the settings related to security issues, such as data redaction and data retention. It may take hours for updates on the settings to propagate to all the related components and take effect. * Multiple security settings can be configured in each location. Each agent can specify the security settings to apply, and each setting can be applied to multiple agents in the same project and location. * * To get more information about SecuritySettings, see: * * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.securitySettings) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) * * ## Example Usage * * ### Dialogflowcx Security Settings Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const basicSecuritySettings = new gcp.diagflow.CxSecuritySettings("basic_security_settings", { * displayName: "dialogflowcx-security-settings", * location: "global", * purgeDataTypes: [], * retentionWindowDays: 7, * }); * ``` * ### Dialogflowcx Security Settings Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const inspect = new gcp.dataloss.PreventionInspectTemplate("inspect", { * parent: "projects/my-project-name/locations/global", * displayName: "dialogflowcx-inspect-template", * inspectConfig: { * infoTypes: [{ * name: "EMAIL_ADDRESS", * }], * }, * }); * const deidentify = new gcp.dataloss.PreventionDeidentifyTemplate("deidentify", { * parent: "projects/my-project-name/locations/global", * displayName: "dialogflowcx-deidentify-template", * deidentifyConfig: { * infoTypeTransformations: { * transformations: [{ * primitiveTransformation: { * replaceConfig: { * newValue: { * stringValue: "[REDACTED]", * }, * }, * }, * }], * }, * }, * }); * const bucket = new gcp.storage.Bucket("bucket", { * name: "dialogflowcx-bucket", * location: "US", * uniformBucketLevelAccess: true, * }); * const basicSecuritySettings = new gcp.diagflow.CxSecuritySettings("basic_security_settings", { * displayName: "dialogflowcx-security-settings", * location: "global", * redactionStrategy: "REDACT_WITH_SERVICE", * redactionScope: "REDACT_DISK_STORAGE", * inspectTemplate: inspect.id, * deidentifyTemplate: deidentify.id, * purgeDataTypes: ["DIALOGFLOW_HISTORY"], * audioExportSettings: { * gcsBucket: bucket.id, * audioExportPattern: "export", * enableAudioRedaction: true, * audioFormat: "OGG", * }, * insightsExportSettings: { * enableInsightsExport: true, * }, * retentionStrategy: "REMOVE_AFTER_CONVERSATION", * }); * ``` * * ## Import * * SecuritySettings can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/securitySettings/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, SecuritySettings can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/cxSecuritySettings:CxSecuritySettings default projects/{{project}}/locations/{{location}}/securitySettings/{{name}} * $ pulumi import gcp:diagflow/cxSecuritySettings:CxSecuritySettings default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:diagflow/cxSecuritySettings:CxSecuritySettings default {{location}}/{{name}} * ``` */ class CxSecuritySettings extends pulumi.CustomResource { /** * Get an existing CxSecuritySettings 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 CxSecuritySettings(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:diagflow/cxSecuritySettings:CxSecuritySettings'; /** * Returns true if the given object is an instance of CxSecuritySettings. 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'] === CxSecuritySettings.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["audioExportSettings"] = state?.audioExportSettings; resourceInputs["deidentifyTemplate"] = state?.deidentifyTemplate; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["displayName"] = state?.displayName; resourceInputs["insightsExportSettings"] = state?.insightsExportSettings; resourceInputs["inspectTemplate"] = state?.inspectTemplate; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["purgeDataTypes"] = state?.purgeDataTypes; resourceInputs["redactionScope"] = state?.redactionScope; resourceInputs["redactionStrategy"] = state?.redactionStrategy; resourceInputs["retentionStrategy"] = state?.retentionStrategy; resourceInputs["retentionWindowDays"] = state?.retentionWindowDays; } else { const args = argsOrState; if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["audioExportSettings"] = args?.audioExportSettings; resourceInputs["deidentifyTemplate"] = args?.deidentifyTemplate; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["displayName"] = args?.displayName; resourceInputs["insightsExportSettings"] = args?.insightsExportSettings; resourceInputs["inspectTemplate"] = args?.inspectTemplate; resourceInputs["location"] = args?.location; resourceInputs["project"] = args?.project; resourceInputs["purgeDataTypes"] = args?.purgeDataTypes; resourceInputs["redactionScope"] = args?.redactionScope; resourceInputs["redactionStrategy"] = args?.redactionStrategy; resourceInputs["retentionStrategy"] = args?.retentionStrategy; resourceInputs["retentionWindowDays"] = args?.retentionWindowDays; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CxSecuritySettings.__pulumiType, name, resourceInputs, opts); } } exports.CxSecuritySettings = CxSecuritySettings; //# sourceMappingURL=cxSecuritySettings.js.map