import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents an environment for an agent. You can create multiple versions of your agent and publish them to separate environments. * When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. * When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for testing, development, production, etc. * * To get more information about Environment, see: * * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) * * ## Example Usage * * ### Dialogflowcx Environment 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", * }); * const development = new gcp.diagflow.CxEnvironment("development", { * parent: agent.id, * displayName: "Development", * description: "Development Environment", * versionConfigs: [{ * version: version1.id, * }], * }); * ``` * * ## Import * * Environment can be imported using any of these accepted formats: * * * `{{parent}}/environments/{{name}}` * * * `{{parent}}/{{name}}` * * When using the `pulumi import` command, Environment can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/cxEnvironment:CxEnvironment default {{parent}}/environments/{{name}} * ``` * * ```sh * $ pulumi import gcp:diagflow/cxEnvironment:CxEnvironment default {{parent}}/{{name}} * ``` */ export declare class CxEnvironment extends pulumi.CustomResource { /** * Get an existing CxEnvironment 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: string, id: pulumi.Input, state?: CxEnvironmentState, opts?: pulumi.CustomResourceOptions): CxEnvironment; /** * Returns true if the given object is an instance of CxEnvironment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CxEnvironment; /** * The human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected. */ readonly description: pulumi.Output; /** * The human-readable name of the environment (unique in an agent). Limit of 64 characters. */ readonly displayName: pulumi.Output; /** * The name of the environment. */ readonly name: pulumi.Output; /** * The Agent to create an Environment for. * Format: projects//locations//agents/. */ readonly parent: pulumi.Output; /** * Update time of this environment. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ readonly updateTime: pulumi.Output; /** * A list of configurations for flow versions. You should include version configs for all flows that are reachable from [Start Flow][Agent.start_flow] in the agent. Otherwise, an error will be returned. * Structure is documented below. */ readonly versionConfigs: pulumi.Output; /** * Create a CxEnvironment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CxEnvironmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CxEnvironment resources. */ export interface CxEnvironmentState { /** * The human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: pulumi.Input; /** * The human-readable name of the environment (unique in an agent). Limit of 64 characters. */ displayName?: pulumi.Input; /** * The name of the environment. */ name?: pulumi.Input; /** * The Agent to create an Environment for. * Format: projects//locations//agents/. */ parent?: pulumi.Input; /** * Update time of this environment. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ updateTime?: pulumi.Input; /** * A list of configurations for flow versions. You should include version configs for all flows that are reachable from [Start Flow][Agent.start_flow] in the agent. Otherwise, an error will be returned. * Structure is documented below. */ versionConfigs?: pulumi.Input[]>; } /** * The set of arguments for constructing a CxEnvironment resource. */ export interface CxEnvironmentArgs { /** * The human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: pulumi.Input; /** * The human-readable name of the environment (unique in an agent). Limit of 64 characters. */ displayName: pulumi.Input; /** * The Agent to create an Environment for. * Format: projects//locations//agents/. */ parent?: pulumi.Input; /** * A list of configurations for flow versions. You should include version configs for all flows that are reachable from [Start Flow][Agent.start_flow] in the agent. Otherwise, an error will be returned. * Structure is documented below. */ versionConfigs: pulumi.Input[]>; }