code: public Sink updateSink(String sinkName, String datasetName) {
      // [START logging_update_sink]
      SinkInfo sinkInfo =
          SinkInfo.newBuilder(sinkName, DatasetDestination.of(datasetName))
              .setVersionFormat(SinkInfo.VersionFormat.V2)
              .setFilter("severity>=ERROR")
              .build();
      Sink sink = logging.update(sinkInfo);
      // [END logging_update_sink]
      return sink;
    }
docs: [VARIABLE "my_dataset"]