Method: properties.updateDataRetentionSettings
Zmienia ustawienia przechowywania danych w usłudze.
Żądanie HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{dataRetentionSettings.name=properties/*/dataRetentionSettings}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
dataRetentionSettings.name |
string
Tylko dane wyjściowe. Nazwa zasobu DataRetentionSetting. Format: properties/{property}/dataRetentionSettings
|
Parametry zapytania
Parametry |
updateMask |
string (FieldMask format)
Wymagane. Lista pól do zaktualizowania. Nazwy pól muszą być zapisane w alfabecie łamanym (np. „field_to_update”). Pominięte pola nie zostaną zaktualizowane. Aby zastąpić cały element, użyj jednej ścieżki z ciągiem znaków „*”, aby dopasować wszystkie pola. Jest to lista pełnych nazw pól rozdzielona przecinkami. Przykład: "user.displayName,photo" .
|
Treść żądania
Treść żądania zawiera wystąpienie elementu DataRetentionSettings
.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu DataRetentionSettings
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/analytics.edit
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-01-14 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]