controls
Creates, updates, deletes, gets or lists a controls
resource.
Overview
Name | controls |
Type | Resource |
Id | google.discoveryengine.controls |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Fully qualified name projects/*/locations/global/dataStore/*/controls/* |
associatedServingConfigIds | array | Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes. |
boostAction | object | Adjusts order of products in returned list. |
conditions | array | Determines 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. |
displayName | string | Required. 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. |
filterAction | object | Specified which products may be included in results. Uses same filter as boost. |
redirectAction | object | Redirects a shopper to the provided URI. |
solutionType | string | Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. |
synonymsAction | object | Creates a set of terms that will act as synonyms of one another. Example: "happy" will also be considered as "glad", "glad" will also be considered as "happy". |
useCases | array | Specifies 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_collections_data_stores_controls_get | SELECT | collectionsId, controlsId, dataStoresId, locationsId, projectsId | Gets a Control. |
projects_locations_collections_data_stores_controls_list | SELECT | collectionsId, dataStoresId, locationsId, projectsId | Lists all Controls by their parent DataStore. |
projects_locations_collections_engines_controls_get | SELECT | collectionsId, controlsId, enginesId, locationsId, projectsId | Gets a Control. |
projects_locations_collections_engines_controls_list | SELECT | collectionsId, enginesId, locationsId, projectsId | Lists all Controls by their parent DataStore. |
projects_locations_data_stores_controls_get | SELECT | controlsId, dataStoresId, locationsId, projectsId | Gets a Control. |
projects_locations_data_stores_controls_list | SELECT | dataStoresId, locationsId, projectsId | Lists all Controls by their parent DataStore. |
projects_locations_collections_data_stores_controls_create | INSERT | collectionsId, dataStoresId, locationsId, projectsId | 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. |
projects_locations_collections_engines_controls_create | INSERT | collectionsId, enginesId, locationsId, projectsId | 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. |
projects_locations_data_stores_controls_create | INSERT | dataStoresId, locationsId, projectsId | 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. |
projects_locations_collections_data_stores_controls_delete | DELETE | collectionsId, controlsId, dataStoresId, locationsId, projectsId | Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned. |
projects_locations_collections_engines_controls_delete | DELETE | collectionsId, controlsId, enginesId, locationsId, projectsId | Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned. |
projects_locations_data_stores_controls_delete | DELETE | controlsId, dataStoresId, locationsId, projectsId | Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned. |
projects_locations_collections_data_stores_controls_patch | UPDATE | collectionsId, controlsId, dataStoresId, locationsId, projectsId | Updates 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_patch | UPDATE | collectionsId, controlsId, enginesId, locationsId, projectsId | Updates 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_patch | UPDATE | controlsId, dataStoresId, locationsId, projectsId | Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned. |
SELECT
examples
Lists all Controls by their parent DataStore.
SELECT
name,
associatedServingConfigIds,
boostAction,
conditions,
displayName,
filterAction,
redirectAction,
solutionType,
synonymsAction,
useCases
FROM google.discoveryengine.controls
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new controls
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.discoveryengine.controls (
dataStoresId,
locationsId,
projectsId,
boostAction,
filterAction,
redirectAction,
synonymsAction,
name,
displayName,
solutionType,
useCases,
conditions
)
SELECT
'{{ dataStoresId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ boostAction }}',
'{{ filterAction }}',
'{{ redirectAction }}',
'{{ synonymsAction }}',
'{{ name }}',
'{{ displayName }}',
'{{ solutionType }}',
'{{ useCases }}',
'{{ conditions }}'
;
- name: your_resource_model_name
props:
- name: boostAction
value:
- name: boost
value: number
- name: filter
value: string
- name: dataStore
value: string
- name: filterAction
value:
- name: filter
value: string
- name: dataStore
value: string
- name: redirectAction
value:
- name: redirectUri
value: string
- name: synonymsAction
value:
- name: synonyms
value:
- string
- name: name
value: string
- name: displayName
value: string
- name: associatedServingConfigIds
value:
- string
- name: solutionType
value: string
- name: useCases
value:
- string
- name: conditions
value:
- - name: queryTerms
value:
- - name: value
value: string
- name: fullMatch
value: boolean
- name: activeTimeRange
value:
- - name: startTime
value: string
- name: endTime
value: string
UPDATE
example
Updates a controls
resource.
/*+ update */
UPDATE google.discoveryengine.controls
SET
boostAction = '{{ boostAction }}',
filterAction = '{{ filterAction }}',
redirectAction = '{{ redirectAction }}',
synonymsAction = '{{ synonymsAction }}',
name = '{{ name }}',
displayName = '{{ displayName }}',
solutionType = '{{ solutionType }}',
useCases = '{{ useCases }}',
conditions = '{{ conditions }}'
WHERE
controlsId = '{{ controlsId }}'
AND dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified controls
resource.
/*+ delete */
DELETE FROM google.discoveryengine.controls
WHERE controlsId = '{{ controlsId }}'
AND dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';