use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class SyncUpdateBucket method syncUpdateBucket.
public static void syncUpdateBucket() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
UpdateBucketRequest request = UpdateBucketRequest.newBuilder().setName(LogBucketName.ofProjectLocationBucketName("[PROJECT]", "[LOCATION]", "[BUCKET]").toString()).setBucket(LogBucket.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
LogBucket response = configClient.updateBucket(request);
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class AsyncUpdateCmekSettings method asyncUpdateCmekSettings.
public static void asyncUpdateCmekSettings() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder().setName("name3373707").setCmekSettings(CmekSettings.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
ApiFuture<CmekSettings> future = configClient.updateCmekSettingsCallable().futureCall(request);
// Do something.
CmekSettings response = future.get();
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class SyncUpdateCmekSettings method syncUpdateCmekSettings.
public static void syncUpdateCmekSettings() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
UpdateCmekSettingsRequest request = UpdateCmekSettingsRequest.newBuilder().setName("name3373707").setCmekSettings(CmekSettings.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
CmekSettings response = configClient.updateCmekSettings(request);
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class SyncUpdateExclusionLogexclusionnameLogexclusionFieldmask method syncUpdateExclusionLogexclusionnameLogexclusionFieldmask.
public static void syncUpdateExclusionLogexclusionnameLogexclusionFieldmask() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
LogExclusion exclusion = LogExclusion.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
LogExclusion response = configClient.updateExclusion(name, exclusion, updateMask);
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class AsyncUpdateSink method asyncUpdateSink.
public static void asyncUpdateSink() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
UpdateSinkRequest request = UpdateSinkRequest.newBuilder().setSinkName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()).setSink(LogSink.newBuilder().build()).setUniqueWriterIdentity(true).setUpdateMask(FieldMask.newBuilder().build()).build();
ApiFuture<LogSink> future = configClient.updateSinkCallable().futureCall(request);
// Do something.
LogSink response = future.get();
}
}
Aggregations