REST Resource: settings.datasources
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài nguyên: DataSource
Datasource (Nguồn dữ liệu) là một không gian tên logic cho các mục cần được lập chỉ mục. Tất cả các mục phải thuộc về một nguồn dữ liệu. Đây là điều kiện tiên quyết để các mục có thể được lập chỉ mục vào Cloud Search.
Biểu diễn dưới dạng JSON |
{
"name": string,
"displayName": string,
"shortName": string,
"indexingServiceAccounts": [
string
],
"disableServing": boolean,
"disableModifications": boolean,
"itemsVisibility": [
{
object (GSuitePrincipal )
}
],
"returnThumbnailUrls": boolean,
"operationIds": [
string
]
} |
Trường |
name |
string
Tên của tài nguyên nguồn dữ liệu. Định dạng: datasources/{sourceId}. Tên này sẽ bị bỏ qua khi tạo nguồn dữ liệu.
|
displayName |
string
Bắt buộc. Tên hiển thị của nguồn dữ liệu. Độ dài tối đa là 300 ký tự.
|
shortName |
string
Tên ngắn hoặc bí danh cho nguồn. Giá trị này sẽ được dùng để so khớp với toán tử "nguồn". Ví dụ: nếu tên ngắn là <value>, thì các cụm từ tìm kiếm như source:<value> sẽ chỉ trả về kết quả cho nguồn này. Giá trị này phải là duy nhất trên tất cả các nguồn dữ liệu. Giá trị chỉ được chứa các ký tự chữ và số (a-zA-Z0-9). Giá trị không được bắt đầu bằng "google" và không được là một trong những giá trị sau: mail, gmail, docs, drive, groups, sites, calendar, hangouts, gplus, keep, people, teams. Độ dài tối đa là 32 ký tự.
|
indexingServiceAccounts[] |
string
Danh sách tài khoản dịch vụ có quyền truy cập vào tính năng lập chỉ mục.
|
disableServing |
boolean
Tắt tính năng phân phát kết quả tìm kiếm hoặc trợ giúp.
|
disableModifications |
boolean
Nếu đúng, hãy đặt nguồn dữ liệu thành chế độ chỉ có thể đọc. Ở chế độ chỉ đọc, API Lập chỉ mục sẽ từ chối mọi yêu cầu lập chỉ mục hoặc xoá các mục trong nguồn này. Việc bật chế độ chỉ có thể đọc sẽ không ngăn việc xử lý dữ liệu đã được chấp nhận trước đó.
|
itemsVisibility[] |
object (GSuitePrincipal )
Trường này hạn chế chế độ hiển thị đối với các mục ở cấp nguồn dữ liệu. Các mục trong nguồn dữ liệu chỉ được giới hạn ở tập hợp người dùng và nhóm có trong trường này. Xin lưu ý rằng việc này không đảm bảo quyền truy cập vào một mục cụ thể, vì người dùng cần có quyền ACL đối với các mục có trong đó. Điều này đảm bảo quyền truy cập cấp cao trên toàn bộ nguồn dữ liệu và các mục riêng lẻ không được chia sẻ bên ngoài chế độ hiển thị này.
|
returnThumbnailUrls |
boolean
Người dùng có thể yêu cầu lấy URI hình thu nhỏ cho các Mục được lập chỉ mục trong nguồn dữ liệu này không.
|
operationIds[] |
string
Mã của các Thao tác thực hiện lâu (LRO) đang chạy cho giản đồ này.
|
Phương thức |
|
Tạo nguồn dữ liệu. |
|
Xoá nguồn dữ liệu. |
|
Lấy nguồn dữ liệu. |
|
Liệt kê các nguồn dữ liệu. |
|
Cập nhật nguồn dữ liệu. |
|
Cập nhật nguồn dữ liệu. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],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. |"]]