@googleapis/servicecontrol 1.0.0 → 1.1.0
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 +24 -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/build/v1.d.ts
CHANGED
|
@@ -173,6 +173,10 @@ export declare namespace servicecontrol_v1 {
|
|
|
173
173
|
* The number of items returned from a List or Query API method, if applicable.
|
|
174
174
|
*/
|
|
175
175
|
numResponseItems?: string | null;
|
|
176
|
+
/**
|
|
177
|
+
* Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.
|
|
178
|
+
*/
|
|
179
|
+
policyViolationInfo?: Schema$PolicyViolationInfo;
|
|
176
180
|
/**
|
|
177
181
|
* 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.
|
|
178
182
|
*/
|
|
@@ -269,6 +273,10 @@ export declare namespace servicecontrol_v1 {
|
|
|
269
273
|
* 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\}"
|
|
270
274
|
*/
|
|
271
275
|
serviceAccountKeyName?: string | null;
|
|
276
|
+
/**
|
|
277
|
+
* Records the history of delegated resource access across Google services.
|
|
278
|
+
*/
|
|
279
|
+
serviceDelegationHistory?: Schema$ServiceDelegationHistory;
|
|
272
280
|
/**
|
|
273
281
|
* 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.
|
|
274
282
|
*/
|
|
@@ -399,7 +407,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
399
407
|
type?: string | null;
|
|
400
408
|
}
|
|
401
409
|
/**
|
|
402
|
-
* Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:
|
|
410
|
+
* 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
|
|
403
411
|
*/
|
|
404
412
|
export interface Schema$Distribution {
|
|
405
413
|
/**
|
|
@@ -767,12 +775,6 @@ export declare namespace servicecontrol_v1 {
|
|
|
767
775
|
* End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.
|
|
768
776
|
*/
|
|
769
777
|
endTime?: string | null;
|
|
770
|
-
/**
|
|
771
|
-
* Unimplemented.
|
|
772
|
-
*/
|
|
773
|
-
extensions?: Array<{
|
|
774
|
-
[key: string]: any;
|
|
775
|
-
}> | null;
|
|
776
778
|
/**
|
|
777
779
|
* DO NOT USE. This is an experimental field.
|
|
778
780
|
*/
|
|
@@ -822,6 +824,31 @@ export declare namespace servicecontrol_v1 {
|
|
|
822
824
|
[key: string]: string;
|
|
823
825
|
} | null;
|
|
824
826
|
}
|
|
827
|
+
/**
|
|
828
|
+
* Represents OrgPolicy Violation information.
|
|
829
|
+
*/
|
|
830
|
+
export interface Schema$OrgPolicyViolationInfo {
|
|
831
|
+
/**
|
|
832
|
+
* 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.
|
|
833
|
+
*/
|
|
834
|
+
payload?: {
|
|
835
|
+
[key: string]: any;
|
|
836
|
+
} | null;
|
|
837
|
+
/**
|
|
838
|
+
* 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.
|
|
839
|
+
*/
|
|
840
|
+
resourceTags?: {
|
|
841
|
+
[key: string]: string;
|
|
842
|
+
} | null;
|
|
843
|
+
/**
|
|
844
|
+
* Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket
|
|
845
|
+
*/
|
|
846
|
+
resourceType?: string | null;
|
|
847
|
+
/**
|
|
848
|
+
* Optional. Policy violations
|
|
849
|
+
*/
|
|
850
|
+
violationInfo?: Schema$ViolationInfo[];
|
|
851
|
+
}
|
|
825
852
|
/**
|
|
826
853
|
* 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.
|
|
827
854
|
*/
|
|
@@ -841,7 +868,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
841
868
|
*/
|
|
842
869
|
port?: string | null;
|
|
843
870
|
/**
|
|
844
|
-
* The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the
|
|
871
|
+
* 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.
|
|
845
872
|
*/
|
|
846
873
|
principal?: string | null;
|
|
847
874
|
/**
|
|
@@ -849,6 +876,15 @@ export declare namespace servicecontrol_v1 {
|
|
|
849
876
|
*/
|
|
850
877
|
regionCode?: string | null;
|
|
851
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* Information related to policy violations for this request.
|
|
881
|
+
*/
|
|
882
|
+
export interface Schema$PolicyViolationInfo {
|
|
883
|
+
/**
|
|
884
|
+
* Indicates the orgpolicy violations for this resource.
|
|
885
|
+
*/
|
|
886
|
+
orgPolicyViolationInfo?: Schema$OrgPolicyViolationInfo;
|
|
887
|
+
}
|
|
852
888
|
/**
|
|
853
889
|
* Represents error information for QuotaOperation.
|
|
854
890
|
*/
|
|
@@ -908,7 +944,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
908
944
|
*/
|
|
909
945
|
methodName?: string | null;
|
|
910
946
|
/**
|
|
911
|
-
* Identity of the operation.
|
|
947
|
+
* 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
|
|
912
948
|
*/
|
|
913
949
|
operationId?: string | null;
|
|
914
950
|
/**
|
|
@@ -999,7 +1035,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
999
1035
|
*/
|
|
1000
1036
|
method?: string | null;
|
|
1001
1037
|
/**
|
|
1002
|
-
* The HTTP URL path.
|
|
1038
|
+
* The HTTP URL path, excluding the query parameters.
|
|
1003
1039
|
*/
|
|
1004
1040
|
path?: string | null;
|
|
1005
1041
|
/**
|
|
@@ -1032,7 +1068,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
1032
1068
|
*/
|
|
1033
1069
|
export interface Schema$RequestMetadata {
|
|
1034
1070
|
/**
|
|
1035
|
-
* 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,
|
|
1071
|
+
* 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.
|
|
1036
1072
|
*/
|
|
1037
1073
|
callerIp?: string | null;
|
|
1038
1074
|
/**
|
|
@@ -1040,7 +1076,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
1040
1076
|
*/
|
|
1041
1077
|
callerNetwork?: string | null;
|
|
1042
1078
|
/**
|
|
1043
|
-
* 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.
|
|
1079
|
+
* 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.
|
|
1044
1080
|
*/
|
|
1045
1081
|
callerSuppliedUserAgent?: string | null;
|
|
1046
1082
|
/**
|
|
@@ -1057,7 +1093,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
1057
1093
|
*/
|
|
1058
1094
|
export interface Schema$Resource {
|
|
1059
1095
|
/**
|
|
1060
|
-
* 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/
|
|
1096
|
+
* 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/
|
|
1061
1097
|
*/
|
|
1062
1098
|
annotations?: {
|
|
1063
1099
|
[key: string]: string;
|
|
@@ -1097,7 +1133,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
1097
1133
|
*/
|
|
1098
1134
|
service?: string | null;
|
|
1099
1135
|
/**
|
|
1100
|
-
* 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\}".
|
|
1136
|
+
* 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".
|
|
1101
1137
|
*/
|
|
1102
1138
|
type?: string | null;
|
|
1103
1139
|
/**
|
|
@@ -1113,6 +1149,10 @@ export declare namespace servicecontrol_v1 {
|
|
|
1113
1149
|
* Describes a resource associated with this operation.
|
|
1114
1150
|
*/
|
|
1115
1151
|
export interface Schema$ResourceInfo {
|
|
1152
|
+
/**
|
|
1153
|
+
* The resource permission required for this request.
|
|
1154
|
+
*/
|
|
1155
|
+
permission?: string | null;
|
|
1116
1156
|
/**
|
|
1117
1157
|
* The identifier of the parent of this resource instance. Must be in one of the following formats: - `projects/` - `folders/` - `organizations/`
|
|
1118
1158
|
*/
|
|
@@ -1148,7 +1188,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
1148
1188
|
*/
|
|
1149
1189
|
firstPartyPrincipal?: Schema$FirstPartyPrincipal;
|
|
1150
1190
|
/**
|
|
1151
|
-
* A string representing the principal_subject associated with the identity.
|
|
1191
|
+
* 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\}]`
|
|
1152
1192
|
*/
|
|
1153
1193
|
principalSubject?: string | null;
|
|
1154
1194
|
/**
|
|
@@ -1157,7 +1197,39 @@ export declare namespace servicecontrol_v1 {
|
|
|
1157
1197
|
thirdPartyPrincipal?: Schema$ThirdPartyPrincipal;
|
|
1158
1198
|
}
|
|
1159
1199
|
/**
|
|
1160
|
-
* The
|
|
1200
|
+
* 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).
|
|
1201
|
+
*/
|
|
1202
|
+
export interface Schema$ServiceDelegationHistory {
|
|
1203
|
+
/**
|
|
1204
|
+
* The original end user who initiated the request to GCP.
|
|
1205
|
+
*/
|
|
1206
|
+
originalPrincipal?: string | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* Data identifying the service specific jobs or units of work that were involved in a chain of service calls.
|
|
1209
|
+
*/
|
|
1210
|
+
serviceMetadata?: Schema$ServiceMetadata[];
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.
|
|
1214
|
+
*/
|
|
1215
|
+
export interface Schema$ServiceMetadata {
|
|
1216
|
+
/**
|
|
1217
|
+
* Additional metadata provided by service teams to describe service specific job information that was triggered by the original principal.
|
|
1218
|
+
*/
|
|
1219
|
+
jobMetadata?: {
|
|
1220
|
+
[key: string]: any;
|
|
1221
|
+
} | null;
|
|
1222
|
+
/**
|
|
1223
|
+
* 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`.
|
|
1224
|
+
*/
|
|
1225
|
+
principalSubject?: string | null;
|
|
1226
|
+
/**
|
|
1227
|
+
* The service's fully qualified domain name, e.g. "dataproc.googleapis.com".
|
|
1228
|
+
*/
|
|
1229
|
+
serviceDomain?: string | null;
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* 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]
|
|
1161
1233
|
*/
|
|
1162
1234
|
export interface Schema$SpanContext {
|
|
1163
1235
|
/**
|
|
@@ -1257,69 +1329,200 @@ export declare namespace servicecontrol_v1 {
|
|
|
1257
1329
|
*/
|
|
1258
1330
|
value?: string | null;
|
|
1259
1331
|
}
|
|
1332
|
+
/**
|
|
1333
|
+
* 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.
|
|
1334
|
+
*/
|
|
1335
|
+
export interface Schema$V1HttpRequest {
|
|
1336
|
+
/**
|
|
1337
|
+
* The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
|
|
1338
|
+
*/
|
|
1339
|
+
cacheFillBytes?: string | null;
|
|
1340
|
+
/**
|
|
1341
|
+
* Whether or not an entity was served from cache (with or without validation).
|
|
1342
|
+
*/
|
|
1343
|
+
cacheHit?: boolean | null;
|
|
1344
|
+
/**
|
|
1345
|
+
* Whether or not a cache lookup was attempted.
|
|
1346
|
+
*/
|
|
1347
|
+
cacheLookup?: boolean | null;
|
|
1348
|
+
/**
|
|
1349
|
+
* 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.
|
|
1350
|
+
*/
|
|
1351
|
+
cacheValidatedWithOriginServer?: boolean | null;
|
|
1352
|
+
/**
|
|
1353
|
+
* The request processing latency on the server, from the time the request was received until the response was sent.
|
|
1354
|
+
*/
|
|
1355
|
+
latency?: string | null;
|
|
1356
|
+
/**
|
|
1357
|
+
* Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
|
|
1358
|
+
*/
|
|
1359
|
+
protocol?: string | null;
|
|
1360
|
+
/**
|
|
1361
|
+
* The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
|
|
1362
|
+
*/
|
|
1363
|
+
referer?: string | null;
|
|
1364
|
+
/**
|
|
1365
|
+
* The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
|
|
1366
|
+
*/
|
|
1367
|
+
remoteIp?: string | null;
|
|
1368
|
+
/**
|
|
1369
|
+
* The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
|
|
1370
|
+
*/
|
|
1371
|
+
requestMethod?: string | null;
|
|
1372
|
+
/**
|
|
1373
|
+
* The size of the HTTP request message in bytes, including the request headers and the request body.
|
|
1374
|
+
*/
|
|
1375
|
+
requestSize?: string | null;
|
|
1376
|
+
/**
|
|
1377
|
+
* 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"`.
|
|
1378
|
+
*/
|
|
1379
|
+
requestUrl?: string | null;
|
|
1380
|
+
/**
|
|
1381
|
+
* The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
|
|
1382
|
+
*/
|
|
1383
|
+
responseSize?: string | null;
|
|
1384
|
+
/**
|
|
1385
|
+
* The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
|
|
1386
|
+
*/
|
|
1387
|
+
serverIp?: string | null;
|
|
1388
|
+
/**
|
|
1389
|
+
* The response code indicating the status of the response. Examples: 200, 404.
|
|
1390
|
+
*/
|
|
1391
|
+
status?: number | null;
|
|
1392
|
+
/**
|
|
1393
|
+
* The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
|
|
1394
|
+
*/
|
|
1395
|
+
userAgent?: string | null;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* An individual log entry.
|
|
1399
|
+
*/
|
|
1400
|
+
export interface Schema$V1LogEntry {
|
|
1401
|
+
/**
|
|
1402
|
+
* Optional. Information about the HTTP request associated with this log entry, if applicable.
|
|
1403
|
+
*/
|
|
1404
|
+
httpRequest?: Schema$V1HttpRequest;
|
|
1405
|
+
/**
|
|
1406
|
+
* A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.
|
|
1407
|
+
*/
|
|
1408
|
+
insertId?: string | null;
|
|
1409
|
+
/**
|
|
1410
|
+
* A set of user-defined (key, value) data that provides additional information about the log entry.
|
|
1411
|
+
*/
|
|
1412
|
+
labels?: {
|
|
1413
|
+
[key: string]: string;
|
|
1414
|
+
} | null;
|
|
1415
|
+
/**
|
|
1416
|
+
* A set of user-defined (key, value) data that provides additional information about the moniotored resource that the log entry belongs to.
|
|
1417
|
+
*/
|
|
1418
|
+
monitoredResourceLabels?: {
|
|
1419
|
+
[key: string]: string;
|
|
1420
|
+
} | null;
|
|
1421
|
+
/**
|
|
1422
|
+
* Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`.
|
|
1423
|
+
*/
|
|
1424
|
+
name?: string | null;
|
|
1425
|
+
/**
|
|
1426
|
+
* Optional. Information about an operation associated with the log entry, if applicable.
|
|
1427
|
+
*/
|
|
1428
|
+
operation?: Schema$V1LogEntryOperation;
|
|
1429
|
+
/**
|
|
1430
|
+
* The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.
|
|
1431
|
+
*/
|
|
1432
|
+
protoPayload?: {
|
|
1433
|
+
[key: string]: any;
|
|
1434
|
+
} | null;
|
|
1435
|
+
/**
|
|
1436
|
+
* The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
|
|
1437
|
+
*/
|
|
1438
|
+
severity?: string | null;
|
|
1439
|
+
/**
|
|
1440
|
+
* Optional. Source code location information associated with the log entry, if any.
|
|
1441
|
+
*/
|
|
1442
|
+
sourceLocation?: Schema$V1LogEntrySourceLocation;
|
|
1443
|
+
/**
|
|
1444
|
+
* The log entry payload, represented as a structure that is expressed as a JSON object.
|
|
1445
|
+
*/
|
|
1446
|
+
structPayload?: {
|
|
1447
|
+
[key: string]: any;
|
|
1448
|
+
} | null;
|
|
1449
|
+
/**
|
|
1450
|
+
* The log entry payload, represented as a Unicode string (UTF-8).
|
|
1451
|
+
*/
|
|
1452
|
+
textPayload?: string | null;
|
|
1453
|
+
/**
|
|
1454
|
+
* The time the event described by the log entry occurred. If omitted, defaults to operation start time.
|
|
1455
|
+
*/
|
|
1456
|
+
timestamp?: string | null;
|
|
1457
|
+
/**
|
|
1458
|
+
* 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`
|
|
1459
|
+
*/
|
|
1460
|
+
trace?: string | null;
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Additional information about a potentially long-running operation with which a log entry is associated.
|
|
1464
|
+
*/
|
|
1465
|
+
export interface Schema$V1LogEntryOperation {
|
|
1466
|
+
/**
|
|
1467
|
+
* Optional. Set this to True if this is the first log entry in the operation.
|
|
1468
|
+
*/
|
|
1469
|
+
first?: boolean | null;
|
|
1470
|
+
/**
|
|
1471
|
+
* Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.
|
|
1472
|
+
*/
|
|
1473
|
+
id?: string | null;
|
|
1474
|
+
/**
|
|
1475
|
+
* Optional. Set this to True if this is the last log entry in the operation.
|
|
1476
|
+
*/
|
|
1477
|
+
last?: boolean | null;
|
|
1478
|
+
/**
|
|
1479
|
+
* 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"`.
|
|
1480
|
+
*/
|
|
1481
|
+
producer?: string | null;
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* Additional information about the source code location that produced the log entry.
|
|
1485
|
+
*/
|
|
1486
|
+
export interface Schema$V1LogEntrySourceLocation {
|
|
1487
|
+
/**
|
|
1488
|
+
* Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.
|
|
1489
|
+
*/
|
|
1490
|
+
file?: string | null;
|
|
1491
|
+
/**
|
|
1492
|
+
* 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).
|
|
1493
|
+
*/
|
|
1494
|
+
function?: string | null;
|
|
1495
|
+
/**
|
|
1496
|
+
* Optional. Line within the source file. 1-based; 0 indicates no line number available.
|
|
1497
|
+
*/
|
|
1498
|
+
line?: string | null;
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* Provides information about the Policy violation info for this request.
|
|
1502
|
+
*/
|
|
1503
|
+
export interface Schema$ViolationInfo {
|
|
1504
|
+
/**
|
|
1505
|
+
* 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
|
|
1506
|
+
*/
|
|
1507
|
+
checkedValue?: string | null;
|
|
1508
|
+
/**
|
|
1509
|
+
* Optional. Constraint name
|
|
1510
|
+
*/
|
|
1511
|
+
constraint?: string | null;
|
|
1512
|
+
/**
|
|
1513
|
+
* Optional. Error message that policy is indicating.
|
|
1514
|
+
*/
|
|
1515
|
+
errorMessage?: string | null;
|
|
1516
|
+
/**
|
|
1517
|
+
* Optional. Indicates the type of the policy.
|
|
1518
|
+
*/
|
|
1519
|
+
policyType?: string | null;
|
|
1520
|
+
}
|
|
1260
1521
|
export class Resource$Services {
|
|
1261
1522
|
context: APIRequestContext;
|
|
1262
1523
|
constructor(context: APIRequestContext);
|
|
1263
1524
|
/**
|
|
1264
1525
|
* 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.
|
|
1265
|
-
* @example
|
|
1266
|
-
* ```js
|
|
1267
|
-
* // Before running the sample:
|
|
1268
|
-
* // - Enable the API at:
|
|
1269
|
-
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1270
|
-
* // - Login into gcloud by running:
|
|
1271
|
-
* // `$ gcloud auth application-default login`
|
|
1272
|
-
* // - Install the npm module by running:
|
|
1273
|
-
* // `$ npm install googleapis`
|
|
1274
|
-
*
|
|
1275
|
-
* const {google} = require('googleapis');
|
|
1276
|
-
* const servicecontrol = google.servicecontrol('v1');
|
|
1277
|
-
*
|
|
1278
|
-
* async function main() {
|
|
1279
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1280
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1281
|
-
* scopes: [
|
|
1282
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1283
|
-
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1284
|
-
* ],
|
|
1285
|
-
* });
|
|
1286
|
-
*
|
|
1287
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1288
|
-
* const authClient = await auth.getClient();
|
|
1289
|
-
* google.options({auth: authClient});
|
|
1290
|
-
*
|
|
1291
|
-
* // Do the magic
|
|
1292
|
-
* const res = await servicecontrol.services.allocateQuota({
|
|
1293
|
-
* // 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.
|
|
1294
|
-
* serviceName: 'placeholder-value',
|
|
1295
|
-
*
|
|
1296
|
-
* // Request body metadata
|
|
1297
|
-
* requestBody: {
|
|
1298
|
-
* // request body parameters
|
|
1299
|
-
* // {
|
|
1300
|
-
* // "allocateOperation": {},
|
|
1301
|
-
* // "serviceConfigId": "my_serviceConfigId"
|
|
1302
|
-
* // }
|
|
1303
|
-
* },
|
|
1304
|
-
* });
|
|
1305
|
-
* console.log(res.data);
|
|
1306
|
-
*
|
|
1307
|
-
* // Example response
|
|
1308
|
-
* // {
|
|
1309
|
-
* // "allocateErrors": [],
|
|
1310
|
-
* // "allocateInfo": {},
|
|
1311
|
-
* // "operationId": "my_operationId",
|
|
1312
|
-
* // "quotaMetrics": [],
|
|
1313
|
-
* // "serviceConfigId": "my_serviceConfigId"
|
|
1314
|
-
* // }
|
|
1315
|
-
* }
|
|
1316
|
-
*
|
|
1317
|
-
* main().catch(e => {
|
|
1318
|
-
* console.error(e);
|
|
1319
|
-
* throw e;
|
|
1320
|
-
* });
|
|
1321
|
-
*
|
|
1322
|
-
* ```
|
|
1323
1526
|
*
|
|
1324
1527
|
* @param params - Parameters for request
|
|
1325
1528
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1333,68 +1536,7 @@ export declare namespace servicecontrol_v1 {
|
|
|
1333
1536
|
allocateQuota(params: Params$Resource$Services$Allocatequota, callback: BodyResponseCallback<Schema$AllocateQuotaResponse>): void;
|
|
1334
1537
|
allocateQuota(callback: BodyResponseCallback<Schema$AllocateQuotaResponse>): void;
|
|
1335
1538
|
/**
|
|
1336
|
-
* 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
|
|
1337
|
-
* @example
|
|
1338
|
-
* ```js
|
|
1339
|
-
* // Before running the sample:
|
|
1340
|
-
* // - Enable the API at:
|
|
1341
|
-
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1342
|
-
* // - Login into gcloud by running:
|
|
1343
|
-
* // `$ gcloud auth application-default login`
|
|
1344
|
-
* // - Install the npm module by running:
|
|
1345
|
-
* // `$ npm install googleapis`
|
|
1346
|
-
*
|
|
1347
|
-
* const {google} = require('googleapis');
|
|
1348
|
-
* const servicecontrol = google.servicecontrol('v1');
|
|
1349
|
-
*
|
|
1350
|
-
* async function main() {
|
|
1351
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1352
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1353
|
-
* scopes: [
|
|
1354
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1355
|
-
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1356
|
-
* ],
|
|
1357
|
-
* });
|
|
1358
|
-
*
|
|
1359
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1360
|
-
* const authClient = await auth.getClient();
|
|
1361
|
-
* google.options({auth: authClient});
|
|
1362
|
-
*
|
|
1363
|
-
* // Do the magic
|
|
1364
|
-
* const res = await servicecontrol.services.check({
|
|
1365
|
-
* // 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.
|
|
1366
|
-
* serviceName: 'placeholder-value',
|
|
1367
|
-
*
|
|
1368
|
-
* // Request body metadata
|
|
1369
|
-
* requestBody: {
|
|
1370
|
-
* // request body parameters
|
|
1371
|
-
* // {
|
|
1372
|
-
* // "operation": {},
|
|
1373
|
-
* // "requestProjectSettings": false,
|
|
1374
|
-
* // "serviceConfigId": "my_serviceConfigId",
|
|
1375
|
-
* // "skipActivationCheck": false
|
|
1376
|
-
* // }
|
|
1377
|
-
* },
|
|
1378
|
-
* });
|
|
1379
|
-
* console.log(res.data);
|
|
1380
|
-
*
|
|
1381
|
-
* // Example response
|
|
1382
|
-
* // {
|
|
1383
|
-
* // "checkErrors": [],
|
|
1384
|
-
* // "checkInfo": {},
|
|
1385
|
-
* // "operationId": "my_operationId",
|
|
1386
|
-
* // "quotaInfo": {},
|
|
1387
|
-
* // "serviceConfigId": "my_serviceConfigId",
|
|
1388
|
-
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1389
|
-
* // }
|
|
1390
|
-
* }
|
|
1391
|
-
*
|
|
1392
|
-
* main().catch(e => {
|
|
1393
|
-
* console.error(e);
|
|
1394
|
-
* throw e;
|
|
1395
|
-
* });
|
|
1396
|
-
*
|
|
1397
|
-
* ```
|
|
1539
|
+
* 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).
|
|
1398
1540
|
*
|
|
1399
1541
|
* @param params - Parameters for request
|
|
1400
1542
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1409,62 +1551,6 @@ export declare namespace servicecontrol_v1 {
|
|
|
1409
1551
|
check(callback: BodyResponseCallback<Schema$CheckResponse>): void;
|
|
1410
1552
|
/**
|
|
1411
1553
|
* 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).
|
|
1412
|
-
* @example
|
|
1413
|
-
* ```js
|
|
1414
|
-
* // Before running the sample:
|
|
1415
|
-
* // - Enable the API at:
|
|
1416
|
-
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1417
|
-
* // - Login into gcloud by running:
|
|
1418
|
-
* // `$ gcloud auth application-default login`
|
|
1419
|
-
* // - Install the npm module by running:
|
|
1420
|
-
* // `$ npm install googleapis`
|
|
1421
|
-
*
|
|
1422
|
-
* const {google} = require('googleapis');
|
|
1423
|
-
* const servicecontrol = google.servicecontrol('v1');
|
|
1424
|
-
*
|
|
1425
|
-
* async function main() {
|
|
1426
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1427
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1428
|
-
* scopes: [
|
|
1429
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1430
|
-
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1431
|
-
* ],
|
|
1432
|
-
* });
|
|
1433
|
-
*
|
|
1434
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1435
|
-
* const authClient = await auth.getClient();
|
|
1436
|
-
* google.options({auth: authClient});
|
|
1437
|
-
*
|
|
1438
|
-
* // Do the magic
|
|
1439
|
-
* const res = await servicecontrol.services.report({
|
|
1440
|
-
* // 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.
|
|
1441
|
-
* serviceName: 'placeholder-value',
|
|
1442
|
-
*
|
|
1443
|
-
* // Request body metadata
|
|
1444
|
-
* requestBody: {
|
|
1445
|
-
* // request body parameters
|
|
1446
|
-
* // {
|
|
1447
|
-
* // "operations": [],
|
|
1448
|
-
* // "serviceConfigId": "my_serviceConfigId"
|
|
1449
|
-
* // }
|
|
1450
|
-
* },
|
|
1451
|
-
* });
|
|
1452
|
-
* console.log(res.data);
|
|
1453
|
-
*
|
|
1454
|
-
* // Example response
|
|
1455
|
-
* // {
|
|
1456
|
-
* // "reportErrors": [],
|
|
1457
|
-
* // "serviceConfigId": "my_serviceConfigId",
|
|
1458
|
-
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1459
|
-
* // }
|
|
1460
|
-
* }
|
|
1461
|
-
*
|
|
1462
|
-
* main().catch(e => {
|
|
1463
|
-
* console.error(e);
|
|
1464
|
-
* throw e;
|
|
1465
|
-
* });
|
|
1466
|
-
*
|
|
1467
|
-
* ```
|
|
1468
1554
|
*
|
|
1469
1555
|
* @param params - Parameters for request
|
|
1470
1556
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v1.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.servicecontrol_v1 = void 0;
|
|
15
16
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
16
|
-
/* eslint-disable @typescript-eslint/class-name-casing */
|
|
17
17
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
18
18
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-namespace */
|
|
@@ -71,10 +71,10 @@ var servicecontrol_v1;
|
|
|
71
71
|
context: this.context,
|
|
72
72
|
};
|
|
73
73
|
if (callback) {
|
|
74
|
-
googleapis_common_1.createAPIRequest(parameters, callback);
|
|
74
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
return googleapis_common_1.createAPIRequest(parameters);
|
|
77
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
check(paramsOrCallback, optionsOrCallback, callback) {
|
|
@@ -101,10 +101,10 @@ var servicecontrol_v1;
|
|
|
101
101
|
context: this.context,
|
|
102
102
|
};
|
|
103
103
|
if (callback) {
|
|
104
|
-
googleapis_common_1.createAPIRequest(parameters, callback);
|
|
104
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
105
105
|
}
|
|
106
106
|
else {
|
|
107
|
-
return googleapis_common_1.createAPIRequest(parameters);
|
|
107
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
report(paramsOrCallback, optionsOrCallback, callback) {
|
|
@@ -131,10 +131,10 @@ var servicecontrol_v1;
|
|
|
131
131
|
context: this.context,
|
|
132
132
|
};
|
|
133
133
|
if (callback) {
|
|
134
|
-
googleapis_common_1.createAPIRequest(parameters, callback);
|
|
134
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
137
|
-
return googleapis_common_1.createAPIRequest(parameters);
|
|
137
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|