UNPKG

@pulumi/gcp

Version:

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

167 lines 7.45 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.WidgetConfig = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Represents a WidgetConfig. * * To get more information about WidgetConfig, see: * * * [API documentation](https://cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.collections.engines.widgetConfigs) * * ## Example Usage * * ### Discoveryengine Widgetconfig Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const basic = new gcp.discoveryengine.DataStore("basic", { * location: "global", * dataStoreId: "data-store-id", * displayName: "tf-test-datastore", * industryVertical: "GENERIC", * contentConfig: "NO_CONTENT", * solutionTypes: ["SOLUTION_TYPE_SEARCH"], * createAdvancedSiteSearch: false, * }); * const basicSearchEngine = new gcp.discoveryengine.SearchEngine("basic", { * engineId: "engine-id", * collectionId: "default_collection", * location: basic.location, * displayName: "tf-test-engine", * dataStoreIds: [basic.dataStoreId], * industryVertical: "GENERIC", * appType: "APP_TYPE_INTRANET", * searchEngineConfig: {}, * }); * const basicWidgetConfig = new gcp.discoveryengine.WidgetConfig("basic", { * location: basicSearchEngine.location, * engineId: basicSearchEngine.engineId, * accessSettings: { * enableWebApp: true, * workforceIdentityPoolProvider: "locations/global/workforcePools/workforce-pool-id/providers/workforce-pool-provider", * }, * uiSettings: { * interactionType: "SEARCH_WITH_ANSWER", * enableAutocomplete: true, * enableQualityFeedback: true, * generativeAnswerConfig: { * resultCount: 5, * }, * }, * }); * export const widgetConfigId = basicWidgetConfig.configId; * ``` * * ## Import * * WidgetConfig can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/widgetConfigs/{{widget_config_id}}` * * `{{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}}` * * `{{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}}` * * When using the `pulumi import` command, WidgetConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:discoveryengine/widgetConfig:WidgetConfig default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/widgetConfigs/{{widget_config_id}} * $ pulumi import gcp:discoveryengine/widgetConfig:WidgetConfig default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}} * $ pulumi import gcp:discoveryengine/widgetConfig:WidgetConfig default {{location}}/{{collection_id}}/{{engine_id}}/{{widget_config_id}} * ``` */ class WidgetConfig extends pulumi.CustomResource { /** * Get an existing WidgetConfig 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 WidgetConfig(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:discoveryengine/widgetConfig:WidgetConfig'; /** * Returns true if the given object is an instance of WidgetConfig. 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'] === WidgetConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessSettings"] = state?.accessSettings; resourceInputs["collectionId"] = state?.collectionId; resourceInputs["configId"] = state?.configId; resourceInputs["engineId"] = state?.engineId; resourceInputs["homepageSetting"] = state?.homepageSetting; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["uiBranding"] = state?.uiBranding; resourceInputs["uiSettings"] = state?.uiSettings; resourceInputs["widgetConfigId"] = state?.widgetConfigId; } else { const args = argsOrState; if (args?.engineId === undefined && !opts.urn) { throw new Error("Missing required property 'engineId'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["accessSettings"] = args?.accessSettings; resourceInputs["collectionId"] = args?.collectionId; resourceInputs["engineId"] = args?.engineId; resourceInputs["homepageSetting"] = args?.homepageSetting; resourceInputs["location"] = args?.location; resourceInputs["project"] = args?.project; resourceInputs["uiBranding"] = args?.uiBranding; resourceInputs["uiSettings"] = args?.uiSettings; resourceInputs["widgetConfigId"] = args?.widgetConfigId; resourceInputs["configId"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WidgetConfig.__pulumiType, name, resourceInputs, opts); } } exports.WidgetConfig = WidgetConfig; //# sourceMappingURL=widgetConfig.js.map