@maxim_mazurok/gapi.client.logging-v2 0.0.20220805
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +9590 -0
- package/package.json +20 -0
- package/readme.md +250 -0
- package/tests.ts +2096 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/tests.ts
ADDED
|
@@ -0,0 +1,2096 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.logging-v2 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220805
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://logging.googleapis.com/$discovery/rest?version=v2');
|
|
12
|
+
/** now we can use gapi.client.logging */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
/** View your data across Google Cloud services and see the email address of your Google Account */
|
|
21
|
+
'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
22
|
+
/** Administrate log data for your projects */
|
|
23
|
+
'https://www.googleapis.com/auth/logging.admin',
|
|
24
|
+
/** View log data for your projects */
|
|
25
|
+
'https://www.googleapis.com/auth/logging.read',
|
|
26
|
+
/** Submit log data for your projects */
|
|
27
|
+
'https://www.googleapis.com/auth/logging.write',
|
|
28
|
+
];
|
|
29
|
+
const immediate = false;
|
|
30
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
31
|
+
if (authResult && !authResult.error) {
|
|
32
|
+
/** handle successful authorization */
|
|
33
|
+
run();
|
|
34
|
+
} else {
|
|
35
|
+
/** handle authorization error */
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
async function run() {
|
|
40
|
+
/**
|
|
41
|
+
* Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once
|
|
42
|
+
* configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
43
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
44
|
+
*/
|
|
45
|
+
await gapi.client.logging.billingAccounts.getCmekSettings({
|
|
46
|
+
name: "Test string",
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can
|
|
50
|
+
* only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
51
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
52
|
+
*/
|
|
53
|
+
await gapi.client.logging.billingAccounts.getSettings({
|
|
54
|
+
name: "Test string",
|
|
55
|
+
});
|
|
56
|
+
/** Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. */
|
|
57
|
+
await gapi.client.logging.billingAccounts.exclusions.create({
|
|
58
|
+
parent: "Test string",
|
|
59
|
+
}, {
|
|
60
|
+
createTime: "Test string",
|
|
61
|
+
description: "Test string",
|
|
62
|
+
disabled: true,
|
|
63
|
+
filter: "Test string",
|
|
64
|
+
name: "Test string",
|
|
65
|
+
updateTime: "Test string",
|
|
66
|
+
});
|
|
67
|
+
/** Deletes an exclusion in the _Default sink. */
|
|
68
|
+
await gapi.client.logging.billingAccounts.exclusions.delete({
|
|
69
|
+
name: "Test string",
|
|
70
|
+
});
|
|
71
|
+
/** Gets the description of an exclusion in the _Default sink. */
|
|
72
|
+
await gapi.client.logging.billingAccounts.exclusions.get({
|
|
73
|
+
name: "Test string",
|
|
74
|
+
});
|
|
75
|
+
/** Lists all the exclusions on the _Default sink in a parent resource. */
|
|
76
|
+
await gapi.client.logging.billingAccounts.exclusions.list({
|
|
77
|
+
pageSize: 42,
|
|
78
|
+
pageToken: "Test string",
|
|
79
|
+
parent: "Test string",
|
|
80
|
+
});
|
|
81
|
+
/** Changes one or more properties of an existing exclusion in the _Default sink. */
|
|
82
|
+
await gapi.client.logging.billingAccounts.exclusions.patch({
|
|
83
|
+
name: "Test string",
|
|
84
|
+
updateMask: "Test string",
|
|
85
|
+
}, {
|
|
86
|
+
createTime: "Test string",
|
|
87
|
+
description: "Test string",
|
|
88
|
+
disabled: true,
|
|
89
|
+
filter: "Test string",
|
|
90
|
+
name: "Test string",
|
|
91
|
+
updateTime: "Test string",
|
|
92
|
+
});
|
|
93
|
+
/** Gets information about a location. */
|
|
94
|
+
await gapi.client.logging.billingAccounts.locations.get({
|
|
95
|
+
name: "Test string",
|
|
96
|
+
});
|
|
97
|
+
/** Lists information about the supported locations for this service. */
|
|
98
|
+
await gapi.client.logging.billingAccounts.locations.list({
|
|
99
|
+
filter: "Test string",
|
|
100
|
+
name: "Test string",
|
|
101
|
+
pageSize: 42,
|
|
102
|
+
pageToken: "Test string",
|
|
103
|
+
});
|
|
104
|
+
/** Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. */
|
|
105
|
+
await gapi.client.logging.billingAccounts.locations.buckets.create({
|
|
106
|
+
bucketId: "Test string",
|
|
107
|
+
parent: "Test string",
|
|
108
|
+
}, {
|
|
109
|
+
cmekSettings: {
|
|
110
|
+
kmsKeyName: "Test string",
|
|
111
|
+
kmsKeyVersionName: "Test string",
|
|
112
|
+
name: "Test string",
|
|
113
|
+
serviceAccountId: "Test string",
|
|
114
|
+
},
|
|
115
|
+
createTime: "Test string",
|
|
116
|
+
description: "Test string",
|
|
117
|
+
indexConfigs: [
|
|
118
|
+
{
|
|
119
|
+
createTime: "Test string",
|
|
120
|
+
fieldPath: "Test string",
|
|
121
|
+
type: "Test string",
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
lifecycleState: "Test string",
|
|
125
|
+
locked: true,
|
|
126
|
+
name: "Test string",
|
|
127
|
+
restrictedFields: [
|
|
128
|
+
"Test string"
|
|
129
|
+
],
|
|
130
|
+
retentionDays: 42,
|
|
131
|
+
updateTime: "Test string",
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently
|
|
135
|
+
* deleted.
|
|
136
|
+
*/
|
|
137
|
+
await gapi.client.logging.billingAccounts.locations.buckets.delete({
|
|
138
|
+
name: "Test string",
|
|
139
|
+
});
|
|
140
|
+
/** Gets a log bucket. */
|
|
141
|
+
await gapi.client.logging.billingAccounts.locations.buckets.get({
|
|
142
|
+
name: "Test string",
|
|
143
|
+
});
|
|
144
|
+
/** Lists log buckets. */
|
|
145
|
+
await gapi.client.logging.billingAccounts.locations.buckets.list({
|
|
146
|
+
pageSize: 42,
|
|
147
|
+
pageToken: "Test string",
|
|
148
|
+
parent: "Test string",
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the
|
|
152
|
+
* bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been
|
|
153
|
+
* created, the bucket's location cannot be changed.
|
|
154
|
+
*/
|
|
155
|
+
await gapi.client.logging.billingAccounts.locations.buckets.patch({
|
|
156
|
+
name: "Test string",
|
|
157
|
+
updateMask: "Test string",
|
|
158
|
+
}, {
|
|
159
|
+
cmekSettings: {
|
|
160
|
+
kmsKeyName: "Test string",
|
|
161
|
+
kmsKeyVersionName: "Test string",
|
|
162
|
+
name: "Test string",
|
|
163
|
+
serviceAccountId: "Test string",
|
|
164
|
+
},
|
|
165
|
+
createTime: "Test string",
|
|
166
|
+
description: "Test string",
|
|
167
|
+
indexConfigs: [
|
|
168
|
+
{
|
|
169
|
+
createTime: "Test string",
|
|
170
|
+
fieldPath: "Test string",
|
|
171
|
+
type: "Test string",
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
lifecycleState: "Test string",
|
|
175
|
+
locked: true,
|
|
176
|
+
name: "Test string",
|
|
177
|
+
restrictedFields: [
|
|
178
|
+
"Test string"
|
|
179
|
+
],
|
|
180
|
+
retentionDays: 42,
|
|
181
|
+
updateTime: "Test string",
|
|
182
|
+
});
|
|
183
|
+
/** Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. */
|
|
184
|
+
await gapi.client.logging.billingAccounts.locations.buckets.undelete({
|
|
185
|
+
name: "Test string",
|
|
186
|
+
}, {
|
|
187
|
+
});
|
|
188
|
+
/** Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. */
|
|
189
|
+
await gapi.client.logging.billingAccounts.locations.buckets.views.create({
|
|
190
|
+
parent: "Test string",
|
|
191
|
+
viewId: "Test string",
|
|
192
|
+
}, {
|
|
193
|
+
createTime: "Test string",
|
|
194
|
+
description: "Test string",
|
|
195
|
+
filter: "Test string",
|
|
196
|
+
name: "Test string",
|
|
197
|
+
updateTime: "Test string",
|
|
198
|
+
});
|
|
199
|
+
/**
|
|
200
|
+
* Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few
|
|
201
|
+
* minutes.
|
|
202
|
+
*/
|
|
203
|
+
await gapi.client.logging.billingAccounts.locations.buckets.views.delete({
|
|
204
|
+
name: "Test string",
|
|
205
|
+
});
|
|
206
|
+
/** Gets a view on a log bucket.. */
|
|
207
|
+
await gapi.client.logging.billingAccounts.locations.buckets.views.get({
|
|
208
|
+
name: "Test string",
|
|
209
|
+
});
|
|
210
|
+
/** Lists views on a log bucket. */
|
|
211
|
+
await gapi.client.logging.billingAccounts.locations.buckets.views.list({
|
|
212
|
+
pageSize: 42,
|
|
213
|
+
pageToken: "Test string",
|
|
214
|
+
parent: "Test string",
|
|
215
|
+
});
|
|
216
|
+
/**
|
|
217
|
+
* Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates
|
|
218
|
+
* that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.
|
|
219
|
+
*/
|
|
220
|
+
await gapi.client.logging.billingAccounts.locations.buckets.views.patch({
|
|
221
|
+
name: "Test string",
|
|
222
|
+
updateMask: "Test string",
|
|
223
|
+
}, {
|
|
224
|
+
createTime: "Test string",
|
|
225
|
+
description: "Test string",
|
|
226
|
+
filter: "Test string",
|
|
227
|
+
name: "Test string",
|
|
228
|
+
updateTime: "Test string",
|
|
229
|
+
});
|
|
230
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
231
|
+
await gapi.client.logging.billingAccounts.locations.buckets.views.logs.list({
|
|
232
|
+
pageSize: 42,
|
|
233
|
+
pageToken: "Test string",
|
|
234
|
+
parent: "Test string",
|
|
235
|
+
resourceNames: "Test string",
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
239
|
+
* method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed
|
|
240
|
+
* despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
|
241
|
+
* corresponding to Code.CANCELLED.
|
|
242
|
+
*/
|
|
243
|
+
await gapi.client.logging.billingAccounts.locations.operations.cancel({
|
|
244
|
+
name: "Test string",
|
|
245
|
+
}, {
|
|
246
|
+
});
|
|
247
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
248
|
+
await gapi.client.logging.billingAccounts.locations.operations.get({
|
|
249
|
+
name: "Test string",
|
|
250
|
+
});
|
|
251
|
+
/**
|
|
252
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to
|
|
253
|
+
* override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
|
|
254
|
+
* to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent
|
|
255
|
+
* resource, without the operations collection id.
|
|
256
|
+
*/
|
|
257
|
+
await gapi.client.logging.billingAccounts.locations.operations.list({
|
|
258
|
+
filter: "Test string",
|
|
259
|
+
name: "Test string",
|
|
260
|
+
pageSize: 42,
|
|
261
|
+
pageToken: "Test string",
|
|
262
|
+
});
|
|
263
|
+
/**
|
|
264
|
+
* Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be
|
|
265
|
+
* deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
|
|
266
|
+
*/
|
|
267
|
+
await gapi.client.logging.billingAccounts.logs.delete({
|
|
268
|
+
logName: "Test string",
|
|
269
|
+
});
|
|
270
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
271
|
+
await gapi.client.logging.billingAccounts.logs.list({
|
|
272
|
+
pageSize: 42,
|
|
273
|
+
pageToken: "Test string",
|
|
274
|
+
parent: "Test string",
|
|
275
|
+
resourceNames: "Test string",
|
|
276
|
+
});
|
|
277
|
+
/**
|
|
278
|
+
* Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to
|
|
279
|
+
* write to the destination. A sink can export log entries only from the resource owning the sink.
|
|
280
|
+
*/
|
|
281
|
+
await gapi.client.logging.billingAccounts.sinks.create({
|
|
282
|
+
parent: "Test string",
|
|
283
|
+
uniqueWriterIdentity: true,
|
|
284
|
+
}, {
|
|
285
|
+
bigqueryOptions: {
|
|
286
|
+
usePartitionedTables: true,
|
|
287
|
+
usesTimestampColumnPartitioning: true,
|
|
288
|
+
},
|
|
289
|
+
createTime: "Test string",
|
|
290
|
+
description: "Test string",
|
|
291
|
+
destination: "Test string",
|
|
292
|
+
disabled: true,
|
|
293
|
+
exclusions: [
|
|
294
|
+
{
|
|
295
|
+
createTime: "Test string",
|
|
296
|
+
description: "Test string",
|
|
297
|
+
disabled: true,
|
|
298
|
+
filter: "Test string",
|
|
299
|
+
name: "Test string",
|
|
300
|
+
updateTime: "Test string",
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
filter: "Test string",
|
|
304
|
+
includeChildren: true,
|
|
305
|
+
name: "Test string",
|
|
306
|
+
outputVersionFormat: "Test string",
|
|
307
|
+
updateTime: "Test string",
|
|
308
|
+
writerIdentity: "Test string",
|
|
309
|
+
});
|
|
310
|
+
/** Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. */
|
|
311
|
+
await gapi.client.logging.billingAccounts.sinks.delete({
|
|
312
|
+
sinkName: "Test string",
|
|
313
|
+
});
|
|
314
|
+
/** Gets a sink. */
|
|
315
|
+
await gapi.client.logging.billingAccounts.sinks.get({
|
|
316
|
+
sinkName: "Test string",
|
|
317
|
+
});
|
|
318
|
+
/** Lists sinks. */
|
|
319
|
+
await gapi.client.logging.billingAccounts.sinks.list({
|
|
320
|
+
pageSize: 42,
|
|
321
|
+
pageToken: "Test string",
|
|
322
|
+
parent: "Test string",
|
|
323
|
+
});
|
|
324
|
+
/**
|
|
325
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
326
|
+
* writer_identity; see the unique_writer_identity field.
|
|
327
|
+
*/
|
|
328
|
+
await gapi.client.logging.billingAccounts.sinks.patch({
|
|
329
|
+
sinkName: "Test string",
|
|
330
|
+
uniqueWriterIdentity: true,
|
|
331
|
+
updateMask: "Test string",
|
|
332
|
+
}, {
|
|
333
|
+
bigqueryOptions: {
|
|
334
|
+
usePartitionedTables: true,
|
|
335
|
+
usesTimestampColumnPartitioning: true,
|
|
336
|
+
},
|
|
337
|
+
createTime: "Test string",
|
|
338
|
+
description: "Test string",
|
|
339
|
+
destination: "Test string",
|
|
340
|
+
disabled: true,
|
|
341
|
+
exclusions: [
|
|
342
|
+
{
|
|
343
|
+
createTime: "Test string",
|
|
344
|
+
description: "Test string",
|
|
345
|
+
disabled: true,
|
|
346
|
+
filter: "Test string",
|
|
347
|
+
name: "Test string",
|
|
348
|
+
updateTime: "Test string",
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
filter: "Test string",
|
|
352
|
+
includeChildren: true,
|
|
353
|
+
name: "Test string",
|
|
354
|
+
outputVersionFormat: "Test string",
|
|
355
|
+
updateTime: "Test string",
|
|
356
|
+
writerIdentity: "Test string",
|
|
357
|
+
});
|
|
358
|
+
/**
|
|
359
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
360
|
+
* writer_identity; see the unique_writer_identity field.
|
|
361
|
+
*/
|
|
362
|
+
await gapi.client.logging.billingAccounts.sinks.update({
|
|
363
|
+
sinkName: "Test string",
|
|
364
|
+
uniqueWriterIdentity: true,
|
|
365
|
+
updateMask: "Test string",
|
|
366
|
+
}, {
|
|
367
|
+
bigqueryOptions: {
|
|
368
|
+
usePartitionedTables: true,
|
|
369
|
+
usesTimestampColumnPartitioning: true,
|
|
370
|
+
},
|
|
371
|
+
createTime: "Test string",
|
|
372
|
+
description: "Test string",
|
|
373
|
+
destination: "Test string",
|
|
374
|
+
disabled: true,
|
|
375
|
+
exclusions: [
|
|
376
|
+
{
|
|
377
|
+
createTime: "Test string",
|
|
378
|
+
description: "Test string",
|
|
379
|
+
disabled: true,
|
|
380
|
+
filter: "Test string",
|
|
381
|
+
name: "Test string",
|
|
382
|
+
updateTime: "Test string",
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
filter: "Test string",
|
|
386
|
+
includeChildren: true,
|
|
387
|
+
name: "Test string",
|
|
388
|
+
outputVersionFormat: "Test string",
|
|
389
|
+
updateTime: "Test string",
|
|
390
|
+
writerIdentity: "Test string",
|
|
391
|
+
});
|
|
392
|
+
/** Copies a set of log entries from a log bucket to a Cloud Storage bucket. */
|
|
393
|
+
await gapi.client.logging.entries.copy({
|
|
394
|
+
}, {
|
|
395
|
+
destination: "Test string",
|
|
396
|
+
filter: "Test string",
|
|
397
|
+
name: "Test string",
|
|
398
|
+
});
|
|
399
|
+
/**
|
|
400
|
+
* Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs
|
|
401
|
+
* (https://cloud.google.com/logging/docs/export).
|
|
402
|
+
*/
|
|
403
|
+
await gapi.client.logging.entries.list({
|
|
404
|
+
}, {
|
|
405
|
+
filter: "Test string",
|
|
406
|
+
orderBy: "Test string",
|
|
407
|
+
pageSize: 42,
|
|
408
|
+
pageToken: "Test string",
|
|
409
|
+
projectIds: [
|
|
410
|
+
"Test string"
|
|
411
|
+
],
|
|
412
|
+
resourceNames: [
|
|
413
|
+
"Test string"
|
|
414
|
+
],
|
|
415
|
+
});
|
|
416
|
+
/** Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs. */
|
|
417
|
+
await gapi.client.logging.entries.tail({
|
|
418
|
+
}, {
|
|
419
|
+
bufferWindow: "Test string",
|
|
420
|
+
filter: "Test string",
|
|
421
|
+
resourceNames: [
|
|
422
|
+
"Test string"
|
|
423
|
+
],
|
|
424
|
+
});
|
|
425
|
+
/**
|
|
426
|
+
* Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all
|
|
427
|
+
* logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)
|
|
428
|
+
*/
|
|
429
|
+
await gapi.client.logging.entries.write({
|
|
430
|
+
}, {
|
|
431
|
+
dryRun: true,
|
|
432
|
+
entries: [
|
|
433
|
+
{
|
|
434
|
+
httpRequest: {
|
|
435
|
+
cacheFillBytes: "Test string",
|
|
436
|
+
cacheHit: true,
|
|
437
|
+
cacheLookup: true,
|
|
438
|
+
cacheValidatedWithOriginServer: true,
|
|
439
|
+
latency: "Test string",
|
|
440
|
+
protocol: "Test string",
|
|
441
|
+
referer: "Test string",
|
|
442
|
+
remoteIp: "Test string",
|
|
443
|
+
requestMethod: "Test string",
|
|
444
|
+
requestSize: "Test string",
|
|
445
|
+
requestUrl: "Test string",
|
|
446
|
+
responseSize: "Test string",
|
|
447
|
+
serverIp: "Test string",
|
|
448
|
+
status: 42,
|
|
449
|
+
userAgent: "Test string",
|
|
450
|
+
},
|
|
451
|
+
insertId: "Test string",
|
|
452
|
+
jsonPayload: {
|
|
453
|
+
A: 42
|
|
454
|
+
},
|
|
455
|
+
labels: {
|
|
456
|
+
A: "Test string"
|
|
457
|
+
},
|
|
458
|
+
logName: "Test string",
|
|
459
|
+
metadata: {
|
|
460
|
+
systemLabels: {
|
|
461
|
+
A: 42
|
|
462
|
+
},
|
|
463
|
+
userLabels: {
|
|
464
|
+
A: "Test string"
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
operation: {
|
|
468
|
+
first: true,
|
|
469
|
+
id: "Test string",
|
|
470
|
+
last: true,
|
|
471
|
+
producer: "Test string",
|
|
472
|
+
},
|
|
473
|
+
protoPayload: {
|
|
474
|
+
A: 42
|
|
475
|
+
},
|
|
476
|
+
receiveTimestamp: "Test string",
|
|
477
|
+
resource: {
|
|
478
|
+
labels: {
|
|
479
|
+
A: "Test string"
|
|
480
|
+
},
|
|
481
|
+
type: "Test string",
|
|
482
|
+
},
|
|
483
|
+
severity: "Test string",
|
|
484
|
+
sourceLocation: {
|
|
485
|
+
file: "Test string",
|
|
486
|
+
function: "Test string",
|
|
487
|
+
line: "Test string",
|
|
488
|
+
},
|
|
489
|
+
spanId: "Test string",
|
|
490
|
+
split: {
|
|
491
|
+
index: 42,
|
|
492
|
+
totalSplits: 42,
|
|
493
|
+
uid: "Test string",
|
|
494
|
+
},
|
|
495
|
+
textPayload: "Test string",
|
|
496
|
+
timestamp: "Test string",
|
|
497
|
+
trace: "Test string",
|
|
498
|
+
traceSampled: true,
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
labels: {
|
|
502
|
+
A: "Test string"
|
|
503
|
+
},
|
|
504
|
+
logName: "Test string",
|
|
505
|
+
partialSuccess: true,
|
|
506
|
+
resource: {
|
|
507
|
+
labels: {
|
|
508
|
+
A: "Test string"
|
|
509
|
+
},
|
|
510
|
+
type: "Test string",
|
|
511
|
+
},
|
|
512
|
+
});
|
|
513
|
+
/** Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. */
|
|
514
|
+
await gapi.client.logging.exclusions.create({
|
|
515
|
+
parent: "Test string",
|
|
516
|
+
}, {
|
|
517
|
+
createTime: "Test string",
|
|
518
|
+
description: "Test string",
|
|
519
|
+
disabled: true,
|
|
520
|
+
filter: "Test string",
|
|
521
|
+
name: "Test string",
|
|
522
|
+
updateTime: "Test string",
|
|
523
|
+
});
|
|
524
|
+
/** Deletes an exclusion in the _Default sink. */
|
|
525
|
+
await gapi.client.logging.exclusions.delete({
|
|
526
|
+
name: "Test string",
|
|
527
|
+
});
|
|
528
|
+
/** Gets the description of an exclusion in the _Default sink. */
|
|
529
|
+
await gapi.client.logging.exclusions.get({
|
|
530
|
+
name: "Test string",
|
|
531
|
+
});
|
|
532
|
+
/** Lists all the exclusions on the _Default sink in a parent resource. */
|
|
533
|
+
await gapi.client.logging.exclusions.list({
|
|
534
|
+
pageSize: 42,
|
|
535
|
+
pageToken: "Test string",
|
|
536
|
+
parent: "Test string",
|
|
537
|
+
});
|
|
538
|
+
/** Changes one or more properties of an existing exclusion in the _Default sink. */
|
|
539
|
+
await gapi.client.logging.exclusions.patch({
|
|
540
|
+
name: "Test string",
|
|
541
|
+
updateMask: "Test string",
|
|
542
|
+
}, {
|
|
543
|
+
createTime: "Test string",
|
|
544
|
+
description: "Test string",
|
|
545
|
+
disabled: true,
|
|
546
|
+
filter: "Test string",
|
|
547
|
+
name: "Test string",
|
|
548
|
+
updateTime: "Test string",
|
|
549
|
+
});
|
|
550
|
+
/**
|
|
551
|
+
* Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once
|
|
552
|
+
* configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
553
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
554
|
+
*/
|
|
555
|
+
await gapi.client.logging.folders.getCmekSettings({
|
|
556
|
+
name: "Test string",
|
|
557
|
+
});
|
|
558
|
+
/**
|
|
559
|
+
* Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can
|
|
560
|
+
* only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
561
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
562
|
+
*/
|
|
563
|
+
await gapi.client.logging.folders.getSettings({
|
|
564
|
+
name: "Test string",
|
|
565
|
+
});
|
|
566
|
+
/**
|
|
567
|
+
* Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to
|
|
568
|
+
* all projects and folders in the Google Cloud organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required
|
|
569
|
+
* roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate
|
|
570
|
+
* OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
571
|
+
*/
|
|
572
|
+
await gapi.client.logging.folders.updateSettings({
|
|
573
|
+
name: "Test string",
|
|
574
|
+
updateMask: "Test string",
|
|
575
|
+
}, {
|
|
576
|
+
disableDefaultSink: true,
|
|
577
|
+
kmsKeyName: "Test string",
|
|
578
|
+
kmsServiceAccountId: "Test string",
|
|
579
|
+
name: "Test string",
|
|
580
|
+
storageLocation: "Test string",
|
|
581
|
+
});
|
|
582
|
+
/** Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. */
|
|
583
|
+
await gapi.client.logging.folders.exclusions.create({
|
|
584
|
+
parent: "Test string",
|
|
585
|
+
}, {
|
|
586
|
+
createTime: "Test string",
|
|
587
|
+
description: "Test string",
|
|
588
|
+
disabled: true,
|
|
589
|
+
filter: "Test string",
|
|
590
|
+
name: "Test string",
|
|
591
|
+
updateTime: "Test string",
|
|
592
|
+
});
|
|
593
|
+
/** Deletes an exclusion in the _Default sink. */
|
|
594
|
+
await gapi.client.logging.folders.exclusions.delete({
|
|
595
|
+
name: "Test string",
|
|
596
|
+
});
|
|
597
|
+
/** Gets the description of an exclusion in the _Default sink. */
|
|
598
|
+
await gapi.client.logging.folders.exclusions.get({
|
|
599
|
+
name: "Test string",
|
|
600
|
+
});
|
|
601
|
+
/** Lists all the exclusions on the _Default sink in a parent resource. */
|
|
602
|
+
await gapi.client.logging.folders.exclusions.list({
|
|
603
|
+
pageSize: 42,
|
|
604
|
+
pageToken: "Test string",
|
|
605
|
+
parent: "Test string",
|
|
606
|
+
});
|
|
607
|
+
/** Changes one or more properties of an existing exclusion in the _Default sink. */
|
|
608
|
+
await gapi.client.logging.folders.exclusions.patch({
|
|
609
|
+
name: "Test string",
|
|
610
|
+
updateMask: "Test string",
|
|
611
|
+
}, {
|
|
612
|
+
createTime: "Test string",
|
|
613
|
+
description: "Test string",
|
|
614
|
+
disabled: true,
|
|
615
|
+
filter: "Test string",
|
|
616
|
+
name: "Test string",
|
|
617
|
+
updateTime: "Test string",
|
|
618
|
+
});
|
|
619
|
+
/** Gets information about a location. */
|
|
620
|
+
await gapi.client.logging.folders.locations.get({
|
|
621
|
+
name: "Test string",
|
|
622
|
+
});
|
|
623
|
+
/** Lists information about the supported locations for this service. */
|
|
624
|
+
await gapi.client.logging.folders.locations.list({
|
|
625
|
+
filter: "Test string",
|
|
626
|
+
name: "Test string",
|
|
627
|
+
pageSize: 42,
|
|
628
|
+
pageToken: "Test string",
|
|
629
|
+
});
|
|
630
|
+
/** Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. */
|
|
631
|
+
await gapi.client.logging.folders.locations.buckets.create({
|
|
632
|
+
bucketId: "Test string",
|
|
633
|
+
parent: "Test string",
|
|
634
|
+
}, {
|
|
635
|
+
cmekSettings: {
|
|
636
|
+
kmsKeyName: "Test string",
|
|
637
|
+
kmsKeyVersionName: "Test string",
|
|
638
|
+
name: "Test string",
|
|
639
|
+
serviceAccountId: "Test string",
|
|
640
|
+
},
|
|
641
|
+
createTime: "Test string",
|
|
642
|
+
description: "Test string",
|
|
643
|
+
indexConfigs: [
|
|
644
|
+
{
|
|
645
|
+
createTime: "Test string",
|
|
646
|
+
fieldPath: "Test string",
|
|
647
|
+
type: "Test string",
|
|
648
|
+
}
|
|
649
|
+
],
|
|
650
|
+
lifecycleState: "Test string",
|
|
651
|
+
locked: true,
|
|
652
|
+
name: "Test string",
|
|
653
|
+
restrictedFields: [
|
|
654
|
+
"Test string"
|
|
655
|
+
],
|
|
656
|
+
retentionDays: 42,
|
|
657
|
+
updateTime: "Test string",
|
|
658
|
+
});
|
|
659
|
+
/**
|
|
660
|
+
* Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently
|
|
661
|
+
* deleted.
|
|
662
|
+
*/
|
|
663
|
+
await gapi.client.logging.folders.locations.buckets.delete({
|
|
664
|
+
name: "Test string",
|
|
665
|
+
});
|
|
666
|
+
/** Gets a log bucket. */
|
|
667
|
+
await gapi.client.logging.folders.locations.buckets.get({
|
|
668
|
+
name: "Test string",
|
|
669
|
+
});
|
|
670
|
+
/** Lists log buckets. */
|
|
671
|
+
await gapi.client.logging.folders.locations.buckets.list({
|
|
672
|
+
pageSize: 42,
|
|
673
|
+
pageToken: "Test string",
|
|
674
|
+
parent: "Test string",
|
|
675
|
+
});
|
|
676
|
+
/**
|
|
677
|
+
* Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the
|
|
678
|
+
* bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been
|
|
679
|
+
* created, the bucket's location cannot be changed.
|
|
680
|
+
*/
|
|
681
|
+
await gapi.client.logging.folders.locations.buckets.patch({
|
|
682
|
+
name: "Test string",
|
|
683
|
+
updateMask: "Test string",
|
|
684
|
+
}, {
|
|
685
|
+
cmekSettings: {
|
|
686
|
+
kmsKeyName: "Test string",
|
|
687
|
+
kmsKeyVersionName: "Test string",
|
|
688
|
+
name: "Test string",
|
|
689
|
+
serviceAccountId: "Test string",
|
|
690
|
+
},
|
|
691
|
+
createTime: "Test string",
|
|
692
|
+
description: "Test string",
|
|
693
|
+
indexConfigs: [
|
|
694
|
+
{
|
|
695
|
+
createTime: "Test string",
|
|
696
|
+
fieldPath: "Test string",
|
|
697
|
+
type: "Test string",
|
|
698
|
+
}
|
|
699
|
+
],
|
|
700
|
+
lifecycleState: "Test string",
|
|
701
|
+
locked: true,
|
|
702
|
+
name: "Test string",
|
|
703
|
+
restrictedFields: [
|
|
704
|
+
"Test string"
|
|
705
|
+
],
|
|
706
|
+
retentionDays: 42,
|
|
707
|
+
updateTime: "Test string",
|
|
708
|
+
});
|
|
709
|
+
/** Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. */
|
|
710
|
+
await gapi.client.logging.folders.locations.buckets.undelete({
|
|
711
|
+
name: "Test string",
|
|
712
|
+
}, {
|
|
713
|
+
});
|
|
714
|
+
/** Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. */
|
|
715
|
+
await gapi.client.logging.folders.locations.buckets.views.create({
|
|
716
|
+
parent: "Test string",
|
|
717
|
+
viewId: "Test string",
|
|
718
|
+
}, {
|
|
719
|
+
createTime: "Test string",
|
|
720
|
+
description: "Test string",
|
|
721
|
+
filter: "Test string",
|
|
722
|
+
name: "Test string",
|
|
723
|
+
updateTime: "Test string",
|
|
724
|
+
});
|
|
725
|
+
/**
|
|
726
|
+
* Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few
|
|
727
|
+
* minutes.
|
|
728
|
+
*/
|
|
729
|
+
await gapi.client.logging.folders.locations.buckets.views.delete({
|
|
730
|
+
name: "Test string",
|
|
731
|
+
});
|
|
732
|
+
/** Gets a view on a log bucket.. */
|
|
733
|
+
await gapi.client.logging.folders.locations.buckets.views.get({
|
|
734
|
+
name: "Test string",
|
|
735
|
+
});
|
|
736
|
+
/** Lists views on a log bucket. */
|
|
737
|
+
await gapi.client.logging.folders.locations.buckets.views.list({
|
|
738
|
+
pageSize: 42,
|
|
739
|
+
pageToken: "Test string",
|
|
740
|
+
parent: "Test string",
|
|
741
|
+
});
|
|
742
|
+
/**
|
|
743
|
+
* Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates
|
|
744
|
+
* that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.
|
|
745
|
+
*/
|
|
746
|
+
await gapi.client.logging.folders.locations.buckets.views.patch({
|
|
747
|
+
name: "Test string",
|
|
748
|
+
updateMask: "Test string",
|
|
749
|
+
}, {
|
|
750
|
+
createTime: "Test string",
|
|
751
|
+
description: "Test string",
|
|
752
|
+
filter: "Test string",
|
|
753
|
+
name: "Test string",
|
|
754
|
+
updateTime: "Test string",
|
|
755
|
+
});
|
|
756
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
757
|
+
await gapi.client.logging.folders.locations.buckets.views.logs.list({
|
|
758
|
+
pageSize: 42,
|
|
759
|
+
pageToken: "Test string",
|
|
760
|
+
parent: "Test string",
|
|
761
|
+
resourceNames: "Test string",
|
|
762
|
+
});
|
|
763
|
+
/**
|
|
764
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
765
|
+
* method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed
|
|
766
|
+
* despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
|
767
|
+
* corresponding to Code.CANCELLED.
|
|
768
|
+
*/
|
|
769
|
+
await gapi.client.logging.folders.locations.operations.cancel({
|
|
770
|
+
name: "Test string",
|
|
771
|
+
}, {
|
|
772
|
+
});
|
|
773
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
774
|
+
await gapi.client.logging.folders.locations.operations.get({
|
|
775
|
+
name: "Test string",
|
|
776
|
+
});
|
|
777
|
+
/**
|
|
778
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to
|
|
779
|
+
* override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
|
|
780
|
+
* to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent
|
|
781
|
+
* resource, without the operations collection id.
|
|
782
|
+
*/
|
|
783
|
+
await gapi.client.logging.folders.locations.operations.list({
|
|
784
|
+
filter: "Test string",
|
|
785
|
+
name: "Test string",
|
|
786
|
+
pageSize: 42,
|
|
787
|
+
pageToken: "Test string",
|
|
788
|
+
});
|
|
789
|
+
/**
|
|
790
|
+
* Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be
|
|
791
|
+
* deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
|
|
792
|
+
*/
|
|
793
|
+
await gapi.client.logging.folders.logs.delete({
|
|
794
|
+
logName: "Test string",
|
|
795
|
+
});
|
|
796
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
797
|
+
await gapi.client.logging.folders.logs.list({
|
|
798
|
+
pageSize: 42,
|
|
799
|
+
pageToken: "Test string",
|
|
800
|
+
parent: "Test string",
|
|
801
|
+
resourceNames: "Test string",
|
|
802
|
+
});
|
|
803
|
+
/**
|
|
804
|
+
* Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to
|
|
805
|
+
* write to the destination. A sink can export log entries only from the resource owning the sink.
|
|
806
|
+
*/
|
|
807
|
+
await gapi.client.logging.folders.sinks.create({
|
|
808
|
+
parent: "Test string",
|
|
809
|
+
uniqueWriterIdentity: true,
|
|
810
|
+
}, {
|
|
811
|
+
bigqueryOptions: {
|
|
812
|
+
usePartitionedTables: true,
|
|
813
|
+
usesTimestampColumnPartitioning: true,
|
|
814
|
+
},
|
|
815
|
+
createTime: "Test string",
|
|
816
|
+
description: "Test string",
|
|
817
|
+
destination: "Test string",
|
|
818
|
+
disabled: true,
|
|
819
|
+
exclusions: [
|
|
820
|
+
{
|
|
821
|
+
createTime: "Test string",
|
|
822
|
+
description: "Test string",
|
|
823
|
+
disabled: true,
|
|
824
|
+
filter: "Test string",
|
|
825
|
+
name: "Test string",
|
|
826
|
+
updateTime: "Test string",
|
|
827
|
+
}
|
|
828
|
+
],
|
|
829
|
+
filter: "Test string",
|
|
830
|
+
includeChildren: true,
|
|
831
|
+
name: "Test string",
|
|
832
|
+
outputVersionFormat: "Test string",
|
|
833
|
+
updateTime: "Test string",
|
|
834
|
+
writerIdentity: "Test string",
|
|
835
|
+
});
|
|
836
|
+
/** Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. */
|
|
837
|
+
await gapi.client.logging.folders.sinks.delete({
|
|
838
|
+
sinkName: "Test string",
|
|
839
|
+
});
|
|
840
|
+
/** Gets a sink. */
|
|
841
|
+
await gapi.client.logging.folders.sinks.get({
|
|
842
|
+
sinkName: "Test string",
|
|
843
|
+
});
|
|
844
|
+
/** Lists sinks. */
|
|
845
|
+
await gapi.client.logging.folders.sinks.list({
|
|
846
|
+
pageSize: 42,
|
|
847
|
+
pageToken: "Test string",
|
|
848
|
+
parent: "Test string",
|
|
849
|
+
});
|
|
850
|
+
/**
|
|
851
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
852
|
+
* writer_identity; see the unique_writer_identity field.
|
|
853
|
+
*/
|
|
854
|
+
await gapi.client.logging.folders.sinks.patch({
|
|
855
|
+
sinkName: "Test string",
|
|
856
|
+
uniqueWriterIdentity: true,
|
|
857
|
+
updateMask: "Test string",
|
|
858
|
+
}, {
|
|
859
|
+
bigqueryOptions: {
|
|
860
|
+
usePartitionedTables: true,
|
|
861
|
+
usesTimestampColumnPartitioning: true,
|
|
862
|
+
},
|
|
863
|
+
createTime: "Test string",
|
|
864
|
+
description: "Test string",
|
|
865
|
+
destination: "Test string",
|
|
866
|
+
disabled: true,
|
|
867
|
+
exclusions: [
|
|
868
|
+
{
|
|
869
|
+
createTime: "Test string",
|
|
870
|
+
description: "Test string",
|
|
871
|
+
disabled: true,
|
|
872
|
+
filter: "Test string",
|
|
873
|
+
name: "Test string",
|
|
874
|
+
updateTime: "Test string",
|
|
875
|
+
}
|
|
876
|
+
],
|
|
877
|
+
filter: "Test string",
|
|
878
|
+
includeChildren: true,
|
|
879
|
+
name: "Test string",
|
|
880
|
+
outputVersionFormat: "Test string",
|
|
881
|
+
updateTime: "Test string",
|
|
882
|
+
writerIdentity: "Test string",
|
|
883
|
+
});
|
|
884
|
+
/**
|
|
885
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
886
|
+
* writer_identity; see the unique_writer_identity field.
|
|
887
|
+
*/
|
|
888
|
+
await gapi.client.logging.folders.sinks.update({
|
|
889
|
+
sinkName: "Test string",
|
|
890
|
+
uniqueWriterIdentity: true,
|
|
891
|
+
updateMask: "Test string",
|
|
892
|
+
}, {
|
|
893
|
+
bigqueryOptions: {
|
|
894
|
+
usePartitionedTables: true,
|
|
895
|
+
usesTimestampColumnPartitioning: true,
|
|
896
|
+
},
|
|
897
|
+
createTime: "Test string",
|
|
898
|
+
description: "Test string",
|
|
899
|
+
destination: "Test string",
|
|
900
|
+
disabled: true,
|
|
901
|
+
exclusions: [
|
|
902
|
+
{
|
|
903
|
+
createTime: "Test string",
|
|
904
|
+
description: "Test string",
|
|
905
|
+
disabled: true,
|
|
906
|
+
filter: "Test string",
|
|
907
|
+
name: "Test string",
|
|
908
|
+
updateTime: "Test string",
|
|
909
|
+
}
|
|
910
|
+
],
|
|
911
|
+
filter: "Test string",
|
|
912
|
+
includeChildren: true,
|
|
913
|
+
name: "Test string",
|
|
914
|
+
outputVersionFormat: "Test string",
|
|
915
|
+
updateTime: "Test string",
|
|
916
|
+
writerIdentity: "Test string",
|
|
917
|
+
});
|
|
918
|
+
/** Gets information about a location. */
|
|
919
|
+
await gapi.client.logging.locations.get({
|
|
920
|
+
name: "Test string",
|
|
921
|
+
});
|
|
922
|
+
/** Lists information about the supported locations for this service. */
|
|
923
|
+
await gapi.client.logging.locations.list({
|
|
924
|
+
filter: "Test string",
|
|
925
|
+
name: "Test string",
|
|
926
|
+
pageSize: 42,
|
|
927
|
+
pageToken: "Test string",
|
|
928
|
+
});
|
|
929
|
+
/** Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. */
|
|
930
|
+
await gapi.client.logging.locations.buckets.create({
|
|
931
|
+
bucketId: "Test string",
|
|
932
|
+
parent: "Test string",
|
|
933
|
+
}, {
|
|
934
|
+
cmekSettings: {
|
|
935
|
+
kmsKeyName: "Test string",
|
|
936
|
+
kmsKeyVersionName: "Test string",
|
|
937
|
+
name: "Test string",
|
|
938
|
+
serviceAccountId: "Test string",
|
|
939
|
+
},
|
|
940
|
+
createTime: "Test string",
|
|
941
|
+
description: "Test string",
|
|
942
|
+
indexConfigs: [
|
|
943
|
+
{
|
|
944
|
+
createTime: "Test string",
|
|
945
|
+
fieldPath: "Test string",
|
|
946
|
+
type: "Test string",
|
|
947
|
+
}
|
|
948
|
+
],
|
|
949
|
+
lifecycleState: "Test string",
|
|
950
|
+
locked: true,
|
|
951
|
+
name: "Test string",
|
|
952
|
+
restrictedFields: [
|
|
953
|
+
"Test string"
|
|
954
|
+
],
|
|
955
|
+
retentionDays: 42,
|
|
956
|
+
updateTime: "Test string",
|
|
957
|
+
});
|
|
958
|
+
/**
|
|
959
|
+
* Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently
|
|
960
|
+
* deleted.
|
|
961
|
+
*/
|
|
962
|
+
await gapi.client.logging.locations.buckets.delete({
|
|
963
|
+
name: "Test string",
|
|
964
|
+
});
|
|
965
|
+
/** Gets a log bucket. */
|
|
966
|
+
await gapi.client.logging.locations.buckets.get({
|
|
967
|
+
name: "Test string",
|
|
968
|
+
});
|
|
969
|
+
/** Lists log buckets. */
|
|
970
|
+
await gapi.client.logging.locations.buckets.list({
|
|
971
|
+
pageSize: 42,
|
|
972
|
+
pageToken: "Test string",
|
|
973
|
+
parent: "Test string",
|
|
974
|
+
});
|
|
975
|
+
/**
|
|
976
|
+
* Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the
|
|
977
|
+
* bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been
|
|
978
|
+
* created, the bucket's location cannot be changed.
|
|
979
|
+
*/
|
|
980
|
+
await gapi.client.logging.locations.buckets.patch({
|
|
981
|
+
name: "Test string",
|
|
982
|
+
updateMask: "Test string",
|
|
983
|
+
}, {
|
|
984
|
+
cmekSettings: {
|
|
985
|
+
kmsKeyName: "Test string",
|
|
986
|
+
kmsKeyVersionName: "Test string",
|
|
987
|
+
name: "Test string",
|
|
988
|
+
serviceAccountId: "Test string",
|
|
989
|
+
},
|
|
990
|
+
createTime: "Test string",
|
|
991
|
+
description: "Test string",
|
|
992
|
+
indexConfigs: [
|
|
993
|
+
{
|
|
994
|
+
createTime: "Test string",
|
|
995
|
+
fieldPath: "Test string",
|
|
996
|
+
type: "Test string",
|
|
997
|
+
}
|
|
998
|
+
],
|
|
999
|
+
lifecycleState: "Test string",
|
|
1000
|
+
locked: true,
|
|
1001
|
+
name: "Test string",
|
|
1002
|
+
restrictedFields: [
|
|
1003
|
+
"Test string"
|
|
1004
|
+
],
|
|
1005
|
+
retentionDays: 42,
|
|
1006
|
+
updateTime: "Test string",
|
|
1007
|
+
});
|
|
1008
|
+
/** Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. */
|
|
1009
|
+
await gapi.client.logging.locations.buckets.undelete({
|
|
1010
|
+
name: "Test string",
|
|
1011
|
+
}, {
|
|
1012
|
+
});
|
|
1013
|
+
/** Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. */
|
|
1014
|
+
await gapi.client.logging.locations.buckets.views.create({
|
|
1015
|
+
parent: "Test string",
|
|
1016
|
+
viewId: "Test string",
|
|
1017
|
+
}, {
|
|
1018
|
+
createTime: "Test string",
|
|
1019
|
+
description: "Test string",
|
|
1020
|
+
filter: "Test string",
|
|
1021
|
+
name: "Test string",
|
|
1022
|
+
updateTime: "Test string",
|
|
1023
|
+
});
|
|
1024
|
+
/**
|
|
1025
|
+
* Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few
|
|
1026
|
+
* minutes.
|
|
1027
|
+
*/
|
|
1028
|
+
await gapi.client.logging.locations.buckets.views.delete({
|
|
1029
|
+
name: "Test string",
|
|
1030
|
+
});
|
|
1031
|
+
/** Gets a view on a log bucket.. */
|
|
1032
|
+
await gapi.client.logging.locations.buckets.views.get({
|
|
1033
|
+
name: "Test string",
|
|
1034
|
+
});
|
|
1035
|
+
/** Lists views on a log bucket. */
|
|
1036
|
+
await gapi.client.logging.locations.buckets.views.list({
|
|
1037
|
+
pageSize: 42,
|
|
1038
|
+
pageToken: "Test string",
|
|
1039
|
+
parent: "Test string",
|
|
1040
|
+
});
|
|
1041
|
+
/**
|
|
1042
|
+
* Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates
|
|
1043
|
+
* that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.
|
|
1044
|
+
*/
|
|
1045
|
+
await gapi.client.logging.locations.buckets.views.patch({
|
|
1046
|
+
name: "Test string",
|
|
1047
|
+
updateMask: "Test string",
|
|
1048
|
+
}, {
|
|
1049
|
+
createTime: "Test string",
|
|
1050
|
+
description: "Test string",
|
|
1051
|
+
filter: "Test string",
|
|
1052
|
+
name: "Test string",
|
|
1053
|
+
updateTime: "Test string",
|
|
1054
|
+
});
|
|
1055
|
+
/**
|
|
1056
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
1057
|
+
* method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed
|
|
1058
|
+
* despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
|
1059
|
+
* corresponding to Code.CANCELLED.
|
|
1060
|
+
*/
|
|
1061
|
+
await gapi.client.logging.locations.operations.cancel({
|
|
1062
|
+
name: "Test string",
|
|
1063
|
+
}, {
|
|
1064
|
+
});
|
|
1065
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
1066
|
+
await gapi.client.logging.locations.operations.get({
|
|
1067
|
+
name: "Test string",
|
|
1068
|
+
});
|
|
1069
|
+
/**
|
|
1070
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to
|
|
1071
|
+
* override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
|
|
1072
|
+
* to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent
|
|
1073
|
+
* resource, without the operations collection id.
|
|
1074
|
+
*/
|
|
1075
|
+
await gapi.client.logging.locations.operations.list({
|
|
1076
|
+
filter: "Test string",
|
|
1077
|
+
name: "Test string",
|
|
1078
|
+
pageSize: 42,
|
|
1079
|
+
pageToken: "Test string",
|
|
1080
|
+
});
|
|
1081
|
+
/**
|
|
1082
|
+
* Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be
|
|
1083
|
+
* deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
|
|
1084
|
+
*/
|
|
1085
|
+
await gapi.client.logging.logs.delete({
|
|
1086
|
+
logName: "Test string",
|
|
1087
|
+
});
|
|
1088
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
1089
|
+
await gapi.client.logging.logs.list({
|
|
1090
|
+
pageSize: 42,
|
|
1091
|
+
pageToken: "Test string",
|
|
1092
|
+
parent: "Test string",
|
|
1093
|
+
resourceNames: "Test string",
|
|
1094
|
+
});
|
|
1095
|
+
/** Lists the descriptors for monitored resource types used by Logging. */
|
|
1096
|
+
await gapi.client.logging.monitoredResourceDescriptors.list({
|
|
1097
|
+
pageSize: 42,
|
|
1098
|
+
pageToken: "Test string",
|
|
1099
|
+
});
|
|
1100
|
+
/**
|
|
1101
|
+
* Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once
|
|
1102
|
+
* configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
1103
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
1104
|
+
*/
|
|
1105
|
+
await gapi.client.logging.organizations.getCmekSettings({
|
|
1106
|
+
name: "Test string",
|
|
1107
|
+
});
|
|
1108
|
+
/**
|
|
1109
|
+
* Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can
|
|
1110
|
+
* only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
1111
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
1112
|
+
*/
|
|
1113
|
+
await gapi.client.logging.organizations.getSettings({
|
|
1114
|
+
name: "Test string",
|
|
1115
|
+
});
|
|
1116
|
+
/**
|
|
1117
|
+
* Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to
|
|
1118
|
+
* all projects and folders in the Google Cloud organization.UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required
|
|
1119
|
+
* roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.See Enabling CMEK for Log Router
|
|
1120
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
1121
|
+
*/
|
|
1122
|
+
await gapi.client.logging.organizations.updateCmekSettings({
|
|
1123
|
+
name: "Test string",
|
|
1124
|
+
updateMask: "Test string",
|
|
1125
|
+
}, {
|
|
1126
|
+
kmsKeyName: "Test string",
|
|
1127
|
+
kmsKeyVersionName: "Test string",
|
|
1128
|
+
name: "Test string",
|
|
1129
|
+
serviceAccountId: "Test string",
|
|
1130
|
+
});
|
|
1131
|
+
/**
|
|
1132
|
+
* Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to
|
|
1133
|
+
* all projects and folders in the Google Cloud organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required
|
|
1134
|
+
* roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate
|
|
1135
|
+
* OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
1136
|
+
*/
|
|
1137
|
+
await gapi.client.logging.organizations.updateSettings({
|
|
1138
|
+
name: "Test string",
|
|
1139
|
+
updateMask: "Test string",
|
|
1140
|
+
}, {
|
|
1141
|
+
disableDefaultSink: true,
|
|
1142
|
+
kmsKeyName: "Test string",
|
|
1143
|
+
kmsServiceAccountId: "Test string",
|
|
1144
|
+
name: "Test string",
|
|
1145
|
+
storageLocation: "Test string",
|
|
1146
|
+
});
|
|
1147
|
+
/** Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. */
|
|
1148
|
+
await gapi.client.logging.organizations.exclusions.create({
|
|
1149
|
+
parent: "Test string",
|
|
1150
|
+
}, {
|
|
1151
|
+
createTime: "Test string",
|
|
1152
|
+
description: "Test string",
|
|
1153
|
+
disabled: true,
|
|
1154
|
+
filter: "Test string",
|
|
1155
|
+
name: "Test string",
|
|
1156
|
+
updateTime: "Test string",
|
|
1157
|
+
});
|
|
1158
|
+
/** Deletes an exclusion in the _Default sink. */
|
|
1159
|
+
await gapi.client.logging.organizations.exclusions.delete({
|
|
1160
|
+
name: "Test string",
|
|
1161
|
+
});
|
|
1162
|
+
/** Gets the description of an exclusion in the _Default sink. */
|
|
1163
|
+
await gapi.client.logging.organizations.exclusions.get({
|
|
1164
|
+
name: "Test string",
|
|
1165
|
+
});
|
|
1166
|
+
/** Lists all the exclusions on the _Default sink in a parent resource. */
|
|
1167
|
+
await gapi.client.logging.organizations.exclusions.list({
|
|
1168
|
+
pageSize: 42,
|
|
1169
|
+
pageToken: "Test string",
|
|
1170
|
+
parent: "Test string",
|
|
1171
|
+
});
|
|
1172
|
+
/** Changes one or more properties of an existing exclusion in the _Default sink. */
|
|
1173
|
+
await gapi.client.logging.organizations.exclusions.patch({
|
|
1174
|
+
name: "Test string",
|
|
1175
|
+
updateMask: "Test string",
|
|
1176
|
+
}, {
|
|
1177
|
+
createTime: "Test string",
|
|
1178
|
+
description: "Test string",
|
|
1179
|
+
disabled: true,
|
|
1180
|
+
filter: "Test string",
|
|
1181
|
+
name: "Test string",
|
|
1182
|
+
updateTime: "Test string",
|
|
1183
|
+
});
|
|
1184
|
+
/** Gets information about a location. */
|
|
1185
|
+
await gapi.client.logging.organizations.locations.get({
|
|
1186
|
+
name: "Test string",
|
|
1187
|
+
});
|
|
1188
|
+
/** Lists information about the supported locations for this service. */
|
|
1189
|
+
await gapi.client.logging.organizations.locations.list({
|
|
1190
|
+
filter: "Test string",
|
|
1191
|
+
name: "Test string",
|
|
1192
|
+
pageSize: 42,
|
|
1193
|
+
pageToken: "Test string",
|
|
1194
|
+
});
|
|
1195
|
+
/** Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. */
|
|
1196
|
+
await gapi.client.logging.organizations.locations.buckets.create({
|
|
1197
|
+
bucketId: "Test string",
|
|
1198
|
+
parent: "Test string",
|
|
1199
|
+
}, {
|
|
1200
|
+
cmekSettings: {
|
|
1201
|
+
kmsKeyName: "Test string",
|
|
1202
|
+
kmsKeyVersionName: "Test string",
|
|
1203
|
+
name: "Test string",
|
|
1204
|
+
serviceAccountId: "Test string",
|
|
1205
|
+
},
|
|
1206
|
+
createTime: "Test string",
|
|
1207
|
+
description: "Test string",
|
|
1208
|
+
indexConfigs: [
|
|
1209
|
+
{
|
|
1210
|
+
createTime: "Test string",
|
|
1211
|
+
fieldPath: "Test string",
|
|
1212
|
+
type: "Test string",
|
|
1213
|
+
}
|
|
1214
|
+
],
|
|
1215
|
+
lifecycleState: "Test string",
|
|
1216
|
+
locked: true,
|
|
1217
|
+
name: "Test string",
|
|
1218
|
+
restrictedFields: [
|
|
1219
|
+
"Test string"
|
|
1220
|
+
],
|
|
1221
|
+
retentionDays: 42,
|
|
1222
|
+
updateTime: "Test string",
|
|
1223
|
+
});
|
|
1224
|
+
/**
|
|
1225
|
+
* Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently
|
|
1226
|
+
* deleted.
|
|
1227
|
+
*/
|
|
1228
|
+
await gapi.client.logging.organizations.locations.buckets.delete({
|
|
1229
|
+
name: "Test string",
|
|
1230
|
+
});
|
|
1231
|
+
/** Gets a log bucket. */
|
|
1232
|
+
await gapi.client.logging.organizations.locations.buckets.get({
|
|
1233
|
+
name: "Test string",
|
|
1234
|
+
});
|
|
1235
|
+
/** Lists log buckets. */
|
|
1236
|
+
await gapi.client.logging.organizations.locations.buckets.list({
|
|
1237
|
+
pageSize: 42,
|
|
1238
|
+
pageToken: "Test string",
|
|
1239
|
+
parent: "Test string",
|
|
1240
|
+
});
|
|
1241
|
+
/**
|
|
1242
|
+
* Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the
|
|
1243
|
+
* bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been
|
|
1244
|
+
* created, the bucket's location cannot be changed.
|
|
1245
|
+
*/
|
|
1246
|
+
await gapi.client.logging.organizations.locations.buckets.patch({
|
|
1247
|
+
name: "Test string",
|
|
1248
|
+
updateMask: "Test string",
|
|
1249
|
+
}, {
|
|
1250
|
+
cmekSettings: {
|
|
1251
|
+
kmsKeyName: "Test string",
|
|
1252
|
+
kmsKeyVersionName: "Test string",
|
|
1253
|
+
name: "Test string",
|
|
1254
|
+
serviceAccountId: "Test string",
|
|
1255
|
+
},
|
|
1256
|
+
createTime: "Test string",
|
|
1257
|
+
description: "Test string",
|
|
1258
|
+
indexConfigs: [
|
|
1259
|
+
{
|
|
1260
|
+
createTime: "Test string",
|
|
1261
|
+
fieldPath: "Test string",
|
|
1262
|
+
type: "Test string",
|
|
1263
|
+
}
|
|
1264
|
+
],
|
|
1265
|
+
lifecycleState: "Test string",
|
|
1266
|
+
locked: true,
|
|
1267
|
+
name: "Test string",
|
|
1268
|
+
restrictedFields: [
|
|
1269
|
+
"Test string"
|
|
1270
|
+
],
|
|
1271
|
+
retentionDays: 42,
|
|
1272
|
+
updateTime: "Test string",
|
|
1273
|
+
});
|
|
1274
|
+
/** Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. */
|
|
1275
|
+
await gapi.client.logging.organizations.locations.buckets.undelete({
|
|
1276
|
+
name: "Test string",
|
|
1277
|
+
}, {
|
|
1278
|
+
});
|
|
1279
|
+
/** Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. */
|
|
1280
|
+
await gapi.client.logging.organizations.locations.buckets.views.create({
|
|
1281
|
+
parent: "Test string",
|
|
1282
|
+
viewId: "Test string",
|
|
1283
|
+
}, {
|
|
1284
|
+
createTime: "Test string",
|
|
1285
|
+
description: "Test string",
|
|
1286
|
+
filter: "Test string",
|
|
1287
|
+
name: "Test string",
|
|
1288
|
+
updateTime: "Test string",
|
|
1289
|
+
});
|
|
1290
|
+
/**
|
|
1291
|
+
* Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few
|
|
1292
|
+
* minutes.
|
|
1293
|
+
*/
|
|
1294
|
+
await gapi.client.logging.organizations.locations.buckets.views.delete({
|
|
1295
|
+
name: "Test string",
|
|
1296
|
+
});
|
|
1297
|
+
/** Gets a view on a log bucket.. */
|
|
1298
|
+
await gapi.client.logging.organizations.locations.buckets.views.get({
|
|
1299
|
+
name: "Test string",
|
|
1300
|
+
});
|
|
1301
|
+
/** Lists views on a log bucket. */
|
|
1302
|
+
await gapi.client.logging.organizations.locations.buckets.views.list({
|
|
1303
|
+
pageSize: 42,
|
|
1304
|
+
pageToken: "Test string",
|
|
1305
|
+
parent: "Test string",
|
|
1306
|
+
});
|
|
1307
|
+
/**
|
|
1308
|
+
* Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates
|
|
1309
|
+
* that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.
|
|
1310
|
+
*/
|
|
1311
|
+
await gapi.client.logging.organizations.locations.buckets.views.patch({
|
|
1312
|
+
name: "Test string",
|
|
1313
|
+
updateMask: "Test string",
|
|
1314
|
+
}, {
|
|
1315
|
+
createTime: "Test string",
|
|
1316
|
+
description: "Test string",
|
|
1317
|
+
filter: "Test string",
|
|
1318
|
+
name: "Test string",
|
|
1319
|
+
updateTime: "Test string",
|
|
1320
|
+
});
|
|
1321
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
1322
|
+
await gapi.client.logging.organizations.locations.buckets.views.logs.list({
|
|
1323
|
+
pageSize: 42,
|
|
1324
|
+
pageToken: "Test string",
|
|
1325
|
+
parent: "Test string",
|
|
1326
|
+
resourceNames: "Test string",
|
|
1327
|
+
});
|
|
1328
|
+
/**
|
|
1329
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
1330
|
+
* method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed
|
|
1331
|
+
* despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
|
1332
|
+
* corresponding to Code.CANCELLED.
|
|
1333
|
+
*/
|
|
1334
|
+
await gapi.client.logging.organizations.locations.operations.cancel({
|
|
1335
|
+
name: "Test string",
|
|
1336
|
+
}, {
|
|
1337
|
+
});
|
|
1338
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
1339
|
+
await gapi.client.logging.organizations.locations.operations.get({
|
|
1340
|
+
name: "Test string",
|
|
1341
|
+
});
|
|
1342
|
+
/**
|
|
1343
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to
|
|
1344
|
+
* override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
|
|
1345
|
+
* to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent
|
|
1346
|
+
* resource, without the operations collection id.
|
|
1347
|
+
*/
|
|
1348
|
+
await gapi.client.logging.organizations.locations.operations.list({
|
|
1349
|
+
filter: "Test string",
|
|
1350
|
+
name: "Test string",
|
|
1351
|
+
pageSize: 42,
|
|
1352
|
+
pageToken: "Test string",
|
|
1353
|
+
});
|
|
1354
|
+
/**
|
|
1355
|
+
* Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be
|
|
1356
|
+
* deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
|
|
1357
|
+
*/
|
|
1358
|
+
await gapi.client.logging.organizations.logs.delete({
|
|
1359
|
+
logName: "Test string",
|
|
1360
|
+
});
|
|
1361
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
1362
|
+
await gapi.client.logging.organizations.logs.list({
|
|
1363
|
+
pageSize: 42,
|
|
1364
|
+
pageToken: "Test string",
|
|
1365
|
+
parent: "Test string",
|
|
1366
|
+
resourceNames: "Test string",
|
|
1367
|
+
});
|
|
1368
|
+
/**
|
|
1369
|
+
* Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to
|
|
1370
|
+
* write to the destination. A sink can export log entries only from the resource owning the sink.
|
|
1371
|
+
*/
|
|
1372
|
+
await gapi.client.logging.organizations.sinks.create({
|
|
1373
|
+
parent: "Test string",
|
|
1374
|
+
uniqueWriterIdentity: true,
|
|
1375
|
+
}, {
|
|
1376
|
+
bigqueryOptions: {
|
|
1377
|
+
usePartitionedTables: true,
|
|
1378
|
+
usesTimestampColumnPartitioning: true,
|
|
1379
|
+
},
|
|
1380
|
+
createTime: "Test string",
|
|
1381
|
+
description: "Test string",
|
|
1382
|
+
destination: "Test string",
|
|
1383
|
+
disabled: true,
|
|
1384
|
+
exclusions: [
|
|
1385
|
+
{
|
|
1386
|
+
createTime: "Test string",
|
|
1387
|
+
description: "Test string",
|
|
1388
|
+
disabled: true,
|
|
1389
|
+
filter: "Test string",
|
|
1390
|
+
name: "Test string",
|
|
1391
|
+
updateTime: "Test string",
|
|
1392
|
+
}
|
|
1393
|
+
],
|
|
1394
|
+
filter: "Test string",
|
|
1395
|
+
includeChildren: true,
|
|
1396
|
+
name: "Test string",
|
|
1397
|
+
outputVersionFormat: "Test string",
|
|
1398
|
+
updateTime: "Test string",
|
|
1399
|
+
writerIdentity: "Test string",
|
|
1400
|
+
});
|
|
1401
|
+
/** Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. */
|
|
1402
|
+
await gapi.client.logging.organizations.sinks.delete({
|
|
1403
|
+
sinkName: "Test string",
|
|
1404
|
+
});
|
|
1405
|
+
/** Gets a sink. */
|
|
1406
|
+
await gapi.client.logging.organizations.sinks.get({
|
|
1407
|
+
sinkName: "Test string",
|
|
1408
|
+
});
|
|
1409
|
+
/** Lists sinks. */
|
|
1410
|
+
await gapi.client.logging.organizations.sinks.list({
|
|
1411
|
+
pageSize: 42,
|
|
1412
|
+
pageToken: "Test string",
|
|
1413
|
+
parent: "Test string",
|
|
1414
|
+
});
|
|
1415
|
+
/**
|
|
1416
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
1417
|
+
* writer_identity; see the unique_writer_identity field.
|
|
1418
|
+
*/
|
|
1419
|
+
await gapi.client.logging.organizations.sinks.patch({
|
|
1420
|
+
sinkName: "Test string",
|
|
1421
|
+
uniqueWriterIdentity: true,
|
|
1422
|
+
updateMask: "Test string",
|
|
1423
|
+
}, {
|
|
1424
|
+
bigqueryOptions: {
|
|
1425
|
+
usePartitionedTables: true,
|
|
1426
|
+
usesTimestampColumnPartitioning: true,
|
|
1427
|
+
},
|
|
1428
|
+
createTime: "Test string",
|
|
1429
|
+
description: "Test string",
|
|
1430
|
+
destination: "Test string",
|
|
1431
|
+
disabled: true,
|
|
1432
|
+
exclusions: [
|
|
1433
|
+
{
|
|
1434
|
+
createTime: "Test string",
|
|
1435
|
+
description: "Test string",
|
|
1436
|
+
disabled: true,
|
|
1437
|
+
filter: "Test string",
|
|
1438
|
+
name: "Test string",
|
|
1439
|
+
updateTime: "Test string",
|
|
1440
|
+
}
|
|
1441
|
+
],
|
|
1442
|
+
filter: "Test string",
|
|
1443
|
+
includeChildren: true,
|
|
1444
|
+
name: "Test string",
|
|
1445
|
+
outputVersionFormat: "Test string",
|
|
1446
|
+
updateTime: "Test string",
|
|
1447
|
+
writerIdentity: "Test string",
|
|
1448
|
+
});
|
|
1449
|
+
/**
|
|
1450
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
1451
|
+
* writer_identity; see the unique_writer_identity field.
|
|
1452
|
+
*/
|
|
1453
|
+
await gapi.client.logging.organizations.sinks.update({
|
|
1454
|
+
sinkName: "Test string",
|
|
1455
|
+
uniqueWriterIdentity: true,
|
|
1456
|
+
updateMask: "Test string",
|
|
1457
|
+
}, {
|
|
1458
|
+
bigqueryOptions: {
|
|
1459
|
+
usePartitionedTables: true,
|
|
1460
|
+
usesTimestampColumnPartitioning: true,
|
|
1461
|
+
},
|
|
1462
|
+
createTime: "Test string",
|
|
1463
|
+
description: "Test string",
|
|
1464
|
+
destination: "Test string",
|
|
1465
|
+
disabled: true,
|
|
1466
|
+
exclusions: [
|
|
1467
|
+
{
|
|
1468
|
+
createTime: "Test string",
|
|
1469
|
+
description: "Test string",
|
|
1470
|
+
disabled: true,
|
|
1471
|
+
filter: "Test string",
|
|
1472
|
+
name: "Test string",
|
|
1473
|
+
updateTime: "Test string",
|
|
1474
|
+
}
|
|
1475
|
+
],
|
|
1476
|
+
filter: "Test string",
|
|
1477
|
+
includeChildren: true,
|
|
1478
|
+
name: "Test string",
|
|
1479
|
+
outputVersionFormat: "Test string",
|
|
1480
|
+
updateTime: "Test string",
|
|
1481
|
+
writerIdentity: "Test string",
|
|
1482
|
+
});
|
|
1483
|
+
/**
|
|
1484
|
+
* Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once
|
|
1485
|
+
* configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
1486
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
1487
|
+
*/
|
|
1488
|
+
await gapi.client.logging.projects.getCmekSettings({
|
|
1489
|
+
name: "Test string",
|
|
1490
|
+
});
|
|
1491
|
+
/**
|
|
1492
|
+
* Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can
|
|
1493
|
+
* only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
1494
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
1495
|
+
*/
|
|
1496
|
+
await gapi.client.logging.projects.getSettings({
|
|
1497
|
+
name: "Test string",
|
|
1498
|
+
});
|
|
1499
|
+
/** Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. */
|
|
1500
|
+
await gapi.client.logging.projects.exclusions.create({
|
|
1501
|
+
parent: "Test string",
|
|
1502
|
+
}, {
|
|
1503
|
+
createTime: "Test string",
|
|
1504
|
+
description: "Test string",
|
|
1505
|
+
disabled: true,
|
|
1506
|
+
filter: "Test string",
|
|
1507
|
+
name: "Test string",
|
|
1508
|
+
updateTime: "Test string",
|
|
1509
|
+
});
|
|
1510
|
+
/** Deletes an exclusion in the _Default sink. */
|
|
1511
|
+
await gapi.client.logging.projects.exclusions.delete({
|
|
1512
|
+
name: "Test string",
|
|
1513
|
+
});
|
|
1514
|
+
/** Gets the description of an exclusion in the _Default sink. */
|
|
1515
|
+
await gapi.client.logging.projects.exclusions.get({
|
|
1516
|
+
name: "Test string",
|
|
1517
|
+
});
|
|
1518
|
+
/** Lists all the exclusions on the _Default sink in a parent resource. */
|
|
1519
|
+
await gapi.client.logging.projects.exclusions.list({
|
|
1520
|
+
pageSize: 42,
|
|
1521
|
+
pageToken: "Test string",
|
|
1522
|
+
parent: "Test string",
|
|
1523
|
+
});
|
|
1524
|
+
/** Changes one or more properties of an existing exclusion in the _Default sink. */
|
|
1525
|
+
await gapi.client.logging.projects.exclusions.patch({
|
|
1526
|
+
name: "Test string",
|
|
1527
|
+
updateMask: "Test string",
|
|
1528
|
+
}, {
|
|
1529
|
+
createTime: "Test string",
|
|
1530
|
+
description: "Test string",
|
|
1531
|
+
disabled: true,
|
|
1532
|
+
filter: "Test string",
|
|
1533
|
+
name: "Test string",
|
|
1534
|
+
updateTime: "Test string",
|
|
1535
|
+
});
|
|
1536
|
+
/** Gets information about a location. */
|
|
1537
|
+
await gapi.client.logging.projects.locations.get({
|
|
1538
|
+
name: "Test string",
|
|
1539
|
+
});
|
|
1540
|
+
/** Lists information about the supported locations for this service. */
|
|
1541
|
+
await gapi.client.logging.projects.locations.list({
|
|
1542
|
+
filter: "Test string",
|
|
1543
|
+
name: "Test string",
|
|
1544
|
+
pageSize: 42,
|
|
1545
|
+
pageToken: "Test string",
|
|
1546
|
+
});
|
|
1547
|
+
/** Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed. */
|
|
1548
|
+
await gapi.client.logging.projects.locations.buckets.create({
|
|
1549
|
+
bucketId: "Test string",
|
|
1550
|
+
parent: "Test string",
|
|
1551
|
+
}, {
|
|
1552
|
+
cmekSettings: {
|
|
1553
|
+
kmsKeyName: "Test string",
|
|
1554
|
+
kmsKeyVersionName: "Test string",
|
|
1555
|
+
name: "Test string",
|
|
1556
|
+
serviceAccountId: "Test string",
|
|
1557
|
+
},
|
|
1558
|
+
createTime: "Test string",
|
|
1559
|
+
description: "Test string",
|
|
1560
|
+
indexConfigs: [
|
|
1561
|
+
{
|
|
1562
|
+
createTime: "Test string",
|
|
1563
|
+
fieldPath: "Test string",
|
|
1564
|
+
type: "Test string",
|
|
1565
|
+
}
|
|
1566
|
+
],
|
|
1567
|
+
lifecycleState: "Test string",
|
|
1568
|
+
locked: true,
|
|
1569
|
+
name: "Test string",
|
|
1570
|
+
restrictedFields: [
|
|
1571
|
+
"Test string"
|
|
1572
|
+
],
|
|
1573
|
+
retentionDays: 42,
|
|
1574
|
+
updateTime: "Test string",
|
|
1575
|
+
});
|
|
1576
|
+
/**
|
|
1577
|
+
* Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently
|
|
1578
|
+
* deleted.
|
|
1579
|
+
*/
|
|
1580
|
+
await gapi.client.logging.projects.locations.buckets.delete({
|
|
1581
|
+
name: "Test string",
|
|
1582
|
+
});
|
|
1583
|
+
/** Gets a log bucket. */
|
|
1584
|
+
await gapi.client.logging.projects.locations.buckets.get({
|
|
1585
|
+
name: "Test string",
|
|
1586
|
+
});
|
|
1587
|
+
/** Lists log buckets. */
|
|
1588
|
+
await gapi.client.logging.projects.locations.buckets.list({
|
|
1589
|
+
pageSize: 42,
|
|
1590
|
+
pageToken: "Test string",
|
|
1591
|
+
parent: "Test string",
|
|
1592
|
+
});
|
|
1593
|
+
/**
|
|
1594
|
+
* Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the
|
|
1595
|
+
* bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been
|
|
1596
|
+
* created, the bucket's location cannot be changed.
|
|
1597
|
+
*/
|
|
1598
|
+
await gapi.client.logging.projects.locations.buckets.patch({
|
|
1599
|
+
name: "Test string",
|
|
1600
|
+
updateMask: "Test string",
|
|
1601
|
+
}, {
|
|
1602
|
+
cmekSettings: {
|
|
1603
|
+
kmsKeyName: "Test string",
|
|
1604
|
+
kmsKeyVersionName: "Test string",
|
|
1605
|
+
name: "Test string",
|
|
1606
|
+
serviceAccountId: "Test string",
|
|
1607
|
+
},
|
|
1608
|
+
createTime: "Test string",
|
|
1609
|
+
description: "Test string",
|
|
1610
|
+
indexConfigs: [
|
|
1611
|
+
{
|
|
1612
|
+
createTime: "Test string",
|
|
1613
|
+
fieldPath: "Test string",
|
|
1614
|
+
type: "Test string",
|
|
1615
|
+
}
|
|
1616
|
+
],
|
|
1617
|
+
lifecycleState: "Test string",
|
|
1618
|
+
locked: true,
|
|
1619
|
+
name: "Test string",
|
|
1620
|
+
restrictedFields: [
|
|
1621
|
+
"Test string"
|
|
1622
|
+
],
|
|
1623
|
+
retentionDays: 42,
|
|
1624
|
+
updateTime: "Test string",
|
|
1625
|
+
});
|
|
1626
|
+
/** Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days. */
|
|
1627
|
+
await gapi.client.logging.projects.locations.buckets.undelete({
|
|
1628
|
+
name: "Test string",
|
|
1629
|
+
}, {
|
|
1630
|
+
});
|
|
1631
|
+
/** Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. */
|
|
1632
|
+
await gapi.client.logging.projects.locations.buckets.views.create({
|
|
1633
|
+
parent: "Test string",
|
|
1634
|
+
viewId: "Test string",
|
|
1635
|
+
}, {
|
|
1636
|
+
createTime: "Test string",
|
|
1637
|
+
description: "Test string",
|
|
1638
|
+
filter: "Test string",
|
|
1639
|
+
name: "Test string",
|
|
1640
|
+
updateTime: "Test string",
|
|
1641
|
+
});
|
|
1642
|
+
/**
|
|
1643
|
+
* Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few
|
|
1644
|
+
* minutes.
|
|
1645
|
+
*/
|
|
1646
|
+
await gapi.client.logging.projects.locations.buckets.views.delete({
|
|
1647
|
+
name: "Test string",
|
|
1648
|
+
});
|
|
1649
|
+
/** Gets a view on a log bucket.. */
|
|
1650
|
+
await gapi.client.logging.projects.locations.buckets.views.get({
|
|
1651
|
+
name: "Test string",
|
|
1652
|
+
});
|
|
1653
|
+
/** Lists views on a log bucket. */
|
|
1654
|
+
await gapi.client.logging.projects.locations.buckets.views.list({
|
|
1655
|
+
pageSize: 42,
|
|
1656
|
+
pageToken: "Test string",
|
|
1657
|
+
parent: "Test string",
|
|
1658
|
+
});
|
|
1659
|
+
/**
|
|
1660
|
+
* Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates
|
|
1661
|
+
* that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.
|
|
1662
|
+
*/
|
|
1663
|
+
await gapi.client.logging.projects.locations.buckets.views.patch({
|
|
1664
|
+
name: "Test string",
|
|
1665
|
+
updateMask: "Test string",
|
|
1666
|
+
}, {
|
|
1667
|
+
createTime: "Test string",
|
|
1668
|
+
description: "Test string",
|
|
1669
|
+
filter: "Test string",
|
|
1670
|
+
name: "Test string",
|
|
1671
|
+
updateTime: "Test string",
|
|
1672
|
+
});
|
|
1673
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
1674
|
+
await gapi.client.logging.projects.locations.buckets.views.logs.list({
|
|
1675
|
+
pageSize: 42,
|
|
1676
|
+
pageToken: "Test string",
|
|
1677
|
+
parent: "Test string",
|
|
1678
|
+
resourceNames: "Test string",
|
|
1679
|
+
});
|
|
1680
|
+
/**
|
|
1681
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
1682
|
+
* method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed
|
|
1683
|
+
* despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
|
1684
|
+
* corresponding to Code.CANCELLED.
|
|
1685
|
+
*/
|
|
1686
|
+
await gapi.client.logging.projects.locations.operations.cancel({
|
|
1687
|
+
name: "Test string",
|
|
1688
|
+
}, {
|
|
1689
|
+
});
|
|
1690
|
+
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
1691
|
+
await gapi.client.logging.projects.locations.operations.get({
|
|
1692
|
+
name: "Test string",
|
|
1693
|
+
});
|
|
1694
|
+
/**
|
|
1695
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to
|
|
1696
|
+
* override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
|
|
1697
|
+
* to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent
|
|
1698
|
+
* resource, without the operations collection id.
|
|
1699
|
+
*/
|
|
1700
|
+
await gapi.client.logging.projects.locations.operations.list({
|
|
1701
|
+
filter: "Test string",
|
|
1702
|
+
name: "Test string",
|
|
1703
|
+
pageSize: 42,
|
|
1704
|
+
pageToken: "Test string",
|
|
1705
|
+
});
|
|
1706
|
+
/**
|
|
1707
|
+
* Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be
|
|
1708
|
+
* deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
|
|
1709
|
+
*/
|
|
1710
|
+
await gapi.client.logging.projects.logs.delete({
|
|
1711
|
+
logName: "Test string",
|
|
1712
|
+
});
|
|
1713
|
+
/** Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. */
|
|
1714
|
+
await gapi.client.logging.projects.logs.list({
|
|
1715
|
+
pageSize: 42,
|
|
1716
|
+
pageToken: "Test string",
|
|
1717
|
+
parent: "Test string",
|
|
1718
|
+
resourceNames: "Test string",
|
|
1719
|
+
});
|
|
1720
|
+
/** Creates a logs-based metric. */
|
|
1721
|
+
await gapi.client.logging.projects.metrics.create({
|
|
1722
|
+
parent: "Test string",
|
|
1723
|
+
}, {
|
|
1724
|
+
bucketName: "Test string",
|
|
1725
|
+
bucketOptions: {
|
|
1726
|
+
explicitBuckets: {
|
|
1727
|
+
bounds: [
|
|
1728
|
+
42
|
|
1729
|
+
],
|
|
1730
|
+
},
|
|
1731
|
+
exponentialBuckets: {
|
|
1732
|
+
growthFactor: 42,
|
|
1733
|
+
numFiniteBuckets: 42,
|
|
1734
|
+
scale: 42,
|
|
1735
|
+
},
|
|
1736
|
+
linearBuckets: {
|
|
1737
|
+
numFiniteBuckets: 42,
|
|
1738
|
+
offset: 42,
|
|
1739
|
+
width: 42,
|
|
1740
|
+
},
|
|
1741
|
+
},
|
|
1742
|
+
createTime: "Test string",
|
|
1743
|
+
description: "Test string",
|
|
1744
|
+
disabled: true,
|
|
1745
|
+
filter: "Test string",
|
|
1746
|
+
labelExtractors: {
|
|
1747
|
+
A: "Test string"
|
|
1748
|
+
},
|
|
1749
|
+
metricDescriptor: {
|
|
1750
|
+
description: "Test string",
|
|
1751
|
+
displayName: "Test string",
|
|
1752
|
+
labels: [
|
|
1753
|
+
{
|
|
1754
|
+
description: "Test string",
|
|
1755
|
+
key: "Test string",
|
|
1756
|
+
valueType: "Test string",
|
|
1757
|
+
}
|
|
1758
|
+
],
|
|
1759
|
+
launchStage: "Test string",
|
|
1760
|
+
metadata: {
|
|
1761
|
+
ingestDelay: "Test string",
|
|
1762
|
+
launchStage: "Test string",
|
|
1763
|
+
samplePeriod: "Test string",
|
|
1764
|
+
},
|
|
1765
|
+
metricKind: "Test string",
|
|
1766
|
+
monitoredResourceTypes: [
|
|
1767
|
+
"Test string"
|
|
1768
|
+
],
|
|
1769
|
+
name: "Test string",
|
|
1770
|
+
type: "Test string",
|
|
1771
|
+
unit: "Test string",
|
|
1772
|
+
valueType: "Test string",
|
|
1773
|
+
},
|
|
1774
|
+
name: "Test string",
|
|
1775
|
+
updateTime: "Test string",
|
|
1776
|
+
valueExtractor: "Test string",
|
|
1777
|
+
version: "Test string",
|
|
1778
|
+
});
|
|
1779
|
+
/** Deletes a logs-based metric. */
|
|
1780
|
+
await gapi.client.logging.projects.metrics.delete({
|
|
1781
|
+
metricName: "Test string",
|
|
1782
|
+
});
|
|
1783
|
+
/** Gets a logs-based metric. */
|
|
1784
|
+
await gapi.client.logging.projects.metrics.get({
|
|
1785
|
+
metricName: "Test string",
|
|
1786
|
+
});
|
|
1787
|
+
/** Lists logs-based metrics. */
|
|
1788
|
+
await gapi.client.logging.projects.metrics.list({
|
|
1789
|
+
pageSize: 42,
|
|
1790
|
+
pageToken: "Test string",
|
|
1791
|
+
parent: "Test string",
|
|
1792
|
+
});
|
|
1793
|
+
/** Creates or updates a logs-based metric. */
|
|
1794
|
+
await gapi.client.logging.projects.metrics.update({
|
|
1795
|
+
metricName: "Test string",
|
|
1796
|
+
}, {
|
|
1797
|
+
bucketName: "Test string",
|
|
1798
|
+
bucketOptions: {
|
|
1799
|
+
explicitBuckets: {
|
|
1800
|
+
bounds: [
|
|
1801
|
+
42
|
|
1802
|
+
],
|
|
1803
|
+
},
|
|
1804
|
+
exponentialBuckets: {
|
|
1805
|
+
growthFactor: 42,
|
|
1806
|
+
numFiniteBuckets: 42,
|
|
1807
|
+
scale: 42,
|
|
1808
|
+
},
|
|
1809
|
+
linearBuckets: {
|
|
1810
|
+
numFiniteBuckets: 42,
|
|
1811
|
+
offset: 42,
|
|
1812
|
+
width: 42,
|
|
1813
|
+
},
|
|
1814
|
+
},
|
|
1815
|
+
createTime: "Test string",
|
|
1816
|
+
description: "Test string",
|
|
1817
|
+
disabled: true,
|
|
1818
|
+
filter: "Test string",
|
|
1819
|
+
labelExtractors: {
|
|
1820
|
+
A: "Test string"
|
|
1821
|
+
},
|
|
1822
|
+
metricDescriptor: {
|
|
1823
|
+
description: "Test string",
|
|
1824
|
+
displayName: "Test string",
|
|
1825
|
+
labels: [
|
|
1826
|
+
{
|
|
1827
|
+
description: "Test string",
|
|
1828
|
+
key: "Test string",
|
|
1829
|
+
valueType: "Test string",
|
|
1830
|
+
}
|
|
1831
|
+
],
|
|
1832
|
+
launchStage: "Test string",
|
|
1833
|
+
metadata: {
|
|
1834
|
+
ingestDelay: "Test string",
|
|
1835
|
+
launchStage: "Test string",
|
|
1836
|
+
samplePeriod: "Test string",
|
|
1837
|
+
},
|
|
1838
|
+
metricKind: "Test string",
|
|
1839
|
+
monitoredResourceTypes: [
|
|
1840
|
+
"Test string"
|
|
1841
|
+
],
|
|
1842
|
+
name: "Test string",
|
|
1843
|
+
type: "Test string",
|
|
1844
|
+
unit: "Test string",
|
|
1845
|
+
valueType: "Test string",
|
|
1846
|
+
},
|
|
1847
|
+
name: "Test string",
|
|
1848
|
+
updateTime: "Test string",
|
|
1849
|
+
valueExtractor: "Test string",
|
|
1850
|
+
version: "Test string",
|
|
1851
|
+
});
|
|
1852
|
+
/**
|
|
1853
|
+
* Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to
|
|
1854
|
+
* write to the destination. A sink can export log entries only from the resource owning the sink.
|
|
1855
|
+
*/
|
|
1856
|
+
await gapi.client.logging.projects.sinks.create({
|
|
1857
|
+
parent: "Test string",
|
|
1858
|
+
uniqueWriterIdentity: true,
|
|
1859
|
+
}, {
|
|
1860
|
+
bigqueryOptions: {
|
|
1861
|
+
usePartitionedTables: true,
|
|
1862
|
+
usesTimestampColumnPartitioning: true,
|
|
1863
|
+
},
|
|
1864
|
+
createTime: "Test string",
|
|
1865
|
+
description: "Test string",
|
|
1866
|
+
destination: "Test string",
|
|
1867
|
+
disabled: true,
|
|
1868
|
+
exclusions: [
|
|
1869
|
+
{
|
|
1870
|
+
createTime: "Test string",
|
|
1871
|
+
description: "Test string",
|
|
1872
|
+
disabled: true,
|
|
1873
|
+
filter: "Test string",
|
|
1874
|
+
name: "Test string",
|
|
1875
|
+
updateTime: "Test string",
|
|
1876
|
+
}
|
|
1877
|
+
],
|
|
1878
|
+
filter: "Test string",
|
|
1879
|
+
includeChildren: true,
|
|
1880
|
+
name: "Test string",
|
|
1881
|
+
outputVersionFormat: "Test string",
|
|
1882
|
+
updateTime: "Test string",
|
|
1883
|
+
writerIdentity: "Test string",
|
|
1884
|
+
});
|
|
1885
|
+
/** Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. */
|
|
1886
|
+
await gapi.client.logging.projects.sinks.delete({
|
|
1887
|
+
sinkName: "Test string",
|
|
1888
|
+
});
|
|
1889
|
+
/** Gets a sink. */
|
|
1890
|
+
await gapi.client.logging.projects.sinks.get({
|
|
1891
|
+
sinkName: "Test string",
|
|
1892
|
+
});
|
|
1893
|
+
/** Lists sinks. */
|
|
1894
|
+
await gapi.client.logging.projects.sinks.list({
|
|
1895
|
+
pageSize: 42,
|
|
1896
|
+
pageToken: "Test string",
|
|
1897
|
+
parent: "Test string",
|
|
1898
|
+
});
|
|
1899
|
+
/**
|
|
1900
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
1901
|
+
* writer_identity; see the unique_writer_identity field.
|
|
1902
|
+
*/
|
|
1903
|
+
await gapi.client.logging.projects.sinks.patch({
|
|
1904
|
+
sinkName: "Test string",
|
|
1905
|
+
uniqueWriterIdentity: true,
|
|
1906
|
+
updateMask: "Test string",
|
|
1907
|
+
}, {
|
|
1908
|
+
bigqueryOptions: {
|
|
1909
|
+
usePartitionedTables: true,
|
|
1910
|
+
usesTimestampColumnPartitioning: true,
|
|
1911
|
+
},
|
|
1912
|
+
createTime: "Test string",
|
|
1913
|
+
description: "Test string",
|
|
1914
|
+
destination: "Test string",
|
|
1915
|
+
disabled: true,
|
|
1916
|
+
exclusions: [
|
|
1917
|
+
{
|
|
1918
|
+
createTime: "Test string",
|
|
1919
|
+
description: "Test string",
|
|
1920
|
+
disabled: true,
|
|
1921
|
+
filter: "Test string",
|
|
1922
|
+
name: "Test string",
|
|
1923
|
+
updateTime: "Test string",
|
|
1924
|
+
}
|
|
1925
|
+
],
|
|
1926
|
+
filter: "Test string",
|
|
1927
|
+
includeChildren: true,
|
|
1928
|
+
name: "Test string",
|
|
1929
|
+
outputVersionFormat: "Test string",
|
|
1930
|
+
updateTime: "Test string",
|
|
1931
|
+
writerIdentity: "Test string",
|
|
1932
|
+
});
|
|
1933
|
+
/**
|
|
1934
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
1935
|
+
* writer_identity; see the unique_writer_identity field.
|
|
1936
|
+
*/
|
|
1937
|
+
await gapi.client.logging.projects.sinks.update({
|
|
1938
|
+
sinkName: "Test string",
|
|
1939
|
+
uniqueWriterIdentity: true,
|
|
1940
|
+
updateMask: "Test string",
|
|
1941
|
+
}, {
|
|
1942
|
+
bigqueryOptions: {
|
|
1943
|
+
usePartitionedTables: true,
|
|
1944
|
+
usesTimestampColumnPartitioning: true,
|
|
1945
|
+
},
|
|
1946
|
+
createTime: "Test string",
|
|
1947
|
+
description: "Test string",
|
|
1948
|
+
destination: "Test string",
|
|
1949
|
+
disabled: true,
|
|
1950
|
+
exclusions: [
|
|
1951
|
+
{
|
|
1952
|
+
createTime: "Test string",
|
|
1953
|
+
description: "Test string",
|
|
1954
|
+
disabled: true,
|
|
1955
|
+
filter: "Test string",
|
|
1956
|
+
name: "Test string",
|
|
1957
|
+
updateTime: "Test string",
|
|
1958
|
+
}
|
|
1959
|
+
],
|
|
1960
|
+
filter: "Test string",
|
|
1961
|
+
includeChildren: true,
|
|
1962
|
+
name: "Test string",
|
|
1963
|
+
outputVersionFormat: "Test string",
|
|
1964
|
+
updateTime: "Test string",
|
|
1965
|
+
writerIdentity: "Test string",
|
|
1966
|
+
});
|
|
1967
|
+
/**
|
|
1968
|
+
* Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to
|
|
1969
|
+
* write to the destination. A sink can export log entries only from the resource owning the sink.
|
|
1970
|
+
*/
|
|
1971
|
+
await gapi.client.logging.sinks.create({
|
|
1972
|
+
parent: "Test string",
|
|
1973
|
+
uniqueWriterIdentity: true,
|
|
1974
|
+
}, {
|
|
1975
|
+
bigqueryOptions: {
|
|
1976
|
+
usePartitionedTables: true,
|
|
1977
|
+
usesTimestampColumnPartitioning: true,
|
|
1978
|
+
},
|
|
1979
|
+
createTime: "Test string",
|
|
1980
|
+
description: "Test string",
|
|
1981
|
+
destination: "Test string",
|
|
1982
|
+
disabled: true,
|
|
1983
|
+
exclusions: [
|
|
1984
|
+
{
|
|
1985
|
+
createTime: "Test string",
|
|
1986
|
+
description: "Test string",
|
|
1987
|
+
disabled: true,
|
|
1988
|
+
filter: "Test string",
|
|
1989
|
+
name: "Test string",
|
|
1990
|
+
updateTime: "Test string",
|
|
1991
|
+
}
|
|
1992
|
+
],
|
|
1993
|
+
filter: "Test string",
|
|
1994
|
+
includeChildren: true,
|
|
1995
|
+
name: "Test string",
|
|
1996
|
+
outputVersionFormat: "Test string",
|
|
1997
|
+
updateTime: "Test string",
|
|
1998
|
+
writerIdentity: "Test string",
|
|
1999
|
+
});
|
|
2000
|
+
/** Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. */
|
|
2001
|
+
await gapi.client.logging.sinks.delete({
|
|
2002
|
+
sinkName: "Test string",
|
|
2003
|
+
});
|
|
2004
|
+
/** Gets a sink. */
|
|
2005
|
+
await gapi.client.logging.sinks.get({
|
|
2006
|
+
sinkName: "Test string",
|
|
2007
|
+
});
|
|
2008
|
+
/** Lists sinks. */
|
|
2009
|
+
await gapi.client.logging.sinks.list({
|
|
2010
|
+
pageSize: 42,
|
|
2011
|
+
pageToken: "Test string",
|
|
2012
|
+
parent: "Test string",
|
|
2013
|
+
});
|
|
2014
|
+
/**
|
|
2015
|
+
* Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new
|
|
2016
|
+
* writer_identity; see the unique_writer_identity field.
|
|
2017
|
+
*/
|
|
2018
|
+
await gapi.client.logging.sinks.update({
|
|
2019
|
+
sinkName: "Test string",
|
|
2020
|
+
uniqueWriterIdentity: true,
|
|
2021
|
+
updateMask: "Test string",
|
|
2022
|
+
}, {
|
|
2023
|
+
bigqueryOptions: {
|
|
2024
|
+
usePartitionedTables: true,
|
|
2025
|
+
usesTimestampColumnPartitioning: true,
|
|
2026
|
+
},
|
|
2027
|
+
createTime: "Test string",
|
|
2028
|
+
description: "Test string",
|
|
2029
|
+
destination: "Test string",
|
|
2030
|
+
disabled: true,
|
|
2031
|
+
exclusions: [
|
|
2032
|
+
{
|
|
2033
|
+
createTime: "Test string",
|
|
2034
|
+
description: "Test string",
|
|
2035
|
+
disabled: true,
|
|
2036
|
+
filter: "Test string",
|
|
2037
|
+
name: "Test string",
|
|
2038
|
+
updateTime: "Test string",
|
|
2039
|
+
}
|
|
2040
|
+
],
|
|
2041
|
+
filter: "Test string",
|
|
2042
|
+
includeChildren: true,
|
|
2043
|
+
name: "Test string",
|
|
2044
|
+
outputVersionFormat: "Test string",
|
|
2045
|
+
updateTime: "Test string",
|
|
2046
|
+
writerIdentity: "Test string",
|
|
2047
|
+
});
|
|
2048
|
+
/**
|
|
2049
|
+
* Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once
|
|
2050
|
+
* configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
2051
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
2052
|
+
*/
|
|
2053
|
+
await gapi.client.logging.v2.getCmekSettings({
|
|
2054
|
+
name: "Test string",
|
|
2055
|
+
});
|
|
2056
|
+
/**
|
|
2057
|
+
* Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can
|
|
2058
|
+
* only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router
|
|
2059
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
2060
|
+
*/
|
|
2061
|
+
await gapi.client.logging.v2.getSettings({
|
|
2062
|
+
name: "Test string",
|
|
2063
|
+
});
|
|
2064
|
+
/**
|
|
2065
|
+
* Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to
|
|
2066
|
+
* all projects and folders in the Google Cloud organization.UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required
|
|
2067
|
+
* roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.See Enabling CMEK for Log Router
|
|
2068
|
+
* (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
2069
|
+
*/
|
|
2070
|
+
await gapi.client.logging.v2.updateCmekSettings({
|
|
2071
|
+
name: "Test string",
|
|
2072
|
+
updateMask: "Test string",
|
|
2073
|
+
}, {
|
|
2074
|
+
kmsKeyName: "Test string",
|
|
2075
|
+
kmsKeyVersionName: "Test string",
|
|
2076
|
+
name: "Test string",
|
|
2077
|
+
serviceAccountId: "Test string",
|
|
2078
|
+
});
|
|
2079
|
+
/**
|
|
2080
|
+
* Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to
|
|
2081
|
+
* all projects and folders in the Google Cloud organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required
|
|
2082
|
+
* roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate
|
|
2083
|
+
* OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
|
|
2084
|
+
*/
|
|
2085
|
+
await gapi.client.logging.v2.updateSettings({
|
|
2086
|
+
name: "Test string",
|
|
2087
|
+
updateMask: "Test string",
|
|
2088
|
+
}, {
|
|
2089
|
+
disableDefaultSink: true,
|
|
2090
|
+
kmsKeyName: "Test string",
|
|
2091
|
+
kmsServiceAccountId: "Test string",
|
|
2092
|
+
name: "Test string",
|
|
2093
|
+
storageLocation: "Test string",
|
|
2094
|
+
});
|
|
2095
|
+
}
|
|
2096
|
+
});
|