use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class SyncDeleteExclusion method syncDeleteExclusion.
public static void syncDeleteExclusion() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
DeleteExclusionRequest request = DeleteExclusionRequest.newBuilder().setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()).build();
configClient.deleteExclusion(request);
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class SyncDeleteExclusionLogexclusionname method syncDeleteExclusionLogexclusionname.
public static void syncDeleteExclusionLogexclusionname() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
configClient.deleteExclusion(name);
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class SyncDeleteExclusionString method syncDeleteExclusionString.
public static void syncDeleteExclusionString() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
String name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString();
configClient.deleteExclusion(name);
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class AsyncDeleteSink method asyncDeleteSink.
public static void asyncDeleteSink() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
DeleteSinkRequest request = DeleteSinkRequest.newBuilder().setSinkName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()).build();
ApiFuture<Empty> future = configClient.deleteSinkCallable().futureCall(request);
// Do something.
future.get();
}
}
use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.
the class AsyncDeleteView method asyncDeleteView.
public static void asyncDeleteView() throws Exception {
// It may require modifications to work in your environment.
try (ConfigClient configClient = ConfigClient.create()) {
DeleteViewRequest request = DeleteViewRequest.newBuilder().setName(LogViewName.ofProjectLocationBucketViewName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]").toString()).build();
ApiFuture<Empty> future = configClient.deleteViewCallable().futureCall(request);
// Do something.
future.get();
}
}
Aggregations