@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
254 lines • 10.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The PromptTemplate resource for Firebase AI Logic.
*
* > **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
* See Provider Versions for more details on beta resources.
*
* To get more information about PromptTemplate, see:
*
* * [API documentation](https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/projects.locations.templates)
* * How-to Guides
* * [Get started with server prompt templates](https://firebase.google.com/docs/ai-logic/server-prompt-templates/get-started)
* * [Product documentation for Firebase AI Logic](https://firebase.google.com/docs/ai-logic)
* * [Specification for Dotprompt format](https://google.github.io/dotprompt/getting-started)
*
* ## Example Usage
*
* ### Firebaseailogic Prompt Template File
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as std from "@pulumi/std";
*
* const file = new gcp.firebase.AiLogicPromptTemplate("file", {
* location: "global",
* templateId: "file-template",
* templateString: std.file({
* input: "test-fixtures/hello_world.prompt",
* }).then(invoke => invoke.result),
* });
* ```
* ### Firebaseailogic Prompt Template Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basic = new gcp.firebase.AiLogicPromptTemplate("basic", {
* location: "global",
* templateId: "basic-template",
* templateString: `---
* model: gemini-2.5-flash
* ---
* Hello world!
* `,
* });
* ```
*
* ## Import
*
* PromptTemplate can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/templates/{{template_id}}`
* * `{{project}}/{{location}}/{{template_id}}`
* * `{{location}}/{{template_id}}`
*
* When using the `pulumi import` command, PromptTemplate can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default projects/{{project}}/locations/{{location}}/templates/{{template_id}}
* $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default {{project}}/{{location}}/{{template_id}}
* $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default {{location}}/{{template_id}}
* ```
*/
export declare class AiLogicPromptTemplate extends pulumi.CustomResource {
/**
* Get an existing AiLogicPromptTemplate 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?: AiLogicPromptTemplateState, opts?: pulumi.CustomResourceOptions): AiLogicPromptTemplate;
/**
* Returns true if the given object is an instance of AiLogicPromptTemplate. 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 AiLogicPromptTemplate;
/**
* Timestamp when the PromptTemplate was created.
*/
readonly createTime: 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 display name of the PromptTemplate.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
readonly location: pulumi.Output<string>;
/**
* Indicates if the PromptTemplate has been locked for mutations. It is
* strongly recommended that PromptTemplates used in production Apps be
* locked to avoid accidental distruption to live apps.
* To modify a PromptTemplate that has been locked, a call to ModifyLock with
* lock=false is required first.
*/
readonly locked: pulumi.Output<boolean>;
/**
* The model name parsed from the template_string.
*/
readonly model: pulumi.Output<string>;
/**
* Identifier. The resource name of the PromptTemplate.
* Format:
* projects/{project}/locations/{location}/templates/{prompt_template}
*/
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>;
/**
* Timestamp when the PromptTemplate state was last changed.
*/
readonly stateChangeTime: pulumi.Output<string>;
/**
* The unique ID of the PromptTemplate, which is the final component of the
* PromptTemplate's resource name.
*/
readonly templateId: pulumi.Output<string>;
/**
* The [Dotprompt](https://google.github.io/dotprompt/getting-started) raw template string.
*/
readonly templateString: pulumi.Output<string>;
/**
* Timestamp when the PromptTemplate was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a AiLogicPromptTemplate 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: AiLogicPromptTemplateArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AiLogicPromptTemplate resources.
*/
export interface AiLogicPromptTemplateState {
/**
* Timestamp when the PromptTemplate was created.
*/
createTime?: 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 display name of the PromptTemplate.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location?: pulumi.Input<string | undefined>;
/**
* Indicates if the PromptTemplate has been locked for mutations. It is
* strongly recommended that PromptTemplates used in production Apps be
* locked to avoid accidental distruption to live apps.
* To modify a PromptTemplate that has been locked, a call to ModifyLock with
* lock=false is required first.
*/
locked?: pulumi.Input<boolean | undefined>;
/**
* The model name parsed from the template_string.
*/
model?: pulumi.Input<string | undefined>;
/**
* Identifier. The resource name of the PromptTemplate.
* Format:
* projects/{project}/locations/{location}/templates/{prompt_template}
*/
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>;
/**
* Timestamp when the PromptTemplate state was last changed.
*/
stateChangeTime?: pulumi.Input<string | undefined>;
/**
* The unique ID of the PromptTemplate, which is the final component of the
* PromptTemplate's resource name.
*/
templateId?: pulumi.Input<string | undefined>;
/**
* The [Dotprompt](https://google.github.io/dotprompt/getting-started) raw template string.
*/
templateString?: pulumi.Input<string | undefined>;
/**
* Timestamp when the PromptTemplate was last updated.
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a AiLogicPromptTemplate resource.
*/
export interface AiLogicPromptTemplateArgs {
/**
* 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 display name of the PromptTemplate.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
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>;
/**
* The unique ID of the PromptTemplate, which is the final component of the
* PromptTemplate's resource name.
*/
templateId: pulumi.Input<string>;
/**
* The [Dotprompt](https://google.github.io/dotprompt/getting-started) raw template string.
*/
templateString: pulumi.Input<string>;
}
//# sourceMappingURL=aiLogicPromptTemplate.d.ts.map