gcp.diagflow.CxTool
Explore with Pulumi AI
A tool provides a list of actions which are available to the Playbook to attain its goal. A Tool consists of a description of the tool’s usage and a specification of the tool which contains the schema and authentication information.
To get more information about Tool, see:
- API documentation
- How-to Guides
Example Usage
Dialogflowcx Tool Open Api
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as std from "@pulumi/std";
const agent = new gcp.diagflow.CxAgent("agent", {
displayName: "dialogflowcx-agent-open-api",
location: "global",
defaultLanguageCode: "en",
timeZone: "America/New_York",
description: "Example description.",
});
const openApiTool = new gcp.diagflow.CxTool("open_api_tool", {
parent: agent.id,
displayName: "Example Open API Tool",
description: "Example Description",
openApiSpec: {
authentication: {
oauthConfig: {
oauthGrantType: "CLIENT_CREDENTIAL",
clientId: "example client ID",
clientSecret: "example client secret",
scopes: ["example scope"],
secretVersionForClientSecret: "projects/-/secrets/-/versions/-",
tokenEndpoint: "https://example.com/oauth/token",
},
},
tlsConfig: {
caCerts: [{
displayName: "example ca cert name",
cert: std.base64encode({
input: "example cert",
}).then(invoke => invoke.result),
}],
},
serviceDirectoryConfig: {
service: "projects/-/locations/-/namespaces/-/services/-",
},
textSchema: ` {
"openapi": "3.0.0",
"info": {
"title": "Time API",
"version": "1.0.0",
"description": "A simple API to get the current time."
},
"servers": [
{
"url": "https://example-api-endpoint.com"
}
],
"paths": {
"/time": {
"get": {
"operationId": "getCurrentTime",
"summary": "Gets the current server time.",
"responses": {
"200": {
"description": "Successful response with the current time.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currentTime": {
"type": "string",
"format": "date-time",
"description": "The current time in ISO 8601 format."
}
}
}
}
}
}
}
}
}
}
}
`,
},
});
import pulumi
import pulumi_gcp as gcp
import pulumi_std as std
agent = gcp.diagflow.CxAgent("agent",
display_name="dialogflowcx-agent-open-api",
location="global",
default_language_code="en",
time_zone="America/New_York",
description="Example description.")
open_api_tool = gcp.diagflow.CxTool("open_api_tool",
parent=agent.id,
display_name="Example Open API Tool",
description="Example Description",
open_api_spec={
"authentication": {
"oauth_config": {
"oauth_grant_type": "CLIENT_CREDENTIAL",
"client_id": "example client ID",
"client_secret": "example client secret",
"scopes": ["example scope"],
"secret_version_for_client_secret": "projects/-/secrets/-/versions/-",
"token_endpoint": "https://example.com/oauth/token",
},
},
"tls_config": {
"ca_certs": [{
"display_name": "example ca cert name",
"cert": std.base64encode(input="example cert").result,
}],
},
"service_directory_config": {
"service": "projects/-/locations/-/namespaces/-/services/-",
},
"text_schema": """ {
"openapi": "3.0.0",
"info": {
"title": "Time API",
"version": "1.0.0",
"description": "A simple API to get the current time."
},
"servers": [
{
"url": "https://example-api-endpoint.com"
}
],
"paths": {
"/time": {
"get": {
"operationId": "getCurrentTime",
"summary": "Gets the current server time.",
"responses": {
"200": {
"description": "Successful response with the current time.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currentTime": {
"type": "string",
"format": "date-time",
"description": "The current time in ISO 8601 format."
}
}
}
}
}
}
}
}
}
}
}
""",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/diagflow"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
DisplayName: pulumi.String("dialogflowcx-agent-open-api"),
Location: pulumi.String("global"),
DefaultLanguageCode: pulumi.String("en"),
TimeZone: pulumi.String("America/New_York"),
Description: pulumi.String("Example description."),
})
if err != nil {
return err
}
invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
Input: "example cert",
}, nil)
if err != nil {
return err
}
_, err = diagflow.NewCxTool(ctx, "open_api_tool", &diagflow.CxToolArgs{
Parent: agent.ID(),
DisplayName: pulumi.String("Example Open API Tool"),
Description: pulumi.String("Example Description"),
OpenApiSpec: &diagflow.CxToolOpenApiSpecArgs{
Authentication: &diagflow.CxToolOpenApiSpecAuthenticationArgs{
OauthConfig: &diagflow.CxToolOpenApiSpecAuthenticationOauthConfigArgs{
OauthGrantType: pulumi.String("CLIENT_CREDENTIAL"),
ClientId: pulumi.String("example client ID"),
ClientSecret: pulumi.String("example client secret"),
Scopes: pulumi.StringArray{
pulumi.String("example scope"),
},
SecretVersionForClientSecret: pulumi.String("projects/-/secrets/-/versions/-"),
TokenEndpoint: pulumi.String("https://example.com/oauth/token"),
},
},
TlsConfig: &diagflow.CxToolOpenApiSpecTlsConfigArgs{
CaCerts: diagflow.CxToolOpenApiSpecTlsConfigCaCertArray{
&diagflow.CxToolOpenApiSpecTlsConfigCaCertArgs{
DisplayName: pulumi.String("example ca cert name"),
Cert: pulumi.String(invokeBase64encode.Result),
},
},
},
ServiceDirectoryConfig: &diagflow.CxToolOpenApiSpecServiceDirectoryConfigArgs{
Service: pulumi.String("projects/-/locations/-/namespaces/-/services/-"),
},
TextSchema: pulumi.String(` {
"openapi": "3.0.0",
"info": {
"title": "Time API",
"version": "1.0.0",
"description": "A simple API to get the current time."
},
"servers": [
{
"url": "https://example-api-endpoint.com"
}
],
"paths": {
"/time": {
"get": {
"operationId": "getCurrentTime",
"summary": "Gets the current server time.",
"responses": {
"200": {
"description": "Successful response with the current time.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currentTime": {
"type": "string",
"format": "date-time",
"description": "The current time in ISO 8601 format."
}
}
}
}
}
}
}
}
}
}
}
`),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var agent = new Gcp.Diagflow.CxAgent("agent", new()
{
DisplayName = "dialogflowcx-agent-open-api",
Location = "global",
DefaultLanguageCode = "en",
TimeZone = "America/New_York",
Description = "Example description.",
});
var openApiTool = new Gcp.Diagflow.CxTool("open_api_tool", new()
{
Parent = agent.Id,
DisplayName = "Example Open API Tool",
Description = "Example Description",
OpenApiSpec = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecArgs
{
Authentication = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationArgs
{
OauthConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationOauthConfigArgs
{
OauthGrantType = "CLIENT_CREDENTIAL",
ClientId = "example client ID",
ClientSecret = "example client secret",
Scopes = new[]
{
"example scope",
},
SecretVersionForClientSecret = "projects/-/secrets/-/versions/-",
TokenEndpoint = "https://example.com/oauth/token",
},
},
TlsConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecTlsConfigArgs
{
CaCerts = new[]
{
new Gcp.Diagflow.Inputs.CxToolOpenApiSpecTlsConfigCaCertArgs
{
DisplayName = "example ca cert name",
Cert = Std.Base64encode.Invoke(new()
{
Input = "example cert",
}).Apply(invoke => invoke.Result),
},
},
},
ServiceDirectoryConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecServiceDirectoryConfigArgs
{
Service = "projects/-/locations/-/namespaces/-/services/-",
},
TextSchema = @" {
""openapi"": ""3.0.0"",
""info"": {
""title"": ""Time API"",
""version"": ""1.0.0"",
""description"": ""A simple API to get the current time.""
},
""servers"": [
{
""url"": ""https://example-api-endpoint.com""
}
],
""paths"": {
""/time"": {
""get"": {
""operationId"": ""getCurrentTime"",
""summary"": ""Gets the current server time."",
""responses"": {
""200"": {
""description"": ""Successful response with the current time."",
""content"": {
""application/json"": {
""schema"": {
""type"": ""object"",
""properties"": {
""currentTime"": {
""type"": ""string"",
""format"": ""date-time"",
""description"": ""The current time in ISO 8601 format.""
}
}
}
}
}
}
}
}
}
}
}
",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.diagflow.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.diagflow.CxTool;
import com.pulumi.gcp.diagflow.CxToolArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolOpenApiSpecArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolOpenApiSpecAuthenticationArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolOpenApiSpecAuthenticationOauthConfigArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolOpenApiSpecTlsConfigArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolOpenApiSpecServiceDirectoryConfigArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.Base64encodeArgs;
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 agent = new CxAgent("agent", CxAgentArgs.builder()
.displayName("dialogflowcx-agent-open-api")
.location("global")
.defaultLanguageCode("en")
.timeZone("America/New_York")
.description("Example description.")
.build());
var openApiTool = new CxTool("openApiTool", CxToolArgs.builder()
.parent(agent.id())
.displayName("Example Open API Tool")
.description("Example Description")
.openApiSpec(CxToolOpenApiSpecArgs.builder()
.authentication(CxToolOpenApiSpecAuthenticationArgs.builder()
.oauthConfig(CxToolOpenApiSpecAuthenticationOauthConfigArgs.builder()
.oauthGrantType("CLIENT_CREDENTIAL")
.clientId("example client ID")
.clientSecret("example client secret")
.scopes("example scope")
.secretVersionForClientSecret("projects/-/secrets/-/versions/-")
.tokenEndpoint("https://example.com/oauth/token")
.build())
.build())
.tlsConfig(CxToolOpenApiSpecTlsConfigArgs.builder()
.caCerts(CxToolOpenApiSpecTlsConfigCaCertArgs.builder()
.displayName("example ca cert name")
.cert(StdFunctions.base64encode(Base64encodeArgs.builder()
.input("example cert")
.build()).result())
.build())
.build())
.serviceDirectoryConfig(CxToolOpenApiSpecServiceDirectoryConfigArgs.builder()
.service("projects/-/locations/-/namespaces/-/services/-")
.build())
.textSchema("""
{
"openapi": "3.0.0",
"info": {
"title": "Time API",
"version": "1.0.0",
"description": "A simple API to get the current time."
},
"servers": [
{
"url": "https://example-api-endpoint.com"
}
],
"paths": {
"/time": {
"get": {
"operationId": "getCurrentTime",
"summary": "Gets the current server time.",
"responses": {
"200": {
"description": "Successful response with the current time.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currentTime": {
"type": "string",
"format": "date-time",
"description": "The current time in ISO 8601 format."
}
}
}
}
}
}
}
}
}
}
}
""")
.build())
.build());
}
}
resources:
agent:
type: gcp:diagflow:CxAgent
properties:
displayName: dialogflowcx-agent-open-api
location: global
defaultLanguageCode: en
timeZone: America/New_York
description: Example description.
openApiTool:
type: gcp:diagflow:CxTool
name: open_api_tool
properties:
parent: ${agent.id}
displayName: Example Open API Tool
description: Example Description
openApiSpec:
authentication:
oauthConfig:
oauthGrantType: CLIENT_CREDENTIAL
clientId: example client ID
clientSecret: example client secret
scopes:
- example scope
secretVersionForClientSecret: projects/-/secrets/-/versions/-
tokenEndpoint: https://example.com/oauth/token
tlsConfig:
caCerts:
- displayName: example ca cert name
cert:
fn::invoke:
function: std:base64encode
arguments:
input: example cert
return: result
serviceDirectoryConfig:
service: projects/-/locations/-/namespaces/-/services/-
textSchema: |2
{
"openapi": "3.0.0",
"info": {
"title": "Time API",
"version": "1.0.0",
"description": "A simple API to get the current time."
},
"servers": [
{
"url": "https://example-api-endpoint.com"
}
],
"paths": {
"/time": {
"get": {
"operationId": "getCurrentTime",
"summary": "Gets the current server time.",
"responses": {
"200": {
"description": "Successful response with the current time.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currentTime": {
"type": "string",
"format": "date-time",
"description": "The current time in ISO 8601 format."
}
}
}
}
}
}
}
}
}
}
}
Dialogflowcx Tool Data Store
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myDatastore = new gcp.discoveryengine.DataStore("my_datastore", {
location: "global",
dataStoreId: "datastore-tool-test-_79169",
displayName: "datastore for Tool test",
industryVertical: "GENERIC",
contentConfig: "NO_CONTENT",
solutionTypes: ["SOLUTION_TYPE_CHAT"],
});
const agent = new gcp.diagflow.CxAgent("agent", {
displayName: "dialogflowcx-agent-data-store",
location: "global",
defaultLanguageCode: "en",
timeZone: "America/New_York",
description: "Example description.",
deleteChatEngineOnDestroy: true,
}, {
dependsOn: [myDatastore],
});
const project = gcp.organizations.getProject({});
const dataStoreTool = new gcp.diagflow.CxTool("data_store_tool", {
parent: agent.id,
displayName: "Example Data Store Tool",
description: "Example Description",
dataStoreSpec: {
dataStoreConnections: [{
dataStoreType: "UNSTRUCTURED",
dataStore: pulumi.all([project, myDatastore.dataStoreId]).apply(([project, dataStoreId]) => `projects/${project.number}/locations/global/collections/default_collection/dataStores/${dataStoreId}`),
documentProcessingMode: "DOCUMENTS",
}],
fallbackPrompt: {},
},
}, {
dependsOn: [
myDatastore,
agent,
],
});
import pulumi
import pulumi_gcp as gcp
my_datastore = gcp.discoveryengine.DataStore("my_datastore",
location="global",
data_store_id="datastore-tool-test-_79169",
display_name="datastore for Tool test",
industry_vertical="GENERIC",
content_config="NO_CONTENT",
solution_types=["SOLUTION_TYPE_CHAT"])
agent = gcp.diagflow.CxAgent("agent",
display_name="dialogflowcx-agent-data-store",
location="global",
default_language_code="en",
time_zone="America/New_York",
description="Example description.",
delete_chat_engine_on_destroy=True,
opts = pulumi.ResourceOptions(depends_on=[my_datastore]))
project = gcp.organizations.get_project()
data_store_tool = gcp.diagflow.CxTool("data_store_tool",
parent=agent.id,
display_name="Example Data Store Tool",
description="Example Description",
data_store_spec={
"data_store_connections": [{
"data_store_type": "UNSTRUCTURED",
"data_store": my_datastore.data_store_id.apply(lambda data_store_id: f"projects/{project.number}/locations/global/collections/default_collection/dataStores/{data_store_id}"),
"document_processing_mode": "DOCUMENTS",
}],
"fallback_prompt": {},
},
opts = pulumi.ResourceOptions(depends_on=[
my_datastore,
agent,
]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/diagflow"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/discoveryengine"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myDatastore, err := discoveryengine.NewDataStore(ctx, "my_datastore", &discoveryengine.DataStoreArgs{
Location: pulumi.String("global"),
DataStoreId: pulumi.String("datastore-tool-test-_79169"),
DisplayName: pulumi.String("datastore for Tool test"),
IndustryVertical: pulumi.String("GENERIC"),
ContentConfig: pulumi.String("NO_CONTENT"),
SolutionTypes: pulumi.StringArray{
pulumi.String("SOLUTION_TYPE_CHAT"),
},
})
if err != nil {
return err
}
agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
DisplayName: pulumi.String("dialogflowcx-agent-data-store"),
Location: pulumi.String("global"),
DefaultLanguageCode: pulumi.String("en"),
TimeZone: pulumi.String("America/New_York"),
Description: pulumi.String("Example description."),
DeleteChatEngineOnDestroy: pulumi.Bool(true),
}, pulumi.DependsOn([]pulumi.Resource{
myDatastore,
}))
if err != nil {
return err
}
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = diagflow.NewCxTool(ctx, "data_store_tool", &diagflow.CxToolArgs{
Parent: agent.ID(),
DisplayName: pulumi.String("Example Data Store Tool"),
Description: pulumi.String("Example Description"),
DataStoreSpec: &diagflow.CxToolDataStoreSpecArgs{
DataStoreConnections: diagflow.CxToolDataStoreSpecDataStoreConnectionArray{
&diagflow.CxToolDataStoreSpecDataStoreConnectionArgs{
DataStoreType: pulumi.String("UNSTRUCTURED"),
DataStore: myDatastore.DataStoreId.ApplyT(func(dataStoreId string) (string, error) {
return fmt.Sprintf("projects/%v/locations/global/collections/default_collection/dataStores/%v", project.Number, dataStoreId), nil
}).(pulumi.StringOutput),
DocumentProcessingMode: pulumi.String("DOCUMENTS"),
},
},
FallbackPrompt: &diagflow.CxToolDataStoreSpecFallbackPromptArgs{},
},
}, pulumi.DependsOn([]pulumi.Resource{
myDatastore,
agent,
}))
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 myDatastore = new Gcp.DiscoveryEngine.DataStore("my_datastore", new()
{
Location = "global",
DataStoreId = "datastore-tool-test-_79169",
DisplayName = "datastore for Tool test",
IndustryVertical = "GENERIC",
ContentConfig = "NO_CONTENT",
SolutionTypes = new[]
{
"SOLUTION_TYPE_CHAT",
},
});
var agent = new Gcp.Diagflow.CxAgent("agent", new()
{
DisplayName = "dialogflowcx-agent-data-store",
Location = "global",
DefaultLanguageCode = "en",
TimeZone = "America/New_York",
Description = "Example description.",
DeleteChatEngineOnDestroy = true,
}, new CustomResourceOptions
{
DependsOn =
{
myDatastore,
},
});
var project = Gcp.Organizations.GetProject.Invoke();
var dataStoreTool = new Gcp.Diagflow.CxTool("data_store_tool", new()
{
Parent = agent.Id,
DisplayName = "Example Data Store Tool",
Description = "Example Description",
DataStoreSpec = new Gcp.Diagflow.Inputs.CxToolDataStoreSpecArgs
{
DataStoreConnections = new[]
{
new Gcp.Diagflow.Inputs.CxToolDataStoreSpecDataStoreConnectionArgs
{
DataStoreType = "UNSTRUCTURED",
DataStore = Output.Tuple(project, myDatastore.DataStoreId).Apply(values =>
{
var project = values.Item1;
var dataStoreId = values.Item2;
return $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/global/collections/default_collection/dataStores/{dataStoreId}";
}),
DocumentProcessingMode = "DOCUMENTS",
},
},
FallbackPrompt = null,
},
}, new CustomResourceOptions
{
DependsOn =
{
myDatastore,
agent,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.discoveryengine.DataStore;
import com.pulumi.gcp.discoveryengine.DataStoreArgs;
import com.pulumi.gcp.diagflow.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.diagflow.CxTool;
import com.pulumi.gcp.diagflow.CxToolArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolDataStoreSpecArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolDataStoreSpecFallbackPromptArgs;
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 myDatastore = new DataStore("myDatastore", DataStoreArgs.builder()
.location("global")
.dataStoreId("datastore-tool-test-_79169")
.displayName("datastore for Tool test")
.industryVertical("GENERIC")
.contentConfig("NO_CONTENT")
.solutionTypes("SOLUTION_TYPE_CHAT")
.build());
var agent = new CxAgent("agent", CxAgentArgs.builder()
.displayName("dialogflowcx-agent-data-store")
.location("global")
.defaultLanguageCode("en")
.timeZone("America/New_York")
.description("Example description.")
.deleteChatEngineOnDestroy(true)
.build(), CustomResourceOptions.builder()
.dependsOn(myDatastore)
.build());
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var dataStoreTool = new CxTool("dataStoreTool", CxToolArgs.builder()
.parent(agent.id())
.displayName("Example Data Store Tool")
.description("Example Description")
.dataStoreSpec(CxToolDataStoreSpecArgs.builder()
.dataStoreConnections(CxToolDataStoreSpecDataStoreConnectionArgs.builder()
.dataStoreType("UNSTRUCTURED")
.dataStore(myDatastore.dataStoreId().applyValue(_dataStoreId -> String.format("projects/%s/locations/global/collections/default_collection/dataStores/%s", project.number(),_dataStoreId)))
.documentProcessingMode("DOCUMENTS")
.build())
.fallbackPrompt(CxToolDataStoreSpecFallbackPromptArgs.builder()
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(
myDatastore,
agent)
.build());
}
}
resources:
agent:
type: gcp:diagflow:CxAgent
properties:
displayName: dialogflowcx-agent-data-store
location: global
defaultLanguageCode: en
timeZone: America/New_York
description: Example description.
deleteChatEngineOnDestroy: true
options:
dependsOn:
- ${myDatastore}
dataStoreTool:
type: gcp:diagflow:CxTool
name: data_store_tool
properties:
parent: ${agent.id}
displayName: Example Data Store Tool
description: Example Description
dataStoreSpec:
dataStoreConnections:
- dataStoreType: UNSTRUCTURED
dataStore: projects/${project.number}/locations/global/collections/default_collection/dataStores/${myDatastore.dataStoreId}
documentProcessingMode: DOCUMENTS
fallbackPrompt: {}
options:
dependsOn:
- ${myDatastore}
- ${agent}
myDatastore:
type: gcp:discoveryengine:DataStore
name: my_datastore
properties:
location: global
dataStoreId: datastore-tool-test-_79169
displayName: datastore for Tool test
industryVertical: GENERIC
contentConfig: NO_CONTENT
solutionTypes:
- SOLUTION_TYPE_CHAT
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
Dialogflowcx Tool Function
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const agent = new gcp.diagflow.CxAgent("agent", {
displayName: "dialogflowcx-agent-fucntion",
location: "global",
defaultLanguageCode: "en",
timeZone: "America/New_York",
description: "Example description.",
});
const functionTool = new gcp.diagflow.CxTool("function_tool", {
parent: agent.id,
displayName: "Example Function Tool",
description: "Example Description",
functionSpec: {
inputSchema: ` {
"type": "object",
"properties": {
"message_to_echo": {
"type": "string",
"description": "The message that should be echoed back."
}
},
"required": [
"message_to_echo"
]
}
`,
outputSchema: ` {
"type": "object",
"properties": {
"echoed_message": {
"type": "string",
"description": "The message that is echoed back."
}
}
}
`,
},
});
import pulumi
import pulumi_gcp as gcp
agent = gcp.diagflow.CxAgent("agent",
display_name="dialogflowcx-agent-fucntion",
location="global",
default_language_code="en",
time_zone="America/New_York",
description="Example description.")
function_tool = gcp.diagflow.CxTool("function_tool",
parent=agent.id,
display_name="Example Function Tool",
description="Example Description",
function_spec={
"input_schema": """ {
"type": "object",
"properties": {
"message_to_echo": {
"type": "string",
"description": "The message that should be echoed back."
}
},
"required": [
"message_to_echo"
]
}
""",
"output_schema": """ {
"type": "object",
"properties": {
"echoed_message": {
"type": "string",
"description": "The message that is echoed back."
}
}
}
""",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/diagflow"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
DisplayName: pulumi.String("dialogflowcx-agent-fucntion"),
Location: pulumi.String("global"),
DefaultLanguageCode: pulumi.String("en"),
TimeZone: pulumi.String("America/New_York"),
Description: pulumi.String("Example description."),
})
if err != nil {
return err
}
_, err = diagflow.NewCxTool(ctx, "function_tool", &diagflow.CxToolArgs{
Parent: agent.ID(),
DisplayName: pulumi.String("Example Function Tool"),
Description: pulumi.String("Example Description"),
FunctionSpec: &diagflow.CxToolFunctionSpecArgs{
InputSchema: pulumi.String(` {
"type": "object",
"properties": {
"message_to_echo": {
"type": "string",
"description": "The message that should be echoed back."
}
},
"required": [
"message_to_echo"
]
}
`),
OutputSchema: pulumi.String(` {
"type": "object",
"properties": {
"echoed_message": {
"type": "string",
"description": "The message that is echoed back."
}
}
}
`),
},
})
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 agent = new Gcp.Diagflow.CxAgent("agent", new()
{
DisplayName = "dialogflowcx-agent-fucntion",
Location = "global",
DefaultLanguageCode = "en",
TimeZone = "America/New_York",
Description = "Example description.",
});
var functionTool = new Gcp.Diagflow.CxTool("function_tool", new()
{
Parent = agent.Id,
DisplayName = "Example Function Tool",
Description = "Example Description",
FunctionSpec = new Gcp.Diagflow.Inputs.CxToolFunctionSpecArgs
{
InputSchema = @" {
""type"": ""object"",
""properties"": {
""message_to_echo"": {
""type"": ""string"",
""description"": ""The message that should be echoed back.""
}
},
""required"": [
""message_to_echo""
]
}
",
OutputSchema = @" {
""type"": ""object"",
""properties"": {
""echoed_message"": {
""type"": ""string"",
""description"": ""The message that is echoed back.""
}
}
}
",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.diagflow.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.diagflow.CxTool;
import com.pulumi.gcp.diagflow.CxToolArgs;
import com.pulumi.gcp.diagflow.inputs.CxToolFunctionSpecArgs;
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 agent = new CxAgent("agent", CxAgentArgs.builder()
.displayName("dialogflowcx-agent-fucntion")
.location("global")
.defaultLanguageCode("en")
.timeZone("America/New_York")
.description("Example description.")
.build());
var functionTool = new CxTool("functionTool", CxToolArgs.builder()
.parent(agent.id())
.displayName("Example Function Tool")
.description("Example Description")
.functionSpec(CxToolFunctionSpecArgs.builder()
.inputSchema("""
{
"type": "object",
"properties": {
"message_to_echo": {
"type": "string",
"description": "The message that should be echoed back."
}
},
"required": [
"message_to_echo"
]
}
""")
.outputSchema("""
{
"type": "object",
"properties": {
"echoed_message": {
"type": "string",
"description": "The message that is echoed back."
}
}
}
""")
.build())
.build());
}
}
resources:
agent:
type: gcp:diagflow:CxAgent
properties:
displayName: dialogflowcx-agent-fucntion
location: global
defaultLanguageCode: en
timeZone: America/New_York
description: Example description.
functionTool:
type: gcp:diagflow:CxTool
name: function_tool
properties:
parent: ${agent.id}
displayName: Example Function Tool
description: Example Description
functionSpec:
inputSchema: |2
{
"type": "object",
"properties": {
"message_to_echo": {
"type": "string",
"description": "The message that should be echoed back."
}
},
"required": [
"message_to_echo"
]
}
outputSchema: |2
{
"type": "object",
"properties": {
"echoed_message": {
"type": "string",
"description": "The message that is echoed back."
}
}
}
Create CxTool Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CxTool(name: string, args: CxToolArgs, opts?: CustomResourceOptions);
@overload
def CxTool(resource_name: str,
args: CxToolArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CxTool(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
data_store_spec: Optional[CxToolDataStoreSpecArgs] = None,
function_spec: Optional[CxToolFunctionSpecArgs] = None,
open_api_spec: Optional[CxToolOpenApiSpecArgs] = None,
parent: Optional[str] = None)
func NewCxTool(ctx *Context, name string, args CxToolArgs, opts ...ResourceOption) (*CxTool, error)
public CxTool(string name, CxToolArgs args, CustomResourceOptions? opts = null)
public CxTool(String name, CxToolArgs args)
public CxTool(String name, CxToolArgs args, CustomResourceOptions options)
type: gcp:diagflow:CxTool
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 CxToolArgs
- 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 CxToolArgs
- 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 CxToolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CxToolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CxToolArgs
- 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 cxToolResource = new Gcp.Diagflow.CxTool("cxToolResource", new()
{
Description = "string",
DisplayName = "string",
DataStoreSpec = new Gcp.Diagflow.Inputs.CxToolDataStoreSpecArgs
{
DataStoreConnections = new[]
{
new Gcp.Diagflow.Inputs.CxToolDataStoreSpecDataStoreConnectionArgs
{
DataStore = "string",
DataStoreType = "string",
DocumentProcessingMode = "string",
},
},
FallbackPrompt = null,
},
FunctionSpec = new Gcp.Diagflow.Inputs.CxToolFunctionSpecArgs
{
InputSchema = "string",
OutputSchema = "string",
},
OpenApiSpec = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecArgs
{
TextSchema = "string",
Authentication = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationArgs
{
ApiKeyConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationApiKeyConfigArgs
{
KeyName = "string",
RequestLocation = "string",
ApiKey = "string",
SecretVersionForApiKey = "string",
},
BearerTokenConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationBearerTokenConfigArgs
{
SecretVersionForToken = "string",
Token = "string",
},
OauthConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationOauthConfigArgs
{
ClientId = "string",
OauthGrantType = "string",
TokenEndpoint = "string",
ClientSecret = "string",
Scopes = new[]
{
"string",
},
SecretVersionForClientSecret = "string",
},
ServiceAgentAuthConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecAuthenticationServiceAgentAuthConfigArgs
{
ServiceAgentAuth = "string",
},
},
ServiceDirectoryConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecServiceDirectoryConfigArgs
{
Service = "string",
},
TlsConfig = new Gcp.Diagflow.Inputs.CxToolOpenApiSpecTlsConfigArgs
{
CaCerts = new[]
{
new Gcp.Diagflow.Inputs.CxToolOpenApiSpecTlsConfigCaCertArgs
{
Cert = "string",
DisplayName = "string",
},
},
},
},
Parent = "string",
});
example, err := diagflow.NewCxTool(ctx, "cxToolResource", &diagflow.CxToolArgs{
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
DataStoreSpec: &diagflow.CxToolDataStoreSpecArgs{
DataStoreConnections: diagflow.CxToolDataStoreSpecDataStoreConnectionArray{
&diagflow.CxToolDataStoreSpecDataStoreConnectionArgs{
DataStore: pulumi.String("string"),
DataStoreType: pulumi.String("string"),
DocumentProcessingMode: pulumi.String("string"),
},
},
FallbackPrompt: &diagflow.CxToolDataStoreSpecFallbackPromptArgs{},
},
FunctionSpec: &diagflow.CxToolFunctionSpecArgs{
InputSchema: pulumi.String("string"),
OutputSchema: pulumi.String("string"),
},
OpenApiSpec: &diagflow.CxToolOpenApiSpecArgs{
TextSchema: pulumi.String("string"),
Authentication: &diagflow.CxToolOpenApiSpecAuthenticationArgs{
ApiKeyConfig: &diagflow.CxToolOpenApiSpecAuthenticationApiKeyConfigArgs{
KeyName: pulumi.String("string"),
RequestLocation: pulumi.String("string"),
ApiKey: pulumi.String("string"),
SecretVersionForApiKey: pulumi.String("string"),
},
BearerTokenConfig: &diagflow.CxToolOpenApiSpecAuthenticationBearerTokenConfigArgs{
SecretVersionForToken: pulumi.String("string"),
Token: pulumi.String("string"),
},
OauthConfig: &diagflow.CxToolOpenApiSpecAuthenticationOauthConfigArgs{
ClientId: pulumi.String("string"),
OauthGrantType: pulumi.String("string"),
TokenEndpoint: pulumi.String("string"),
ClientSecret: pulumi.String("string"),
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
SecretVersionForClientSecret: pulumi.String("string"),
},
ServiceAgentAuthConfig: &diagflow.CxToolOpenApiSpecAuthenticationServiceAgentAuthConfigArgs{
ServiceAgentAuth: pulumi.String("string"),
},
},
ServiceDirectoryConfig: &diagflow.CxToolOpenApiSpecServiceDirectoryConfigArgs{
Service: pulumi.String("string"),
},
TlsConfig: &diagflow.CxToolOpenApiSpecTlsConfigArgs{
CaCerts: diagflow.CxToolOpenApiSpecTlsConfigCaCertArray{
&diagflow.CxToolOpenApiSpecTlsConfigCaCertArgs{
Cert: pulumi.String("string"),
DisplayName: pulumi.String("string"),
},
},
},
},
Parent: pulumi.String("string"),
})
var cxToolResource = new CxTool("cxToolResource", CxToolArgs.builder()
.description("string")
.displayName("string")
.dataStoreSpec(CxToolDataStoreSpecArgs.builder()
.dataStoreConnections(CxToolDataStoreSpecDataStoreConnectionArgs.builder()
.dataStore("string")
.dataStoreType("string")
.documentProcessingMode("string")
.build())
.fallbackPrompt(CxToolDataStoreSpecFallbackPromptArgs.builder()
.build())
.build())
.functionSpec(CxToolFunctionSpecArgs.builder()
.inputSchema("string")
.outputSchema("string")
.build())
.openApiSpec(CxToolOpenApiSpecArgs.builder()
.textSchema("string")
.authentication(CxToolOpenApiSpecAuthenticationArgs.builder()
.apiKeyConfig(CxToolOpenApiSpecAuthenticationApiKeyConfigArgs.builder()
.keyName("string")
.requestLocation("string")
.apiKey("string")
.secretVersionForApiKey("string")
.build())
.bearerTokenConfig(CxToolOpenApiSpecAuthenticationBearerTokenConfigArgs.builder()
.secretVersionForToken("string")
.token("string")
.build())
.oauthConfig(CxToolOpenApiSpecAuthenticationOauthConfigArgs.builder()
.clientId("string")
.oauthGrantType("string")
.tokenEndpoint("string")
.clientSecret("string")
.scopes("string")
.secretVersionForClientSecret("string")
.build())
.serviceAgentAuthConfig(CxToolOpenApiSpecAuthenticationServiceAgentAuthConfigArgs.builder()
.serviceAgentAuth("string")
.build())
.build())
.serviceDirectoryConfig(CxToolOpenApiSpecServiceDirectoryConfigArgs.builder()
.service("string")
.build())
.tlsConfig(CxToolOpenApiSpecTlsConfigArgs.builder()
.caCerts(CxToolOpenApiSpecTlsConfigCaCertArgs.builder()
.cert("string")
.displayName("string")
.build())
.build())
.build())
.parent("string")
.build());
cx_tool_resource = gcp.diagflow.CxTool("cxToolResource",
description="string",
display_name="string",
data_store_spec={
"data_store_connections": [{
"data_store": "string",
"data_store_type": "string",
"document_processing_mode": "string",
}],
"fallback_prompt": {},
},
function_spec={
"input_schema": "string",
"output_schema": "string",
},
open_api_spec={
"text_schema": "string",
"authentication": {
"api_key_config": {
"key_name": "string",
"request_location": "string",
"api_key": "string",
"secret_version_for_api_key": "string",
},
"bearer_token_config": {
"secret_version_for_token": "string",
"token": "string",
},
"oauth_config": {
"client_id": "string",
"oauth_grant_type": "string",
"token_endpoint": "string",
"client_secret": "string",
"scopes": ["string"],
"secret_version_for_client_secret": "string",
},
"service_agent_auth_config": {
"service_agent_auth": "string",
},
},
"service_directory_config": {
"service": "string",
},
"tls_config": {
"ca_certs": [{
"cert": "string",
"display_name": "string",
}],
},
},
parent="string")
const cxToolResource = new gcp.diagflow.CxTool("cxToolResource", {
description: "string",
displayName: "string",
dataStoreSpec: {
dataStoreConnections: [{
dataStore: "string",
dataStoreType: "string",
documentProcessingMode: "string",
}],
fallbackPrompt: {},
},
functionSpec: {
inputSchema: "string",
outputSchema: "string",
},
openApiSpec: {
textSchema: "string",
authentication: {
apiKeyConfig: {
keyName: "string",
requestLocation: "string",
apiKey: "string",
secretVersionForApiKey: "string",
},
bearerTokenConfig: {
secretVersionForToken: "string",
token: "string",
},
oauthConfig: {
clientId: "string",
oauthGrantType: "string",
tokenEndpoint: "string",
clientSecret: "string",
scopes: ["string"],
secretVersionForClientSecret: "string",
},
serviceAgentAuthConfig: {
serviceAgentAuth: "string",
},
},
serviceDirectoryConfig: {
service: "string",
},
tlsConfig: {
caCerts: [{
cert: "string",
displayName: "string",
}],
},
},
parent: "string",
});
type: gcp:diagflow:CxTool
properties:
dataStoreSpec:
dataStoreConnections:
- dataStore: string
dataStoreType: string
documentProcessingMode: string
fallbackPrompt: {}
description: string
displayName: string
functionSpec:
inputSchema: string
outputSchema: string
openApiSpec:
authentication:
apiKeyConfig:
apiKey: string
keyName: string
requestLocation: string
secretVersionForApiKey: string
bearerTokenConfig:
secretVersionForToken: string
token: string
oauthConfig:
clientId: string
clientSecret: string
oauthGrantType: string
scopes:
- string
secretVersionForClientSecret: string
tokenEndpoint: string
serviceAgentAuthConfig:
serviceAgentAuth: string
serviceDirectoryConfig:
service: string
textSchema: string
tlsConfig:
caCerts:
- cert: string
displayName: string
parent: string
CxTool 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 CxTool resource accepts the following input properties:
- Description string
- High level description of the Tool and its usage.
- Display
Name string - The human-readable name of the tool, unique within the agent.
- Data
Store CxSpec Tool Data Store Spec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Function
Spec CxTool Function Spec - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Open
Api CxSpec Tool Open Api Spec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Parent string
- The agent to create a Tool for. Format: projects//locations//agents/.
- Description string
- High level description of the Tool and its usage.
- Display
Name string - The human-readable name of the tool, unique within the agent.
- Data
Store CxSpec Tool Data Store Spec Args - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Function
Spec CxTool Function Spec Args - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Open
Api CxSpec Tool Open Api Spec Args - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Parent string
- The agent to create a Tool for. Format: projects//locations//agents/.
- description String
- High level description of the Tool and its usage.
- display
Name String - The human-readable name of the tool, unique within the agent.
- data
Store CxSpec Tool Data Store Spec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - function
Spec CxTool Function Spec - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - open
Api CxSpec Tool Open Api Spec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent String
- The agent to create a Tool for. Format: projects//locations//agents/.
- description string
- High level description of the Tool and its usage.
- display
Name string - The human-readable name of the tool, unique within the agent.
- data
Store CxSpec Tool Data Store Spec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - function
Spec CxTool Function Spec - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - open
Api CxSpec Tool Open Api Spec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent string
- The agent to create a Tool for. Format: projects//locations//agents/.
- description str
- High level description of the Tool and its usage.
- display_
name str - The human-readable name of the tool, unique within the agent.
- data_
store_ Cxspec Tool Data Store Spec Args - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - function_
spec CxTool Function Spec Args - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - open_
api_ Cxspec Tool Open Api Spec Args - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent str
- The agent to create a Tool for. Format: projects//locations//agents/.
- description String
- High level description of the Tool and its usage.
- display
Name String - The human-readable name of the tool, unique within the agent.
- data
Store Property MapSpec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - function
Spec Property Map - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - open
Api Property MapSpec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent String
- The agent to create a Tool for. Format: projects//locations//agents/.
Outputs
All input properties are implicitly available as output properties. Additionally, the CxTool resource produces the following output properties:
Look up Existing CxTool Resource
Get an existing CxTool 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?: CxToolState, opts?: CustomResourceOptions): CxTool
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
data_store_spec: Optional[CxToolDataStoreSpecArgs] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
function_spec: Optional[CxToolFunctionSpecArgs] = None,
name: Optional[str] = None,
open_api_spec: Optional[CxToolOpenApiSpecArgs] = None,
parent: Optional[str] = None,
tool_type: Optional[str] = None) -> CxTool
func GetCxTool(ctx *Context, name string, id IDInput, state *CxToolState, opts ...ResourceOption) (*CxTool, error)
public static CxTool Get(string name, Input<string> id, CxToolState? state, CustomResourceOptions? opts = null)
public static CxTool get(String name, Output<String> id, CxToolState state, CustomResourceOptions options)
resources: _: type: gcp:diagflow:CxTool 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.
- Data
Store CxSpec Tool Data Store Spec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Description string
- High level description of the Tool and its usage.
- Display
Name string - The human-readable name of the tool, unique within the agent.
- Function
Spec CxTool Function Spec - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Name string
- The unique identifier of the Tool. Format: projects//locations//agents//tools/.
- Open
Api CxSpec Tool Open Api Spec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Parent string
- The agent to create a Tool for. Format: projects//locations//agents/.
- Tool
Type string - The tool type.
- Data
Store CxSpec Tool Data Store Spec Args - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Description string
- High level description of the Tool and its usage.
- Display
Name string - The human-readable name of the tool, unique within the agent.
- Function
Spec CxTool Function Spec Args - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Name string
- The unique identifier of the Tool. Format: projects//locations//agents//tools/.
- Open
Api CxSpec Tool Open Api Spec Args - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - Parent string
- The agent to create a Tool for. Format: projects//locations//agents/.
- Tool
Type string - The tool type.
- data
Store CxSpec Tool Data Store Spec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - description String
- High level description of the Tool and its usage.
- display
Name String - The human-readable name of the tool, unique within the agent.
- function
Spec CxTool Function Spec - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - name String
- The unique identifier of the Tool. Format: projects//locations//agents//tools/.
- open
Api CxSpec Tool Open Api Spec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent String
- The agent to create a Tool for. Format: projects//locations//agents/.
- tool
Type String - The tool type.
- data
Store CxSpec Tool Data Store Spec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - description string
- High level description of the Tool and its usage.
- display
Name string - The human-readable name of the tool, unique within the agent.
- function
Spec CxTool Function Spec - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - name string
- The unique identifier of the Tool. Format: projects//locations//agents//tools/.
- open
Api CxSpec Tool Open Api Spec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent string
- The agent to create a Tool for. Format: projects//locations//agents/.
- tool
Type string - The tool type.
- data_
store_ Cxspec Tool Data Store Spec Args - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - description str
- High level description of the Tool and its usage.
- display_
name str - The human-readable name of the tool, unique within the agent.
- function_
spec CxTool Function Spec Args - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - name str
- The unique identifier of the Tool. Format: projects//locations//agents//tools/.
- open_
api_ Cxspec Tool Open Api Spec Args - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent str
- The agent to create a Tool for. Format: projects//locations//agents/.
- tool_
type str - The tool type.
- data
Store Property MapSpec - Data store search tool specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - description String
- High level description of the Tool and its usage.
- display
Name String - The human-readable name of the tool, unique within the agent.
- function
Spec Property Map - Client side executed function specification.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - name String
- The unique identifier of the Tool. Format: projects//locations//agents//tools/.
- open
Api Property MapSpec - OpenAPI specification of the Tool.
This field is part of a union field
specification
: Only one ofopenApiSpec
,dataStoreSpec
, orfunctionSpec
may be set. Structure is documented below. - parent String
- The agent to create a Tool for. Format: projects//locations//agents/.
- tool
Type String - The tool type.
Supporting Types
CxToolDataStoreSpec, CxToolDataStoreSpecArgs
- Data
Store List<CxConnections Tool Data Store Spec Data Store Connection> - List of data stores to search. Structure is documented below.
- Fallback
Prompt CxTool Data Store Spec Fallback Prompt - Fallback prompt configurations to use.
- Data
Store []CxConnections Tool Data Store Spec Data Store Connection - List of data stores to search. Structure is documented below.
- Fallback
Prompt CxTool Data Store Spec Fallback Prompt - Fallback prompt configurations to use.
- data
Store List<CxConnections Tool Data Store Spec Data Store Connection> - List of data stores to search. Structure is documented below.
- fallback
Prompt CxTool Data Store Spec Fallback Prompt - Fallback prompt configurations to use.
- data
Store CxConnections Tool Data Store Spec Data Store Connection[] - List of data stores to search. Structure is documented below.
- fallback
Prompt CxTool Data Store Spec Fallback Prompt - Fallback prompt configurations to use.
- data_
store_ Sequence[Cxconnections Tool Data Store Spec Data Store Connection] - List of data stores to search. Structure is documented below.
- fallback_
prompt CxTool Data Store Spec Fallback Prompt - Fallback prompt configurations to use.
- data
Store List<Property Map>Connections - List of data stores to search. Structure is documented below.
- fallback
Prompt Property Map - Fallback prompt configurations to use.
CxToolDataStoreSpecDataStoreConnection, CxToolDataStoreSpecDataStoreConnectionArgs
- Data
Store string - The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
- Data
Store stringType - The type of the connected data store. See DataStoreType for valid values.
- Document
Processing stringMode - The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode. See DocumentProcessingMode for valid values.
- Data
Store string - The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
- Data
Store stringType - The type of the connected data store. See DataStoreType for valid values.
- Document
Processing stringMode - The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode. See DocumentProcessingMode for valid values.
- data
Store String - The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
- data
Store StringType - The type of the connected data store. See DataStoreType for valid values.
- document
Processing StringMode - The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode. See DocumentProcessingMode for valid values.
- data
Store string - The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
- data
Store stringType - The type of the connected data store. See DataStoreType for valid values.
- document
Processing stringMode - The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode. See DocumentProcessingMode for valid values.
- data_
store str - The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
- data_
store_ strtype - The type of the connected data store. See DataStoreType for valid values.
- document_
processing_ strmode - The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode. See DocumentProcessingMode for valid values.
- data
Store String - The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
- data
Store StringType - The type of the connected data store. See DataStoreType for valid values.
- document
Processing StringMode - The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode. See DocumentProcessingMode for valid values.
CxToolFunctionSpec, CxToolFunctionSpecArgs
- Input
Schema string - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object
- Output
Schema string - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object
- Input
Schema string - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object
- Output
Schema string - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object
- input
Schema String - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object
- output
Schema String - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object
- input
Schema string - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object
- output
Schema string - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object
- input_
schema str - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object
- output_
schema str - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object
- input
Schema String - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object
- output
Schema String - Optional. The JSON schema is encapsulated in a google.protobuf.Struct to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object
CxToolOpenApiSpec, CxToolOpenApiSpecArgs
- Text
Schema string - The OpenAPI schema specified as a text.
This field is part of a union field
schema
: only one oftextSchema
may be set. - Authentication
Cx
Tool Open Api Spec Authentication - Optional. Authentication information required by the API. Structure is documented below.
- Service
Directory CxConfig Tool Open Api Spec Service Directory Config - Optional. Service Directory configuration. Structure is documented below.
- Tls
Config CxTool Open Api Spec Tls Config - Optional. TLS configuration for the HTTPS verification. Structure is documented below.
- Text
Schema string - The OpenAPI schema specified as a text.
This field is part of a union field
schema
: only one oftextSchema
may be set. - Authentication
Cx
Tool Open Api Spec Authentication - Optional. Authentication information required by the API. Structure is documented below.
- Service
Directory CxConfig Tool Open Api Spec Service Directory Config - Optional. Service Directory configuration. Structure is documented below.
- Tls
Config CxTool Open Api Spec Tls Config - Optional. TLS configuration for the HTTPS verification. Structure is documented below.
- text
Schema String - The OpenAPI schema specified as a text.
This field is part of a union field
schema
: only one oftextSchema
may be set. - authentication
Cx
Tool Open Api Spec Authentication - Optional. Authentication information required by the API. Structure is documented below.
- service
Directory CxConfig Tool Open Api Spec Service Directory Config - Optional. Service Directory configuration. Structure is documented below.
- tls
Config CxTool Open Api Spec Tls Config - Optional. TLS configuration for the HTTPS verification. Structure is documented below.
- text
Schema string - The OpenAPI schema specified as a text.
This field is part of a union field
schema
: only one oftextSchema
may be set. - authentication
Cx
Tool Open Api Spec Authentication - Optional. Authentication information required by the API. Structure is documented below.
- service
Directory CxConfig Tool Open Api Spec Service Directory Config - Optional. Service Directory configuration. Structure is documented below.
- tls
Config CxTool Open Api Spec Tls Config - Optional. TLS configuration for the HTTPS verification. Structure is documented below.
- text_
schema str - The OpenAPI schema specified as a text.
This field is part of a union field
schema
: only one oftextSchema
may be set. - authentication
Cx
Tool Open Api Spec Authentication - Optional. Authentication information required by the API. Structure is documented below.
- service_
directory_ Cxconfig Tool Open Api Spec Service Directory Config - Optional. Service Directory configuration. Structure is documented below.
- tls_
config CxTool Open Api Spec Tls Config - Optional. TLS configuration for the HTTPS verification. Structure is documented below.
- text
Schema String - The OpenAPI schema specified as a text.
This field is part of a union field
schema
: only one oftextSchema
may be set. - authentication Property Map
- Optional. Authentication information required by the API. Structure is documented below.
- service
Directory Property MapConfig - Optional. Service Directory configuration. Structure is documented below.
- tls
Config Property Map - Optional. TLS configuration for the HTTPS verification. Structure is documented below.
CxToolOpenApiSpecAuthentication, CxToolOpenApiSpecAuthenticationArgs
- Api
Key CxConfig Tool Open Api Spec Authentication Api Key Config - Config for API key auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - Bearer
Token CxConfig Tool Open Api Spec Authentication Bearer Token Config - Config for bearer token auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - Oauth
Config CxTool Open Api Spec Authentication Oauth Config - Config for OAuth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - Service
Agent CxAuth Config Tool Open Api Spec Authentication Service Agent Auth Config - Config for Diglogflow service agent auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below.
- Api
Key CxConfig Tool Open Api Spec Authentication Api Key Config - Config for API key auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - Bearer
Token CxConfig Tool Open Api Spec Authentication Bearer Token Config - Config for bearer token auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - Oauth
Config CxTool Open Api Spec Authentication Oauth Config - Config for OAuth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - Service
Agent CxAuth Config Tool Open Api Spec Authentication Service Agent Auth Config - Config for Diglogflow service agent auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below.
- api
Key CxConfig Tool Open Api Spec Authentication Api Key Config - Config for API key auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - bearer
Token CxConfig Tool Open Api Spec Authentication Bearer Token Config - Config for bearer token auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - oauth
Config CxTool Open Api Spec Authentication Oauth Config - Config for OAuth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - service
Agent CxAuth Config Tool Open Api Spec Authentication Service Agent Auth Config - Config for Diglogflow service agent auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below.
- api
Key CxConfig Tool Open Api Spec Authentication Api Key Config - Config for API key auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - bearer
Token CxConfig Tool Open Api Spec Authentication Bearer Token Config - Config for bearer token auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - oauth
Config CxTool Open Api Spec Authentication Oauth Config - Config for OAuth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - service
Agent CxAuth Config Tool Open Api Spec Authentication Service Agent Auth Config - Config for Diglogflow service agent auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below.
- api_
key_ Cxconfig Tool Open Api Spec Authentication Api Key Config - Config for API key auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - bearer_
token_ Cxconfig Tool Open Api Spec Authentication Bearer Token Config - Config for bearer token auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - oauth_
config CxTool Open Api Spec Authentication Oauth Config - Config for OAuth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - service_
agent_ Cxauth_ config Tool Open Api Spec Authentication Service Agent Auth Config - Config for Diglogflow service agent auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below.
- api
Key Property MapConfig - Config for API key auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - bearer
Token Property MapConfig - Config for bearer token auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - oauth
Config Property Map - Config for OAuth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below. - service
Agent Property MapAuth Config - Config for Diglogflow service agent auth.
This field is part of a union field
auth_config
: Only one ofapiKeyConfig
,oauthConfig
,serviceAgentAuthConfig
, orbearerTokenConfig
may be set. Structure is documented below.
CxToolOpenApiSpecAuthenticationApiKeyConfig, CxToolOpenApiSpecAuthenticationApiKeyConfigArgs
- Key
Name string - The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name.
- Request
Location string - Key location in the request. See RequestLocation for valid values.
- Api
Key string - Optional. The API key. If the `secretVersionForApiKey`` field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan.
- Secret
Version stringFor Api Key - Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the apiKey field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- Key
Name string - The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name.
- Request
Location string - Key location in the request. See RequestLocation for valid values.
- Api
Key string - Optional. The API key. If the `secretVersionForApiKey`` field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan.
- Secret
Version stringFor Api Key - Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the apiKey field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- key
Name String - The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name.
- request
Location String - Key location in the request. See RequestLocation for valid values.
- api
Key String - Optional. The API key. If the `secretVersionForApiKey`` field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan.
- secret
Version StringFor Api Key - Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the apiKey field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- key
Name string - The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name.
- request
Location string - Key location in the request. See RequestLocation for valid values.
- api
Key string - Optional. The API key. If the `secretVersionForApiKey`` field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan.
- secret
Version stringFor Api Key - Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the apiKey field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- key_
name str - The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name.
- request_
location str - Key location in the request. See RequestLocation for valid values.
- api_
key str - Optional. The API key. If the `secretVersionForApiKey`` field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan.
- secret_
version_ strfor_ api_ key - Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the apiKey field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- key
Name String - The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name.
- request
Location String - Key location in the request. See RequestLocation for valid values.
- api
Key String - Optional. The API key. If the `secretVersionForApiKey`` field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan.
- secret
Version StringFor Api Key - Optional. The name of the SecretManager secret version resource storing the API key. If this field is set, the apiKey field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
CxToolOpenApiSpecAuthenticationBearerTokenConfig, CxToolOpenApiSpecAuthenticationBearerTokenConfigArgs
- Secret
Version stringFor Token - Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the
token
field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version} - Token string
- Optional. The text token appended to the text Bearer to the request Authorization header.
Session parameters reference can be used to pass the token dynamically, e.g.
$session.params.parameter-id
. Note: This property is sensitive and will not be displayed in the plan.
- Secret
Version stringFor Token - Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the
token
field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version} - Token string
- Optional. The text token appended to the text Bearer to the request Authorization header.
Session parameters reference can be used to pass the token dynamically, e.g.
$session.params.parameter-id
. Note: This property is sensitive and will not be displayed in the plan.
- secret
Version StringFor Token - Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the
token
field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version} - token String
- Optional. The text token appended to the text Bearer to the request Authorization header.
Session parameters reference can be used to pass the token dynamically, e.g.
$session.params.parameter-id
. Note: This property is sensitive and will not be displayed in the plan.
- secret
Version stringFor Token - Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the
token
field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version} - token string
- Optional. The text token appended to the text Bearer to the request Authorization header.
Session parameters reference can be used to pass the token dynamically, e.g.
$session.params.parameter-id
. Note: This property is sensitive and will not be displayed in the plan.
- secret_
version_ strfor_ token - Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the
token
field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version} - token str
- Optional. The text token appended to the text Bearer to the request Authorization header.
Session parameters reference can be used to pass the token dynamically, e.g.
$session.params.parameter-id
. Note: This property is sensitive and will not be displayed in the plan.
- secret
Version StringFor Token - Optional. The name of the SecretManager secret version resource storing the Bearer token. If this field is set, the
token
field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version} - token String
- Optional. The text token appended to the text Bearer to the request Authorization header.
Session parameters reference can be used to pass the token dynamically, e.g.
$session.params.parameter-id
. Note: This property is sensitive and will not be displayed in the plan.
CxToolOpenApiSpecAuthenticationOauthConfig, CxToolOpenApiSpecAuthenticationOauthConfigArgs
- Client
Id string - The client ID from the OAuth provider.
- Oauth
Grant stringType - OAuth grant types. See OauthGrantType for valid values
- Token
Endpoint string - The token endpoint in the OAuth provider to exchange for an access token.
- Client
Secret string - Optional. The client secret from the OAuth provider. If the
secretVersionForClientSecret
field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan. - Scopes List<string>
- Optional. The OAuth scopes to grant.
- Secret
Version stringFor Client Secret - Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the clientSecret field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- Client
Id string - The client ID from the OAuth provider.
- Oauth
Grant stringType - OAuth grant types. See OauthGrantType for valid values
- Token
Endpoint string - The token endpoint in the OAuth provider to exchange for an access token.
- Client
Secret string - Optional. The client secret from the OAuth provider. If the
secretVersionForClientSecret
field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan. - Scopes []string
- Optional. The OAuth scopes to grant.
- Secret
Version stringFor Client Secret - Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the clientSecret field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- client
Id String - The client ID from the OAuth provider.
- oauth
Grant StringType - OAuth grant types. See OauthGrantType for valid values
- token
Endpoint String - The token endpoint in the OAuth provider to exchange for an access token.
- client
Secret String - Optional. The client secret from the OAuth provider. If the
secretVersionForClientSecret
field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan. - scopes List<String>
- Optional. The OAuth scopes to grant.
- secret
Version StringFor Client Secret - Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the clientSecret field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- client
Id string - The client ID from the OAuth provider.
- oauth
Grant stringType - OAuth grant types. See OauthGrantType for valid values
- token
Endpoint string - The token endpoint in the OAuth provider to exchange for an access token.
- client
Secret string - Optional. The client secret from the OAuth provider. If the
secretVersionForClientSecret
field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan. - scopes string[]
- Optional. The OAuth scopes to grant.
- secret
Version stringFor Client Secret - Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the clientSecret field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- client_
id str - The client ID from the OAuth provider.
- oauth_
grant_ strtype - OAuth grant types. See OauthGrantType for valid values
- token_
endpoint str - The token endpoint in the OAuth provider to exchange for an access token.
- client_
secret str - Optional. The client secret from the OAuth provider. If the
secretVersionForClientSecret
field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan. - scopes Sequence[str]
- Optional. The OAuth scopes to grant.
- secret_
version_ strfor_ client_ secret - Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the clientSecret field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
- client
Id String - The client ID from the OAuth provider.
- oauth
Grant StringType - OAuth grant types. See OauthGrantType for valid values
- token
Endpoint String - The token endpoint in the OAuth provider to exchange for an access token.
- client
Secret String - Optional. The client secret from the OAuth provider. If the
secretVersionForClientSecret
field is set, this field will be ignored. Note: This property is sensitive and will not be displayed in the plan. - scopes List<String>
- Optional. The OAuth scopes to grant.
- secret
Version StringFor Client Secret - Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the clientSecret field will be ignored. Format: projects/{project}/secrets/{secret}/versions/{version}
CxToolOpenApiSpecAuthenticationServiceAgentAuthConfig, CxToolOpenApiSpecAuthenticationServiceAgentAuthConfigArgs
- Service
Agent stringAuth - Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header. See ServiceAgentAuth for valid values.
- Service
Agent stringAuth - Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header. See ServiceAgentAuth for valid values.
- service
Agent StringAuth - Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header. See ServiceAgentAuth for valid values.
- service
Agent stringAuth - Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header. See ServiceAgentAuth for valid values.
- service_
agent_ strauth - Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header. See ServiceAgentAuth for valid values.
- service
Agent StringAuth - Optional. Indicate the auth token type generated from the Diglogflow service agent. The generated token is sent in the Authorization header. See ServiceAgentAuth for valid values.
CxToolOpenApiSpecServiceDirectoryConfig, CxToolOpenApiSpecServiceDirectoryConfigArgs
- Service string
- The name of Service Directory service. Format: projects//locations//namespaces//services/. LocationID of the service directory must be the same as the location of the agent.
- Service string
- The name of Service Directory service. Format: projects//locations//namespaces//services/. LocationID of the service directory must be the same as the location of the agent.
- service String
- The name of Service Directory service. Format: projects//locations//namespaces//services/. LocationID of the service directory must be the same as the location of the agent.
- service string
- The name of Service Directory service. Format: projects//locations//namespaces//services/. LocationID of the service directory must be the same as the location of the agent.
- service str
- The name of Service Directory service. Format: projects//locations//namespaces//services/. LocationID of the service directory must be the same as the location of the agent.
- service String
- The name of Service Directory service. Format: projects//locations//namespaces//services/. LocationID of the service directory must be the same as the location of the agent.
CxToolOpenApiSpecTlsConfig, CxToolOpenApiSpecTlsConfigArgs
- Ca
Certs List<CxTool Open Api Spec Tls Config Ca Cert> - Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
- Ca
Certs []CxTool Open Api Spec Tls Config Ca Cert - Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
- ca
Certs List<CxTool Open Api Spec Tls Config Ca Cert> - Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
- ca
Certs CxTool Open Api Spec Tls Config Ca Cert[] - Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
- ca_
certs Sequence[CxTool Open Api Spec Tls Config Ca Cert] - Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
- ca
Certs List<Property Map> - Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
CxToolOpenApiSpecTlsConfigCaCert, CxToolOpenApiSpecTlsConfigCaCertArgs
- Cert string
The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command:
openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
A base64-encoded string.
- Display
Name string - The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.
- Cert string
The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command:
openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
A base64-encoded string.
- Display
Name string - The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.
- cert String
The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command:
openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
A base64-encoded string.
- display
Name String - The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.
- cert string
The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command:
openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
A base64-encoded string.
- display
Name string - The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.
- cert str
The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command:
openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
A base64-encoded string.
- display_
name str - The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.
- cert String
The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command:
openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
A base64-encoded string.
- display
Name String - The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates.
Import
Tool can be imported using any of these accepted formats:
{{parent}}/tools/{{name}}
{{parent}}/{{name}}
When using the pulumi import
command, Tool can be imported using one of the formats above. For example:
$ pulumi import gcp:diagflow/cxTool:CxTool default {{parent}}/tools/{{name}}
$ pulumi import gcp:diagflow/cxTool:CxTool default {{parent}}/{{name}}
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-beta
Terraform Provider.