UNPKG

@pulumi/gcp

Version:

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

253 lines • 9.95 kB
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. * * To get more information about Environment, see: * * * [API documentation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.agent.environments) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/docs/) * * ## Example Usage * * ### Dialogflow Environment Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const project = new gcp.organizations.Project("project", { * projectId: "my-proj", * name: "my-proj", * orgId: "123456789", * billingAccount: "000000-0000000-0000000-000000", * deletionPolicy: "DELETE", * }); * const dialogflow = new gcp.projects.Service("dialogflow", { * project: project.projectId, * service: "dialogflow.googleapis.com", * }); * const waitEnableServiceApi = new time.Sleep("wait_enable_service_api", {createDuration: "30s"}, { * dependsOn: [dialogflow], * }); * const basicAgent = new gcp.diagflow.Agent("basic_agent", { * displayName: "example_agent", * defaultLanguageCode: "en-us", * timeZone: "America/New_York", * project: project.projectId, * }, { * dependsOn: [waitEnableServiceApi], * }); * const version = new gcp.diagflow.Version("version", { * description: "Dialogflow Version", * parent: pulumi.interpolate`projects/${project.projectId}/agent`, * }, { * dependsOn: [basicAgent], * }); * const basicEnvironment = new gcp.diagflow.Environment("basic_environment", { * project: project.projectId, * environmentid: "basic-environment", * description: "basic environment", * agentVersion: pulumi.interpolate`projects/${project.projectId}/locations/global/agent/versions/${version.name}`, * }, { * dependsOn: [basicAgent], * }); * ``` * * ## Import * * Environment can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/agent/environments/{{environmentid}}` * * `{{project}}/{{location}}/{{environmentid}}` * * `{{location}}/{{environmentid}}` * * When using the `pulumi import` command, Environment can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/environment:Environment default projects/{{project}}/locations/{{location}}/agent/environments/{{environmentid}} * $ pulumi import gcp:diagflow/environment:Environment default {{project}}/{{location}}/{{environmentid}} * $ pulumi import gcp:diagflow/environment:Environment default {{location}}/{{environmentid}} * ``` */ export declare class Environment extends pulumi.CustomResource { /** * Get an existing Environment 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<pulumi.ID>, state?: EnvironmentState, opts?: pulumi.CustomResourceOptions): Environment; /** * Returns true if the given object is an instance of Environment. 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 Environment; /** * The agent version loaded into this environment. Supported formats: * - projects/<Project ID>/agent/versions/<Version ID> * - projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID> */ readonly agentVersion: pulumi.Output<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ readonly deletionPolicy: pulumi.Output<string>; /** * The developer-provided description for this environment. */ readonly description: pulumi.Output<string | undefined>; /** * (Required) */ readonly environmentid: pulumi.Output<string>; /** * desc * Structure is documented below. */ readonly fulfillment: pulumi.Output<outputs.diagflow.EnvironmentFulfillment | undefined>; /** * (Optional) */ readonly location: pulumi.Output<string | undefined>; /** * The unique identifier of this agent environment. */ readonly name: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * The state of this environment. */ readonly state: pulumi.Output<string>; /** * Text to speech settings for this environment. * Structure is documented below. */ readonly textToSpeechSettings: pulumi.Output<outputs.diagflow.EnvironmentTextToSpeechSettings | undefined>; /** * Create a Environment 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: EnvironmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Environment resources. */ export interface EnvironmentState { /** * The agent version loaded into this environment. Supported formats: * - projects/<Project ID>/agent/versions/<Version ID> * - projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID> */ agentVersion?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * The developer-provided description for this environment. */ description?: pulumi.Input<string | undefined>; /** * (Required) */ environmentid?: pulumi.Input<string | undefined>; /** * desc * Structure is documented below. */ fulfillment?: pulumi.Input<inputs.diagflow.EnvironmentFulfillment | undefined>; /** * (Optional) */ location?: pulumi.Input<string | undefined>; /** * The unique identifier of this agent environment. */ name?: pulumi.Input<string | undefined>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string | undefined>; /** * The state of this environment. */ state?: pulumi.Input<string | undefined>; /** * Text to speech settings for this environment. * Structure is documented below. */ textToSpeechSettings?: pulumi.Input<inputs.diagflow.EnvironmentTextToSpeechSettings | undefined>; } /** * The set of arguments for constructing a Environment resource. */ export interface EnvironmentArgs { /** * The agent version loaded into this environment. Supported formats: * - projects/<Project ID>/agent/versions/<Version ID> * - projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID> */ agentVersion?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * The developer-provided description for this environment. */ description?: pulumi.Input<string | undefined>; /** * (Required) */ environmentid: pulumi.Input<string>; /** * desc * Structure is documented below. */ fulfillment?: pulumi.Input<inputs.diagflow.EnvironmentFulfillment | undefined>; /** * (Optional) */ location?: pulumi.Input<string | undefined>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string | undefined>; /** * Text to speech settings for this environment. * Structure is documented below. */ textToSpeechSettings?: pulumi.Input<inputs.diagflow.EnvironmentTextToSpeechSettings | undefined>; } //# sourceMappingURL=environment.d.ts.map