Search in sources :

Example 66 with ConfigClient

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

the class SyncUpdateSinkLogsinknameLogsinkFieldmask method syncUpdateSinkLogsinknameLogsinkFieldmask.

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

Example 67 with ConfigClient

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

the class SyncUpdateSinkStringLogsink method syncUpdateSinkStringLogsink.

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

Example 68 with ConfigClient

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

the class SyncUpdateSinkStringLogsinkFieldmask method syncUpdateSinkStringLogsinkFieldmask.

public static void syncUpdateSinkStringLogsinkFieldmask() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        String sinkName = LogSinkName.ofProjectSinkName("[PROJECT]", "[SINK]").toString();
        LogSink sink = LogSink.newBuilder().build();
        FieldMask updateMask = FieldMask.newBuilder().build();
        LogSink response = configClient.updateSink(sinkName, sink, updateMask);
    }
}
Also used : LogSink(com.google.logging.v2.LogSink) ConfigClient(com.google.cloud.logging.v2.ConfigClient) FieldMask(com.google.protobuf.FieldMask)

Example 69 with ConfigClient

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

the class SyncUpdateView method syncUpdateView.

public static void syncUpdateView() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        UpdateViewRequest request = UpdateViewRequest.newBuilder().setName("name3373707").setView(LogView.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).build();
        LogView response = configClient.updateView(request);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) UpdateViewRequest(com.google.logging.v2.UpdateViewRequest) 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