REST Resource: settings.datasources
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:DataSource
数据源是用于编入索引的项的逻辑命名空间。所有项都必须属于某个数据源。这是将项编入 Cloud Search 索引的前提条件。
JSON 表示法 |
{
"name": string,
"displayName": string,
"shortName": string,
"indexingServiceAccounts": [
string
],
"disableServing": boolean,
"disableModifications": boolean,
"itemsVisibility": [
{
object (GSuitePrincipal )
}
],
"returnThumbnailUrls": boolean,
"operationIds": [
string
]
} |
字段 |
name |
string
数据源资源的名称。格式:datasources/{sourceId}。 创建数据源时,系统会忽略该名称。
|
displayName |
string
必需。数据源的显示名称。长度不得超过 300 个字符。
|
shortName |
string
来源的简称或别名。此值将用于匹配“来源”运算符。例如,如果短名称为 <value>,则 source:<value> 等查询将仅返回此来源的结果。此值在所有数据源中都必须是唯一的。该值只能包含字母数字字符 (a-zA-Z0-9)。此值不能以“google”开头,也不能是以下各项之一:mail、gmail、docs、drive、groups、sites、calendar、hangouts、gplus、keep、people、teams。长度不得超过 32 个字符。
|
indexingServiceAccounts[] |
string
具有索引编制权限的服务账号列表。
|
disableServing |
boolean
停用任何搜索或辅助结果的呈现。
|
disableModifications |
boolean
如果为 true,则将数据源设为只读模式。在只读模式下,Indexing API 会拒绝对此来源中内容进行编入索引或删除的任何请求。启用只读模式不会停止处理之前接受的数据。
|
itemsVisibility[] |
object (GSuitePrincipal )
此字段会限制数据源级别的项的可见性。数据源中的项仅限于此字段中包含的用户和群组的联合。请注意,这并不保证用户可以访问特定项,因为用户需要对包含的项拥有 ACL 权限。这样可确保对整个数据源的访问权限级别较高,并且不会在这种可见性范围之外共享具体项。
|
returnThumbnailUrls |
boolean
用户能否请求获取在此数据源中编入索引的项的缩略图 URI。
|
operationIds[] |
string
目前针对此架构运行的长时间运行操作 (LRO) 的 ID。
|
方法 |
|
创建数据源。 |
|
删除数据源。 |
|
获取数据源。 |
|
列出数据源。 |
|
更新数据源。 |
|
更新数据源。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# REST Resource: settings.datasources\n\n- [Resource: DataSource](#DataSource)\n - [JSON representation](#DataSource.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: DataSource\n--------------------\n\nDatasource is a logical namespace for items to be indexed. All items must belong to a datasource. This is the prerequisite before items can be indexed into Cloud Search.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"displayName\": string, \"shortName\": string, \"indexingServiceAccounts\": [ string ], \"disableServing\": boolean, \"disableModifications\": boolean, \"itemsVisibility\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/GSuitePrincipal) } ], \"returnThumbnailUrls\": boolean, \"operationIds\": [ string ] } ``` |\n\n| Fields ||\n|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The name of the datasource resource. Format: datasources/{sourceId}. The name is ignored when creating a datasource. |\n| `displayName` | `string` Required. Display name of the datasource The maximum length is 300 characters. |\n| `shortName` | `string` A short name or alias for the source. This value will be used to match the 'source' operator. For example, if the short name is *\\\u003cvalue\\\u003e* then queries like *source:\\\u003cvalue\\\u003e* will only return results for this source. The value must be unique across all datasources. The value must only contain alphanumeric characters (a-zA-Z0-9). The value cannot start with 'google' and cannot be one of the following: mail, gmail, docs, drive, groups, sites, calendar, hangouts, gplus, keep, people, teams. Its maximum length is 32 characters. |\n| `indexingServiceAccounts[]` | `string` List of service accounts that have indexing access. |\n| `disableServing` | `boolean` Disable serving any search or assist results. |\n| `disableModifications` | `boolean` If true, sets the datasource to read-only mode. In read-only mode, the Indexing API rejects any requests to index or delete items in this source. Enabling read-only mode does not stop the processing of previously accepted data. |\n| `itemsVisibility[]` | `object (`[GSuitePrincipal](/workspace/cloud-search/docs/reference/rest/v1/GSuitePrincipal)`)` This field restricts visibility to items at the datasource level. Items within the datasource are restricted to the union of users and groups included in this field. Note that, this does not ensure access to a specific item, as users need to have ACL permissions on the contained items. This ensures a high level access on the entire datasource, and that the individual items are not shared outside this visibility. |\n| `returnThumbnailUrls` | `boolean` Can a user request to get thumbnail URI for Items indexed in this data source. |\n| `operationIds[]` | `string` IDs of the Long Running Operations (LROs) currently running for this schema. |\n\n| Methods ------- ||\n|------------------------------------------------------------------------------------------|-----------------------|\n| ### [create](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/create) | Creates a datasource. |\n| ### [delete](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/delete) | Deletes a datasource. |\n| ### [get](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/get) | Gets a datasource. |\n| ### [list](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/list) | Lists datasources. |\n| ### [patch](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/patch) | Updates a datasource. |\n| ### [update](/workspace/cloud-search/docs/reference/rest/v1/settings.datasources/update) | Updates a datasource. |"]]