@googleapis/servicecontrol 1.0.0 → 1.1.1
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/CHANGELOG.md +32 -0
- package/README.md +13 -23
- package/build/index.js +5 -4
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +278 -192
- package/build/v1.js +7 -7
- package/build/v1.js.map +1 -1
- package/build/v2.d.ts +284 -122
- package/build/v2.js +5 -5
- package/build/v2.js.map +1 -1
- package/index.ts +1 -1
- package/package.json +7 -7
- package/v1.ts +264 -191
- package/v2.ts +270 -123
package/v1.ts
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
15
|
-
/* eslint-disable @typescript-eslint/class-name-casing */
|
|
16
15
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
17
16
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
18
17
|
/* eslint-disable @typescript-eslint/no-namespace */
|
|
@@ -223,6 +222,10 @@ export namespace servicecontrol_v1 {
|
|
|
223
222
|
* The number of items returned from a List or Query API method, if applicable.
|
|
224
223
|
*/
|
|
225
224
|
numResponseItems?: string | null;
|
|
225
|
+
/**
|
|
226
|
+
* Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.
|
|
227
|
+
*/
|
|
228
|
+
policyViolationInfo?: Schema$PolicyViolationInfo;
|
|
226
229
|
/**
|
|
227
230
|
* The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.
|
|
228
231
|
*/
|
|
@@ -309,6 +312,10 @@ export namespace servicecontrol_v1 {
|
|
|
309
312
|
* The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: "//iam.googleapis.com/projects/{PROJECT_ID\}/serviceAccounts/{ACCOUNT\}/keys/{key\}"
|
|
310
313
|
*/
|
|
311
314
|
serviceAccountKeyName?: string | null;
|
|
315
|
+
/**
|
|
316
|
+
* Records the history of delegated resource access across Google services.
|
|
317
|
+
*/
|
|
318
|
+
serviceDelegationHistory?: Schema$ServiceDelegationHistory;
|
|
312
319
|
/**
|
|
313
320
|
* The third party identification (if any) of the authenticated user making the request. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.
|
|
314
321
|
*/
|
|
@@ -437,7 +444,7 @@ export namespace servicecontrol_v1 {
|
|
|
437
444
|
type?: string | null;
|
|
438
445
|
}
|
|
439
446
|
/**
|
|
440
|
-
* Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:
|
|
447
|
+
* Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information: * the arithmetic mean of the samples * the minimum and maximum of the samples * the sum-squared-deviation of the samples, used to compute variance * a histogram of the values of the sample points
|
|
441
448
|
*/
|
|
442
449
|
export interface Schema$Distribution {
|
|
443
450
|
/**
|
|
@@ -793,10 +800,6 @@ export namespace servicecontrol_v1 {
|
|
|
793
800
|
* End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.
|
|
794
801
|
*/
|
|
795
802
|
endTime?: string | null;
|
|
796
|
-
/**
|
|
797
|
-
* Unimplemented.
|
|
798
|
-
*/
|
|
799
|
-
extensions?: Array<{[key: string]: any}> | null;
|
|
800
803
|
/**
|
|
801
804
|
* DO NOT USE. This is an experimental field.
|
|
802
805
|
*/
|
|
@@ -842,6 +845,27 @@ export namespace servicecontrol_v1 {
|
|
|
842
845
|
*/
|
|
843
846
|
userLabels?: {[key: string]: string} | null;
|
|
844
847
|
}
|
|
848
|
+
/**
|
|
849
|
+
* Represents OrgPolicy Violation information.
|
|
850
|
+
*/
|
|
851
|
+
export interface Schema$OrgPolicyViolationInfo {
|
|
852
|
+
/**
|
|
853
|
+
* Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.
|
|
854
|
+
*/
|
|
855
|
+
payload?: {[key: string]: any} | null;
|
|
856
|
+
/**
|
|
857
|
+
* Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.
|
|
858
|
+
*/
|
|
859
|
+
resourceTags?: {[key: string]: string} | null;
|
|
860
|
+
/**
|
|
861
|
+
* Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket
|
|
862
|
+
*/
|
|
863
|
+
resourceType?: string | null;
|
|
864
|
+
/**
|
|
865
|
+
* Optional. Policy violations
|
|
866
|
+
*/
|
|
867
|
+
violationInfo?: Schema$ViolationInfo[];
|
|
868
|
+
}
|
|
845
869
|
/**
|
|
846
870
|
* This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.
|
|
847
871
|
*/
|
|
@@ -859,7 +883,7 @@ export namespace servicecontrol_v1 {
|
|
|
859
883
|
*/
|
|
860
884
|
port?: string | null;
|
|
861
885
|
/**
|
|
862
|
-
* The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the
|
|
886
|
+
* The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
|
|
863
887
|
*/
|
|
864
888
|
principal?: string | null;
|
|
865
889
|
/**
|
|
@@ -867,6 +891,15 @@ export namespace servicecontrol_v1 {
|
|
|
867
891
|
*/
|
|
868
892
|
regionCode?: string | null;
|
|
869
893
|
}
|
|
894
|
+
/**
|
|
895
|
+
* Information related to policy violations for this request.
|
|
896
|
+
*/
|
|
897
|
+
export interface Schema$PolicyViolationInfo {
|
|
898
|
+
/**
|
|
899
|
+
* Indicates the orgpolicy violations for this resource.
|
|
900
|
+
*/
|
|
901
|
+
orgPolicyViolationInfo?: Schema$OrgPolicyViolationInfo;
|
|
902
|
+
}
|
|
870
903
|
/**
|
|
871
904
|
* Represents error information for QuotaOperation.
|
|
872
905
|
*/
|
|
@@ -922,7 +955,7 @@ export namespace servicecontrol_v1 {
|
|
|
922
955
|
*/
|
|
923
956
|
methodName?: string | null;
|
|
924
957
|
/**
|
|
925
|
-
* Identity of the operation.
|
|
958
|
+
* Identity of the operation. For Allocation Quota, this is expected to be unique within the scope of the service that generated the operation, and guarantees idempotency in case of retries. In order to ensure best performance and latency in the Quota backends, operation_ids are optimally associated with time, so that related operations can be accessed fast in storage. For this reason, the recommended token for services that intend to operate at a high QPS is Unix time in nanos + UUID
|
|
926
959
|
*/
|
|
927
960
|
operationId?: string | null;
|
|
928
961
|
/**
|
|
@@ -1011,7 +1044,7 @@ export namespace servicecontrol_v1 {
|
|
|
1011
1044
|
*/
|
|
1012
1045
|
method?: string | null;
|
|
1013
1046
|
/**
|
|
1014
|
-
* The HTTP URL path.
|
|
1047
|
+
* The HTTP URL path, excluding the query parameters.
|
|
1015
1048
|
*/
|
|
1016
1049
|
path?: string | null;
|
|
1017
1050
|
/**
|
|
@@ -1044,7 +1077,7 @@ export namespace servicecontrol_v1 {
|
|
|
1044
1077
|
*/
|
|
1045
1078
|
export interface Schema$RequestMetadata {
|
|
1046
1079
|
/**
|
|
1047
|
-
* The IP address of the caller. For caller from internet, this will be public IPv4 or IPv6 address. For caller from a Compute Engine VM with external IP address,
|
|
1080
|
+
* The IP address of the caller. For a caller from the internet, this will be the public IPv4 or IPv6 address. For calls made from inside Google's internal production network from one GCP service to another, `caller_ip` will be redacted to "private". For a caller from a Compute Engine VM with a external IP address, `caller_ip` will be the VM's external IP address. For a caller from a Compute Engine VM without a external IP address, if the VM is in the same organization (or project) as the accessed resource, `caller_ip` will be the VM's internal IPv4 address, otherwise `caller_ip` will be redacted to "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more information.
|
|
1048
1081
|
*/
|
|
1049
1082
|
callerIp?: string | null;
|
|
1050
1083
|
/**
|
|
@@ -1052,7 +1085,7 @@ export namespace servicecontrol_v1 {
|
|
|
1052
1085
|
*/
|
|
1053
1086
|
callerNetwork?: string | null;
|
|
1054
1087
|
/**
|
|
1055
|
-
* The user agent of the caller. This information is not authenticated and should be treated accordingly. For example: + `google-api-python-client/1.4.0`: The request was made by the Google API client for Python. + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI (gcloud). + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`: The request was made from the `my-project` App Engine app.
|
|
1088
|
+
* The user agent of the caller. This information is not authenticated and should be treated accordingly. For example: + `google-api-python-client/1.4.0`: The request was made by the Google API client for Python. + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI (gcloud). + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`: The request was made from the `my-project` App Engine app.
|
|
1056
1089
|
*/
|
|
1057
1090
|
callerSuppliedUserAgent?: string | null;
|
|
1058
1091
|
/**
|
|
@@ -1069,7 +1102,7 @@ export namespace servicecontrol_v1 {
|
|
|
1069
1102
|
*/
|
|
1070
1103
|
export interface Schema$Resource {
|
|
1071
1104
|
/**
|
|
1072
|
-
* Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/
|
|
1105
|
+
* Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
|
1073
1106
|
*/
|
|
1074
1107
|
annotations?: {[key: string]: string} | null;
|
|
1075
1108
|
/**
|
|
@@ -1105,7 +1138,7 @@ export namespace servicecontrol_v1 {
|
|
|
1105
1138
|
*/
|
|
1106
1139
|
service?: string | null;
|
|
1107
1140
|
/**
|
|
1108
|
-
* The type of the resource. The syntax is platform-specific because different platforms define their resources differently. For Google APIs, the type format must be "{service\}/{kind\}".
|
|
1141
|
+
* The type of the resource. The syntax is platform-specific because different platforms define their resources differently. For Google APIs, the type format must be "{service\}/{kind\}", such as "pubsub.googleapis.com/Topic".
|
|
1109
1142
|
*/
|
|
1110
1143
|
type?: string | null;
|
|
1111
1144
|
/**
|
|
@@ -1121,6 +1154,10 @@ export namespace servicecontrol_v1 {
|
|
|
1121
1154
|
* Describes a resource associated with this operation.
|
|
1122
1155
|
*/
|
|
1123
1156
|
export interface Schema$ResourceInfo {
|
|
1157
|
+
/**
|
|
1158
|
+
* The resource permission required for this request.
|
|
1159
|
+
*/
|
|
1160
|
+
permission?: string | null;
|
|
1124
1161
|
/**
|
|
1125
1162
|
* The identifier of the parent of this resource instance. Must be in one of the following formats: - `projects/` - `folders/` - `organizations/`
|
|
1126
1163
|
*/
|
|
@@ -1156,7 +1193,7 @@ export namespace servicecontrol_v1 {
|
|
|
1156
1193
|
*/
|
|
1157
1194
|
firstPartyPrincipal?: Schema$FirstPartyPrincipal;
|
|
1158
1195
|
/**
|
|
1159
|
-
* A string representing the principal_subject associated with the identity.
|
|
1196
|
+
* A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name\}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name\}[{subject\}]`
|
|
1160
1197
|
*/
|
|
1161
1198
|
principalSubject?: string | null;
|
|
1162
1199
|
/**
|
|
@@ -1165,7 +1202,37 @@ export namespace servicecontrol_v1 {
|
|
|
1165
1202
|
thirdPartyPrincipal?: Schema$ThirdPartyPrincipal;
|
|
1166
1203
|
}
|
|
1167
1204
|
/**
|
|
1168
|
-
* The
|
|
1205
|
+
* The history of delegation across multiple services as the result of the original user's action. Such as "service A uses its own account to do something for user B". This differs from ServiceAccountDelegationInfo, which only tracks the history of direct token exchanges (impersonation).
|
|
1206
|
+
*/
|
|
1207
|
+
export interface Schema$ServiceDelegationHistory {
|
|
1208
|
+
/**
|
|
1209
|
+
* The original end user who initiated the request to GCP.
|
|
1210
|
+
*/
|
|
1211
|
+
originalPrincipal?: string | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* Data identifying the service specific jobs or units of work that were involved in a chain of service calls.
|
|
1214
|
+
*/
|
|
1215
|
+
serviceMetadata?: Schema$ServiceMetadata[];
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.
|
|
1219
|
+
*/
|
|
1220
|
+
export interface Schema$ServiceMetadata {
|
|
1221
|
+
/**
|
|
1222
|
+
* Additional metadata provided by service teams to describe service specific job information that was triggered by the original principal.
|
|
1223
|
+
*/
|
|
1224
|
+
jobMetadata?: {[key: string]: any} | null;
|
|
1225
|
+
/**
|
|
1226
|
+
* A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name\}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name\}[{subject\}]` If the identity is a Google account (e.g. workspace user account or service account), this will be the email of the prefixed by `serviceAccount:`. For example: `serviceAccount:my-service-account@project-1.iam.gserviceaccount.com`. If the identity is an individual user, the identity will be formatted as: `user:user_ABC@email.com`.
|
|
1227
|
+
*/
|
|
1228
|
+
principalSubject?: string | null;
|
|
1229
|
+
/**
|
|
1230
|
+
* The service's fully qualified domain name, e.g. "dataproc.googleapis.com".
|
|
1231
|
+
*/
|
|
1232
|
+
serviceDomain?: string | null;
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* The context of a span. This is attached to an Exemplar in Distribution values during aggregation. It contains the name of a span with format: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
|
|
1169
1236
|
*/
|
|
1170
1237
|
export interface Schema$SpanContext {
|
|
1171
1238
|
/**
|
|
@@ -1261,6 +1328,187 @@ export namespace servicecontrol_v1 {
|
|
|
1261
1328
|
*/
|
|
1262
1329
|
value?: string | null;
|
|
1263
1330
|
}
|
|
1331
|
+
/**
|
|
1332
|
+
* A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.
|
|
1333
|
+
*/
|
|
1334
|
+
export interface Schema$V1HttpRequest {
|
|
1335
|
+
/**
|
|
1336
|
+
* The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
|
|
1337
|
+
*/
|
|
1338
|
+
cacheFillBytes?: string | null;
|
|
1339
|
+
/**
|
|
1340
|
+
* Whether or not an entity was served from cache (with or without validation).
|
|
1341
|
+
*/
|
|
1342
|
+
cacheHit?: boolean | null;
|
|
1343
|
+
/**
|
|
1344
|
+
* Whether or not a cache lookup was attempted.
|
|
1345
|
+
*/
|
|
1346
|
+
cacheLookup?: boolean | null;
|
|
1347
|
+
/**
|
|
1348
|
+
* Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.
|
|
1349
|
+
*/
|
|
1350
|
+
cacheValidatedWithOriginServer?: boolean | null;
|
|
1351
|
+
/**
|
|
1352
|
+
* The request processing latency on the server, from the time the request was received until the response was sent.
|
|
1353
|
+
*/
|
|
1354
|
+
latency?: string | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
|
|
1357
|
+
*/
|
|
1358
|
+
protocol?: string | null;
|
|
1359
|
+
/**
|
|
1360
|
+
* The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
|
|
1361
|
+
*/
|
|
1362
|
+
referer?: string | null;
|
|
1363
|
+
/**
|
|
1364
|
+
* The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
|
|
1365
|
+
*/
|
|
1366
|
+
remoteIp?: string | null;
|
|
1367
|
+
/**
|
|
1368
|
+
* The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
|
|
1369
|
+
*/
|
|
1370
|
+
requestMethod?: string | null;
|
|
1371
|
+
/**
|
|
1372
|
+
* The size of the HTTP request message in bytes, including the request headers and the request body.
|
|
1373
|
+
*/
|
|
1374
|
+
requestSize?: string | null;
|
|
1375
|
+
/**
|
|
1376
|
+
* The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
|
|
1377
|
+
*/
|
|
1378
|
+
requestUrl?: string | null;
|
|
1379
|
+
/**
|
|
1380
|
+
* The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
|
|
1381
|
+
*/
|
|
1382
|
+
responseSize?: string | null;
|
|
1383
|
+
/**
|
|
1384
|
+
* The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
|
|
1385
|
+
*/
|
|
1386
|
+
serverIp?: string | null;
|
|
1387
|
+
/**
|
|
1388
|
+
* The response code indicating the status of the response. Examples: 200, 404.
|
|
1389
|
+
*/
|
|
1390
|
+
status?: number | null;
|
|
1391
|
+
/**
|
|
1392
|
+
* The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
|
|
1393
|
+
*/
|
|
1394
|
+
userAgent?: string | null;
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* An individual log entry.
|
|
1398
|
+
*/
|
|
1399
|
+
export interface Schema$V1LogEntry {
|
|
1400
|
+
/**
|
|
1401
|
+
* Optional. Information about the HTTP request associated with this log entry, if applicable.
|
|
1402
|
+
*/
|
|
1403
|
+
httpRequest?: Schema$V1HttpRequest;
|
|
1404
|
+
/**
|
|
1405
|
+
* A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.
|
|
1406
|
+
*/
|
|
1407
|
+
insertId?: string | null;
|
|
1408
|
+
/**
|
|
1409
|
+
* A set of user-defined (key, value) data that provides additional information about the log entry.
|
|
1410
|
+
*/
|
|
1411
|
+
labels?: {[key: string]: string} | null;
|
|
1412
|
+
/**
|
|
1413
|
+
* A set of user-defined (key, value) data that provides additional information about the moniotored resource that the log entry belongs to.
|
|
1414
|
+
*/
|
|
1415
|
+
monitoredResourceLabels?: {[key: string]: string} | null;
|
|
1416
|
+
/**
|
|
1417
|
+
* Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`.
|
|
1418
|
+
*/
|
|
1419
|
+
name?: string | null;
|
|
1420
|
+
/**
|
|
1421
|
+
* Optional. Information about an operation associated with the log entry, if applicable.
|
|
1422
|
+
*/
|
|
1423
|
+
operation?: Schema$V1LogEntryOperation;
|
|
1424
|
+
/**
|
|
1425
|
+
* The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.
|
|
1426
|
+
*/
|
|
1427
|
+
protoPayload?: {[key: string]: any} | null;
|
|
1428
|
+
/**
|
|
1429
|
+
* The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
|
|
1430
|
+
*/
|
|
1431
|
+
severity?: string | null;
|
|
1432
|
+
/**
|
|
1433
|
+
* Optional. Source code location information associated with the log entry, if any.
|
|
1434
|
+
*/
|
|
1435
|
+
sourceLocation?: Schema$V1LogEntrySourceLocation;
|
|
1436
|
+
/**
|
|
1437
|
+
* The log entry payload, represented as a structure that is expressed as a JSON object.
|
|
1438
|
+
*/
|
|
1439
|
+
structPayload?: {[key: string]: any} | null;
|
|
1440
|
+
/**
|
|
1441
|
+
* The log entry payload, represented as a Unicode string (UTF-8).
|
|
1442
|
+
*/
|
|
1443
|
+
textPayload?: string | null;
|
|
1444
|
+
/**
|
|
1445
|
+
* The time the event described by the log entry occurred. If omitted, defaults to operation start time.
|
|
1446
|
+
*/
|
|
1447
|
+
timestamp?: string | null;
|
|
1448
|
+
/**
|
|
1449
|
+
* Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
|
|
1450
|
+
*/
|
|
1451
|
+
trace?: string | null;
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Additional information about a potentially long-running operation with which a log entry is associated.
|
|
1455
|
+
*/
|
|
1456
|
+
export interface Schema$V1LogEntryOperation {
|
|
1457
|
+
/**
|
|
1458
|
+
* Optional. Set this to True if this is the first log entry in the operation.
|
|
1459
|
+
*/
|
|
1460
|
+
first?: boolean | null;
|
|
1461
|
+
/**
|
|
1462
|
+
* Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.
|
|
1463
|
+
*/
|
|
1464
|
+
id?: string | null;
|
|
1465
|
+
/**
|
|
1466
|
+
* Optional. Set this to True if this is the last log entry in the operation.
|
|
1467
|
+
*/
|
|
1468
|
+
last?: boolean | null;
|
|
1469
|
+
/**
|
|
1470
|
+
* Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
|
|
1471
|
+
*/
|
|
1472
|
+
producer?: string | null;
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* Additional information about the source code location that produced the log entry.
|
|
1476
|
+
*/
|
|
1477
|
+
export interface Schema$V1LogEntrySourceLocation {
|
|
1478
|
+
/**
|
|
1479
|
+
* Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.
|
|
1480
|
+
*/
|
|
1481
|
+
file?: string | null;
|
|
1482
|
+
/**
|
|
1483
|
+
* Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` (Python).
|
|
1484
|
+
*/
|
|
1485
|
+
function?: string | null;
|
|
1486
|
+
/**
|
|
1487
|
+
* Optional. Line within the source file. 1-based; 0 indicates no line number available.
|
|
1488
|
+
*/
|
|
1489
|
+
line?: string | null;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Provides information about the Policy violation info for this request.
|
|
1493
|
+
*/
|
|
1494
|
+
export interface Schema$ViolationInfo {
|
|
1495
|
+
/**
|
|
1496
|
+
* Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types
|
|
1497
|
+
*/
|
|
1498
|
+
checkedValue?: string | null;
|
|
1499
|
+
/**
|
|
1500
|
+
* Optional. Constraint name
|
|
1501
|
+
*/
|
|
1502
|
+
constraint?: string | null;
|
|
1503
|
+
/**
|
|
1504
|
+
* Optional. Error message that policy is indicating.
|
|
1505
|
+
*/
|
|
1506
|
+
errorMessage?: string | null;
|
|
1507
|
+
/**
|
|
1508
|
+
* Optional. Indicates the type of the policy.
|
|
1509
|
+
*/
|
|
1510
|
+
policyType?: string | null;
|
|
1511
|
+
}
|
|
1264
1512
|
|
|
1265
1513
|
export class Resource$Services {
|
|
1266
1514
|
context: APIRequestContext;
|
|
@@ -1270,64 +1518,6 @@ export namespace servicecontrol_v1 {
|
|
|
1270
1518
|
|
|
1271
1519
|
/**
|
|
1272
1520
|
* Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
|
|
1273
|
-
* @example
|
|
1274
|
-
* ```js
|
|
1275
|
-
* // Before running the sample:
|
|
1276
|
-
* // - Enable the API at:
|
|
1277
|
-
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1278
|
-
* // - Login into gcloud by running:
|
|
1279
|
-
* // `$ gcloud auth application-default login`
|
|
1280
|
-
* // - Install the npm module by running:
|
|
1281
|
-
* // `$ npm install googleapis`
|
|
1282
|
-
*
|
|
1283
|
-
* const {google} = require('googleapis');
|
|
1284
|
-
* const servicecontrol = google.servicecontrol('v1');
|
|
1285
|
-
*
|
|
1286
|
-
* async function main() {
|
|
1287
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1288
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1289
|
-
* scopes: [
|
|
1290
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1291
|
-
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1292
|
-
* ],
|
|
1293
|
-
* });
|
|
1294
|
-
*
|
|
1295
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1296
|
-
* const authClient = await auth.getClient();
|
|
1297
|
-
* google.options({auth: authClient});
|
|
1298
|
-
*
|
|
1299
|
-
* // Do the magic
|
|
1300
|
-
* const res = await servicecontrol.services.allocateQuota({
|
|
1301
|
-
* // Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
|
|
1302
|
-
* serviceName: 'placeholder-value',
|
|
1303
|
-
*
|
|
1304
|
-
* // Request body metadata
|
|
1305
|
-
* requestBody: {
|
|
1306
|
-
* // request body parameters
|
|
1307
|
-
* // {
|
|
1308
|
-
* // "allocateOperation": {},
|
|
1309
|
-
* // "serviceConfigId": "my_serviceConfigId"
|
|
1310
|
-
* // }
|
|
1311
|
-
* },
|
|
1312
|
-
* });
|
|
1313
|
-
* console.log(res.data);
|
|
1314
|
-
*
|
|
1315
|
-
* // Example response
|
|
1316
|
-
* // {
|
|
1317
|
-
* // "allocateErrors": [],
|
|
1318
|
-
* // "allocateInfo": {},
|
|
1319
|
-
* // "operationId": "my_operationId",
|
|
1320
|
-
* // "quotaMetrics": [],
|
|
1321
|
-
* // "serviceConfigId": "my_serviceConfigId"
|
|
1322
|
-
* // }
|
|
1323
|
-
* }
|
|
1324
|
-
*
|
|
1325
|
-
* main().catch(e => {
|
|
1326
|
-
* console.error(e);
|
|
1327
|
-
* throw e;
|
|
1328
|
-
* });
|
|
1329
|
-
*
|
|
1330
|
-
* ```
|
|
1331
1521
|
*
|
|
1332
1522
|
* @param params - Parameters for request
|
|
1333
1523
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1422,68 +1612,7 @@ export namespace servicecontrol_v1 {
|
|
|
1422
1612
|
}
|
|
1423
1613
|
|
|
1424
1614
|
/**
|
|
1425
|
-
* Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit of
|
|
1426
|
-
* @example
|
|
1427
|
-
* ```js
|
|
1428
|
-
* // Before running the sample:
|
|
1429
|
-
* // - Enable the API at:
|
|
1430
|
-
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1431
|
-
* // - Login into gcloud by running:
|
|
1432
|
-
* // `$ gcloud auth application-default login`
|
|
1433
|
-
* // - Install the npm module by running:
|
|
1434
|
-
* // `$ npm install googleapis`
|
|
1435
|
-
*
|
|
1436
|
-
* const {google} = require('googleapis');
|
|
1437
|
-
* const servicecontrol = google.servicecontrol('v1');
|
|
1438
|
-
*
|
|
1439
|
-
* async function main() {
|
|
1440
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1441
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1442
|
-
* scopes: [
|
|
1443
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1444
|
-
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1445
|
-
* ],
|
|
1446
|
-
* });
|
|
1447
|
-
*
|
|
1448
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1449
|
-
* const authClient = await auth.getClient();
|
|
1450
|
-
* google.options({auth: authClient});
|
|
1451
|
-
*
|
|
1452
|
-
* // Do the magic
|
|
1453
|
-
* const res = await servicecontrol.services.check({
|
|
1454
|
-
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1455
|
-
* serviceName: 'placeholder-value',
|
|
1456
|
-
*
|
|
1457
|
-
* // Request body metadata
|
|
1458
|
-
* requestBody: {
|
|
1459
|
-
* // request body parameters
|
|
1460
|
-
* // {
|
|
1461
|
-
* // "operation": {},
|
|
1462
|
-
* // "requestProjectSettings": false,
|
|
1463
|
-
* // "serviceConfigId": "my_serviceConfigId",
|
|
1464
|
-
* // "skipActivationCheck": false
|
|
1465
|
-
* // }
|
|
1466
|
-
* },
|
|
1467
|
-
* });
|
|
1468
|
-
* console.log(res.data);
|
|
1469
|
-
*
|
|
1470
|
-
* // Example response
|
|
1471
|
-
* // {
|
|
1472
|
-
* // "checkErrors": [],
|
|
1473
|
-
* // "checkInfo": {},
|
|
1474
|
-
* // "operationId": "my_operationId",
|
|
1475
|
-
* // "quotaInfo": {},
|
|
1476
|
-
* // "serviceConfigId": "my_serviceConfigId",
|
|
1477
|
-
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1478
|
-
* // }
|
|
1479
|
-
* }
|
|
1480
|
-
*
|
|
1481
|
-
* main().catch(e => {
|
|
1482
|
-
* console.error(e);
|
|
1483
|
-
* throw e;
|
|
1484
|
-
* });
|
|
1485
|
-
*
|
|
1486
|
-
* ```
|
|
1615
|
+
* Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
|
|
1487
1616
|
*
|
|
1488
1617
|
* @param params - Parameters for request
|
|
1489
1618
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1571,62 +1700,6 @@ export namespace servicecontrol_v1 {
|
|
|
1571
1700
|
|
|
1572
1701
|
/**
|
|
1573
1702
|
* Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
|
|
1574
|
-
* @example
|
|
1575
|
-
* ```js
|
|
1576
|
-
* // Before running the sample:
|
|
1577
|
-
* // - Enable the API at:
|
|
1578
|
-
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1579
|
-
* // - Login into gcloud by running:
|
|
1580
|
-
* // `$ gcloud auth application-default login`
|
|
1581
|
-
* // - Install the npm module by running:
|
|
1582
|
-
* // `$ npm install googleapis`
|
|
1583
|
-
*
|
|
1584
|
-
* const {google} = require('googleapis');
|
|
1585
|
-
* const servicecontrol = google.servicecontrol('v1');
|
|
1586
|
-
*
|
|
1587
|
-
* async function main() {
|
|
1588
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1589
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1590
|
-
* scopes: [
|
|
1591
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1592
|
-
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1593
|
-
* ],
|
|
1594
|
-
* });
|
|
1595
|
-
*
|
|
1596
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1597
|
-
* const authClient = await auth.getClient();
|
|
1598
|
-
* google.options({auth: authClient});
|
|
1599
|
-
*
|
|
1600
|
-
* // Do the magic
|
|
1601
|
-
* const res = await servicecontrol.services.report({
|
|
1602
|
-
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1603
|
-
* serviceName: 'placeholder-value',
|
|
1604
|
-
*
|
|
1605
|
-
* // Request body metadata
|
|
1606
|
-
* requestBody: {
|
|
1607
|
-
* // request body parameters
|
|
1608
|
-
* // {
|
|
1609
|
-
* // "operations": [],
|
|
1610
|
-
* // "serviceConfigId": "my_serviceConfigId"
|
|
1611
|
-
* // }
|
|
1612
|
-
* },
|
|
1613
|
-
* });
|
|
1614
|
-
* console.log(res.data);
|
|
1615
|
-
*
|
|
1616
|
-
* // Example response
|
|
1617
|
-
* // {
|
|
1618
|
-
* // "reportErrors": [],
|
|
1619
|
-
* // "serviceConfigId": "my_serviceConfigId",
|
|
1620
|
-
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1621
|
-
* // }
|
|
1622
|
-
* }
|
|
1623
|
-
*
|
|
1624
|
-
* main().catch(e => {
|
|
1625
|
-
* console.error(e);
|
|
1626
|
-
* throw e;
|
|
1627
|
-
* });
|
|
1628
|
-
*
|
|
1629
|
-
* ```
|
|
1630
1703
|
*
|
|
1631
1704
|
* @param params - Parameters for request
|
|
1632
1705
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|