Skip to main content

environments

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

Overview

Nameenvironments
TypeResource
Idgoogle.dialogflow.environments

Fields

The following fields are returned by SELECT queries:

Successful response

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 test cases config for continuous tests of this environment. (id: GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig)
updateTimestring (google-datetime)Output 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.
webhookConfigobjectThe webhook configuration for this environment. (id: GoogleCloudDialogflowCxV3EnvironmentWebhookConfig)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_environments_getselectprojectsId, locationsId, agentsId, environmentsIdRetrieves the specified Environment.
projects_locations_agents_environments_listselectprojectsId, locationsId, agentsIdpageSize, pageTokenReturns the list of all environments in the specified Agent.
projects_locations_agents_environments_createinsertprojectsId, locationsId, agentsIdCreates 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_patchupdateprojectsId, locationsId, agentsId, environmentsIdupdateMaskUpdates 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_deletedeleteprojectsId, locationsId, agentsId, environmentsIdDeletes the specified Environment.
projects_locations_agents_environments_lookup_environment_historyexecprojectsId, locationsId, agentsId, environmentsIdpageSize, pageTokenLooks up the history of the specified Environment.
projects_locations_agents_environments_run_continuous_testexecprojectsId, locationsId, agentsId, environmentsIdKicks 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
projects_locations_agents_environments_deploy_flowexecprojectsId, locationsId, agentsId, environmentsIdDeploys 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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
agentsIdstring
environmentsIdstring
locationsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified Environment.

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

INSERT examples

Creates 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

INSERT INTO google.dialogflow.environments (
data__name,
data__displayName,
data__description,
data__versionConfigs,
data__testCasesConfig,
data__webhookConfig,
projectsId,
locationsId,
agentsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ versionConfigs }}',
'{{ testCasesConfig }}',
'{{ webhookConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates 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

UPDATE google.dialogflow.environments
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__versionConfigs = '{{ versionConfigs }}',
data__testCasesConfig = '{{ testCasesConfig }}',
data__webhookConfig = '{{ webhookConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes the specified Environment.

DELETE FROM google.dialogflow.environments
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required;

Lifecycle Methods

Looks up the history of the specified Environment.

EXEC google.dialogflow.environments.projects_locations_agents_environments_lookup_environment_history 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@environmentsId='{{ environmentsId }}' --required,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}';