The PromptTemplate resource for Firebase AI Logic.
To get more information about PromptTemplate, see:
- API documentation
- How-to Guides
Example Usage
Firebaseailogic Prompt Template Basic
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 pulumi
import pulumi_gcp as gcp
basic = gcp.firebase.AiLogicPromptTemplate("basic",
location="global",
template_id="basic-template",
template_string="""---
model: gemini-2.5-flash
---
Hello world!
""")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := firebase.NewAiLogicPromptTemplate(ctx, "basic", &firebase.AiLogicPromptTemplateArgs{
Location: pulumi.String("global"),
TemplateId: pulumi.String("basic-template"),
TemplateString: pulumi.String("---\nmodel: gemini-2.5-flash\n---\nHello world!\n"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var basic = new Gcp.Firebase.AiLogicPromptTemplate("basic", new()
{
Location = "global",
TemplateId = "basic-template",
TemplateString = @"---
model: gemini-2.5-flash
---
Hello world!
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.AiLogicPromptTemplate;
import com.pulumi.gcp.firebase.AiLogicPromptTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var basic = new AiLogicPromptTemplate("basic", AiLogicPromptTemplateArgs.builder()
.location("global")
.templateId("basic-template")
.templateString("""
---
model: gemini-2.5-flash
---
Hello world!
""")
.build());
}
}
resources:
basic:
type: gcp:firebase:AiLogicPromptTemplate
properties:
location: global
templateId: basic-template
templateString: |
---
model: gemini-2.5-flash
---
Hello world!
Create AiLogicPromptTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiLogicPromptTemplate(name: string, args: AiLogicPromptTemplateArgs, opts?: CustomResourceOptions);@overload
def AiLogicPromptTemplate(resource_name: str,
args: AiLogicPromptTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiLogicPromptTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
template_id: Optional[str] = None,
template_string: Optional[str] = None,
display_name: Optional[str] = None,
project: Optional[str] = None)func NewAiLogicPromptTemplate(ctx *Context, name string, args AiLogicPromptTemplateArgs, opts ...ResourceOption) (*AiLogicPromptTemplate, error)public AiLogicPromptTemplate(string name, AiLogicPromptTemplateArgs args, CustomResourceOptions? opts = null)
public AiLogicPromptTemplate(String name, AiLogicPromptTemplateArgs args)
public AiLogicPromptTemplate(String name, AiLogicPromptTemplateArgs args, CustomResourceOptions options)
type: gcp:firebase:AiLogicPromptTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AiLogicPromptTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AiLogicPromptTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AiLogicPromptTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiLogicPromptTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiLogicPromptTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var aiLogicPromptTemplateResource = new Gcp.Firebase.AiLogicPromptTemplate("aiLogicPromptTemplateResource", new()
{
Location = "string",
TemplateId = "string",
TemplateString = "string",
DisplayName = "string",
Project = "string",
});
example, err := firebase.NewAiLogicPromptTemplate(ctx, "aiLogicPromptTemplateResource", &firebase.AiLogicPromptTemplateArgs{
Location: pulumi.String("string"),
TemplateId: pulumi.String("string"),
TemplateString: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Project: pulumi.String("string"),
})
var aiLogicPromptTemplateResource = new AiLogicPromptTemplate("aiLogicPromptTemplateResource", AiLogicPromptTemplateArgs.builder()
.location("string")
.templateId("string")
.templateString("string")
.displayName("string")
.project("string")
.build());
ai_logic_prompt_template_resource = gcp.firebase.AiLogicPromptTemplate("aiLogicPromptTemplateResource",
location="string",
template_id="string",
template_string="string",
display_name="string",
project="string")
const aiLogicPromptTemplateResource = new gcp.firebase.AiLogicPromptTemplate("aiLogicPromptTemplateResource", {
location: "string",
templateId: "string",
templateString: "string",
displayName: "string",
project: "string",
});
type: gcp:firebase:AiLogicPromptTemplate
properties:
displayName: string
location: string
project: string
templateId: string
templateString: string
AiLogicPromptTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AiLogicPromptTemplate resource accepts the following input properties:
- Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Template
Id string - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- Template
String string - The DotPrompt raw template string.
- Display
Name string - The display name of the PromptTemplate.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Template
Id string - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- Template
String string - The DotPrompt raw template string.
- Display
Name string - The display name of the PromptTemplate.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - template
Id String - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template
String String - The DotPrompt raw template string.
- display
Name String - The display name of the PromptTemplate.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - template
Id string - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template
String string - The DotPrompt raw template string.
- display
Name string - The display name of the PromptTemplate.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - template_
id str - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template_
string str - The DotPrompt raw template string.
- display_
name str - The display name of the PromptTemplate.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - template
Id String - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template
String String - The DotPrompt raw template string.
- display
Name String - The display name of the PromptTemplate.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiLogicPromptTemplate resource produces the following output properties:
- Create
Time string - Timestamp when the PromptTemplate was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Locked bool
- 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.
- Model string
- The model name parsed from the template_string.
- Name string
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- State
Change stringTime - Timestamp when the PromptTemplate state was last changed.
- Update
Time string - Timestamp when the PromptTemplate was last updated.
- Create
Time string - Timestamp when the PromptTemplate was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Locked bool
- 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.
- Model string
- The model name parsed from the template_string.
- Name string
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- State
Change stringTime - Timestamp when the PromptTemplate state was last changed.
- Update
Time string - Timestamp when the PromptTemplate was last updated.
- create
Time String - Timestamp when the PromptTemplate was created.
- id String
- The provider-assigned unique ID for this managed resource.
- locked Boolean
- 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.
- model String
- The model name parsed from the template_string.
- name String
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- state
Change StringTime - Timestamp when the PromptTemplate state was last changed.
- update
Time String - Timestamp when the PromptTemplate was last updated.
- create
Time string - Timestamp when the PromptTemplate was created.
- id string
- The provider-assigned unique ID for this managed resource.
- locked boolean
- 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.
- model string
- The model name parsed from the template_string.
- name string
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- state
Change stringTime - Timestamp when the PromptTemplate state was last changed.
- update
Time string - Timestamp when the PromptTemplate was last updated.
- create_
time str - Timestamp when the PromptTemplate was created.
- id str
- The provider-assigned unique ID for this managed resource.
- locked bool
- 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.
- model str
- The model name parsed from the template_string.
- name str
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- state_
change_ strtime - Timestamp when the PromptTemplate state was last changed.
- update_
time str - Timestamp when the PromptTemplate was last updated.
- create
Time String - Timestamp when the PromptTemplate was created.
- id String
- The provider-assigned unique ID for this managed resource.
- locked Boolean
- 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.
- model String
- The model name parsed from the template_string.
- name String
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- state
Change StringTime - Timestamp when the PromptTemplate state was last changed.
- update
Time String - Timestamp when the PromptTemplate was last updated.
Look up Existing AiLogicPromptTemplate Resource
Get an existing AiLogicPromptTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AiLogicPromptTemplateState, opts?: CustomResourceOptions): AiLogicPromptTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
display_name: Optional[str] = None,
location: Optional[str] = None,
locked: Optional[bool] = None,
model: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
state_change_time: Optional[str] = None,
template_id: Optional[str] = None,
template_string: Optional[str] = None,
update_time: Optional[str] = None) -> AiLogicPromptTemplatefunc GetAiLogicPromptTemplate(ctx *Context, name string, id IDInput, state *AiLogicPromptTemplateState, opts ...ResourceOption) (*AiLogicPromptTemplate, error)public static AiLogicPromptTemplate Get(string name, Input<string> id, AiLogicPromptTemplateState? state, CustomResourceOptions? opts = null)public static AiLogicPromptTemplate get(String name, Output<String> id, AiLogicPromptTemplateState state, CustomResourceOptions options)resources: _: type: gcp:firebase:AiLogicPromptTemplate get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Create
Time string - Timestamp when the PromptTemplate was created.
- Display
Name string - The display name of the PromptTemplate.
- Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Locked bool
- 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.
- Model string
- The model name parsed from the template_string.
- Name string
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- State
Change stringTime - Timestamp when the PromptTemplate state was last changed.
- Template
Id string - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- Template
String string - The DotPrompt raw template string.
- Update
Time string - Timestamp when the PromptTemplate was last updated.
- Create
Time string - Timestamp when the PromptTemplate was created.
- Display
Name string - The display name of the PromptTemplate.
- Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Locked bool
- 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.
- Model string
- The model name parsed from the template_string.
- Name string
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- State
Change stringTime - Timestamp when the PromptTemplate state was last changed.
- Template
Id string - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- Template
String string - The DotPrompt raw template string.
- Update
Time string - Timestamp when the PromptTemplate was last updated.
- create
Time String - Timestamp when the PromptTemplate was created.
- display
Name String - The display name of the PromptTemplate.
- location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - locked Boolean
- 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.
- model String
- The model name parsed from the template_string.
- name String
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state
Change StringTime - Timestamp when the PromptTemplate state was last changed.
- template
Id String - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template
String String - The DotPrompt raw template string.
- update
Time String - Timestamp when the PromptTemplate was last updated.
- create
Time string - Timestamp when the PromptTemplate was created.
- display
Name string - The display name of the PromptTemplate.
- location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - locked boolean
- 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.
- model string
- The model name parsed from the template_string.
- name string
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state
Change stringTime - Timestamp when the PromptTemplate state was last changed.
- template
Id string - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template
String string - The DotPrompt raw template string.
- update
Time string - Timestamp when the PromptTemplate was last updated.
- create_
time str - Timestamp when the PromptTemplate was created.
- display_
name str - The display name of the PromptTemplate.
- location str
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - locked bool
- 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.
- model str
- The model name parsed from the template_string.
- name str
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state_
change_ strtime - Timestamp when the PromptTemplate state was last changed.
- template_
id str - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template_
string str - The DotPrompt raw template string.
- update_
time str - Timestamp when the PromptTemplate was last updated.
- create
Time String - Timestamp when the PromptTemplate was created.
- display
Name String - The display name of the PromptTemplate.
- location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - locked Boolean
- 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.
- model String
- The model name parsed from the template_string.
- name String
- Identifier. The resource name of the PromptTemplate. Format: projects/{project}/locations/{location}/templates/{prompt_template}
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state
Change StringTime - Timestamp when the PromptTemplate state was last changed.
- template
Id String - The unique ID of the PromptTemplate, which is the final component of the PromptTemplate's resource name.
- template
String String - The DotPrompt raw template string.
- update
Time String - Timestamp when the PromptTemplate was last updated.
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:
$ 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}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
