Skip to content

Commit 7d43b80

Browse files
feat: Log Analytics features of the Cloud Logging API (#1335)
* feat: Log Analytics features of the Cloud Logging API feat: Add ConfigServiceV2.CreateBucketAsync method for creating Log Buckets asynchronously feat: Add ConfigServiceV2.UpdateBucketAsync method for creating Log Buckets asynchronously feat: Add ConfigServiceV2.CreateLink method for creating linked datasets for Log Analytics Buckets feat: Add ConfigServiceV2.DeleteLink method for deleting linked datasets feat: Add ConfigServiceV2.ListLinks method for listing linked datasets feat: Add ConfigServiceV2.GetLink methods for describing linked datasets feat: Add LogBucket.analytics_enabled field that specifies whether Log Bucket's Analytics features are enabled feat: Add LogBucket.index_configs field that contains a list of Log Bucket's indexed fields and related configuration data docs: Documentation for the Log Analytics features of the Cloud Logging API PiperOrigin-RevId: 529851525 Source-Link: googleapis/googleapis@1c7ee99 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4a2a3a05b91804333a1b39b635d8fe2243d4b4fd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGEyYTNhMDViOTE4MDQzMzNhMWIzOWI2MzVkOGZlMjI0M2Q0YjRmZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Ignore clirr errors for 7012 Ignore clirr difference '7012: Method Added to Interface' for methods createBucketAsync, updateBucketAsync, createLink, deleteLink, getLink and listLinks added to com.google.logging.v2.ConfigServiceV2Grpc$AsyncService interface. --------- Co-authored-by: Owl Bot Co-authored-by: minherz
1 parent f6accf8 commit 7d43b80

File tree

89 files changed

+22227
-2718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+22227
-2718
lines changed

google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java

Lines changed: 1106 additions & 191 deletions
Large diffs are not rendered by default.

google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse;
2020
import static com.google.cloud.logging.v2.ConfigClient.ListExclusionsPagedResponse;
21+
import static com.google.cloud.logging.v2.ConfigClient.ListLinksPagedResponse;
2122
import static com.google.cloud.logging.v2.ConfigClient.ListSinksPagedResponse;
2223
import static com.google.cloud.logging.v2.ConfigClient.ListViewsPagedResponse;
2324

@@ -34,28 +35,36 @@
3435
import com.google.api.gax.rpc.TransportChannelProvider;
3536
import com.google.api.gax.rpc.UnaryCallSettings;
3637
import com.google.cloud.logging.v2.stub.ConfigServiceV2StubSettings;
38+
import com.google.logging.v2.BucketMetadata;
3739
import com.google.logging.v2.CmekSettings;
3840
import com.google.logging.v2.CopyLogEntriesMetadata;
3941
import com.google.logging.v2.CopyLogEntriesRequest;
4042
import com.google.logging.v2.CopyLogEntriesResponse;
4143
import com.google.logging.v2.CreateBucketRequest;
4244
import com.google.logging.v2.CreateExclusionRequest;
45+
import com.google.logging.v2.CreateLinkRequest;
4346
import com.google.logging.v2.CreateSinkRequest;
4447
import com.google.logging.v2.CreateViewRequest;
4548
import com.google.logging.v2.DeleteBucketRequest;
4649
import com.google.logging.v2.DeleteExclusionRequest;
50+
import com.google.logging.v2.DeleteLinkRequest;
4751
import com.google.logging.v2.DeleteSinkRequest;
4852
import com.google.logging.v2.DeleteViewRequest;
4953
import com.google.logging.v2.GetBucketRequest;
5054
import com.google.logging.v2.GetCmekSettingsRequest;
5155
import com.google.logging.v2.GetExclusionRequest;
56+
import com.google.logging.v2.GetLinkRequest;
5257
import com.google.logging.v2.GetSettingsRequest;
5358
import com.google.logging.v2.GetSinkRequest;
5459
import com.google.logging.v2.GetViewRequest;
60+
import com.google.logging.v2.Link;
61+
import com.google.logging.v2.LinkMetadata;
5562
import com.google.logging.v2.ListBucketsRequest;
5663
import com.google.logging.v2.ListBucketsResponse;
5764
import com.google.logging.v2.ListExclusionsRequest;
5865
import com.google.logging.v2.ListExclusionsResponse;
66+
import com.google.logging.v2.ListLinksRequest;
67+
import com.google.logging.v2.ListLinksResponse;
5968
import com.google.logging.v2.ListSinksRequest;
6069
import com.google.logging.v2.ListSinksResponse;
6170
import com.google.logging.v2.ListViewsRequest;
@@ -128,6 +137,28 @@ public UnaryCallSettings getBucketSettings() {
128137
return ((ConfigServiceV2StubSettings) getStubSettings()).getBucketSettings();
129138
}
130139

140+
/** Returns the object with the settings used for calls to createBucketAsync. */
141+
public UnaryCallSettings<CreateBucketRequest, Operation> createBucketAsyncSettings() {
142+
return ((ConfigServiceV2StubSettings) getStubSettings()).createBucketAsyncSettings();
143+
}
144+
145+
/** Returns the object with the settings used for calls to createBucketAsync. */
146+
public OperationCallSettings<CreateBucketRequest, LogBucket, BucketMetadata>
147+
createBucketAsyncOperationSettings() {
148+
return ((ConfigServiceV2StubSettings) getStubSettings()).createBucketAsyncOperationSettings();
149+
}
150+
151+
/** Returns the object with the settings used for calls to updateBucketAsync. */
152+
public UnaryCallSettings<UpdateBucketRequest, Operation> updateBucketAsyncSettings() {
153+
return ((ConfigServiceV2StubSettings) getStubSettings()).updateBucketAsyncSettings();
154+
}
155+
156+
/** Returns the object with the settings used for calls to updateBucketAsync. */
157+
public OperationCallSettings<UpdateBucketRequest, LogBucket, BucketMetadata>
158+
updateBucketAsyncOperationSettings() {
159+
return ((ConfigServiceV2StubSettings) getStubSettings()).updateBucketAsyncOperationSettings();
160+
}
161+
131162
/** Returns the object with the settings used for calls to createBucket. */
132163
public UnaryCallSettings<CreateBucketRequest, LogBucket> createBucketSettings() {
133164
return ((ConfigServiceV2StubSettings) getStubSettings()).createBucketSettings();
@@ -200,6 +231,39 @@ public UnaryCallSettings deleteSinkSettings() {
200231
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteSinkSettings();
201232
}
202233

234+
/** Returns the object with the settings used for calls to createLink. */
235+
public UnaryCallSettings<CreateLinkRequest, Operation> createLinkSettings() {
236+
return ((ConfigServiceV2StubSettings) getStubSettings()).createLinkSettings();
237+
}
238+
239+
/** Returns the object with the settings used for calls to createLink. */
240+
public OperationCallSettings<CreateLinkRequest, Link, LinkMetadata>
241+
createLinkOperationSettings() {
242+
return ((ConfigServiceV2StubSettings) getStubSettings()).createLinkOperationSettings();
243+
}
244+
245+
/** Returns the object with the settings used for calls to deleteLink. */
246+
public UnaryCallSettings<DeleteLinkRequest, Operation> deleteLinkSettings() {
247+
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteLinkSettings();
248+
}
249+
250+
/** Returns the object with the settings used for calls to deleteLink. */
251+
public OperationCallSettings<DeleteLinkRequest, Empty, LinkMetadata>
252+
deleteLinkOperationSettings() {
253+
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteLinkOperationSettings();
254+
}
255+
256+
/** Returns the object with the settings used for calls to listLinks. */
257+
public PagedCallSettings<ListLinksRequest, ListLinksResponse, ListLinksPagedResponse>
258+
listLinksSettings() {
259+
return ((ConfigServiceV2StubSettings) getStubSettings()).listLinksSettings();
260+
}
261+
262+
/** Returns the object with the settings used for calls to getLink. */
263+
public UnaryCallSettings<GetLinkRequest, Link> getLinkSettings() {
264+
return ((ConfigServiceV2StubSettings) getStubSettings()).getLinkSettings();
265+
}
266+
203267
/** Returns the object with the settings used for calls to listExclusions. */
204268
public PagedCallSettings<
205269
ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -367,6 +431,28 @@ public UnaryCallSettings.Builder getBucketSettings(
367431
return getStubSettingsBuilder().getBucketSettings();
368432
}
369433

434+
/** Returns the builder for the settings used for calls to createBucketAsync. */
435+
public UnaryCallSettings.Builder<CreateBucketRequest, Operation> createBucketAsyncSettings() {
436+
return getStubSettingsBuilder().createBucketAsyncSettings();
437+
}
438+
439+
/** Returns the builder for the settings used for calls to createBucketAsync. */
440+
public OperationCallSettings.Builder<CreateBucketRequest, LogBucket, BucketMetadata>
441+
createBucketAsyncOperationSettings() {
442+
return getStubSettingsBuilder().createBucketAsyncOperationSettings();
443+
}
444+
445+
/** Returns the builder for the settings used for calls to updateBucketAsync. */
446+
public UnaryCallSettings.Builder<UpdateBucketRequest, Operation> updateBucketAsyncSettings() {
447+
return getStubSettingsBuilder().updateBucketAsyncSettings();
448+
}
449+
450+
/** Returns the builder for the settings used for calls to updateBucketAsync. */
451+
public OperationCallSettings.Builder<UpdateBucketRequest, LogBucket, BucketMetadata>
452+
updateBucketAsyncOperationSettings() {
453+
return getStubSettingsBuilder().updateBucketAsyncOperationSettings();
454+
}
455+
370456
/** Returns the builder for the settings used for calls to createBucket. */
371457
public UnaryCallSettings.Builder<CreateBucketRequest, LogBucket> createBucketSettings() {
372458
return getStubSettingsBuilder().createBucketSettings();
@@ -439,6 +525,39 @@ public UnaryCallSettings.Builder deleteSinkSettings()
439525
return getStubSettingsBuilder().deleteSinkSettings();
440526
}
441527

528+
/** Returns the builder for the settings used for calls to createLink. */
529+
public UnaryCallSettings.Builder<CreateLinkRequest, Operation> createLinkSettings() {
530+
return getStubSettingsBuilder().createLinkSettings();
531+
}
532+
533+
/** Returns the builder for the settings used for calls to createLink. */
534+
public OperationCallSettings.Builder<CreateLinkRequest, Link, LinkMetadata>
535+
createLinkOperationSettings() {
536+
return getStubSettingsBuilder().createLinkOperationSettings();
537+
}
538+
539+
/** Returns the builder for the settings used for calls to deleteLink. */
540+
public UnaryCallSettings.Builder<DeleteLinkRequest, Operation> deleteLinkSettings() {
541+
return getStubSettingsBuilder().deleteLinkSettings();
542+
}
543+
544+
/** Returns the builder for the settings used for calls to deleteLink. */
545+
public OperationCallSettings.Builder<DeleteLinkRequest, Empty, LinkMetadata>
546+
deleteLinkOperationSettings() {
547+
return getStubSettingsBuilder().deleteLinkOperationSettings();
548+
}
549+
550+
/** Returns the builder for the settings used for calls to listLinks. */
551+
public PagedCallSettings.Builder<ListLinksRequest, ListLinksResponse, ListLinksPagedResponse>
552+
listLinksSettings() {
553+
return getStubSettingsBuilder().listLinksSettings();
554+
}
555+
556+
/** Returns the builder for the settings used for calls to getLink. */
557+
public UnaryCallSettings.Builder<GetLinkRequest, Link> getLinkSettings() {
558+
return getStubSettingsBuilder().getLinkSettings();
559+
}
560+
442561
/** Returns the builder for the settings used for calls to listExclusions. */
443562
public PagedCallSettings.Builder<
444563
ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>

google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,12 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
597597
* *
598598
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
599599
* * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
600-
*

Projects listed in the `project_ids` field are added to this list.

601-
* @param filter Optional. A filter that chooses which log entries to return. See [Advanced Logs
602-
* Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries
603-
* that match the filter are returned. An empty filter matches all log entries in the
604-
* resources listed in `resource_names`. Referencing a parent resource that is not listed in
605-
* `resource_names` will cause the filter to return no results. The maximum length of the
606-
* filter is 20000 characters.
600+
*

Projects listed in the `project_ids` field are added to this list. A maximum of 100

601+
* resources may be specified in a single request.
602+
* @param filter Optional. Only log entries that match the filter are returned. An empty filter
603+
* matches all log entries in the resources listed in `resource_names`. Referencing a parent
604+
* resource that is not listed in `resource_names` will cause the filter to return no results.
605+
* The maximum length of a filter is 20,000 characters.
607606
* @param orderBy Optional. How the results should be sorted. Presently, the only permitted values
608607
* are `"timestamp asc"` (default) and `"timestamp desc"`. The first option returns entries in
609608
* order of increasing values of `LogEntry.timestamp` (oldest first), and the second option
@@ -864,7 +863,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource
864863
* }
865864
* }
866865
*
867-
* @param parent Required. The resource name that owns the logs:
866+
* @param parent Required. The resource name to list logs for:
868867
*
    869868
    *
  • `projects/[PROJECT_ID]`
  • 870869
    *
  • `organizations/[ORGANIZATION_ID]`
  • @@ -901,7 +900,7 @@ public final ListLogsPagedResponse listLogs(BillingAccountName parent) {
    901900
    * }
    902901
    * }
    903902
    *
    904-
    * @param parent Required. The resource name that owns the logs:
    903+
    * @param parent Required. The resource name to list logs for:
    905904
    *
      906905
      *
    • `projects/[PROJECT_ID]`
    • 907906
      *
    • `organizations/[ORGANIZATION_ID]`
    • @@ -938,7 +937,7 @@ public final ListLogsPagedResponse listLogs(FolderName parent) {
      938937
      * }
      939938
      * }
      940939
      *
      941-
      * @param parent Required. The resource name that owns the logs:
      940+
      * @param parent Required. The resource name to list logs for:
      942941
      *
        943942
        *
      • `projects/[PROJECT_ID]`
      • 944943
        *
      • `organizations/[ORGANIZATION_ID]`
      • @@ -975,7 +974,7 @@ public final ListLogsPagedResponse listLogs(OrganizationName parent) {
        975974
        * }
        976975
        * }
        977976
        *
        978-
        * @param parent Required. The resource name that owns the logs:
        977+
        * @param parent Required. The resource name to list logs for:
        979978
        *
          980979
          *
        • `projects/[PROJECT_ID]`
        • 981980
          *
        • `organizations/[ORGANIZATION_ID]`
        • @@ -1012,7 +1011,7 @@ public final ListLogsPagedResponse listLogs(ProjectName parent) {
          10121011
          * }
          10131012
          * }
          10141013
          *
          1015-
          * @param parent Required. The resource name that owns the logs:
          1014+
          * @param parent Required. The resource name to list logs for:
          10161015
          *
            10171016
            *
          • `projects/[PROJECT_ID]`
          • 10181017
            *
          • `organizations/[ORGANIZATION_ID]`
          • @@ -1044,9 +1043,9 @@ public final ListLogsPagedResponse listLogs(String parent) {
            10441043
            * ListLogsRequest request =
            10451044
            * ListLogsRequest.newBuilder()
            10461045
            * .setParent(ProjectName.of("[PROJECT]").toString())
            1046+
            * .addAllResourceNames(new ArrayList())
            10471047
            * .setPageSize(883849137)
            10481048
            * .setPageToken("pageToken873572522")
            1049-
            * .addAllResourceNames(new ArrayList())
            10501049
            * .build();
            10511050
            * for (String element : loggingClient.listLogs(request).iterateAll()) {
            10521051
            * // doThingsWith(element);
            @@ -1078,9 +1077,9 @@ public final ListLogsPagedResponse listLogs(ListLogsRequest request) {
            10781077
            * ListLogsRequest request =
            10791078
            * ListLogsRequest.newBuilder()
            10801079
            * .setParent(ProjectName.of("[PROJECT]").toString())
            1080+
            * .addAllResourceNames(new ArrayList())
            10811081
            * .setPageSize(883849137)
            10821082
            * .setPageToken("pageToken873572522")
            1083-
            * .addAllResourceNames(new ArrayList())
            10841083
            * .build();
            10851084
            * ApiFuture future = loggingClient.listLogsPagedCallable().futureCall(request);
            10861085
            * // Do something.
            @@ -1111,9 +1110,9 @@ public final UnaryCallable listLogsPaged
            11111110
            * ListLogsRequest request =
            11121111
            * ListLogsRequest.newBuilder()
            11131112
            * .setParent(ProjectName.of("[PROJECT]").toString())
            1113+
            * .addAllResourceNames(new ArrayList())
            11141114
            * .setPageSize(883849137)
            11151115
            * .setPageToken("pageToken873572522")
            1116-
            * .addAllResourceNames(new ArrayList())
            11171116
            * .build();
            11181117
            * while (true) {
            11191118
            * ListLogsResponse response = loggingClient.listLogsCallable().call(request);

            google-cloud-logging/src/main/java/com/google/cloud/logging/v2/gapic_metadata.json

            Lines changed: 18 additions & 0 deletions
            Original file line numberDiff line numberDiff line change
            @@ -43,9 +43,15 @@
            4343
            "CreateBucket": {
            4444
            "methods": ["createBucket", "createBucketCallable"]
            4545
            },
            46+
            "CreateBucketAsync": {
            47+
            "methods": ["createBucketAsyncAsync", "createBucketAsyncOperationCallable", "createBucketAsyncCallable"]
            48+
            },
            4649
            "CreateExclusion": {
            4750
            "methods": ["createExclusion", "createExclusion", "createExclusion", "createExclusion", "createExclusion", "createExclusion", "createExclusionCallable"]
            4851
            },
            52+
            "CreateLink": {
            53+
            "methods": ["createLinkAsync", "createLinkAsync", "createLinkAsync", "createLinkOperationCallable", "createLinkCallable"]
            54+
            },
            4955
            "CreateSink": {
            5056
            "methods": ["createSink", "createSink", "createSink", "createSink", "createSink", "createSink", "createSinkCallable"]
            5157
            },
            @@ -58,6 +64,9 @@
            5864
            "DeleteExclusion": {
            5965
            "methods": ["deleteExclusion", "deleteExclusion", "deleteExclusion", "deleteExclusionCallable"]
            6066
            },
            67+
            "DeleteLink": {
            68+
            "methods": ["deleteLinkAsync", "deleteLinkAsync", "deleteLinkAsync", "deleteLinkOperationCallable", "deleteLinkCallable"]
            69+
            },
            6170
            "DeleteSink": {
            6271
            "methods": ["deleteSink", "deleteSink", "deleteSink", "deleteSinkCallable"]
            6372
            },
            @@ -73,6 +82,9 @@
            7382
            "GetExclusion": {
            7483
            "methods": ["getExclusion", "getExclusion", "getExclusion", "getExclusionCallable"]
            7584
            },
            85+
            "GetLink": {
            86+
            "methods": ["getLink", "getLink", "getLink", "getLinkCallable"]
            87+
            },
            7688
            "GetSettings": {
            7789
            "methods": ["getSettings", "getSettings", "getSettings", "getSettingsCallable"]
            7890
            },
            @@ -88,6 +100,9 @@
            88100
            "ListExclusions": {
            89101
            "methods": ["listExclusions", "listExclusions", "listExclusions", "listExclusions", "listExclusions", "listExclusions", "listExclusionsPagedCallable", "listExclusionsCallable"]
            90102
            },
            103+
            "ListLinks": {
            104+
            "methods": ["listLinks", "listLinks", "listLinks", "listLinksPagedCallable", "listLinksCallable"]
            105+
            },
            91106
            "ListSinks": {
            92107
            "methods": ["listSinks", "listSinks", "listSinks", "listSinks", "listSinks", "listSinks", "listSinksPagedCallable", "listSinksCallable"]
            93108
            },
            @@ -100,6 +115,9 @@
            100115
            "UpdateBucket": {
            101116
            "methods": ["updateBucket", "updateBucketCallable"]
            102117
            },
            118+
            "UpdateBucketAsync": {
            119+
            "methods": ["updateBucketAsyncAsync", "updateBucketAsyncOperationCallable", "updateBucketAsyncCallable"]
            120+
            },
            103121
            "UpdateCmekSettings": {
            104122
            "methods": ["updateCmekSettings", "updateCmekSettingsCallable"]
            105123
            },

            0 commit comments

            Comments
             (0)