@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
184 lines • 7.55 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Sets the root agent of a CES App after both the app and the agent have
* been created.
*
* Because a CES Agent must reference its parent app at creation time, the
* app must exist before any agent can be created. This means the root agent
* cannot be set on the app at creation time — use this resource to set it
* afterwards.
*
* > **Note:** This resource modifies the `rootAgent` field on the parent
* `gcp.ces.App`. Add `lifecycle { ignoreChanges = [rootAgent] }` to
* your `gcp.ces.App` resource to prevent Terraform from detecting drift
* and clearing the field on every plan.
*
* ## Example Usage
*
* ### Ces App Root Agent Association Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const app = new gcp.ces.App("app", {
* location: "eu",
* appId: "app-id",
* displayName: "Example App app-id",
* languageSettings: {
* defaultLanguageCode: "en-US",
* supportedLanguageCodes: ["es-ES"],
* fallbackAction: "escalate",
* },
* timeZoneSettings: {
* timeZone: "America/Los_Angeles",
* },
* });
* const agent = new gcp.ces.Agent("agent", {
* location: app.location,
* app: app.appId,
* agentId: "agent-id",
* displayName: "Example Agent",
* instruction: "You are a helpful assistant.",
* llmAgent: {},
* });
* const association = new gcp.ces.AppRootAgentAssociation("association", {
* location: app.location,
* appId: app.appId,
* agentId: agent.agentId,
* });
* ```
*
* ## Import
*
* AppRootAgentAssociation can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/apps/{{app_id}}/agents/{{agent_id}}`
* * `{{project}}/{{location}}/{{app_id}}/{{agent_id}}`
* * `{{location}}/{{app_id}}/{{agent_id}}`
*
* When using the `pulumi import` command, AppRootAgentAssociation can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:ces/appRootAgentAssociation:AppRootAgentAssociation default projects/{{project}}/locations/{{location}}/apps/{{app_id}}/agents/{{agent_id}}
* $ pulumi import gcp:ces/appRootAgentAssociation:AppRootAgentAssociation default {{project}}/{{location}}/{{app_id}}/{{agent_id}}
* $ pulumi import gcp:ces/appRootAgentAssociation:AppRootAgentAssociation default {{location}}/{{app_id}}/{{agent_id}}
* ```
*/
export declare class AppRootAgentAssociation extends pulumi.CustomResource {
/**
* Get an existing AppRootAgentAssociation 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?: AppRootAgentAssociationState, opts?: pulumi.CustomResourceOptions): AppRootAgentAssociation;
/**
* Returns true if the given object is an instance of AppRootAgentAssociation. 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 AppRootAgentAssociation;
/**
* The ID or fully qualified resource name of the agent to associate as the
* root agent of the app.
*/
readonly agentId: pulumi.Output<string>;
/**
* The ID of the App. Used to construct the app resource name.
*/
readonly appId: pulumi.Output<string>;
/**
* 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 location of the App.
*/
readonly location: 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>;
/**
* Create a AppRootAgentAssociation 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: AppRootAgentAssociationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AppRootAgentAssociation resources.
*/
export interface AppRootAgentAssociationState {
/**
* The ID or fully qualified resource name of the agent to associate as the
* root agent of the app.
*/
agentId?: pulumi.Input<string | undefined>;
/**
* The ID of the App. Used to construct the app resource name.
*/
appId?: 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 location of the App.
*/
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>;
}
/**
* The set of arguments for constructing a AppRootAgentAssociation resource.
*/
export interface AppRootAgentAssociationArgs {
/**
* The ID or fully qualified resource name of the agent to associate as the
* root agent of the app.
*/
agentId: pulumi.Input<string>;
/**
* The ID of the App. Used to construct the app resource name.
*/
appId: pulumi.Input<string>;
/**
* 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 location of the App.
*/
location: pulumi.Input<string>;
/**
* 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>;
}
//# sourceMappingURL=appRootAgentAssociation.d.ts.map