Skip to main content

user_stores

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

Overview

Nameuser_stores
TypeResource
Idgoogle.discoveryengine.user_stores

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. The full resource name of the User Store, in the format of projects/{project}/locations/{location}/userStores/{user_store}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
defaultLicenseConfigstringOptional. The default subscription LicenseConfig for the UserStore, if UserStore.enable_license_auto_register is true, new users will automatically register under the default subscription. If default LicenseConfig doesn't have remaining license seats left, new users will not be assigned with license and will be blocked for Vertex AI Search features. This is used if license_assignment_tier_rules is not configured.
displayNamestringThe display name of the User Store.
enableExpiredLicenseAutoUpdatebooleanOptional. Whether to enable license auto update for users in this User Store. If true, users with expired licenses will automatically be updated to use the default license config as long as the default license config has seats left.
enableLicenseAutoRegisterbooleanOptional. Whether to enable license auto register for users in this User Store. If true, new users will automatically register under the default license config as long as the default license config has seats left.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_user_stores_getselectprojectsId, locationsId, userStoresIdGets the User Store.
projects_locations_user_stores_createinsertprojectsId, locationsIduserStoreIdCreates a new User Store.
projects_locations_user_stores_patchupdateprojectsId, locationsId, userStoresIdupdateMaskUpdates the User Store.
projects_locations_user_stores_batch_update_user_licensesupdateprojectsId, locationsId, userStoresIdUpdates the User License. This method is used for batch assign/unassign licenses to users.
projects_locations_user_stores_deletedeleteprojectsId, locationsId, userStoresIdDeletes the User Store.

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
locationsIdstring
projectsIdstring
userStoresIdstring
updateMaskstring (google-fieldmask)
userStoreIdstring

SELECT examples

Gets the User Store.

SELECT
name,
defaultLicenseConfig,
displayName,
enableExpiredLicenseAutoUpdate,
enableLicenseAutoRegister
FROM google.discoveryengine.user_stores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND userStoresId = '{{ userStoresId }}' -- required
;

INSERT examples

Creates a new User Store.

INSERT INTO google.discoveryengine.user_stores (
data__displayName,
data__defaultLicenseConfig,
data__enableLicenseAutoRegister,
data__enableExpiredLicenseAutoUpdate,
data__name,
projectsId,
locationsId,
userStoreId
)
SELECT
'{{ displayName }}',
'{{ defaultLicenseConfig }}',
{{ enableLicenseAutoRegister }},
{{ enableExpiredLicenseAutoUpdate }},
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ userStoreId }}'
RETURNING
name,
defaultLicenseConfig,
displayName,
enableExpiredLicenseAutoUpdate,
enableLicenseAutoRegister
;

UPDATE examples

Updates the User Store.

UPDATE google.discoveryengine.user_stores
SET
data__displayName = '{{ displayName }}',
data__defaultLicenseConfig = '{{ defaultLicenseConfig }}',
data__enableLicenseAutoRegister = {{ enableLicenseAutoRegister }},
data__enableExpiredLicenseAutoUpdate = {{ enableExpiredLicenseAutoUpdate }},
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND userStoresId = '{{ userStoresId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
defaultLicenseConfig,
displayName,
enableExpiredLicenseAutoUpdate,
enableLicenseAutoRegister;

DELETE examples

Deletes the User Store.

DELETE FROM google.discoveryengine.user_stores
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND userStoresId = '{{ userStoresId }}' --required
;