@maxim_mazurok/gapi.client.assuredworkloads-v1beta1 0.0.20230721 → 0.0.20230804

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.
Files changed (3) hide show
  1. package/index.d.ts +134 -78
  2. package/package.json +2 -2
  3. package/tests.ts +18 -10
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://assuredworkloads.googleapis.com/$discovery/rest?version=v1beta1
12
- // Revision: 20230721
12
+ // Revision: 20230804
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -23,6 +23,9 @@ declare namespace gapi.client {
23
23
 
24
24
  namespace assuredworkloads {
25
25
  interface GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest {
26
+ /** Optional. Acknowledge type of specified violation. */
27
+ acknowledgeType?:
28
+ string;
26
29
  /** Required. Business justification explaining the need for violation acknowledgement */
27
30
  comment?:
28
31
  string;
@@ -37,9 +40,26 @@ declare namespace gapi.client {
37
40
  interface GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse {
38
41
  }
39
42
  interface GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse {
40
- /** A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload. */
43
+ /** List of analysis results for each asset in scope. */
44
+ assetMoveAnalyses?:
45
+ GoogleCloudAssuredworkloadsV1beta1AssetMoveAnalysis[];
46
+ /** A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload. This field is now deprecated. */
41
47
  blockers?:
42
48
  string[];
49
+ /** The next page token. Is empty if the last page is reached. */
50
+ nextPageToken?:
51
+ string;
52
+ }
53
+ interface GoogleCloudAssuredworkloadsV1beta1AssetMoveAnalysis {
54
+ /** List of eligible analyses performed for the asset. */
55
+ analysisGroups?:
56
+ GoogleCloudAssuredworkloadsV1beta1MoveAnalysisGroup[];
57
+ /** The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1 */
58
+ asset?:
59
+ string;
60
+ /** Type of the asset being analyzed. Possible values will be among the ones listed [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). */
61
+ assetType?:
62
+ string;
43
63
  }
44
64
  interface GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata {
45
65
  /** Optional. Compliance controls that should be applied to the resources managed by the workload. */
@@ -58,6 +78,9 @@ declare namespace gapi.client {
58
78
  resourceSettings?:
59
79
  GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[];
60
80
  }
81
+ // tslint:disable-next-line:no-empty-interface
82
+ interface GoogleCloudAssuredworkloadsV1beta1EnableResourceMonitoringResponse {
83
+ }
61
84
  interface GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse {
62
85
  /** The next page token. Returns empty if reached the last page. */
63
86
  nextPageToken?:
@@ -74,6 +97,30 @@ declare namespace gapi.client {
74
97
  workloads?:
75
98
  GoogleCloudAssuredworkloadsV1beta1Workload[];
76
99
  }
100
+ interface GoogleCloudAssuredworkloadsV1beta1MoveAnalysisGroup {
101
+ /** Result of a successful analysis. */
102
+ analysisResult?:
103
+ GoogleCloudAssuredworkloadsV1beta1MoveAnalysisResult;
104
+ /** Name of the analysis group. */
105
+ displayName?:
106
+ string;
107
+ /** Error details for a failed analysis. */
108
+ error?:
109
+ GoogleRpcStatus;
110
+ }
111
+ interface GoogleCloudAssuredworkloadsV1beta1MoveAnalysisResult {
112
+ /** List of blockers. If not resolved, these will result in compliance violations in the target. */
113
+ blockers?:
114
+ GoogleCloudAssuredworkloadsV1beta1MoveImpact[];
115
+ /** List of warnings. These are risks that may or may not result in compliance violations. */
116
+ warnings?:
117
+ GoogleCloudAssuredworkloadsV1beta1MoveImpact[];
118
+ }
119
+ interface GoogleCloudAssuredworkloadsV1beta1MoveImpact {
120
+ /** Explanation of the impact. */
121
+ detail?:
122
+ string;
123
+ }
77
124
  interface GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest {
78
125
  /** Required. The type of restriction for using gcp products in the Workload environment. */
79
126
  restrictionType?:
@@ -92,6 +139,9 @@ declare namespace gapi.client {
92
139
  */
93
140
  acknowledgementTime?:
94
141
  string;
142
+ /** Optional. Output only. Violation Id of the org-policy violation due to which the resource violation is caused. Empty for org-policy violations. */
143
+ associatedOrgPolicyViolationId?:
144
+ string;
95
145
  /** Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder} */
96
146
  auditLogLink?:
97
147
  string;
@@ -125,18 +175,30 @@ declare namespace gapi.client {
125
175
  /** Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation. */
126
176
  orgPolicyConstraint?:
127
177
  string;
178
+ /** Optional. Output only. Parent project number where resource is present. Empty for org-policy violations. */
179
+ parentProjectNumber?:
180
+ string;
128
181
  /** Output only. Compliance violation remediation */
129
182
  remediation?:
130
183
  GoogleCloudAssuredworkloadsV1beta1ViolationRemediation;
131
184
  /** Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. */
132
185
  resolveTime?:
133
186
  string;
187
+ /** Optional. Output only. Name of the resource like //storage.googleapis.com/myprojectxyz-testbucket. Empty for org-policy violations. */
188
+ resourceName?:
189
+ string;
190
+ /** Optional. Output only. Type of the resource like compute.googleapis.com/Disk, etc. Empty for org-policy violations. */
191
+ resourceType?:
192
+ string;
134
193
  /** Output only. State of the violation */
135
194
  state?:
136
195
  string;
137
196
  /** Output only. The last time when the Violation record was updated. */
138
197
  updateTime?:
139
198
  string;
199
+ /** Output only. Type of the violation */
200
+ violationType?:
201
+ string;
140
202
  }
141
203
  interface GoogleCloudAssuredworkloadsV1beta1ViolationExceptionContext {
142
204
  /** Timestamp when the violation was acknowledged. */
@@ -267,6 +329,12 @@ declare namespace gapi.client {
267
329
  */
268
330
  provisionedResourcesParent?:
269
331
  string;
332
+ /**
333
+ * Output only. Indicates whether resource monitoring is enabled for workload or not. It is true when Resource feed is subscribed to AWM topic and AWM Service Agent Role is binded to
334
+ * AW Service Account for resource Assured workload.
335
+ */
336
+ resourceMonitoringEnabled?:
337
+ boolean;
270
338
  /**
271
339
  * Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation
272
340
  * will fail. Always read only.
@@ -299,9 +367,15 @@ declare namespace gapi.client {
299
367
  GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
300
368
  }
301
369
  interface GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus {
370
+ /** Number of current resource violations which are not acknowledged. */
371
+ acknowledgedResourceViolationCount?:
372
+ number;
302
373
  /** Number of current orgPolicy violations which are acknowledged. */
303
374
  acknowledgedViolationCount?:
304
375
  number;
376
+ /** Number of current resource violations which are acknowledged. */
377
+ activeResourceViolationCount?:
378
+ number;
305
379
  /** Number of current orgPolicy violations which are not acknowledged. */
306
380
  activeViolationCount?:
307
381
  number;
@@ -344,12 +418,12 @@ declare namespace gapi.client {
344
418
  string;
345
419
  }
346
420
  interface GoogleCloudAssuredworkloadsV1beta1WorkloadPartnerPermissions {
421
+ /** Optional. Allow partner to view violation alerts. */
422
+ assuredWorkloadsMonitoring?:
423
+ boolean;
347
424
  /** Allow the partner to view inspectability logs and monitoring violations. */
348
425
  dataLogsViewer?:
349
426
  boolean;
350
- /** Allow partner to monitor folder and remediate violations */
351
- remediateFolderViolations?:
352
- boolean;
353
427
  /** Optional. Allow partner to view access approval logs. */
354
428
  serviceAccessApprover?:
355
429
  boolean;
@@ -412,9 +486,9 @@ declare namespace gapi.client {
412
486
  name?:
413
487
  string;
414
488
  /**
415
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the
416
- * original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the
417
- * original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
489
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original
490
+ * method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original
491
+ * method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
418
492
  */
419
493
  response?:
420
494
  { [P in string]: any };
@@ -525,71 +599,6 @@ declare namespace gapi.client {
525
599
  string;
526
600
  }): Request<GoogleLongrunningListOperationsResponse>;
527
601
  }
528
- interface WorkloadsResource {
529
- /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
530
- analyzeWorkloadMove(request?: {
531
- /** V1 error format. */
532
- "$.xgafv"?:
533
- string;
534
- /** OAuth access token. */
535
- access_token?:
536
- string;
537
- /** Data format for response. */
538
- alt?:
539
- string;
540
- /** JSONP */
541
- callback?:
542
- string;
543
- /** Selector specifying which fields to include in a partial response. */
544
- fields?:
545
- string;
546
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
547
- key?:
548
- string;
549
- /** OAuth 2.0 token for the current user. */
550
- oauth_token?:
551
- string;
552
- /** Returns response with indentations and line breaks. */
553
- prettyPrint?:
554
- boolean;
555
- /**
556
- * The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER}" or
557
- * "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID.
558
- */
559
- project?:
560
- string;
561
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
562
- quotaUser?:
563
- string;
564
- /**
565
- * The source type is a project-based workload. Specify the workloads's relative resource name, formatted as:
566
- * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1"
567
- */
568
- source:
569
- string;
570
- /**
571
- * Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative
572
- * resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example:
573
- * "organizations/123/locations/us-east1/workloads/assured-workload-2"
574
- */
575
- target:
576
- string;
577
- /** Upload protocol for media (e.g. "raw", "multipart"). */
578
- upload_protocol?:
579
- string;
580
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
581
- uploadType?:
582
- string;
583
- }): Request<GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse>;
584
- }
585
- interface LocationsResource {
586
- workloads:
587
- WorkloadsResource;
588
- }
589
- interface OrganizationsResource {
590
- locations:
591
- LocationsResource;
592
- }
593
602
  interface ViolationsResource {
594
603
  /**
595
604
  * Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid
@@ -911,6 +920,45 @@ declare namespace gapi.client {
911
920
  uploadType?:
912
921
  string;
913
922
  }): Request<{}>;
923
+ /** Enable resource violation monitoring for a workload. */
924
+ enableResourceMonitoring(request?: {
925
+ /** V1 error format. */
926
+ "$.xgafv"?:
927
+ string;
928
+ /** OAuth access token. */
929
+ access_token?:
930
+ string;
931
+ /** Data format for response. */
932
+ alt?:
933
+ string;
934
+ /** JSONP */
935
+ callback?:
936
+ string;
937
+ /** Selector specifying which fields to include in a partial response. */
938
+ fields?:
939
+ string;
940
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
941
+ key?:
942
+ string;
943
+ /** Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} */
944
+ name:
945
+ string;
946
+ /** OAuth 2.0 token for the current user. */
947
+ oauth_token?:
948
+ string;
949
+ /** Returns response with indentations and line breaks. */
950
+ prettyPrint?:
951
+ boolean;
952
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
953
+ quotaUser?:
954
+ string;
955
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
956
+ upload_protocol?:
957
+ string;
958
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
959
+ uploadType?:
960
+ string;
961
+ }): Request<{}>;
914
962
  /** Gets Assured Workload associated with a CRM Node */
915
963
  get(request?: {
916
964
  /** V1 error format. */
@@ -1182,8 +1230,6 @@ declare namespace gapi.client {
1182
1230
  string;
1183
1231
  },
1184
1232
  body: GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest): Request<{}>;
1185
- organizations:
1186
- OrganizationsResource;
1187
1233
  violations:
1188
1234
  ViolationsResource;
1189
1235
  }
@@ -1198,7 +1244,7 @@ declare namespace gapi.client {
1198
1244
  LocationsResource;
1199
1245
  }
1200
1246
  interface WorkloadsResource {
1201
- /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
1247
+ /** Analyzes a hypothetical move of a source resource to a target(destination) folder-based workload to surface compliance risks. */
1202
1248
  analyzeWorkloadMove(request?: {
1203
1249
  /** V1 error format. */
1204
1250
  "$.xgafv"?:
@@ -1209,6 +1255,9 @@ declare namespace gapi.client {
1209
1255
  /** Data format for response. */
1210
1256
  alt?:
1211
1257
  string;
1258
+ /** Optional. Indicates if all child assets of the source resource should also be analyzed in addition to the source. */
1259
+ analyzeChildAssets?:
1260
+ boolean;
1212
1261
  /** JSONP */
1213
1262
  callback?:
1214
1263
  string;
@@ -1221,6 +1270,12 @@ declare namespace gapi.client {
1221
1270
  /** OAuth 2.0 token for the current user. */
1222
1271
  oauth_token?:
1223
1272
  string;
1273
+ /** Optional. Page size. If a value is not specified, the default value of 10 is used. */
1274
+ pageSize?:
1275
+ number;
1276
+ /** Optional. The page token from the previous response. It needs to be passed in the second and following requests. */
1277
+ pageToken?:
1278
+ string;
1224
1279
  /** Returns response with indentations and line breaks. */
1225
1280
  prettyPrint?:
1226
1281
  boolean;
@@ -1235,12 +1290,13 @@ declare namespace gapi.client {
1235
1290
  string;
1236
1291
  /**
1237
1292
  * The source type is a project-based workload. Specify the workloads's relative resource name, formatted as:
1238
- * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1"
1293
+ * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1" This option is
1294
+ * now deprecated.
1239
1295
  */
1240
1296
  source?:
1241
1297
  string;
1242
1298
  /**
1243
- * Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative
1299
+ * Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative
1244
1300
  * resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example:
1245
1301
  * "organizations/123/locations/us-east1/workloads/assured-workload-2"
1246
1302
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.assuredworkloads-v1beta1",
3
- "version": "0.0.20230721",
3
+ "version": "0.0.20230804",
4
4
  "description": "TypeScript typings for Assured Workloads API v1beta1",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -15,6 +15,6 @@
15
15
  "types": "index.d.ts",
16
16
  "dependencies": {
17
17
  "@types/gapi.client": "*",
18
- "@types/gapi.client.discovery": "*"
18
+ "@types/gapi.client.discovery-v1": "*"
19
19
  }
20
20
  }
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230721
6
+ // Revision: 20230804
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -54,7 +54,9 @@ gapi.load('client', async () => {
54
54
  },
55
55
  complianceRegime: "Test string",
56
56
  complianceStatus: {
57
+ acknowledgedResourceViolationCount: 42,
57
58
  acknowledgedViolationCount: 42,
59
+ activeResourceViolationCount: 42,
58
60
  activeViolationCount: 42,
59
61
  },
60
62
  compliantButDisallowedServices: [
@@ -98,11 +100,12 @@ gapi.load('client', async () => {
98
100
  name: "Test string",
99
101
  partner: "Test string",
100
102
  partnerPermissions: {
103
+ assuredWorkloadsMonitoring: true,
101
104
  dataLogsViewer: true,
102
- remediateFolderViolations: true,
103
105
  serviceAccessApprover: true,
104
106
  },
105
107
  provisionedResourcesParent: "Test string",
108
+ resourceMonitoringEnabled: true,
106
109
  resources: [
107
110
  {
108
111
  resourceId: "Test string",
@@ -132,6 +135,10 @@ gapi.load('client', async () => {
132
135
  etag: "Test string",
133
136
  name: "Test string",
134
137
  });
138
+ /** Enable resource violation monitoring for a workload. */
139
+ await gapi.client.assuredworkloads.organizations.locations.workloads.enableResourceMonitoring({
140
+ name: "Test string",
141
+ });
135
142
  /** Gets Assured Workload associated with a CRM Node */
136
143
  await gapi.client.assuredworkloads.organizations.locations.workloads.get({
137
144
  name: "Test string",
@@ -160,7 +167,9 @@ gapi.load('client', async () => {
160
167
  },
161
168
  complianceRegime: "Test string",
162
169
  complianceStatus: {
170
+ acknowledgedResourceViolationCount: 42,
163
171
  acknowledgedViolationCount: 42,
172
+ activeResourceViolationCount: 42,
164
173
  activeViolationCount: 42,
165
174
  },
166
175
  compliantButDisallowedServices: [
@@ -204,11 +213,12 @@ gapi.load('client', async () => {
204
213
  name: "Test string",
205
214
  partner: "Test string",
206
215
  partnerPermissions: {
216
+ assuredWorkloadsMonitoring: true,
207
217
  dataLogsViewer: true,
208
- remediateFolderViolations: true,
209
218
  serviceAccessApprover: true,
210
219
  },
211
220
  provisionedResourcesParent: "Test string",
221
+ resourceMonitoringEnabled: true,
212
222
  resources: [
213
223
  {
214
224
  resourceId: "Test string",
@@ -240,12 +250,6 @@ gapi.load('client', async () => {
240
250
  }, {
241
251
  restrictionType: "Test string",
242
252
  });
243
- /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
244
- await gapi.client.assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove({
245
- project: "Test string",
246
- source: "Test string",
247
- target: "Test string",
248
- });
249
253
  /**
250
254
  * Acknowledges an existing violation. By acknowledging a violation, users acknowledge the existence of a compliance violation in their workload and decide to ignore it due to a valid
251
255
  * business justification. Acknowledgement is a permanent operation and it cannot be reverted.
@@ -253,6 +257,7 @@ gapi.load('client', async () => {
253
257
  await gapi.client.assuredworkloads.organizations.locations.workloads.violations.acknowledge({
254
258
  name: "Test string",
255
259
  }, {
260
+ acknowledgeType: "Test string",
256
261
  comment: "Test string",
257
262
  nonCompliantOrgPolicy: "Test string",
258
263
  });
@@ -272,8 +277,11 @@ gapi.load('client', async () => {
272
277
  pageToken: "Test string",
273
278
  parent: "Test string",
274
279
  });
275
- /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
280
+ /** Analyzes a hypothetical move of a source resource to a target(destination) folder-based workload to surface compliance risks. */
276
281
  await gapi.client.assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove({
282
+ analyzeChildAssets: true,
283
+ pageSize: 42,
284
+ pageToken: "Test string",
277
285
  project: "Test string",
278
286
  source: "Test string",
279
287
  target: "Test string",