Skip to main content

target_sites

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

Overview

Nametarget_sites
TypeResource
Idgoogle.discoveryengine.target_sites

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The fully qualified resource name of the target site. projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site} The target_site_id is system-generated.
exactMatchbooleanImmutable. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.
failureReasonobjectOutput only. Failure reason. (id: GoogleCloudDiscoveryengineV1TargetSiteFailureReason)
generatedUriPatternstringOutput only. This is system-generated based on the provided_uri_pattern.
indexingStatusstringOutput only. Indexing status.
providedUriPatternstringRequired. Input only. The user provided URI pattern from which the generated_uri_pattern is generated.
rootDomainUristringOutput only. Root domain of the provided_uri_pattern.
siteVerificationInfoobjectOutput only. Site ownership and validity verification status. (id: GoogleCloudDiscoveryengineV1SiteVerificationInfo)
typestringThe type of the target site, e.g., whether the site is to be included or excluded.
updateTimestring (google-datetime)Output only. The target site's last updated time.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_collections_data_stores_site_search_engine_target_sites_getselectprojectsId, locationsId, collectionsId, dataStoresId, targetSitesIdGets a TargetSite.
projects_locations_collections_data_stores_site_search_engine_target_sites_listselectprojectsId, locationsId, collectionsId, dataStoresIdpageSize, pageTokenGets a list of TargetSites.
projects_locations_data_stores_site_search_engine_target_sites_getselectprojectsId, locationsId, dataStoresId, targetSitesIdGets a TargetSite.
projects_locations_data_stores_site_search_engine_target_sites_listselectprojectsId, locationsId, dataStoresIdpageSize, pageTokenGets a list of TargetSites.
projects_locations_collections_data_stores_site_search_engine_target_sites_createinsertprojectsId, locationsId, collectionsId, dataStoresIdCreates a TargetSite.
projects_locations_collections_data_stores_site_search_engine_target_sites_batch_createinsertprojectsId, locationsId, collectionsId, dataStoresIdCreates TargetSite in a batch.
projects_locations_data_stores_site_search_engine_target_sites_createinsertprojectsId, locationsId, dataStoresIdCreates a TargetSite.
projects_locations_data_stores_site_search_engine_target_sites_batch_createinsertprojectsId, locationsId, dataStoresIdCreates TargetSite in a batch.
projects_locations_collections_data_stores_site_search_engine_target_sites_patchupdateprojectsId, locationsId, collectionsId, dataStoresId, targetSitesIdUpdates a TargetSite.
projects_locations_data_stores_site_search_engine_target_sites_patchupdateprojectsId, locationsId, dataStoresId, targetSitesIdUpdates a TargetSite.
projects_locations_collections_data_stores_site_search_engine_target_sites_deletedeleteprojectsId, locationsId, collectionsId, dataStoresId, targetSitesIdDeletes a TargetSite.
projects_locations_data_stores_site_search_engine_target_sites_deletedeleteprojectsId, locationsId, dataStoresId, targetSitesIdDeletes a TargetSite.

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
dataStoresIdstring
locationsIdstring
projectsIdstring
targetSitesIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a TargetSite.

SELECT
name,
exactMatch,
failureReason,
generatedUriPattern,
indexingStatus,
providedUriPattern,
rootDomainUri,
siteVerificationInfo,
type,
updateTime
FROM google.discoveryengine.target_sites
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND targetSitesId = '{{ targetSitesId }}' -- required;

INSERT examples

Creates a TargetSite.

INSERT INTO google.discoveryengine.target_sites (
data__providedUriPattern,
data__type,
data__exactMatch,
projectsId,
locationsId,
collectionsId,
dataStoresId
)
SELECT
'{{ providedUriPattern }}',
'{{ type }}',
{{ exactMatch }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectionsId }}',
'{{ dataStoresId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a TargetSite.

UPDATE google.discoveryengine.target_sites
SET
data__providedUriPattern = '{{ providedUriPattern }}',
data__type = '{{ type }}',
data__exactMatch = {{ exactMatch }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND targetSitesId = '{{ targetSitesId }}' --required
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a TargetSite.

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