updateSettings method
Updates the Log Router settings for the given resource.
Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
UpdateSettings
will fail if 1) kms_key_name is invalid, or 2) the associated service
account does not have the required
roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or
3) access to the key is disabled. 4) location_id is not supported by
Logging. 5) location_id violate OrgPolicy.
See Enabling CMEK for Log Router for more information.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a StatusException if the API failed with a
Status message. Throws a ServiceException for any other failure.
Implementation
Future<Settings> updateSettings(UpdateSettingsRequest request) async {
final url = Uri.https(_host, '/v2/${request.name}/settings', {
if (request.updateMask case final $1?) 'updateMask': $1.toJson(),
});
final response = await _client.patch(url, body: request.settings);
return Settings.fromJson(response);
}