Search in sources :

Example 46 with ConfigClient

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

the class SyncGetCmekSettings method syncGetCmekSettings.

public static void syncGetCmekSettings() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        GetCmekSettingsRequest request = GetCmekSettingsRequest.newBuilder().setName(CmekSettingsName.ofProjectName("[PROJECT]").toString()).build();
        CmekSettings response = configClient.getCmekSettings(request);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) CmekSettings(com.google.logging.v2.CmekSettings) GetCmekSettingsRequest(com.google.logging.v2.GetCmekSettingsRequest)

Example 47 with ConfigClient

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

the class AsyncCreateExclusion method asyncCreateExclusion.

public static void asyncCreateExclusion() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        CreateExclusionRequest request = CreateExclusionRequest.newBuilder().setParent(ProjectName.of("[PROJECT]").toString()).setExclusion(LogExclusion.newBuilder().build()).build();
        ApiFuture<LogExclusion> future = configClient.createExclusionCallable().futureCall(request);
        // Do something.
        LogExclusion response = future.get();
    }
}
Also used : CreateExclusionRequest(com.google.logging.v2.CreateExclusionRequest) ConfigClient(com.google.cloud.logging.v2.ConfigClient) LogExclusion(com.google.logging.v2.LogExclusion)

Example 48 with ConfigClient

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

the class SyncCreateExclusion method syncCreateExclusion.

public static void syncCreateExclusion() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        CreateExclusionRequest request = CreateExclusionRequest.newBuilder().setParent(ProjectName.of("[PROJECT]").toString()).setExclusion(LogExclusion.newBuilder().build()).build();
        LogExclusion response = configClient.createExclusion(request);
    }
}
Also used : CreateExclusionRequest(com.google.logging.v2.CreateExclusionRequest) ConfigClient(com.google.cloud.logging.v2.ConfigClient) LogExclusion(com.google.logging.v2.LogExclusion)

Example 49 with ConfigClient

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

the class SyncCreateExclusionBillingaccountnameLogexclusion method syncCreateExclusionBillingaccountnameLogexclusion.

public static void syncCreateExclusionBillingaccountnameLogexclusion() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        BillingAccountName parent = BillingAccountName.of("[BILLING_ACCOUNT]");
        LogExclusion exclusion = LogExclusion.newBuilder().build();
        LogExclusion response = configClient.createExclusion(parent, exclusion);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) BillingAccountName(com.google.logging.v2.BillingAccountName) LogExclusion(com.google.logging.v2.LogExclusion)

Example 50 with ConfigClient

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

the class SyncCreateExclusionFoldernameLogexclusion method syncCreateExclusionFoldernameLogexclusion.

public static void syncCreateExclusionFoldernameLogexclusion() throws Exception {
    // It may require modifications to work in your environment.
    try (ConfigClient configClient = ConfigClient.create()) {
        FolderName parent = FolderName.of("[FOLDER]");
        LogExclusion exclusion = LogExclusion.newBuilder().build();
        LogExclusion response = configClient.createExclusion(parent, exclusion);
    }
}
Also used : ConfigClient(com.google.cloud.logging.v2.ConfigClient) LogExclusion(com.google.logging.v2.LogExclusion) FolderName(com.google.logging.v2.FolderName)

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