UNPKG

@pulumi/gcp

Version:

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

146 lines 6.09 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.CxVersion = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * You can create multiple versions of your agent flows and deploy them to separate serving environments. * When you edit a flow, you are editing a draft flow. At any point, you can save a draft flow as a flow version. A flow version is an immutable snapshot of your flow data and associated agent data like intents, entities, webhooks, pages, route groups, etc. * * To get more information about Version, see: * * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.flows.versions) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) * * ## Example Usage * * ### Dialogflowcx Version Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const agent = new gcp.diagflow.CxAgent("agent", { * displayName: "dialogflowcx-agent", * location: "global", * defaultLanguageCode: "en", * supportedLanguageCodes: [ * "fr", * "de", * "es", * ], * timeZone: "America/New_York", * description: "Example description.", * avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png", * enableStackdriverLogging: true, * enableSpellCorrection: true, * speechToTextSettings: { * enableSpeechAdaptation: true, * }, * }); * const version1 = new gcp.diagflow.CxVersion("version_1", { * parent: agent.startFlow, * displayName: "1.0.0", * description: "version 1.0.0", * }); * ``` * * ## Import * * Version can be imported using any of these accepted formats: * * * `{{parent}}/versions/{{name}}` * * `{{parent}}/{{name}}` * * When using the `pulumi import` command, Version can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/cxVersion:CxVersion default {{parent}}/versions/{{name}} * $ pulumi import gcp:diagflow/cxVersion:CxVersion default {{parent}}/{{name}} * ``` */ class CxVersion extends pulumi.CustomResource { /** * Get an existing CxVersion 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 CxVersion(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:diagflow/cxVersion:CxVersion'; /** * Returns true if the given object is an instance of CxVersion. 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'] === CxVersion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["displayName"] = state?.displayName; resourceInputs["name"] = state?.name; resourceInputs["nluSettings"] = state?.nluSettings; resourceInputs["parent"] = state?.parent; resourceInputs["state"] = state?.state; } else { const args = argsOrState; if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["displayName"] = args?.displayName; resourceInputs["parent"] = args?.parent; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["nluSettings"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CxVersion.__pulumiType, name, resourceInputs, opts); } } exports.CxVersion = CxVersion; //# sourceMappingURL=cxVersion.js.map