Configuration for Firebase AI Logic.
To get more information about Config, see:
- API documentation
- How-to Guides
Note: All arguments marked as write-only values will not be stored in the state:
generative_language_config.api_key_wo. Read more about Write-only Arguments.
Example Usage
Firebaseailogic Config Basic
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: "basic",
name: "Firebase Project",
orgId: "123456789",
billingAccount: "000000-0000000-0000000-000000",
deletionPolicy: "DELETE",
});
const _default = new gcp.firebase.Project("default", {project: project.projectId});
const firebase = new gcp.projects.Service("firebase", {
project: project.projectId,
service: "firebase.googleapis.com",
});
const ailogic = new gcp.projects.Service("ailogic", {
project: project.projectId,
service: "firebasevertexai.googleapis.com",
});
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
const wait30s = new time.Sleep("wait_30s", {createDuration: "30s"}, {
dependsOn: [
ailogic,
firebase,
],
});
const defaultAiLogicConfig = new gcp.firebase.AiLogicConfig("default", {
project: _default.project,
location: "global",
}, {
dependsOn: [wait30s],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
project = gcp.organizations.Project("project",
project_id="basic",
name="Firebase Project",
org_id="123456789",
billing_account="000000-0000000-0000000-000000",
deletion_policy="DELETE")
default = gcp.firebase.Project("default", project=project.project_id)
firebase = gcp.projects.Service("firebase",
project=project.project_id,
service="firebase.googleapis.com")
ailogic = gcp.projects.Service("ailogic",
project=project.project_id,
service="firebasevertexai.googleapis.com")
# It takes a while for permissions to propagate
# If your Terraform setup has a retry mechanism, this wait is unnecessary
wait30s = time.Sleep("wait_30s", create_duration="30s",
opts = pulumi.ResourceOptions(depends_on=[
ailogic,
firebase,
]))
default_ai_logic_config = gcp.firebase.AiLogicConfig("default",
project=default.project,
location="global",
opts = pulumi.ResourceOptions(depends_on=[wait30s]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/projects"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-time/sdk/go/time"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
ProjectId: pulumi.String("basic"),
Name: pulumi.String("Firebase Project"),
OrgId: pulumi.String("123456789"),
BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
_default, err := firebase.NewProject(ctx, "default", &firebase.ProjectArgs{
Project: project.ProjectId,
})
if err != nil {
return err
}
firebase, err := projects.NewService(ctx, "firebase", &projects.ServiceArgs{
Project: project.ProjectId,
Service: pulumi.String("firebase.googleapis.com"),
})
if err != nil {
return err
}
ailogic, err := projects.NewService(ctx, "ailogic", &projects.ServiceArgs{
Project: project.ProjectId,
Service: pulumi.String("firebasevertexai.googleapis.com"),
})
if err != nil {
return err
}
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
wait30s, err := time.NewSleep(ctx, "wait_30s", &time.SleepArgs{
CreateDuration: pulumi.String("30s"),
}, pulumi.DependsOn([]pulumi.Resource{
ailogic,
firebase,
}))
if err != nil {
return err
}
_, err = firebase.NewAiLogicConfig(ctx, "default", &firebase.AiLogicConfigArgs{
Project: _default.Project,
Location: pulumi.String("global"),
}, pulumi.DependsOn([]pulumi.Resource{
wait30s,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;
return await Deployment.RunAsync(() =>
{
var project = new Gcp.Organizations.Project("project", new()
{
ProjectId = "basic",
Name = "Firebase Project",
OrgId = "123456789",
BillingAccount = "000000-0000000-0000000-000000",
DeletionPolicy = "DELETE",
});
var @default = new Gcp.Firebase.Project("default", new()
{
ProjectID = project.ProjectId,
});
var firebase = new Gcp.Projects.Service("firebase", new()
{
Project = project.ProjectId,
ServiceName = "firebase.googleapis.com",
});
var ailogic = new Gcp.Projects.Service("ailogic", new()
{
Project = project.ProjectId,
ServiceName = "firebasevertexai.googleapis.com",
});
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
var wait30s = new Time.Sleep("wait_30s", new()
{
CreateDuration = "30s",
}, new CustomResourceOptions
{
DependsOn =
{
ailogic,
firebase,
},
});
var defaultAiLogicConfig = new Gcp.Firebase.AiLogicConfig("default", new()
{
Project = @default.ProjectID,
Location = "global",
}, new CustomResourceOptions
{
DependsOn =
{
wait30s,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.firebase.AiLogicConfig;
import com.pulumi.gcp.firebase.AiLogicConfigArgs;
import com.pulumi.resources.CustomResourceOptions;
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 project = new com.pulumi.gcp.organizations.Project("project", com.pulumi.gcp.organizations.ProjectArgs.builder()
.projectId("basic")
.name("Firebase Project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.deletionPolicy("DELETE")
.build());
var default_ = new com.pulumi.gcp.firebase.Project("default", com.pulumi.gcp.firebase.ProjectArgs.builder()
.project(project.projectId())
.build());
var firebase = new Service("firebase", ServiceArgs.builder()
.project(project.projectId())
.service("firebase.googleapis.com")
.build());
var ailogic = new Service("ailogic", ServiceArgs.builder()
.project(project.projectId())
.service("firebasevertexai.googleapis.com")
.build());
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
var wait30s = new Sleep("wait30s", SleepArgs.builder()
.createDuration("30s")
.build(), CustomResourceOptions.builder()
.dependsOn(
ailogic,
firebase)
.build());
var defaultAiLogicConfig = new AiLogicConfig("defaultAiLogicConfig", AiLogicConfigArgs.builder()
.project(default_.project())
.location("global")
.build(), CustomResourceOptions.builder()
.dependsOn(wait30s)
.build());
}
}
resources:
project:
type: gcp:organizations:Project
properties:
projectId: basic
name: Firebase Project
orgId: '123456789'
billingAccount: 000000-0000000-0000000-000000
deletionPolicy: DELETE
default:
type: gcp:firebase:Project
properties:
project: ${project.projectId}
firebase:
type: gcp:projects:Service
properties:
project: ${project.projectId}
service: firebase.googleapis.com
ailogic:
type: gcp:projects:Service
properties:
project: ${project.projectId}
service: firebasevertexai.googleapis.com
# It takes a while for permissions to propagate
# If your Terraform setup has a retry mechanism, this wait is unnecessary
wait30s:
type: time:Sleep
name: wait_30s
properties:
createDuration: 30s
options:
dependsOn:
- ${ailogic}
- ${firebase}
defaultAiLogicConfig:
type: gcp:firebase:AiLogicConfig
name: default
properties:
project: ${default.project}
location: global
options:
dependsOn:
- ${wait30s}
Firebaseailogic Config Full
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: "full",
name: "Firebase Project",
orgId: "123456789",
billingAccount: "000000-0000000-0000000-000000",
deletionPolicy: "DELETE",
});
const _default = new gcp.firebase.Project("default", {project: project.projectId});
const firebase = new gcp.projects.Service("firebase", {
project: project.projectId,
service: "firebase.googleapis.com",
});
const ailogic = new gcp.projects.Service("ailogic", {
project: project.projectId,
service: "firebasevertexai.googleapis.com",
});
const gemini = new gcp.projects.ApiKey("gemini", {
project: project.projectId,
name: "gemini-api-key",
displayName: "Gemini Developer API key",
restrictions: {
apiTargets: [{
service: "generativelanguage.googleapis.com",
}],
},
});
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
const wait30s = new time.Sleep("wait_30s", {createDuration: "30s"}, {
dependsOn: [
ailogic,
firebase,
],
});
const defaultAiLogicConfig = new gcp.firebase.AiLogicConfig("default", {
project: _default.project,
location: "global",
generativeLanguageConfig: {
apiKey: gemini.keyString,
},
telemetryConfig: {
mode: "ALL",
samplingRate: 1,
},
}, {
dependsOn: [wait30s],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
project = gcp.organizations.Project("project",
project_id="full",
name="Firebase Project",
org_id="123456789",
billing_account="000000-0000000-0000000-000000",
deletion_policy="DELETE")
default = gcp.firebase.Project("default", project=project.project_id)
firebase = gcp.projects.Service("firebase",
project=project.project_id,
service="firebase.googleapis.com")
ailogic = gcp.projects.Service("ailogic",
project=project.project_id,
service="firebasevertexai.googleapis.com")
gemini = gcp.projects.ApiKey("gemini",
project=project.project_id,
name="gemini-api-key",
display_name="Gemini Developer API key",
restrictions={
"api_targets": [{
"service": "generativelanguage.googleapis.com",
}],
})
# It takes a while for permissions to propagate
# If your Terraform setup has a retry mechanism, this wait is unnecessary
wait30s = time.Sleep("wait_30s", create_duration="30s",
opts = pulumi.ResourceOptions(depends_on=[
ailogic,
firebase,
]))
default_ai_logic_config = gcp.firebase.AiLogicConfig("default",
project=default.project,
location="global",
generative_language_config={
"api_key": gemini.key_string,
},
telemetry_config={
"mode": "ALL",
"sampling_rate": 1,
},
opts = pulumi.ResourceOptions(depends_on=[wait30s]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/projects"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-time/sdk/go/time"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
ProjectId: pulumi.String("full"),
Name: pulumi.String("Firebase Project"),
OrgId: pulumi.String("123456789"),
BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
_default, err := firebase.NewProject(ctx, "default", &firebase.ProjectArgs{
Project: project.ProjectId,
})
if err != nil {
return err
}
firebase, err := projects.NewService(ctx, "firebase", &projects.ServiceArgs{
Project: project.ProjectId,
Service: pulumi.String("firebase.googleapis.com"),
})
if err != nil {
return err
}
ailogic, err := projects.NewService(ctx, "ailogic", &projects.ServiceArgs{
Project: project.ProjectId,
Service: pulumi.String("firebasevertexai.googleapis.com"),
})
if err != nil {
return err
}
gemini, err := projects.NewApiKey(ctx, "gemini", &projects.ApiKeyArgs{
Project: project.ProjectId,
Name: pulumi.String("gemini-api-key"),
DisplayName: pulumi.String("Gemini Developer API key"),
Restrictions: &projects.ApiKeyRestrictionsArgs{
ApiTargets: projects.ApiKeyRestrictionsApiTargetArray{
&projects.ApiKeyRestrictionsApiTargetArgs{
Service: pulumi.String("generativelanguage.googleapis.com"),
},
},
},
})
if err != nil {
return err
}
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
wait30s, err := time.NewSleep(ctx, "wait_30s", &time.SleepArgs{
CreateDuration: pulumi.String("30s"),
}, pulumi.DependsOn([]pulumi.Resource{
ailogic,
firebase,
}))
if err != nil {
return err
}
_, err = firebase.NewAiLogicConfig(ctx, "default", &firebase.AiLogicConfigArgs{
Project: _default.Project,
Location: pulumi.String("global"),
GenerativeLanguageConfig: &firebase.AiLogicConfigGenerativeLanguageConfigArgs{
ApiKey: gemini.KeyString,
},
TelemetryConfig: &firebase.AiLogicConfigTelemetryConfigArgs{
Mode: pulumi.String("ALL"),
SamplingRate: pulumi.Float64(1),
},
}, pulumi.DependsOn([]pulumi.Resource{
wait30s,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;
return await Deployment.RunAsync(() =>
{
var project = new Gcp.Organizations.Project("project", new()
{
ProjectId = "full",
Name = "Firebase Project",
OrgId = "123456789",
BillingAccount = "000000-0000000-0000000-000000",
DeletionPolicy = "DELETE",
});
var @default = new Gcp.Firebase.Project("default", new()
{
ProjectID = project.ProjectId,
});
var firebase = new Gcp.Projects.Service("firebase", new()
{
Project = project.ProjectId,
ServiceName = "firebase.googleapis.com",
});
var ailogic = new Gcp.Projects.Service("ailogic", new()
{
Project = project.ProjectId,
ServiceName = "firebasevertexai.googleapis.com",
});
var gemini = new Gcp.Projects.ApiKey("gemini", new()
{
Project = project.ProjectId,
Name = "gemini-api-key",
DisplayName = "Gemini Developer API key",
Restrictions = new Gcp.Projects.Inputs.ApiKeyRestrictionsArgs
{
ApiTargets = new[]
{
new Gcp.Projects.Inputs.ApiKeyRestrictionsApiTargetArgs
{
Service = "generativelanguage.googleapis.com",
},
},
},
});
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
var wait30s = new Time.Sleep("wait_30s", new()
{
CreateDuration = "30s",
}, new CustomResourceOptions
{
DependsOn =
{
ailogic,
firebase,
},
});
var defaultAiLogicConfig = new Gcp.Firebase.AiLogicConfig("default", new()
{
Project = @default.ProjectID,
Location = "global",
GenerativeLanguageConfig = new Gcp.Firebase.Inputs.AiLogicConfigGenerativeLanguageConfigArgs
{
ApiKey = gemini.KeyString,
},
TelemetryConfig = new Gcp.Firebase.Inputs.AiLogicConfigTelemetryConfigArgs
{
Mode = "ALL",
SamplingRate = 1,
},
}, new CustomResourceOptions
{
DependsOn =
{
wait30s,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.projects.ApiKey;
import com.pulumi.gcp.projects.ApiKeyArgs;
import com.pulumi.gcp.projects.inputs.ApiKeyRestrictionsArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.firebase.AiLogicConfig;
import com.pulumi.gcp.firebase.AiLogicConfigArgs;
import com.pulumi.gcp.firebase.inputs.AiLogicConfigGenerativeLanguageConfigArgs;
import com.pulumi.gcp.firebase.inputs.AiLogicConfigTelemetryConfigArgs;
import com.pulumi.resources.CustomResourceOptions;
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 project = new com.pulumi.gcp.organizations.Project("project", com.pulumi.gcp.organizations.ProjectArgs.builder()
.projectId("full")
.name("Firebase Project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.deletionPolicy("DELETE")
.build());
var default_ = new com.pulumi.gcp.firebase.Project("default", com.pulumi.gcp.firebase.ProjectArgs.builder()
.project(project.projectId())
.build());
var firebase = new Service("firebase", ServiceArgs.builder()
.project(project.projectId())
.service("firebase.googleapis.com")
.build());
var ailogic = new Service("ailogic", ServiceArgs.builder()
.project(project.projectId())
.service("firebasevertexai.googleapis.com")
.build());
var gemini = new ApiKey("gemini", ApiKeyArgs.builder()
.project(project.projectId())
.name("gemini-api-key")
.displayName("Gemini Developer API key")
.restrictions(ApiKeyRestrictionsArgs.builder()
.apiTargets(ApiKeyRestrictionsApiTargetArgs.builder()
.service("generativelanguage.googleapis.com")
.build())
.build())
.build());
// It takes a while for permissions to propagate
// If your Terraform setup has a retry mechanism, this wait is unnecessary
var wait30s = new Sleep("wait30s", SleepArgs.builder()
.createDuration("30s")
.build(), CustomResourceOptions.builder()
.dependsOn(
ailogic,
firebase)
.build());
var defaultAiLogicConfig = new AiLogicConfig("defaultAiLogicConfig", AiLogicConfigArgs.builder()
.project(default_.project())
.location("global")
.generativeLanguageConfig(AiLogicConfigGenerativeLanguageConfigArgs.builder()
.apiKey(gemini.keyString())
.build())
.telemetryConfig(AiLogicConfigTelemetryConfigArgs.builder()
.mode("ALL")
.samplingRate(1.0)
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(wait30s)
.build());
}
}
resources:
project:
type: gcp:organizations:Project
properties:
projectId: full
name: Firebase Project
orgId: '123456789'
billingAccount: 000000-0000000-0000000-000000
deletionPolicy: DELETE
default:
type: gcp:firebase:Project
properties:
project: ${project.projectId}
firebase:
type: gcp:projects:Service
properties:
project: ${project.projectId}
service: firebase.googleapis.com
ailogic:
type: gcp:projects:Service
properties:
project: ${project.projectId}
service: firebasevertexai.googleapis.com
gemini:
type: gcp:projects:ApiKey
properties:
project: ${project.projectId}
name: gemini-api-key
displayName: Gemini Developer API key
restrictions:
apiTargets:
- service: generativelanguage.googleapis.com
# It takes a while for permissions to propagate
# If your Terraform setup has a retry mechanism, this wait is unnecessary
wait30s:
type: time:Sleep
name: wait_30s
properties:
createDuration: 30s
options:
dependsOn:
- ${ailogic}
- ${firebase}
defaultAiLogicConfig:
type: gcp:firebase:AiLogicConfig
name: default
properties:
project: ${default.project}
location: global
generativeLanguageConfig:
apiKey: ${gemini.keyString}
telemetryConfig:
mode: ALL
samplingRate: 1
options:
dependsOn:
- ${wait30s}
Create AiLogicConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiLogicConfig(name: string, args?: AiLogicConfigArgs, opts?: CustomResourceOptions);@overload
def AiLogicConfig(resource_name: str,
args: Optional[AiLogicConfigArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def AiLogicConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
generative_language_config: Optional[AiLogicConfigGenerativeLanguageConfigArgs] = None,
location: Optional[str] = None,
project: Optional[str] = None,
telemetry_config: Optional[AiLogicConfigTelemetryConfigArgs] = None)func NewAiLogicConfig(ctx *Context, name string, args *AiLogicConfigArgs, opts ...ResourceOption) (*AiLogicConfig, error)public AiLogicConfig(string name, AiLogicConfigArgs? args = null, CustomResourceOptions? opts = null)
public AiLogicConfig(String name, AiLogicConfigArgs args)
public AiLogicConfig(String name, AiLogicConfigArgs args, CustomResourceOptions options)
type: gcp:firebase:AiLogicConfig
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 AiLogicConfigArgs
- 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 AiLogicConfigArgs
- 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 AiLogicConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiLogicConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiLogicConfigArgs
- 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 aiLogicConfigResource = new Gcp.Firebase.AiLogicConfig("aiLogicConfigResource", new()
{
GenerativeLanguageConfig = new Gcp.Firebase.Inputs.AiLogicConfigGenerativeLanguageConfigArgs
{
ApiKey = "string",
ApiKeyWo = "string",
ApiKeyWoVersion = "string",
},
Location = "string",
Project = "string",
TelemetryConfig = new Gcp.Firebase.Inputs.AiLogicConfigTelemetryConfigArgs
{
Mode = "string",
SamplingRate = 0,
},
});
example, err := firebase.NewAiLogicConfig(ctx, "aiLogicConfigResource", &firebase.AiLogicConfigArgs{
GenerativeLanguageConfig: &firebase.AiLogicConfigGenerativeLanguageConfigArgs{
ApiKey: pulumi.String("string"),
ApiKeyWo: pulumi.String("string"),
ApiKeyWoVersion: pulumi.String("string"),
},
Location: pulumi.String("string"),
Project: pulumi.String("string"),
TelemetryConfig: &firebase.AiLogicConfigTelemetryConfigArgs{
Mode: pulumi.String("string"),
SamplingRate: pulumi.Float64(0),
},
})
var aiLogicConfigResource = new AiLogicConfig("aiLogicConfigResource", AiLogicConfigArgs.builder()
.generativeLanguageConfig(AiLogicConfigGenerativeLanguageConfigArgs.builder()
.apiKey("string")
.apiKeyWo("string")
.apiKeyWoVersion("string")
.build())
.location("string")
.project("string")
.telemetryConfig(AiLogicConfigTelemetryConfigArgs.builder()
.mode("string")
.samplingRate(0.0)
.build())
.build());
ai_logic_config_resource = gcp.firebase.AiLogicConfig("aiLogicConfigResource",
generative_language_config={
"api_key": "string",
"api_key_wo": "string",
"api_key_wo_version": "string",
},
location="string",
project="string",
telemetry_config={
"mode": "string",
"sampling_rate": 0,
})
const aiLogicConfigResource = new gcp.firebase.AiLogicConfig("aiLogicConfigResource", {
generativeLanguageConfig: {
apiKey: "string",
apiKeyWo: "string",
apiKeyWoVersion: "string",
},
location: "string",
project: "string",
telemetryConfig: {
mode: "string",
samplingRate: 0,
},
});
type: gcp:firebase:AiLogicConfig
properties:
generativeLanguageConfig:
apiKey: string
apiKeyWo: string
apiKeyWoVersion: string
location: string
project: string
telemetryConfig:
mode: string
samplingRate: 0
AiLogicConfig 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 AiLogicConfig resource accepts the following input properties:
- Generative
Language AiConfig Logic Config Generative Language Config - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Telemetry
Config AiLogic Config Telemetry Config - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- Generative
Language AiConfig Logic Config Generative Language Config Args - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Telemetry
Config AiLogic Config Telemetry Config Args - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative
Language AiConfig Logic Config Generative Language Config - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry
Config AiLogic Config Telemetry Config - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative
Language AiConfig Logic Config Generative Language Config - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry
Config AiLogic Config Telemetry Config - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative_
language_ Aiconfig Logic Config Generative Language Config Args - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry_
config AiLogic Config Telemetry Config Args - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative
Language Property MapConfig - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry
Config Property Map - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiLogicConfig resource produces the following output properties:
Look up Existing AiLogicConfig Resource
Get an existing AiLogicConfig 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?: AiLogicConfigState, opts?: CustomResourceOptions): AiLogicConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
generative_language_config: Optional[AiLogicConfigGenerativeLanguageConfigArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
telemetry_config: Optional[AiLogicConfigTelemetryConfigArgs] = None) -> AiLogicConfigfunc GetAiLogicConfig(ctx *Context, name string, id IDInput, state *AiLogicConfigState, opts ...ResourceOption) (*AiLogicConfig, error)public static AiLogicConfig Get(string name, Input<string> id, AiLogicConfigState? state, CustomResourceOptions? opts = null)public static AiLogicConfig get(String name, Output<String> id, AiLogicConfigState state, CustomResourceOptions options)resources: _: type: gcp:firebase:AiLogicConfig 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.
- Generative
Language AiConfig Logic Config Generative Language Config - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - Name string
- Identifier. The resource name of the config. Format: projects/{project}/locations/{location}/config
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Telemetry
Config AiLogic Config Telemetry Config - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- Generative
Language AiConfig Logic Config Generative Language Config Args - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - Name string
- Identifier. The resource name of the config. Format: projects/{project}/locations/{location}/config
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Telemetry
Config AiLogic Config Telemetry Config Args - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative
Language AiConfig Logic Config Generative Language Config - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - name String
- Identifier. The resource name of the config. Format: projects/{project}/locations/{location}/config
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry
Config AiLogic Config Telemetry Config - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative
Language AiConfig Logic Config Generative Language Config - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - name string
- Identifier. The resource name of the config. Format: projects/{project}/locations/{location}/config
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry
Config AiLogic Config Telemetry Config - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative_
language_ Aiconfig Logic Config Generative Language Config Args - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - name str
- Identifier. The resource name of the config. Format: projects/{project}/locations/{location}/config
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry_
config AiLogic Config Telemetry Config Args - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
- generative
Language Property MapConfig - Configuration for using the Gemini Developer API via Firebase AI Logic. When using the Gemini Developer API via Firebase AI Logic, a separate Gemini API key is stored in this configuration on the server so that you do not add your Gemini API key directly into your app's codebase. Structure is documented below.
- 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. - name String
- Identifier. The resource name of the config. Format: projects/{project}/locations/{location}/config
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- telemetry
Config Property Map - Configuration for telemetry. Telemetry is the collection of metrics, logs, and traces recorded by the Firebase AI Logic backend. Structure is documented below.
Supporting Types
AiLogicConfigGenerativeLanguageConfig, AiLogicConfigGenerativeLanguageConfigArgs
- Api
Key string The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- Api
Key stringWo NOTE: This field is write-only and its value will not be updated in state as part of read operations. The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- Api
Key stringWo Version - Triggers update of 'api_key_wo' write-only. Increment this value when an update to 'api_key_wo' is needed. For more info see updating write-only arguments
- Api
Key string The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- Api
Key stringWo NOTE: This field is write-only and its value will not be updated in state as part of read operations. The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- Api
Key stringWo Version - Triggers update of 'api_key_wo' write-only. Increment this value when an update to 'api_key_wo' is needed. For more info see updating write-only arguments
- api
Key String The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api
Key StringWo NOTE: This field is write-only and its value will not be updated in state as part of read operations. The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api
Key StringWo Version - Triggers update of 'api_key_wo' write-only. Increment this value when an update to 'api_key_wo' is needed. For more info see updating write-only arguments
- api
Key string The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api
Key stringWo NOTE: This field is write-only and its value will not be updated in state as part of read operations. The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api
Key stringWo Version - Triggers update of 'api_key_wo' write-only. Increment this value when an update to 'api_key_wo' is needed. For more info see updating write-only arguments
- api_
key str The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api_
key_ strwo NOTE: This field is write-only and its value will not be updated in state as part of read operations. The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api_
key_ strwo_ version - Triggers update of 'api_key_wo' write-only. Increment this value when an update to 'api_key_wo' is needed. For more info see updating write-only arguments
- api
Key String The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api
Key StringWo NOTE: This field is write-only and its value will not be updated in state as part of read operations. The value of the API key. The API key must have 'generativelanguage.googleapis.com' in its "API restrictions" allowlist. Note that this API is sometimes called the Generative Language API in the Google Cloud console.
Do not add this Gemini API key into your app's codebase
- api
Key StringWo Version - Triggers update of 'api_key_wo' write-only. Increment this value when an update to 'api_key_wo' is needed. For more info see updating write-only arguments
AiLogicConfigTelemetryConfig, AiLogicConfigTelemetryConfigArgs
- Mode string
- The current monitoring mode used for this project. Possible values: NONE ALL
- Sampling
Rate double - The percentage of requests to be sampled, expressed as a fraction in the range (0,1]. Note that the actual sampling rate may be lower than the specified value if the system is overloaded. Default is 1.0.
- Mode string
- The current monitoring mode used for this project. Possible values: NONE ALL
- Sampling
Rate float64 - The percentage of requests to be sampled, expressed as a fraction in the range (0,1]. Note that the actual sampling rate may be lower than the specified value if the system is overloaded. Default is 1.0.
- mode String
- The current monitoring mode used for this project. Possible values: NONE ALL
- sampling
Rate Double - The percentage of requests to be sampled, expressed as a fraction in the range (0,1]. Note that the actual sampling rate may be lower than the specified value if the system is overloaded. Default is 1.0.
- mode string
- The current monitoring mode used for this project. Possible values: NONE ALL
- sampling
Rate number - The percentage of requests to be sampled, expressed as a fraction in the range (0,1]. Note that the actual sampling rate may be lower than the specified value if the system is overloaded. Default is 1.0.
- mode str
- The current monitoring mode used for this project. Possible values: NONE ALL
- sampling_
rate float - The percentage of requests to be sampled, expressed as a fraction in the range (0,1]. Note that the actual sampling rate may be lower than the specified value if the system is overloaded. Default is 1.0.
- mode String
- The current monitoring mode used for this project. Possible values: NONE ALL
- sampling
Rate Number - The percentage of requests to be sampled, expressed as a fraction in the range (0,1]. Note that the actual sampling rate may be lower than the specified value if the system is overloaded. Default is 1.0.
Import
Config can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/config{{project}}/{{location}}{{location}}
When using the pulumi import command, Config can be imported using one of the formats above. For example:
$ pulumi import gcp:firebase/aiLogicConfig:AiLogicConfig default projects/{{project}}/locations/{{location}}/config
$ pulumi import gcp:firebase/aiLogicConfig:AiLogicConfig default {{project}}/{{location}}
$ pulumi import gcp:firebase/aiLogicConfig:AiLogicConfig default {{location}}
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.
