Search in sources :

Example 11 with ConfigClient

use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.

the class SyncGetExclusion method syncGetExclusion.

public static void syncGetExclusion() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        GetExclusionRequest request = GetExclusionRequest.newBuilder().setName(LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]").toString()).build();
        LogExclusion response = configClient.getExclusion(request);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) LogExclusion(com.google.logging.v2.LogExclusion) GetExclusionRequest(com.google.logging.v2.GetExclusionRequest)

Example 12 with ConfigClient

use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.

the class SyncGetExclusionLogexclusionname method syncGetExclusionLogexclusionname.

public static void syncGetExclusionLogexclusionname() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        LogExclusionName name = LogExclusionName.ofProjectExclusionName("[PROJECT]", "[EXCLUSION]");
        LogExclusion response = configClient.getExclusion(name);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) LogExclusion(com.google.logging.v2.LogExclusion) LogExclusionName(com.google.logging.v2.LogExclusionName)

Example 13 with ConfigClient

use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.

the class AsyncGetSink method asyncGetSink.

public static void asyncGetSink() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        GetSinkRequest request = GetSinkRequest.newBuilder().setSinkName(LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString()).build();
        ApiFuture<LogSink> future = configClient.getSinkCallable().futureCall(request);
        // Do something.
        LogSink response = future.get();
    }
}
Also used : LogSink(com.google.logging.v2.LogSink) ConfigClient(com.google.cloud.logging.v2.ConfigClient) GetSinkRequest(com.google.logging.v2.GetSinkRequest)

Example 14 with ConfigClient

use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.

the class SyncGetSinkLogsinkname method syncGetSinkLogsinkname.

public static void syncGetSinkLogsinkname() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        LogSinkName sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]");
        LogSink response = configClient.getSink(sinkName);
    }
}
Also used : LogSinkName(com.google.logging.v2.LogSinkName) LogSink(com.google.logging.v2.LogSink) ConfigClient(com.google.cloud.logging.v2.ConfigClient)

Example 15 with ConfigClient

use of com.google.cloud.logging.v2.ConfigClient in project gapic-generator-java by googleapis.

the class AsyncGetView method asyncGetView.

public static void asyncGetView() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        GetViewRequest request = GetViewRequest.newBuilder().setName(LogViewName.ofProjectLocationBucketViewName("[PROJECT]", "[LOCATION]", "[BUCKET]", "[VIEW]").toString()).build();
        ApiFuture<LogView> future = configClient.getViewCallable().futureCall(request);
        // Do something.
        LogView response = future.get();
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) GetViewRequest(com.google.logging.v2.GetViewRequest) LogView(com.google.logging.v2.LogView)

Aggregations

ConfigClient (com.google.cloud.logging.v2.ConfigClient)69 LogSink (com.google.logging.v2.LogSink)19 LogExclusion (com.google.logging.v2.LogExclusion)17 LogView (com.google.logging.v2.LogView)8 LogBucket (com.google.logging.v2.LogBucket)7 Empty (com.google.protobuf.Empty)5 CmekSettings (com.google.logging.v2.CmekSettings)4 LogSinkName (com.google.logging.v2.LogSinkName)4 FieldMask (com.google.protobuf.FieldMask)4 LogExclusionName (com.google.logging.v2.LogExclusionName)3 BillingAccountName (com.google.logging.v2.BillingAccountName)2 CreateBucketRequest (com.google.logging.v2.CreateBucketRequest)2 CreateExclusionRequest (com.google.logging.v2.CreateExclusionRequest)2 CreateSinkRequest (com.google.logging.v2.CreateSinkRequest)2 CreateViewRequest (com.google.logging.v2.CreateViewRequest)2 DeleteBucketRequest (com.google.logging.v2.DeleteBucketRequest)2 DeleteExclusionRequest (com.google.logging.v2.DeleteExclusionRequest)2 DeleteSinkRequest (com.google.logging.v2.DeleteSinkRequest)2 DeleteViewRequest (com.google.logging.v2.DeleteViewRequest)2 FolderName (com.google.logging.v2.FolderName)2