1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. diagflow
  5. CxTool
Google Cloud v8.36.0 published on Friday, Jun 27, 2025 by Pulumi

gcp.diagflow.CxTool

Explore with Pulumi AI

gcp logo
Google Cloud v8.36.0 published on Friday, Jun 27, 2025 by Pulumi

    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:

    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.


    DisplayName string
    The human-readable name of the tool, unique within the agent.
    DataStoreSpec CxToolDataStoreSpec
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    FunctionSpec CxToolFunctionSpec
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    OpenApiSpec CxToolOpenApiSpec
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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.


    DisplayName string
    The human-readable name of the tool, unique within the agent.
    DataStoreSpec CxToolDataStoreSpecArgs
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    FunctionSpec CxToolFunctionSpecArgs
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    OpenApiSpec CxToolOpenApiSpecArgs
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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.


    displayName String
    The human-readable name of the tool, unique within the agent.
    dataStoreSpec CxToolDataStoreSpec
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    functionSpec CxToolFunctionSpec
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    openApiSpec CxToolOpenApiSpec
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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.


    displayName string
    The human-readable name of the tool, unique within the agent.
    dataStoreSpec CxToolDataStoreSpec
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    functionSpec CxToolFunctionSpec
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    openApiSpec CxToolOpenApiSpec
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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_spec CxToolDataStoreSpecArgs
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    function_spec CxToolFunctionSpecArgs
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    open_api_spec CxToolOpenApiSpecArgs
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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.


    displayName String
    The human-readable name of the tool, unique within the agent.
    dataStoreSpec Property Map
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    functionSpec Property Map
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    openApiSpec Property Map
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    ToolType string
    The tool type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    ToolType string
    The tool type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    toolType String
    The tool type.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    toolType string
    The tool type.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    tool_type str
    The tool type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    toolType String
    The tool type.

    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.
    The following state arguments are supported:
    DataStoreSpec CxToolDataStoreSpec
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    Description string
    High level description of the Tool and its usage.


    DisplayName string
    The human-readable name of the tool, unique within the agent.
    FunctionSpec CxToolFunctionSpec
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    Name string
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    OpenApiSpec CxToolOpenApiSpec
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    Parent string
    The agent to create a Tool for. Format: projects//locations//agents/.
    ToolType string
    The tool type.
    DataStoreSpec CxToolDataStoreSpecArgs
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    Description string
    High level description of the Tool and its usage.


    DisplayName string
    The human-readable name of the tool, unique within the agent.
    FunctionSpec CxToolFunctionSpecArgs
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    Name string
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    OpenApiSpec CxToolOpenApiSpecArgs
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    Parent string
    The agent to create a Tool for. Format: projects//locations//agents/.
    ToolType string
    The tool type.
    dataStoreSpec CxToolDataStoreSpec
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    description String
    High level description of the Tool and its usage.


    displayName String
    The human-readable name of the tool, unique within the agent.
    functionSpec CxToolFunctionSpec
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    name String
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    openApiSpec CxToolOpenApiSpec
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    parent String
    The agent to create a Tool for. Format: projects//locations//agents/.
    toolType String
    The tool type.
    dataStoreSpec CxToolDataStoreSpec
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    description string
    High level description of the Tool and its usage.


    displayName string
    The human-readable name of the tool, unique within the agent.
    functionSpec CxToolFunctionSpec
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    name string
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    openApiSpec CxToolOpenApiSpec
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    parent string
    The agent to create a Tool for. Format: projects//locations//agents/.
    toolType string
    The tool type.
    data_store_spec CxToolDataStoreSpecArgs
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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 CxToolFunctionSpecArgs
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    name str
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    open_api_spec CxToolOpenApiSpecArgs
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec 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.
    dataStoreSpec Property Map
    Data store search tool specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    description String
    High level description of the Tool and its usage.


    displayName String
    The human-readable name of the tool, unique within the agent.
    functionSpec Property Map
    Client side executed function specification. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    name String
    The unique identifier of the Tool. Format: projects//locations//agents//tools/.
    openApiSpec Property Map
    OpenAPI specification of the Tool. This field is part of a union field specification: Only one of openApiSpec, dataStoreSpec, or functionSpec may be set. Structure is documented below.
    parent String
    The agent to create a Tool for. Format: projects//locations//agents/.
    toolType String
    The tool type.

    Supporting Types

    CxToolDataStoreSpec, CxToolDataStoreSpecArgs

    DataStoreConnections List<CxToolDataStoreSpecDataStoreConnection>
    List of data stores to search. Structure is documented below.
    FallbackPrompt CxToolDataStoreSpecFallbackPrompt
    Fallback prompt configurations to use.
    DataStoreConnections []CxToolDataStoreSpecDataStoreConnection
    List of data stores to search. Structure is documented below.
    FallbackPrompt CxToolDataStoreSpecFallbackPrompt
    Fallback prompt configurations to use.
    dataStoreConnections List<CxToolDataStoreSpecDataStoreConnection>
    List of data stores to search. Structure is documented below.
    fallbackPrompt CxToolDataStoreSpecFallbackPrompt
    Fallback prompt configurations to use.
    dataStoreConnections CxToolDataStoreSpecDataStoreConnection[]
    List of data stores to search. Structure is documented below.
    fallbackPrompt CxToolDataStoreSpecFallbackPrompt
    Fallback prompt configurations to use.
    data_store_connections Sequence[CxToolDataStoreSpecDataStoreConnection]
    List of data stores to search. Structure is documented below.
    fallback_prompt CxToolDataStoreSpecFallbackPrompt
    Fallback prompt configurations to use.
    dataStoreConnections List<Property Map>
    List of data stores to search. Structure is documented below.
    fallbackPrompt Property Map
    Fallback prompt configurations to use.

    CxToolDataStoreSpecDataStoreConnection, CxToolDataStoreSpecDataStoreConnectionArgs

    DataStore string
    The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
    DataStoreType string
    The type of the connected data store. See DataStoreType for valid values.
    DocumentProcessingMode string
    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.
    DataStore string
    The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
    DataStoreType string
    The type of the connected data store. See DataStoreType for valid values.
    DocumentProcessingMode string
    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.
    dataStore String
    The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
    dataStoreType String
    The type of the connected data store. See DataStoreType for valid values.
    documentProcessingMode String
    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.
    dataStore string
    The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
    dataStoreType string
    The type of the connected data store. See DataStoreType for valid values.
    documentProcessingMode string
    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_type str
    The type of the connected data store. See DataStoreType for valid values.
    document_processing_mode str
    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.
    dataStore String
    The full name of the referenced data store. Formats: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} projects/{project}/locations/{location}/dataStores/{dataStore}
    dataStoreType String
    The type of the connected data store. See DataStoreType for valid values.
    documentProcessingMode String
    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

    InputSchema 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
    OutputSchema 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
    InputSchema 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
    OutputSchema 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
    inputSchema 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
    outputSchema 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
    inputSchema 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
    outputSchema 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
    inputSchema 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
    outputSchema 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

    TextSchema string
    The OpenAPI schema specified as a text. This field is part of a union field schema: only one of textSchema may be set.
    Authentication CxToolOpenApiSpecAuthentication
    Optional. Authentication information required by the API. Structure is documented below.
    ServiceDirectoryConfig CxToolOpenApiSpecServiceDirectoryConfig
    Optional. Service Directory configuration. Structure is documented below.
    TlsConfig CxToolOpenApiSpecTlsConfig
    Optional. TLS configuration for the HTTPS verification. Structure is documented below.
    TextSchema string
    The OpenAPI schema specified as a text. This field is part of a union field schema: only one of textSchema may be set.
    Authentication CxToolOpenApiSpecAuthentication
    Optional. Authentication information required by the API. Structure is documented below.
    ServiceDirectoryConfig CxToolOpenApiSpecServiceDirectoryConfig
    Optional. Service Directory configuration. Structure is documented below.
    TlsConfig CxToolOpenApiSpecTlsConfig
    Optional. TLS configuration for the HTTPS verification. Structure is documented below.
    textSchema String
    The OpenAPI schema specified as a text. This field is part of a union field schema: only one of textSchema may be set.
    authentication CxToolOpenApiSpecAuthentication
    Optional. Authentication information required by the API. Structure is documented below.
    serviceDirectoryConfig CxToolOpenApiSpecServiceDirectoryConfig
    Optional. Service Directory configuration. Structure is documented below.
    tlsConfig CxToolOpenApiSpecTlsConfig
    Optional. TLS configuration for the HTTPS verification. Structure is documented below.
    textSchema string
    The OpenAPI schema specified as a text. This field is part of a union field schema: only one of textSchema may be set.
    authentication CxToolOpenApiSpecAuthentication
    Optional. Authentication information required by the API. Structure is documented below.
    serviceDirectoryConfig CxToolOpenApiSpecServiceDirectoryConfig
    Optional. Service Directory configuration. Structure is documented below.
    tlsConfig CxToolOpenApiSpecTlsConfig
    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 of textSchema may be set.
    authentication CxToolOpenApiSpecAuthentication
    Optional. Authentication information required by the API. Structure is documented below.
    service_directory_config CxToolOpenApiSpecServiceDirectoryConfig
    Optional. Service Directory configuration. Structure is documented below.
    tls_config CxToolOpenApiSpecTlsConfig
    Optional. TLS configuration for the HTTPS verification. Structure is documented below.
    textSchema String
    The OpenAPI schema specified as a text. This field is part of a union field schema: only one of textSchema may be set.
    authentication Property Map
    Optional. Authentication information required by the API. Structure is documented below.
    serviceDirectoryConfig Property Map
    Optional. Service Directory configuration. Structure is documented below.
    tlsConfig Property Map
    Optional. TLS configuration for the HTTPS verification. Structure is documented below.

    CxToolOpenApiSpecAuthentication, CxToolOpenApiSpecAuthenticationArgs

    ApiKeyConfig CxToolOpenApiSpecAuthenticationApiKeyConfig
    Config for API key auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    BearerTokenConfig CxToolOpenApiSpecAuthenticationBearerTokenConfig
    Config for bearer token auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    OauthConfig CxToolOpenApiSpecAuthenticationOauthConfig
    Config for OAuth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    ServiceAgentAuthConfig CxToolOpenApiSpecAuthenticationServiceAgentAuthConfig
    Config for Diglogflow service agent auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    ApiKeyConfig CxToolOpenApiSpecAuthenticationApiKeyConfig
    Config for API key auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    BearerTokenConfig CxToolOpenApiSpecAuthenticationBearerTokenConfig
    Config for bearer token auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    OauthConfig CxToolOpenApiSpecAuthenticationOauthConfig
    Config for OAuth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    ServiceAgentAuthConfig CxToolOpenApiSpecAuthenticationServiceAgentAuthConfig
    Config for Diglogflow service agent auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    apiKeyConfig CxToolOpenApiSpecAuthenticationApiKeyConfig
    Config for API key auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    bearerTokenConfig CxToolOpenApiSpecAuthenticationBearerTokenConfig
    Config for bearer token auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    oauthConfig CxToolOpenApiSpecAuthenticationOauthConfig
    Config for OAuth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    serviceAgentAuthConfig CxToolOpenApiSpecAuthenticationServiceAgentAuthConfig
    Config for Diglogflow service agent auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    apiKeyConfig CxToolOpenApiSpecAuthenticationApiKeyConfig
    Config for API key auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    bearerTokenConfig CxToolOpenApiSpecAuthenticationBearerTokenConfig
    Config for bearer token auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    oauthConfig CxToolOpenApiSpecAuthenticationOauthConfig
    Config for OAuth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    serviceAgentAuthConfig CxToolOpenApiSpecAuthenticationServiceAgentAuthConfig
    Config for Diglogflow service agent auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    api_key_config CxToolOpenApiSpecAuthenticationApiKeyConfig
    Config for API key auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    bearer_token_config CxToolOpenApiSpecAuthenticationBearerTokenConfig
    Config for bearer token auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    oauth_config CxToolOpenApiSpecAuthenticationOauthConfig
    Config for OAuth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    service_agent_auth_config CxToolOpenApiSpecAuthenticationServiceAgentAuthConfig
    Config for Diglogflow service agent auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    apiKeyConfig Property Map
    Config for API key auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    bearerTokenConfig Property Map
    Config for bearer token auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    oauthConfig Property Map
    Config for OAuth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.
    serviceAgentAuthConfig Property Map
    Config for Diglogflow service agent auth. This field is part of a union field auth_config: Only one of apiKeyConfig, oauthConfig, serviceAgentAuthConfig, or bearerTokenConfig may be set. Structure is documented below.

    CxToolOpenApiSpecAuthenticationApiKeyConfig, CxToolOpenApiSpecAuthenticationApiKeyConfigArgs

    KeyName 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.
    RequestLocation string
    Key location in the request. See RequestLocation for valid values.
    ApiKey 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.
    SecretVersionForApiKey string
    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}
    KeyName 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.
    RequestLocation string
    Key location in the request. See RequestLocation for valid values.
    ApiKey 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.
    SecretVersionForApiKey string
    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}
    keyName 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.
    requestLocation String
    Key location in the request. See RequestLocation for valid values.
    apiKey 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.
    secretVersionForApiKey String
    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}
    keyName 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.
    requestLocation string
    Key location in the request. See RequestLocation for valid values.
    apiKey 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.
    secretVersionForApiKey string
    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_for_api_key str
    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}
    keyName 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.
    requestLocation String
    Key location in the request. See RequestLocation for valid values.
    apiKey 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.
    secretVersionForApiKey String
    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

    SecretVersionForToken string
    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.
    SecretVersionForToken string
    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.
    secretVersionForToken String
    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.
    secretVersionForToken string
    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_for_token str
    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.
    secretVersionForToken String
    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

    ClientId string
    The client ID from the OAuth provider.
    OauthGrantType string
    OAuth grant types. See OauthGrantType for valid values
    TokenEndpoint string
    The token endpoint in the OAuth provider to exchange for an access token.
    ClientSecret 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.
    SecretVersionForClientSecret string
    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}
    ClientId string
    The client ID from the OAuth provider.
    OauthGrantType string
    OAuth grant types. See OauthGrantType for valid values
    TokenEndpoint string
    The token endpoint in the OAuth provider to exchange for an access token.
    ClientSecret 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.
    SecretVersionForClientSecret string
    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}
    clientId String
    The client ID from the OAuth provider.
    oauthGrantType String
    OAuth grant types. See OauthGrantType for valid values
    tokenEndpoint String
    The token endpoint in the OAuth provider to exchange for an access token.
    clientSecret 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.
    secretVersionForClientSecret String
    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}
    clientId string
    The client ID from the OAuth provider.
    oauthGrantType string
    OAuth grant types. See OauthGrantType for valid values
    tokenEndpoint string
    The token endpoint in the OAuth provider to exchange for an access token.
    clientSecret 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.
    secretVersionForClientSecret string
    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_type str
    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_for_client_secret str
    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}
    clientId String
    The client ID from the OAuth provider.
    oauthGrantType String
    OAuth grant types. See OauthGrantType for valid values
    tokenEndpoint String
    The token endpoint in the OAuth provider to exchange for an access token.
    clientSecret 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.
    secretVersionForClientSecret String
    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

    ServiceAgentAuth string
    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.
    ServiceAgentAuth string
    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.
    serviceAgentAuth String
    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.
    serviceAgentAuth string
    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_auth str
    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.
    serviceAgentAuth String
    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

    CaCerts List<CxToolOpenApiSpecTlsConfigCaCert>
    Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
    CaCerts []CxToolOpenApiSpecTlsConfigCaCert
    Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
    caCerts List<CxToolOpenApiSpecTlsConfigCaCert>
    Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
    caCerts CxToolOpenApiSpecTlsConfigCaCert[]
    Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
    ca_certs Sequence[CxToolOpenApiSpecTlsConfigCaCert]
    Specifies a list of allowed custom CA certificates for HTTPS verification. Structure is documented below.
    caCerts 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.

    DisplayName 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.

    DisplayName 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.

    displayName 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.

    displayName 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.

    displayName 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.
    gcp logo
    Google Cloud v8.36.0 published on Friday, Jun 27, 2025 by Pulumi