Method: properties.updateDataRetentionSettings
Memperbarui setelan retensi data singleton untuk properti ini.
Permintaan HTTP
PATCH https://analyticsadmin.googleapis.com/v1beta/{dataRetentionSettings.name=properties/*/dataRetentionSettings}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
dataRetentionSettings.name |
string
Hanya output. Nama resource untuk resource DataRetentionSetting ini. Format: properties/{property}/dataRetentionSettings
|
Parameter kueri
Parameter |
updateMask |
string (FieldMask format)
Wajib. Daftar kolom yang akan diperbarui. Nama kolom harus dalam snake case (misalnya, "field_to_update"). Kolom yang dihilangkan tidak akan diperbarui. Untuk mengganti seluruh entitas, gunakan satu jalur dengan string "*" untuk mencocokkan semua kolom. Ini adalah daftar dipisahkan koma yang berisi nama-nama kolom yang sepenuhnya memenuhi syarat. Contoh: "user.displayName,photo" .
|
Isi permintaan
Isi permintaan memuat instance DataRetentionSettings
.
Isi respons
Jika berhasil, isi respons memuat instance DataRetentionSettings
.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut:
https://www.googleapis.com/auth/analytics.edit
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-01-14 UTC.
[null,null,["Terakhir diperbarui pada 2025-01-14 UTC."],[[["This method updates the data retention settings for a Google Analytics 4 property using an HTTP PATCH request."],["It requires specifying the property in the path parameter and uses a field mask in the query parameter to indicate which fields should be updated."],["The request body should contain the desired DataRetentionSettings, and a successful response will return the updated settings."],["Authorization with the `https://www.googleapis.com/auth/analytics.edit` scope is necessary to use this method."]]],["This document details updating data retention settings for a property using a `PATCH` request to a specified URL. The URL includes a path parameter, `dataRetentionSettings.name`, indicating the resource to be updated. The `updateMask` query parameter specifies which fields to modify. The request and response bodies use the `DataRetentionSettings` format. The process requires authorization via the `https://www.googleapis.com/auth/analytics.edit` OAuth scope. It also supports the `Try it!` function.\n"]]