UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

671 lines • 23.1 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Toolset = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Description * * ## Example Usage * * ### Ces Toolset Openapi Service Account Auth Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetOpenapiServiceAccountAuthConfig = new gcp.ces.Toolset("ces_toolset_openapi_service_account_auth_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * openApiToolset: { * openApiSchema: `openapi: 3.0.0 * info: * title: My Sample API * version: 1.0.0 * description: A simple API example * servers: * - url: https://api.example.com/v1 * paths: {} * `, * ignoreUnknownFields: false, * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * serviceAccountAuthConfig: { * serviceAccount: "my@service-account.com", * scopes: ["scope1"], * }, * }, * }, * }); * ``` * ### Ces Toolset Openapi Oauth Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetOpenapiOauthConfig = new gcp.ces.Toolset("ces_toolset_openapi_oauth_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * openApiToolset: { * openApiSchema: `openapi: 3.0.0 * info: * title: My Sample API * version: 1.0.0 * description: A simple API example * servers: * - url: https://api.example.com/v1 * paths: {} * `, * ignoreUnknownFields: false, * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * oauthConfig: { * oauthGrantType: "CLIENT_CREDENTIAL", * clientId: "example_client_id", * clientSecretVersion: "projects/fake-project/secrets/fake-secret/versions/version1", * tokenEndpoint: "123", * scopes: ["scope1"], * }, * }, * }, * }); * ``` * ### Ces Toolset Openapi Service Agent Id Token Auth Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetOpenapiServiceAgentIdTokenAuthConfig = new gcp.ces.Toolset("ces_toolset_openapi_service_agent_id_token_auth_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * openApiToolset: { * openApiSchema: `openapi: 3.0.0 * info: * title: My Sample API * version: 1.0.0 * description: A simple API example * servers: * - url: https://api.example.com/v1 * paths: {} * `, * ignoreUnknownFields: false, * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * serviceAgentIdTokenAuthConfig: {}, * }, * }, * }); * ``` * ### Ces Toolset Openapi Api Key Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetOpenapiApiKeyConfig = new gcp.ces.Toolset("ces_toolset_openapi_api_key_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * description: "Test description", * executionType: "SYNCHRONOUS", * openApiToolset: { * openApiSchema: `openapi: 3.0.0 * info: * title: My Sample API * version: 1.0.0 * description: A simple API example * servers: * - url: https://api.example.com/v1 * paths: {} * `, * ignoreUnknownFields: false, * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * apiKeyConfig: { * keyName: "ExampleKey", * apiKeySecretVersion: "projects/fake-project/secrets/fake-secret/versions/version-1", * requestLocation: "HEADER", * }, * }, * }, * }); * ``` * ### Ces Toolset Bearer Token Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetBearerTokenConfig = new gcp.ces.Toolset("ces_toolset_bearer_token_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * openApiToolset: { * openApiSchema: `openapi: 3.0.0 * info: * title: My Sample API * version: 1.0.0 * description: A simple API example * servers: * - url: https://api.example.com/v1 * paths: {} * `, * ignoreUnknownFields: false, * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * bearerTokenConfig: { * token: "$context.variables.my_ces_toolset_auth_token", * }, * }, * }, * }); * ``` * ### Ces Toolset Mcp Service Account Auth Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetMcpServiceAccountAuthConfig = new gcp.ces.Toolset("ces_toolset_mcp_service_account_auth_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * mcpToolset: { * serverAddress: "https://api.example.com/mcp/", * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * serviceAccountAuthConfig: { * serviceAccount: "my@service-account.com", * scopes: ["scope1"], * }, * }, * }, * }); * ``` * ### Ces Toolset Mcp Oauth Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetMcpOauthConfig = new gcp.ces.Toolset("ces_toolset_mcp_oauth_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * mcpToolset: { * serverAddress: "https://api.example.com/mcp/", * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * oauthConfig: { * oauthGrantType: "CLIENT_CREDENTIAL", * clientId: "example_client_id", * clientSecretVersion: "projects/fake-project/secrets/fake-secret/versions/version1", * tokenEndpoint: "123", * scopes: ["scope1"], * }, * }, * }, * }); * ``` * ### Ces Toolset Mcp Service Agent Id Token Auth Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetMcpServiceAgentIdTokenAuthConfig = new gcp.ces.Toolset("ces_toolset_mcp_service_agent_id_token_auth_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * mcpToolset: { * serverAddress: "https://api.example.com/mcp/", * customHeaders: { * "X-Custom-Header": "$context.variables.my_variable", * }, * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * serviceAgentIdTokenAuthConfig: {}, * }, * }, * }); * ``` * ### Ces Toolset Mcp Api Key Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetMcpApiKeyConfig = new gcp.ces.Toolset("ces_toolset_mcp_api_key_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * description: "Test description", * executionType: "SYNCHRONOUS", * mcpToolset: { * serverAddress: "https://api.example.com/mcp/", * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * apiKeyConfig: { * keyName: "ExampleKey", * apiKeySecretVersion: "projects/fake-project/secrets/fake-secret/versions/version-1", * requestLocation: "HEADER", * }, * }, * }, * }); * ``` * ### Ces Toolset Mcp Bearer Token Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppForToolset = new gcp.ces.App("ces_app_for_toolset", { * appId: "app-id", * location: "us", * description: "App used as parent for CES Toolset example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolsetMcpBearerTokenConfig = new gcp.ces.Toolset("ces_toolset_mcp_bearer_token_config", { * toolsetId: "toolset1", * location: "us", * app: cesAppForToolset.appId, * displayName: "Basic toolset display name", * mcpToolset: { * serverAddress: "https://api.example.com/mcp/", * tlsConfig: { * caCerts: [{ * displayName: "example", * cert: "ZXhhbXBsZQ==", * }], * }, * serviceDirectoryConfig: { * service: "projects/example/locations/us/namespaces/namespace/services/service", * }, * apiAuthentication: { * bearerTokenConfig: { * token: "$context.variables.my_ces_toolset_auth_token", * }, * }, * }, * }); * ``` * * ## Import * * Toolset can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/apps/{{app}}/toolsets/{{toolset_id}}` * * `{{project}}/{{location}}/{{app}}/{{toolset_id}}` * * `{{location}}/{{app}}/{{toolset_id}}` * * When using the `pulumi import` command, Toolset can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:ces/toolset:Toolset default projects/{{project}}/locations/{{location}}/apps/{{app}}/toolsets/{{toolset_id}} * $ pulumi import gcp:ces/toolset:Toolset default {{project}}/{{location}}/{{app}}/{{toolset_id}} * $ pulumi import gcp:ces/toolset:Toolset default {{location}}/{{app}}/{{toolset_id}} * ``` */ class Toolset extends pulumi.CustomResource { /** * Get an existing Toolset resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Toolset(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:ces/toolset:Toolset'; /** * Returns true if the given object is an instance of Toolset. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Toolset.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["app"] = state?.app; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["displayName"] = state?.displayName; resourceInputs["etag"] = state?.etag; resourceInputs["executionType"] = state?.executionType; resourceInputs["location"] = state?.location; resourceInputs["mcpToolset"] = state?.mcpToolset; resourceInputs["name"] = state?.name; resourceInputs["openApiToolset"] = state?.openApiToolset; resourceInputs["project"] = state?.project; resourceInputs["toolsetId"] = state?.toolsetId; resourceInputs["updateTime"] = state?.updateTime; } else { const args = argsOrState; if (args?.app === undefined && !opts.urn) { throw new Error("Missing required property 'app'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.toolsetId === undefined && !opts.urn) { throw new Error("Missing required property 'toolsetId'"); } resourceInputs["app"] = args?.app; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["displayName"] = args?.displayName; resourceInputs["executionType"] = args?.executionType; resourceInputs["location"] = args?.location; resourceInputs["mcpToolset"] = args?.mcpToolset; resourceInputs["openApiToolset"] = args?.openApiToolset; resourceInputs["project"] = args?.project; resourceInputs["toolsetId"] = args?.toolsetId; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Toolset.__pulumiType, name, resourceInputs, opts); } } exports.Toolset = Toolset; //# sourceMappingURL=toolset.js.map