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.
Google Cloud Search hỗ trợ giải pháp VPC Service Controls để tăng cường bảo mật cho dữ liệu của bạn. VPC Service Controls cho phép bạn xác định một ranh giới dịch vụ xung quanh các tài nguyên của Google Cloud Platform để hạn chế dữ liệu và giúp giảm thiểu rủi ro rò rỉ dữ liệu.
TITLE là tiêu đề mà con người có thể đọc được của chu vi.
PROJECTS là danh sách gồm một hoặc nhiều số dự án được phân tách bằng dấu phẩy, mỗi số dự án đều có chuỗi projects/ ở phía trước. Sử dụng số dự án thu được ở bước 1. Ví dụ: nếu bạn có hai dự án là 12345 và 67890, thì chế độ cài đặt của bạn sẽ là --resource=projects/12345, project/67890 .Cờ này chỉ hỗ trợ số dự án, chứ không hỗ trợ tên hoặc mã dự án.
RESTRICTED-SERVICES là danh sách gồm một hoặc nhiều dịch vụ được phân tách bằng dấu phẩy.
Sử dụng cloudsearch.googleapis.com.
POLICY_NAME là tên bằng số của chính sách truy cập của tổ chức mà bạn nhận được ở bước 2c.
Để biết thêm thông tin về cách tạo một phạm vi dịch vụ, hãy tham khảo bài viết Tạo phạm vi dịch vụ.
(không bắt buộc) Nếu bạn muốn áp dụng các hạn chế dựa trên IP hoặc khu vực, hãy tạo các cấp truy cập và thêm các cấp đó vào chu vi dịch vụ đã tạo ở bước 3:
Để tạo cấp truy cập, hãy tham khảo phần Tạo cấp truy cập cơ bản.
Để xem ví dụ về cách tạo điều kiện cấp độ truy cập chỉ cho phép truy cập từ một dải địa chỉ IP cụ thể (chẳng hạn như những địa chỉ IP trong mạng của công ty), hãy tham khảo bài viết Giới hạn quyền truy cập trên mạng của công ty.
Sau khi tạo cấp truy cập, hãy thêm cấp truy cập đó vào ranh giới dịch vụ.
Để biết hướng dẫn về cách thêm cấp truy cập vào một chu vi dịch vụ, hãy tham khảo bài viết Thêm cấp truy cập vào một chu vi hiện có.
Thay đổi này có thể mất đến 30 phút để lan truyền và có hiệu lực.
Sử dụng Cloud Search Customer Service REST API để cập nhật chế độ cài đặt khách hàng bằng dự án được bảo vệ bằng phạm vi VPC Service Controls:
Lấy mã truy cập OAuth 2.0 từ Máy chủ uỷ quyền của Google.
Để biết thông tin về cách lấy mã thông báo, hãy tham khảo bước 2 trong phần Sử dụng OAuth 2.0 để truy cập vào các API của Google.
Khi lấy mã truy cập, hãy sử dụng một trong các phạm vi OAuth sau đây: https://www.googleapis.com/auth/cloud_search.settings.indexing, https://www.googleapis.com/auth/cloud_search.settings hoặc https://www.googleapis.com/auth/cloud_search
Chạy lệnh curl sau đây để đặt dự án trong chế độ cài đặt VPC Service Controls trong phần Chế độ cài đặt của khách hàng trong Google Cloud Search:
YOUR_ACCESS_TOKEN là mã truy cập OAuth 2.0 thu được ở bước 5a.
PROJECT_ID là mã dự án mà bạn nhận được ở bước 1.
Nếu thành công, bạn sẽ nhận được phản hồi 200 OK kèm theo chế độ cài đặt khách hàng đã cập nhật.
Sau khi bạn hoàn tất thành công các bước trên, các hạn chế của VPC Service Controls (Kiểm soát dịch vụ bằng VPC) (như được xác định trong ranh giới dịch vụ) sẽ được áp dụng cho tất cả các API Google Cloud Search, các lượt tìm kiếm tại cloudsearch.google.com, cũng như việc xem và thay đổi cấu hình hoặc báo cáo bằng Bảng điều khiển dành cho quản trị viên. Các yêu cầu khác đối với Google Cloud Search API không tuân theo các cấp truy cập sẽ nhận được lỗi PERMISSION_DENIED “Request is prohibited by organization’s policy”.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[],[],null,["# Enhance security with VPC Service Controls\n\nGoogle Cloud Search supports VPC Service Controls\nto enhance the security of your data. VPC Service Controls allows you to define\na service perimeter around Google Cloud Platform resources to constrain data\nand help mitigate data exfiltration risks.\n| **Note:** Cloud Search supports restricted VIP which provides a private network route to make data and resources inaccessible from the internet. For information on setting up restricted VIP, refer to [Setting up private connectivity to Google APIs and services](https://cloud.google.com/vpc-service-controls/docs/set-up-private-connectivity).\n\nPrerequisites\n-------------\n\nBefore you begin,\n[install the gcloud command-line interface](https://cloud.google.com/sdk/gcloud).\n\nEnable VPC Service Controls\n---------------------------\n\nTo enable VPC Service Controls:\n\n1. Obtain the project IDs and project numbers for the Google Cloud Platform\n project you want to use. To obtain the project IDs and numbers, refer to\n [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects).\n\n2. Use gcloud to create an access policy for your Google Cloud Platform\n organization:\n\n 1. [Get your organization ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).\n 2. [Create an access policy](https://cloud.google.com/access-context-manager/docs/create-access-policy).\n 3. [Get the name of your access policy](https://cloud.google.com/access-context-manager/docs/manage-access-policy#gcloud).\n\n | **Note:** Organizations can only have one access policy. If you attempt to create a second access policy for for your organization, an error occurs.\n3. Create a service perimeter with Cloud Search as a restricted service by\n running the following gcloud command:\n\n gcloud access-context-manager perimeters create NAME \\\n --title=TITLE \\\n --resources=PROJECTS \\\n --restricted-services=RESTRICTED-SERVICES \\\n --policy=POLICY_NAME\n\n Where:\n - `NAME` is the name of the perimeter.\n - `TITLE` is the human-readable title of the perimeter.\n - `PROJECTS` is a comma-separated list of one or more project numbers, each preceded by the string `projects/`. Use the project numbers obtained in step 1. For example, if you had two projects, project `12345` and `67890`, your setting would be `--resource=projects/12345, project/67890` .This flag only supports project numbers; it doesn't support names or IDs.\n - `RESTRICTED-SERVICES` is a comma-separated list of one or more services. Use `cloudsearch.googleapis.com`.\n - `POLICY_NAME` is the numeric name of your organization's access policy obtained in step 2c.\n\n For further information on how to create a service perimeter, refer to\n [Creating a service perimeter](https://cloud.google.com/vpc-service-controls/docs/create-service-perimeters).\n4. (optional) If you want to apply IP or region-based restrictions, create\n access levels and add them to the service perimeter created in step 3:\n\n 1. To create an access level, refer to [Creating an basic access level](https://cloud.google.com/access-context-manager/docs/create-basic-access-level). For an example on how to create an access level condition that only allows access from a specific range of IP addresses, such as those within a corporate network, refer to [Limit access on a corporate network](https://cloud.google.com/access-context-manager/docs/create-basic-access-level#corporate-network-example).\n 2. After you have created an access level, add it to the service perimeter. For instructions on adding an access level to a service perimeter, refer to [Adding an access level to an existing perimeter](https://cloud.google.com/vpc-service-controls/docs/manage-service-perimeters#add-access-level). This change can take up to 30 minutes for this change to propagate and take effect.\n5. Use the Cloud Search Customer Service REST API to update the customer\n settings with your VPC Service Controls perimeter-protected project:\n\n| **Note:** Because Cloud Search resources are not stored in a Google Cloud Platform project, you must update the Cloud Search customer settings with the VPC Service Controls perimeter-protected project. The VPC Service Controls project acts as a virtual project container for all your Cloud Search resources. Without building this mapping, VPC Service Controls won't work for the Cloud Search API.\n\n1. Obtain an OAuth 2.0 access token from the Google Authorization Server.\n For information on obtaining the token, refer to step 2 of\n [Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/oauth2).\n When obtaining the access token, use one of the following OAuth scopes:\n `https://www.googleapis.com/auth/cloud_search.settings.indexing`,\n `https://www.googleapis.com/auth/cloud_search.settings`,\n or `https://www.googleapis.com/auth/cloud_search`\n\n2. Run the following curl command to set the project in VPC Service Controls\n settings under Customer settings in Google Cloud Search:\n\n curl --request PATCH \\\n 'https://cloudsearch.googleapis.com/v1/settings/customer' \\\n --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data '{ \"vpc_settings\": { \"project\": \"projects/PROJECT_ID\" } }' \\\n --compressed\n\n Where:\n\n- `YOUR_ACCESS_TOKEN` is OAuth 2.0 access token obtained in step 5a.\n- `PROJECT_ID` is the project ID obtained in step 1.\n\n If successful, you should receive a `200 OK` response accompanied by the\n updated customer settings.\n\nAfter the above steps are completed successfully, the VPC Service Controls\nrestrictions, as defined in the service perimeter, are applied to all Google\nCloud Search APIs, searches at `cloudsearch.google.com`, and viewing and\nchanging configuration or reports using the Admin console. Further requests\nto the Google Cloud Search API that don't follow access levels receive a\n`PERMISSION_DENIED \"Request is prohibited by organization's policy\"` error."]]