Skip to main content

environments

Creates, updates, deletes, gets or lists a environments resource.

Overview

Nameenvironments
TypeResource
Idgoogle.dialogflow.environments

Fields

NameDatatypeDescription
namestringThe name of the environment. Format: projects//locations//agents//environments/.
descriptionstringThe human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected.
displayNamestringRequired. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
testCasesConfigobjectThe configuration for continuous tests.
updateTimestringOutput only. Update time of this environment.
versionConfigsarrayA list of configurations for flow versions. You should include version configs for all flows that are reachable from Start Flow in the agent. Otherwise, an error will be returned.
webhookConfigobjectConfiguration for webhooks.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_agents_environments_getSELECTagentsId, environmentsId, locationsId, projectsIdRetrieves the specified Environment.
projects_locations_agents_environments_listSELECTagentsId, locationsId, projectsIdReturns the list of all environments in the specified Agent.
projects_locations_agents_environments_createINSERTagentsId, locationsId, projectsIdCreates an Environment in the specified Agent. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: An empty Struct message - response: Environment
projects_locations_agents_environments_deleteDELETEagentsId, environmentsId, locationsId, projectsIdDeletes the specified Environment.
projects_locations_agents_environments_patchUPDATEagentsId, environmentsId, locationsId, projectsIdUpdates the specified Environment. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: An empty Struct message - response: Environment
projects_locations_agents_environments_deploy_flowEXECagentsId, environmentsId, locationsId, projectsIdDeploys a flow to the specified Environment. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: DeployFlowMetadata - response: DeployFlowResponse
projects_locations_agents_environments_lookup_environment_historyEXECagentsId, environmentsId, locationsId, projectsIdLooks up the history of the specified Environment.
projects_locations_agents_environments_run_continuous_testEXECagentsId, environmentsId, locationsId, projectsIdKicks off a continuous test under the specified Environment. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: RunContinuousTestMetadata - response: RunContinuousTestResponse

SELECT examples

Returns the list of all environments in the specified Agent.

SELECT
name,
description,
displayName,
testCasesConfig,
updateTime,
versionConfigs,
webhookConfig
FROM google.dialogflow.environments
WHERE agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new environments resource.

/*+ create */
INSERT INTO google.dialogflow.environments (
agentsId,
locationsId,
projectsId,
name,
displayName,
description,
versionConfigs,
testCasesConfig,
webhookConfig
)
SELECT
'{{ agentsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ versionConfigs }}',
'{{ testCasesConfig }}',
'{{ webhookConfig }}'
;

UPDATE example

Updates a environments resource.

/*+ update */
UPDATE google.dialogflow.environments
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
versionConfigs = '{{ versionConfigs }}',
testCasesConfig = '{{ testCasesConfig }}',
webhookConfig = '{{ webhookConfig }}'
WHERE
agentsId = '{{ agentsId }}'
AND environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified environments resource.

/*+ delete */
DELETE FROM google.dialogflow.environments
WHERE agentsId = '{{ agentsId }}'
AND environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';