Skip to main content

controls

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

Overview

Namecontrols
TypeResource
Idgoogle.discoveryengine.controls

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. Fully qualified name projects/*/locations/global/dataStore/*/controls/*
associatedServingConfigIdsarrayOutput only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.
boostActionobjectDefines a boost-type control (id: GoogleCloudDiscoveryengineV1ControlBoostAction)
conditionsarrayDetermines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.
displayNamestringRequired. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.
filterActionobjectDefines a filter-type control Currently not supported by Recommendation (id: GoogleCloudDiscoveryengineV1ControlFilterAction)
promoteActionobjectPromote certain links based on predefined trigger queries. (id: GoogleCloudDiscoveryengineV1ControlPromoteAction)
redirectActionobjectDefines a redirect-type control. (id: GoogleCloudDiscoveryengineV1ControlRedirectAction)
solutionTypestringRequired. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.
synonymsActionobjectTreats a group of terms as synonyms of one another. (id: GoogleCloudDiscoveryengineV1ControlSynonymsAction)
useCasesarraySpecifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_collections_data_stores_controls_getselectprojectsId, locationsId, collectionsId, dataStoresId, controlsIdGets a Control.
projects_locations_collections_engines_controls_getselectprojectsId, locationsId, collectionsId, enginesId, controlsIdGets a Control.
projects_locations_collections_data_stores_controls_listselectprojectsId, locationsId, collectionsId, dataStoresIdpageSize, pageToken, filterLists all Controls by their parent DataStore.
projects_locations_collections_engines_controls_listselectprojectsId, locationsId, collectionsId, enginesIdpageSize, pageToken, filterLists all Controls by their parent DataStore.
projects_locations_data_stores_controls_getselectprojectsId, locationsId, dataStoresId, controlsIdGets a Control.
projects_locations_data_stores_controls_listselectprojectsId, locationsId, dataStoresIdpageSize, pageToken, filterLists all Controls by their parent DataStore.
projects_locations_collections_data_stores_controls_createinsertprojectsId, locationsId, collectionsId, dataStoresIdcontrolIdCreates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.
projects_locations_collections_engines_controls_createinsertprojectsId, locationsId, collectionsId, enginesIdcontrolIdCreates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.
projects_locations_data_stores_controls_createinsertprojectsId, locationsId, dataStoresIdcontrolIdCreates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.
projects_locations_collections_data_stores_controls_patchupdateprojectsId, locationsId, collectionsId, dataStoresId, controlsIdupdateMaskUpdates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.
projects_locations_collections_engines_controls_patchupdateprojectsId, locationsId, collectionsId, enginesId, controlsIdupdateMaskUpdates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.
projects_locations_data_stores_controls_patchupdateprojectsId, locationsId, dataStoresId, controlsIdupdateMaskUpdates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.
projects_locations_collections_data_stores_controls_deletedeleteprojectsId, locationsId, collectionsId, dataStoresId, controlsIdDeletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.
projects_locations_collections_engines_controls_deletedeleteprojectsId, locationsId, collectionsId, enginesId, controlsIdDeletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.
projects_locations_data_stores_controls_deletedeleteprojectsId, locationsId, dataStoresId, controlsIdDeletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.

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
collectionsIdstring
controlsIdstring
dataStoresIdstring
enginesIdstring
locationsIdstring
projectsIdstring
controlIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets a Control.

SELECT
name,
associatedServingConfigIds,
boostAction,
conditions,
displayName,
filterAction,
promoteAction,
redirectAction,
solutionType,
synonymsAction,
useCases
FROM google.discoveryengine.controls
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND controlsId = '{{ controlsId }}' -- required;

INSERT examples

Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.

INSERT INTO google.discoveryengine.controls (
data__boostAction,
data__filterAction,
data__redirectAction,
data__synonymsAction,
data__promoteAction,
data__name,
data__displayName,
data__solutionType,
data__useCases,
data__conditions,
projectsId,
locationsId,
collectionsId,
dataStoresId,
controlId
)
SELECT
'{{ boostAction }}',
'{{ filterAction }}',
'{{ redirectAction }}',
'{{ synonymsAction }}',
'{{ promoteAction }}',
'{{ name }}',
'{{ displayName }}',
'{{ solutionType }}',
'{{ useCases }}',
'{{ conditions }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectionsId }}',
'{{ dataStoresId }}',
'{{ controlId }}'
RETURNING
name,
associatedServingConfigIds,
boostAction,
conditions,
displayName,
filterAction,
promoteAction,
redirectAction,
solutionType,
synonymsAction,
useCases
;

UPDATE examples

Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.

UPDATE google.discoveryengine.controls
SET
data__boostAction = '{{ boostAction }}',
data__filterAction = '{{ filterAction }}',
data__redirectAction = '{{ redirectAction }}',
data__synonymsAction = '{{ synonymsAction }}',
data__promoteAction = '{{ promoteAction }}',
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__solutionType = '{{ solutionType }}',
data__useCases = '{{ useCases }}',
data__conditions = '{{ conditions }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND controlsId = '{{ controlsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
associatedServingConfigIds,
boostAction,
conditions,
displayName,
filterAction,
promoteAction,
redirectAction,
solutionType,
synonymsAction,
useCases;

DELETE examples

Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.

DELETE FROM google.discoveryengine.controls
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND controlsId = '{{ controlsId }}' --required;