Method: properties.updateDataRetentionSettings
Cập nhật chế độ cài đặt giữ lại dữ liệu singleton cho tài sản này.
Yêu cầu HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{dataRetentionSettings.name=properties/*/dataRetentionSettings}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
dataRetentionSettings.name |
string
Chỉ có đầu ra. Tên tài nguyên cho tài nguyên DataRetentionSetting này. Định dạng: properties/{property}/dataRetentionSettings
|
Tham số truy vấn
Thông số |
updateMask |
string (FieldMask format)
Bắt buộc. Danh sách các trường cần cập nhật. Tên trường phải viết theo kiểu snake case (ví dụ: "field_to_update"). Các trường bị bỏ qua sẽ không được cập nhật. Để thay thế toàn bộ thực thể, hãy sử dụng một đường dẫn có chuỗi "*" để khớp với tất cả các trường. Đây là danh sách tên đủ điều kiện của các trường được phân tách bằng dấu phẩy. Ví dụ: "user.displayName,photo"
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của DataRetentionSettings
.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của DataRetentionSettings
.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/analytics.edit
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-01-14 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-01-14 UTC."],[[["This endpoint updates the data retention settings for a Google Analytics 4 property using an HTTP PATCH request."],["It requires specifying the `dataRetentionSettings.name` as a path parameter to identify the property's settings."],["An `updateMask` query parameter is required to indicate which fields should be updated within the data retention settings."],["The request body should contain the updated `DataRetentionSettings` object, and a successful response will return the updated settings."],["Users need the `https://www.googleapis.com/auth/analytics.edit` OAuth scope to authorize this request."]]],["This document details updating data retention settings for a property using a `PATCH` request to the specified URL. The resource path is defined by `dataRetentionSettings.name`, and the request requires a `updateMask` query parameter specifying fields to update. The request body contains `DataRetentionSettings`, and a successful response also returns `DataRetentionSettings`. This operation requires authorization with the `https://www.googleapis.com/auth/analytics.edit` scope. Additionally, it indicates that there are HTTP requests, path, query, request, and response bodies, and offers a 'try it!' feature.\n"]]