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
來源的簡稱或別名。這個值會用於比對「source」運算子。舉例來說,如果簡短名稱為 <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
目前為此結構定義執行的長時間執行作業 (LROs) ID。
|
方法 |
|
建立資料來源。 |
|
刪除資料來源。 |
|
取得資料來源。 |
|
列出資料來源。 |
|
更新資料來源。 |
|
更新資料來源。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]