@maxim_mazurok/gapi.client.assuredworkloads-v1beta1 0.0.20220926

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,888 @@
1
+ /* Type definitions for non-npm package Assured Workloads API v1beta1 0.0 */
2
+ // Project: https://cloud.google.com
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+
8
+ // IMPORTANT
9
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
+ // Generated from: https://assuredworkloads.googleapis.com/$discovery/rest?version=v1beta1
12
+ // Revision: 20220926
13
+
14
+ /// <reference types="gapi.client" />
15
+
16
+ declare namespace gapi.client {
17
+ /** Load Assured Workloads API v1beta1 */
18
+ function load(urlOrObject: "https://assuredworkloads.googleapis.com/$discovery/rest?version=v1beta1"): Promise<void>;
19
+ /** @deprecated Please load APIs with discovery documents. */
20
+ function load(name: "assuredworkloads", version: "v1beta1"): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: "assuredworkloads", version: "v1beta1", callback: () => any): void;
23
+
24
+ namespace assuredworkloads {
25
+ interface GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest {
26
+ /** Required. Business justification explaining the need for violation acknowledgement */
27
+ comment?: string;
28
+ /**
29
+ * Optional. Name of the OrgPolicy which was modified with non-compliant change and resulted in this violation. Format: projects/{project_number}/policies/{constraint_name}
30
+ * folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}
31
+ */
32
+ nonCompliantOrgPolicy?: string;
33
+ }
34
+ // tslint:disable-next-line:no-empty-interface
35
+ interface GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationResponse {
36
+ }
37
+ interface GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse {
38
+ /** A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload. */
39
+ blockers?: string[];
40
+ }
41
+ interface GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse {
42
+ /** The next page token. Returns empty if reached the last page. */
43
+ nextPageToken?: string;
44
+ /** List of Violations under a Workload. */
45
+ violations?: GoogleCloudAssuredworkloadsV1beta1Violation[];
46
+ }
47
+ interface GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse {
48
+ /** The next page token. Return empty if reached the last page. */
49
+ nextPageToken?: string;
50
+ /** List of Workloads under a given parent. */
51
+ workloads?: GoogleCloudAssuredworkloadsV1beta1Workload[];
52
+ }
53
+ interface GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest {
54
+ /** Required. The type of restriction for using gcp products in the Workload environment. */
55
+ restrictionType?: string;
56
+ }
57
+ // tslint:disable-next-line:no-empty-interface
58
+ interface GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse {
59
+ }
60
+ interface GoogleCloudAssuredworkloadsV1beta1Violation {
61
+ /** A boolean that indicates if the violation is acknowledged */
62
+ acknowledged?: boolean;
63
+ /** Optional. Timestamp when this violation was acknowledged last. This will be absent when acknowledged field is marked as false. */
64
+ acknowledgementTime?: string;
65
+ /** Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder} */
66
+ auditLogLink?: string;
67
+ /** Output only. Time of the event which triggered the Violation. */
68
+ beginTime?: string;
69
+ /** Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc. */
70
+ category?: string;
71
+ /** Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value. */
72
+ description?: string;
73
+ /** Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id} */
74
+ name?: string;
75
+ /**
76
+ * Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name}
77
+ * folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}
78
+ */
79
+ nonCompliantOrgPolicy?: string;
80
+ /** Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation. */
81
+ orgPolicyConstraint?: string;
82
+ /** Output only. Compliance violation remediation */
83
+ remediation?: GoogleCloudAssuredworkloadsV1beta1ViolationRemediation;
84
+ /** Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. */
85
+ resolveTime?: string;
86
+ /** Output only. State of the violation */
87
+ state?: string;
88
+ /** Output only. The last time when the Violation record was updated. */
89
+ updateTime?: string;
90
+ }
91
+ interface GoogleCloudAssuredworkloadsV1beta1ViolationRemediation {
92
+ /** Values that can resolve the violation For example: for list org policy violations, this will either be the list of allowed or denied values */
93
+ compliantValues?: string[];
94
+ /** Required. Remediation instructions to resolve violations */
95
+ instructions?: GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions;
96
+ /** Output only. Reemediation type based on the type of org policy values violated */
97
+ remediationType?: string;
98
+ }
99
+ interface GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructions {
100
+ /** Remediation instructions to resolve violation via cloud console */
101
+ consoleInstructions?: GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole;
102
+ /** Remediation instructions to resolve violation via gcloud cli */
103
+ gcloudInstructions?: GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud;
104
+ }
105
+ interface GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsConsole {
106
+ /** Additional urls for more information about steps */
107
+ additionalLinks?: string[];
108
+ /** Link to console page where violations can be resolved */
109
+ consoleUris?: string[];
110
+ /** Steps to resolve violation via cloud console */
111
+ steps?: string[];
112
+ }
113
+ interface GoogleCloudAssuredworkloadsV1beta1ViolationRemediationInstructionsGcloud {
114
+ /** Additional urls for more information about steps */
115
+ additionalLinks?: string[];
116
+ /** Gcloud command to resolve violation */
117
+ gcloudCommands?: string[];
118
+ /** Steps to resolve violation via gcloud cli */
119
+ steps?: string[];
120
+ }
121
+ interface GoogleCloudAssuredworkloadsV1beta1Workload {
122
+ /**
123
+ * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of
124
+ * Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form
125
+ * `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.
126
+ */
127
+ billingAccount?: string;
128
+ /** Input only. Immutable. Settings specific to resources needed for CJIS. */
129
+ cjisSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings;
130
+ /** Required. Immutable. Compliance Regime associated with this workload. */
131
+ complianceRegime?: string;
132
+ /** Output only. Count of active Violations in the Workload. */
133
+ complianceStatus?: GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus;
134
+ /**
135
+ * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke
136
+ * RestrictAllowedResources endpoint to allow your project developers to use these services in their environment."
137
+ */
138
+ compliantButDisallowedServices?: string[];
139
+ /** Output only. Immutable. The Workload creation timestamp. */
140
+ createTime?: string;
141
+ /**
142
+ * Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers,
143
+ * hyphen, and spaces. Example: My Workload
144
+ */
145
+ displayName?: string;
146
+ /** Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. */
147
+ enableSovereignControls?: boolean;
148
+ /** Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. */
149
+ etag?: string;
150
+ /** Input only. Immutable. Settings specific to resources needed for FedRAMP High. */
151
+ fedrampHighSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings;
152
+ /** Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. */
153
+ fedrampModerateSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings;
154
+ /** Input only. Immutable. Settings specific to resources needed for IL4. */
155
+ il4Settings?: GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings;
156
+ /** Output only. Represents the KAJ enrollment state of the given workload. */
157
+ kajEnrollmentState?: string;
158
+ /**
159
+ * Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a
160
+ * Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
161
+ */
162
+ kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
163
+ /** Optional. Labels applied to the workload. */
164
+ labels?: { [P in string]: string };
165
+ /** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
166
+ name?: string;
167
+ /** Optional. Compliance Regime associated with this workload. */
168
+ partner?: string;
169
+ /**
170
+ * Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not
171
+ * specified all resources are created under the parent organization. Format: folders/{folder_id}
172
+ */
173
+ provisionedResourcesParent?: string;
174
+ /**
175
+ * 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
176
+ * will fail. Always read only.
177
+ */
178
+ resources?: GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo[];
179
+ /**
180
+ * Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible.
181
+ * This field is optional.
182
+ */
183
+ resourceSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[];
184
+ /**
185
+ * Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message
186
+ * is shown in SAA details page.
187
+ */
188
+ saaEnrollmentResponse?: GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse;
189
+ }
190
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings {
191
+ /** Input only. Immutable. Settings used to create a CMEK crypto key. */
192
+ kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
193
+ }
194
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus {
195
+ /** Count of active Violations which are acknowledged in the Workload. */
196
+ acknowledgedViolationCount?: number;
197
+ /** Count of active Violations which haven't been acknowledged. */
198
+ activeViolationCount?: number;
199
+ }
200
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings {
201
+ /** Input only. Immutable. Settings used to create a CMEK crypto key. */
202
+ kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
203
+ }
204
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings {
205
+ /** Input only. Immutable. Settings used to create a CMEK crypto key. */
206
+ kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
207
+ }
208
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings {
209
+ /** Input only. Immutable. Settings used to create a CMEK crypto key. */
210
+ kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
211
+ }
212
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings {
213
+ /** Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary. */
214
+ nextRotationTime?: string;
215
+ /**
216
+ * Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at
217
+ * most 876,000 hours.
218
+ */
219
+ rotationPeriod?: string;
220
+ }
221
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo {
222
+ /** Resource identifier. For a project this represents project_number. */
223
+ resourceId?: string;
224
+ /** Indicates the type of resource. */
225
+ resourceType?: string;
226
+ }
227
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings {
228
+ /** User-assigned resource display name. If not empty it will be used to create a resource with the specified name. */
229
+ displayName?: string;
230
+ /**
231
+ * Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a
232
+ * folder, don't set this value as folder_id is assigned by Google.
233
+ */
234
+ resourceId?: string;
235
+ /** Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) */
236
+ resourceType?: string;
237
+ }
238
+ interface GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse {
239
+ /** Indicates SAA enrollment setup error if any. */
240
+ setupErrors?: string[];
241
+ /** Indicates SAA enrollment status of a given workload. */
242
+ setupStatus?: string;
243
+ }
244
+ interface GoogleLongrunningListOperationsResponse {
245
+ /** The standard List next-page token. */
246
+ nextPageToken?: string;
247
+ /** A list of operations that matches the specified filter in the request. */
248
+ operations?: GoogleLongrunningOperation[];
249
+ }
250
+ interface GoogleLongrunningOperation {
251
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
252
+ done?: boolean;
253
+ /** The error result of the operation in case of failure or cancellation. */
254
+ error?: GoogleRpcStatus;
255
+ /**
256
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such
257
+ * metadata. Any method that returns a long-running operation should document the metadata type, if any.
258
+ */
259
+ metadata?: { [P in string]: any };
260
+ /**
261
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending
262
+ * with `operations/{unique_id}`.
263
+ */
264
+ name?: string;
265
+ /**
266
+ * 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
267
+ * 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
268
+ * original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
269
+ */
270
+ response?: { [P in string]: any };
271
+ }
272
+ // tslint:disable-next-line:no-empty-interface
273
+ interface GoogleProtobufEmpty {
274
+ }
275
+ interface GoogleRpcStatus {
276
+ /** The status code, which should be an enum value of google.rpc.Code. */
277
+ code?: number;
278
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
279
+ details?: Array<{ [P in string]: any }>;
280
+ /**
281
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
282
+ * client.
283
+ */
284
+ message?: string;
285
+ }
286
+ interface OperationsResource {
287
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
288
+ get(request?: {
289
+ /** V1 error format. */
290
+ "$.xgafv"?: string;
291
+ /** OAuth access token. */
292
+ access_token?: string;
293
+ /** Data format for response. */
294
+ alt?: string;
295
+ /** JSONP */
296
+ callback?: string;
297
+ /** Selector specifying which fields to include in a partial response. */
298
+ fields?: string;
299
+ /** 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. */
300
+ key?: string;
301
+ /** The name of the operation resource. */
302
+ name: string;
303
+ /** OAuth 2.0 token for the current user. */
304
+ oauth_token?: string;
305
+ /** Returns response with indentations and line breaks. */
306
+ prettyPrint?: boolean;
307
+ /** 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. */
308
+ quotaUser?: string;
309
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
310
+ upload_protocol?: string;
311
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
312
+ uploadType?: string;
313
+ }): Request<GoogleLongrunningOperation>;
314
+ /**
315
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services
316
+ * to override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
317
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
318
+ * ensure the name binding is the parent resource, without the operations collection id.
319
+ */
320
+ list(request?: {
321
+ /** V1 error format. */
322
+ "$.xgafv"?: string;
323
+ /** OAuth access token. */
324
+ access_token?: string;
325
+ /** Data format for response. */
326
+ alt?: string;
327
+ /** JSONP */
328
+ callback?: string;
329
+ /** Selector specifying which fields to include in a partial response. */
330
+ fields?: string;
331
+ /** The standard list filter. */
332
+ filter?: string;
333
+ /** 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. */
334
+ key?: string;
335
+ /** The name of the operation's parent resource. */
336
+ name: string;
337
+ /** OAuth 2.0 token for the current user. */
338
+ oauth_token?: string;
339
+ /** The standard list page size. */
340
+ pageSize?: number;
341
+ /** The standard list page token. */
342
+ pageToken?: string;
343
+ /** Returns response with indentations and line breaks. */
344
+ prettyPrint?: boolean;
345
+ /** 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. */
346
+ quotaUser?: string;
347
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
348
+ upload_protocol?: string;
349
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
350
+ uploadType?: string;
351
+ }): Request<GoogleLongrunningListOperationsResponse>;
352
+ }
353
+ interface WorkloadsResource {
354
+ /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
355
+ analyzeWorkloadMove(request?: {
356
+ /** V1 error format. */
357
+ "$.xgafv"?: string;
358
+ /** OAuth access token. */
359
+ access_token?: string;
360
+ /** Data format for response. */
361
+ alt?: string;
362
+ /** JSONP */
363
+ callback?: string;
364
+ /** Selector specifying which fields to include in a partial response. */
365
+ fields?: string;
366
+ /** 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. */
367
+ key?: string;
368
+ /** OAuth 2.0 token for the current user. */
369
+ oauth_token?: string;
370
+ /** Returns response with indentations and line breaks. */
371
+ prettyPrint?: boolean;
372
+ /**
373
+ * 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
374
+ * "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID.
375
+ */
376
+ project?: string;
377
+ /** 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. */
378
+ quotaUser?: string;
379
+ /**
380
+ * The source type is a project-based workload. Specify the workloads's relative resource name, formatted as:
381
+ * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1"
382
+ */
383
+ source: string;
384
+ /**
385
+ * 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
386
+ * resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example:
387
+ * "organizations/123/locations/us-east1/workloads/assured-workload-2"
388
+ */
389
+ target: string;
390
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
391
+ upload_protocol?: string;
392
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
393
+ uploadType?: string;
394
+ }): Request<GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse>;
395
+ }
396
+ interface LocationsResource {
397
+ workloads: WorkloadsResource;
398
+ }
399
+ interface OrganizationsResource {
400
+ locations: LocationsResource;
401
+ }
402
+ interface ViolationsResource {
403
+ /**
404
+ * 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
405
+ * business justification. Acknowledgement is a permanent operation and it cannot be reverted.
406
+ */
407
+ acknowledge(request: {
408
+ /** V1 error format. */
409
+ "$.xgafv"?: string;
410
+ /** OAuth access token. */
411
+ access_token?: string;
412
+ /** Data format for response. */
413
+ alt?: string;
414
+ /** JSONP */
415
+ callback?: string;
416
+ /** Selector specifying which fields to include in a partial response. */
417
+ fields?: string;
418
+ /** 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. */
419
+ key?: string;
420
+ /** Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} */
421
+ name: string;
422
+ /** OAuth 2.0 token for the current user. */
423
+ oauth_token?: string;
424
+ /** Returns response with indentations and line breaks. */
425
+ prettyPrint?: boolean;
426
+ /** 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. */
427
+ quotaUser?: string;
428
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
429
+ upload_protocol?: string;
430
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
431
+ uploadType?: string;
432
+ /** Request body */
433
+ resource: GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest;
434
+ }): Request<{}>;
435
+ acknowledge(request: {
436
+ /** V1 error format. */
437
+ "$.xgafv"?: string;
438
+ /** OAuth access token. */
439
+ access_token?: string;
440
+ /** Data format for response. */
441
+ alt?: string;
442
+ /** JSONP */
443
+ callback?: string;
444
+ /** Selector specifying which fields to include in a partial response. */
445
+ fields?: string;
446
+ /** 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. */
447
+ key?: string;
448
+ /** Required. The resource name of the Violation to acknowledge. Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} */
449
+ name: string;
450
+ /** OAuth 2.0 token for the current user. */
451
+ oauth_token?: string;
452
+ /** Returns response with indentations and line breaks. */
453
+ prettyPrint?: boolean;
454
+ /** 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. */
455
+ quotaUser?: string;
456
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
457
+ upload_protocol?: string;
458
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
459
+ uploadType?: string;
460
+ },
461
+ body: GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest): Request<{}>;
462
+ /** Retrieves Assured Workload Violation based on ID. */
463
+ get(request?: {
464
+ /** V1 error format. */
465
+ "$.xgafv"?: string;
466
+ /** OAuth access token. */
467
+ access_token?: string;
468
+ /** Data format for response. */
469
+ alt?: string;
470
+ /** JSONP */
471
+ callback?: string;
472
+ /** Selector specifying which fields to include in a partial response. */
473
+ fields?: string;
474
+ /** 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. */
475
+ key?: string;
476
+ /** Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} */
477
+ name: string;
478
+ /** OAuth 2.0 token for the current user. */
479
+ oauth_token?: string;
480
+ /** Returns response with indentations and line breaks. */
481
+ prettyPrint?: boolean;
482
+ /** 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. */
483
+ quotaUser?: string;
484
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
485
+ upload_protocol?: string;
486
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
487
+ uploadType?: string;
488
+ }): Request<GoogleCloudAssuredworkloadsV1beta1Violation>;
489
+ /**
490
+ * Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the
491
+ * hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`
492
+ */
493
+ list(request?: {
494
+ /** V1 error format. */
495
+ "$.xgafv"?: string;
496
+ /** OAuth access token. */
497
+ access_token?: string;
498
+ /** Data format for response. */
499
+ alt?: string;
500
+ /** JSONP */
501
+ callback?: string;
502
+ /** Selector specifying which fields to include in a partial response. */
503
+ fields?: string;
504
+ /** Optional. A custom filter for filtering by the Violations properties. */
505
+ filter?: string;
506
+ /** The end of the time window. */
507
+ "interval.endTime"?: string;
508
+ /** The start of the time window. */
509
+ "interval.startTime"?: string;
510
+ /** 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. */
511
+ key?: string;
512
+ /** OAuth 2.0 token for the current user. */
513
+ oauth_token?: string;
514
+ /** Optional. Page size. */
515
+ pageSize?: number;
516
+ /** Optional. Page token returned from previous request. */
517
+ pageToken?: string;
518
+ /** Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. */
519
+ parent: string;
520
+ /** Returns response with indentations and line breaks. */
521
+ prettyPrint?: boolean;
522
+ /** 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. */
523
+ quotaUser?: string;
524
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
525
+ upload_protocol?: string;
526
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
527
+ uploadType?: string;
528
+ }): Request<GoogleCloudAssuredworkloadsV1beta1ListViolationsResponse>;
529
+ }
530
+ interface WorkloadsResource {
531
+ /** Creates Assured Workload. */
532
+ create(request: {
533
+ /** V1 error format. */
534
+ "$.xgafv"?: string;
535
+ /** OAuth access token. */
536
+ access_token?: string;
537
+ /** Data format for response. */
538
+ alt?: string;
539
+ /** JSONP */
540
+ callback?: string;
541
+ /**
542
+ * Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the
543
+ * identifier will add a label to the workload and contained projects with the identifier as the value.
544
+ */
545
+ externalId?: string;
546
+ /** Selector specifying which fields to include in a partial response. */
547
+ fields?: string;
548
+ /** 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. */
549
+ key?: string;
550
+ /** OAuth 2.0 token for the current user. */
551
+ oauth_token?: string;
552
+ /** Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. */
553
+ parent: string;
554
+ /** Returns response with indentations and line breaks. */
555
+ prettyPrint?: boolean;
556
+ /** 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. */
557
+ quotaUser?: string;
558
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
559
+ upload_protocol?: string;
560
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
561
+ uploadType?: string;
562
+ /** Request body */
563
+ resource: GoogleCloudAssuredworkloadsV1beta1Workload;
564
+ }): Request<GoogleLongrunningOperation>;
565
+ create(request: {
566
+ /** V1 error format. */
567
+ "$.xgafv"?: string;
568
+ /** OAuth access token. */
569
+ access_token?: string;
570
+ /** Data format for response. */
571
+ alt?: string;
572
+ /** JSONP */
573
+ callback?: string;
574
+ /**
575
+ * Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the
576
+ * identifier will add a label to the workload and contained projects with the identifier as the value.
577
+ */
578
+ externalId?: string;
579
+ /** Selector specifying which fields to include in a partial response. */
580
+ fields?: string;
581
+ /** 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. */
582
+ key?: string;
583
+ /** OAuth 2.0 token for the current user. */
584
+ oauth_token?: string;
585
+ /** Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. */
586
+ parent: string;
587
+ /** Returns response with indentations and line breaks. */
588
+ prettyPrint?: boolean;
589
+ /** 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. */
590
+ quotaUser?: string;
591
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
592
+ upload_protocol?: string;
593
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
594
+ uploadType?: string;
595
+ },
596
+ body: GoogleCloudAssuredworkloadsV1beta1Workload): Request<GoogleLongrunningOperation>;
597
+ /**
598
+ * Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to
599
+ * assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.
600
+ */
601
+ delete(request?: {
602
+ /** V1 error format. */
603
+ "$.xgafv"?: string;
604
+ /** OAuth access token. */
605
+ access_token?: string;
606
+ /** Data format for response. */
607
+ alt?: string;
608
+ /** JSONP */
609
+ callback?: string;
610
+ /** Optional. The etag of the workload. If this is provided, it must match the server's etag. */
611
+ etag?: string;
612
+ /** Selector specifying which fields to include in a partial response. */
613
+ fields?: string;
614
+ /** 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. */
615
+ key?: string;
616
+ /** Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} */
617
+ name: string;
618
+ /** OAuth 2.0 token for the current user. */
619
+ oauth_token?: string;
620
+ /** Returns response with indentations and line breaks. */
621
+ prettyPrint?: boolean;
622
+ /** 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. */
623
+ quotaUser?: string;
624
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
625
+ upload_protocol?: string;
626
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
627
+ uploadType?: string;
628
+ }): Request<{}>;
629
+ /** Gets Assured Workload associated with a CRM Node */
630
+ get(request?: {
631
+ /** V1 error format. */
632
+ "$.xgafv"?: string;
633
+ /** OAuth access token. */
634
+ access_token?: string;
635
+ /** Data format for response. */
636
+ alt?: string;
637
+ /** JSONP */
638
+ callback?: string;
639
+ /** Selector specifying which fields to include in a partial response. */
640
+ fields?: string;
641
+ /** 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. */
642
+ key?: string;
643
+ /**
644
+ * Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as
645
+ * "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".
646
+ */
647
+ name: string;
648
+ /** OAuth 2.0 token for the current user. */
649
+ oauth_token?: string;
650
+ /** Returns response with indentations and line breaks. */
651
+ prettyPrint?: boolean;
652
+ /** 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. */
653
+ quotaUser?: string;
654
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
655
+ upload_protocol?: string;
656
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
657
+ uploadType?: string;
658
+ }): Request<GoogleCloudAssuredworkloadsV1beta1Workload>;
659
+ /** Lists Assured Workloads under a CRM Node. */
660
+ list(request?: {
661
+ /** V1 error format. */
662
+ "$.xgafv"?: string;
663
+ /** OAuth access token. */
664
+ access_token?: string;
665
+ /** Data format for response. */
666
+ alt?: string;
667
+ /** JSONP */
668
+ callback?: string;
669
+ /** Selector specifying which fields to include in a partial response. */
670
+ fields?: string;
671
+ /** A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported. */
672
+ filter?: string;
673
+ /** 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. */
674
+ key?: string;
675
+ /** OAuth 2.0 token for the current user. */
676
+ oauth_token?: string;
677
+ /** Page size. */
678
+ pageSize?: number;
679
+ /** Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests. */
680
+ pageToken?: string;
681
+ /** Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`. */
682
+ parent: string;
683
+ /** Returns response with indentations and line breaks. */
684
+ prettyPrint?: boolean;
685
+ /** 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. */
686
+ quotaUser?: string;
687
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
688
+ upload_protocol?: string;
689
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
690
+ uploadType?: string;
691
+ }): Request<GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse>;
692
+ /**
693
+ * Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per
694
+ * workload can be in progress.
695
+ */
696
+ patch(request: {
697
+ /** V1 error format. */
698
+ "$.xgafv"?: string;
699
+ /** OAuth access token. */
700
+ access_token?: string;
701
+ /** Data format for response. */
702
+ alt?: string;
703
+ /** JSONP */
704
+ callback?: string;
705
+ /** Selector specifying which fields to include in a partial response. */
706
+ fields?: string;
707
+ /** 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. */
708
+ key?: string;
709
+ /** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
710
+ name: string;
711
+ /** OAuth 2.0 token for the current user. */
712
+ oauth_token?: string;
713
+ /** Returns response with indentations and line breaks. */
714
+ prettyPrint?: boolean;
715
+ /** 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. */
716
+ quotaUser?: string;
717
+ /** Required. The list of fields to be updated. */
718
+ updateMask?: string;
719
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
720
+ upload_protocol?: string;
721
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
722
+ uploadType?: string;
723
+ /** Request body */
724
+ resource: GoogleCloudAssuredworkloadsV1beta1Workload;
725
+ }): Request<GoogleCloudAssuredworkloadsV1beta1Workload>;
726
+ patch(request: {
727
+ /** V1 error format. */
728
+ "$.xgafv"?: string;
729
+ /** OAuth access token. */
730
+ access_token?: string;
731
+ /** Data format for response. */
732
+ alt?: string;
733
+ /** JSONP */
734
+ callback?: string;
735
+ /** Selector specifying which fields to include in a partial response. */
736
+ fields?: string;
737
+ /** 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. */
738
+ key?: string;
739
+ /** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
740
+ name: string;
741
+ /** OAuth 2.0 token for the current user. */
742
+ oauth_token?: string;
743
+ /** Returns response with indentations and line breaks. */
744
+ prettyPrint?: boolean;
745
+ /** 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. */
746
+ quotaUser?: string;
747
+ /** Required. The list of fields to be updated. */
748
+ updateMask?: string;
749
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
750
+ upload_protocol?: string;
751
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
752
+ uploadType?: string;
753
+ },
754
+ body: GoogleCloudAssuredworkloadsV1beta1Workload): Request<GoogleCloudAssuredworkloadsV1beta1Workload>;
755
+ /**
756
+ * Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at
757
+ * https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set
758
+ * permission on the folder resource to use this functionality.
759
+ */
760
+ restrictAllowedResources(request: {
761
+ /** V1 error format. */
762
+ "$.xgafv"?: string;
763
+ /** OAuth access token. */
764
+ access_token?: string;
765
+ /** Data format for response. */
766
+ alt?: string;
767
+ /** JSONP */
768
+ callback?: string;
769
+ /** Selector specifying which fields to include in a partial response. */
770
+ fields?: string;
771
+ /** 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. */
772
+ key?: string;
773
+ /**
774
+ * Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as
775
+ * "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".
776
+ */
777
+ name: string;
778
+ /** OAuth 2.0 token for the current user. */
779
+ oauth_token?: string;
780
+ /** Returns response with indentations and line breaks. */
781
+ prettyPrint?: boolean;
782
+ /** 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. */
783
+ quotaUser?: string;
784
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
785
+ upload_protocol?: string;
786
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
787
+ uploadType?: string;
788
+ /** Request body */
789
+ resource: GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest;
790
+ }): Request<{}>;
791
+ restrictAllowedResources(request: {
792
+ /** V1 error format. */
793
+ "$.xgafv"?: string;
794
+ /** OAuth access token. */
795
+ access_token?: string;
796
+ /** Data format for response. */
797
+ alt?: string;
798
+ /** JSONP */
799
+ callback?: string;
800
+ /** Selector specifying which fields to include in a partial response. */
801
+ fields?: string;
802
+ /** 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. */
803
+ key?: string;
804
+ /**
805
+ * Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as
806
+ * "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".
807
+ */
808
+ name: string;
809
+ /** OAuth 2.0 token for the current user. */
810
+ oauth_token?: string;
811
+ /** Returns response with indentations and line breaks. */
812
+ prettyPrint?: boolean;
813
+ /** 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. */
814
+ quotaUser?: string;
815
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
816
+ upload_protocol?: string;
817
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
818
+ uploadType?: string;
819
+ },
820
+ body: GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest): Request<{}>;
821
+ organizations: OrganizationsResource;
822
+ violations: ViolationsResource;
823
+ }
824
+ interface LocationsResource {
825
+ operations: OperationsResource;
826
+ workloads: WorkloadsResource;
827
+ }
828
+ interface OrganizationsResource {
829
+ locations: LocationsResource;
830
+ }
831
+ interface WorkloadsResource {
832
+ /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
833
+ analyzeWorkloadMove(request?: {
834
+ /** V1 error format. */
835
+ "$.xgafv"?: string;
836
+ /** OAuth access token. */
837
+ access_token?: string;
838
+ /** Data format for response. */
839
+ alt?: string;
840
+ /** JSONP */
841
+ callback?: string;
842
+ /** Selector specifying which fields to include in a partial response. */
843
+ fields?: string;
844
+ /** 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. */
845
+ key?: string;
846
+ /** OAuth 2.0 token for the current user. */
847
+ oauth_token?: string;
848
+ /** Returns response with indentations and line breaks. */
849
+ prettyPrint?: boolean;
850
+ /**
851
+ * 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
852
+ * "projects/{PROJECT_ID}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID.
853
+ */
854
+ project: string;
855
+ /** 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. */
856
+ quotaUser?: string;
857
+ /**
858
+ * The source type is a project-based workload. Specify the workloads's relative resource name, formatted as:
859
+ * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1"
860
+ */
861
+ source?: string;
862
+ /**
863
+ * 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
864
+ * resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" For example:
865
+ * "organizations/123/locations/us-east1/workloads/assured-workload-2"
866
+ */
867
+ target: string;
868
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
869
+ upload_protocol?: string;
870
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
871
+ uploadType?: string;
872
+ }): Request<GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse>;
873
+ }
874
+ interface LocationsResource {
875
+ workloads: WorkloadsResource;
876
+ }
877
+ interface OrganizationsResource {
878
+ locations: LocationsResource;
879
+ }
880
+ interface ProjectsResource {
881
+ organizations: OrganizationsResource;
882
+ }
883
+
884
+ const organizations: OrganizationsResource;
885
+
886
+ const projects: ProjectsResource;
887
+ }
888
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.assuredworkloads-v1beta1",
3
+ "version": "0.0.20220926",
4
+ "description": "TypeScript typings for Assured Workloads API v1beta1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,68 @@
1
+ # TypeScript typings for Assured Workloads API v1beta1
2
+
3
+
4
+ For detailed description please check [documentation](https://cloud.google.com).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Assured Workloads API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.assuredworkloads-v1beta1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load('https://assuredworkloads.googleapis.com/$discovery/rest?version=v1beta1', () => {
29
+ // now we can use:
30
+ // gapi.client.assuredworkloads
31
+ });
32
+ ```
33
+
34
+ ```typescript
35
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
36
+ gapi.client.load('assuredworkloads', 'v1beta1', () => {
37
+ // now we can use:
38
+ // gapi.client.assuredworkloads
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
+ 'https://www.googleapis.com/auth/cloud-platform',
50
+ ],
51
+ immediate = true;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
64
+
65
+ After that you can use Assured Workloads API resources: <!-- TODO: make this work for multiple namespaces -->
66
+
67
+ ```typescript
68
+ ```
package/tests.ts ADDED
@@ -0,0 +1,265 @@
1
+ /* This is stub file for gapi.client.assuredworkloads-v1beta1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220926
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://assuredworkloads.googleapis.com/$discovery/rest?version=v1beta1');
12
+ /** now we can use gapi.client.assuredworkloads */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
33
+ await gapi.client.assuredworkloads.organizations.locations.operations.get({
34
+ name: "Test string",
35
+ });
36
+ /**
37
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
38
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
39
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
40
+ * ensure the name binding is the parent resource, without the operations collection id.
41
+ */
42
+ await gapi.client.assuredworkloads.organizations.locations.operations.list({
43
+ filter: "Test string",
44
+ name: "Test string",
45
+ pageSize: 42,
46
+ pageToken: "Test string",
47
+ });
48
+ /** Creates Assured Workload. */
49
+ await gapi.client.assuredworkloads.organizations.locations.workloads.create({
50
+ externalId: "Test string",
51
+ parent: "Test string",
52
+ }, {
53
+ billingAccount: "Test string",
54
+ cjisSettings: {
55
+ kmsSettings: {
56
+ nextRotationTime: "Test string",
57
+ rotationPeriod: "Test string",
58
+ },
59
+ },
60
+ complianceRegime: "Test string",
61
+ complianceStatus: {
62
+ acknowledgedViolationCount: 42,
63
+ activeViolationCount: 42,
64
+ },
65
+ compliantButDisallowedServices: [
66
+ "Test string"
67
+ ],
68
+ createTime: "Test string",
69
+ displayName: "Test string",
70
+ enableSovereignControls: true,
71
+ etag: "Test string",
72
+ fedrampHighSettings: {
73
+ kmsSettings: {
74
+ nextRotationTime: "Test string",
75
+ rotationPeriod: "Test string",
76
+ },
77
+ },
78
+ fedrampModerateSettings: {
79
+ kmsSettings: {
80
+ nextRotationTime: "Test string",
81
+ rotationPeriod: "Test string",
82
+ },
83
+ },
84
+ il4Settings: {
85
+ kmsSettings: {
86
+ nextRotationTime: "Test string",
87
+ rotationPeriod: "Test string",
88
+ },
89
+ },
90
+ kajEnrollmentState: "Test string",
91
+ kmsSettings: {
92
+ nextRotationTime: "Test string",
93
+ rotationPeriod: "Test string",
94
+ },
95
+ labels: {
96
+ A: "Test string"
97
+ },
98
+ name: "Test string",
99
+ partner: "Test string",
100
+ provisionedResourcesParent: "Test string",
101
+ resources: [
102
+ {
103
+ resourceId: "Test string",
104
+ resourceType: "Test string",
105
+ }
106
+ ],
107
+ resourceSettings: [
108
+ {
109
+ displayName: "Test string",
110
+ resourceId: "Test string",
111
+ resourceType: "Test string",
112
+ }
113
+ ],
114
+ saaEnrollmentResponse: {
115
+ setupErrors: [
116
+ "Test string"
117
+ ],
118
+ setupStatus: "Test string",
119
+ },
120
+ });
121
+ /**
122
+ * Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to
123
+ * assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.
124
+ */
125
+ await gapi.client.assuredworkloads.organizations.locations.workloads.delete({
126
+ etag: "Test string",
127
+ name: "Test string",
128
+ });
129
+ /** Gets Assured Workload associated with a CRM Node */
130
+ await gapi.client.assuredworkloads.organizations.locations.workloads.get({
131
+ name: "Test string",
132
+ });
133
+ /** Lists Assured Workloads under a CRM Node. */
134
+ await gapi.client.assuredworkloads.organizations.locations.workloads.list({
135
+ filter: "Test string",
136
+ pageSize: 42,
137
+ pageToken: "Test string",
138
+ parent: "Test string",
139
+ });
140
+ /**
141
+ * Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per
142
+ * workload can be in progress.
143
+ */
144
+ await gapi.client.assuredworkloads.organizations.locations.workloads.patch({
145
+ name: "Test string",
146
+ updateMask: "Test string",
147
+ }, {
148
+ billingAccount: "Test string",
149
+ cjisSettings: {
150
+ kmsSettings: {
151
+ nextRotationTime: "Test string",
152
+ rotationPeriod: "Test string",
153
+ },
154
+ },
155
+ complianceRegime: "Test string",
156
+ complianceStatus: {
157
+ acknowledgedViolationCount: 42,
158
+ activeViolationCount: 42,
159
+ },
160
+ compliantButDisallowedServices: [
161
+ "Test string"
162
+ ],
163
+ createTime: "Test string",
164
+ displayName: "Test string",
165
+ enableSovereignControls: true,
166
+ etag: "Test string",
167
+ fedrampHighSettings: {
168
+ kmsSettings: {
169
+ nextRotationTime: "Test string",
170
+ rotationPeriod: "Test string",
171
+ },
172
+ },
173
+ fedrampModerateSettings: {
174
+ kmsSettings: {
175
+ nextRotationTime: "Test string",
176
+ rotationPeriod: "Test string",
177
+ },
178
+ },
179
+ il4Settings: {
180
+ kmsSettings: {
181
+ nextRotationTime: "Test string",
182
+ rotationPeriod: "Test string",
183
+ },
184
+ },
185
+ kajEnrollmentState: "Test string",
186
+ kmsSettings: {
187
+ nextRotationTime: "Test string",
188
+ rotationPeriod: "Test string",
189
+ },
190
+ labels: {
191
+ A: "Test string"
192
+ },
193
+ name: "Test string",
194
+ partner: "Test string",
195
+ provisionedResourcesParent: "Test string",
196
+ resources: [
197
+ {
198
+ resourceId: "Test string",
199
+ resourceType: "Test string",
200
+ }
201
+ ],
202
+ resourceSettings: [
203
+ {
204
+ displayName: "Test string",
205
+ resourceId: "Test string",
206
+ resourceType: "Test string",
207
+ }
208
+ ],
209
+ saaEnrollmentResponse: {
210
+ setupErrors: [
211
+ "Test string"
212
+ ],
213
+ setupStatus: "Test string",
214
+ },
215
+ });
216
+ /**
217
+ * Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at
218
+ * https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission
219
+ * on the folder resource to use this functionality.
220
+ */
221
+ await gapi.client.assuredworkloads.organizations.locations.workloads.restrictAllowedResources({
222
+ name: "Test string",
223
+ }, {
224
+ restrictionType: "Test string",
225
+ });
226
+ /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
227
+ await gapi.client.assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove({
228
+ project: "Test string",
229
+ source: "Test string",
230
+ target: "Test string",
231
+ });
232
+ /**
233
+ * 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
234
+ * business justification. Acknowledgement is a permanent operation and it cannot be reverted.
235
+ */
236
+ await gapi.client.assuredworkloads.organizations.locations.workloads.violations.acknowledge({
237
+ name: "Test string",
238
+ }, {
239
+ comment: "Test string",
240
+ nonCompliantOrgPolicy: "Test string",
241
+ });
242
+ /** Retrieves Assured Workload Violation based on ID. */
243
+ await gapi.client.assuredworkloads.organizations.locations.workloads.violations.get({
244
+ name: "Test string",
245
+ });
246
+ /**
247
+ * Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen
248
+ * or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`
249
+ */
250
+ await gapi.client.assuredworkloads.organizations.locations.workloads.violations.list({
251
+ filter: "Test string",
252
+ "interval.endTime": "Test string",
253
+ "interval.startTime": "Test string",
254
+ pageSize: 42,
255
+ pageToken: "Test string",
256
+ parent: "Test string",
257
+ });
258
+ /** Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. */
259
+ await gapi.client.assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove({
260
+ project: "Test string",
261
+ source: "Test string",
262
+ target: "Test string",
263
+ });
264
+ }
265
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6", "dom"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictNullChecks": true,
8
+ "baseUrl": "../",
9
+ "typeRoots": [
10
+ "../"
11
+ ],
12
+ "types": [],
13
+ "noEmit": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strictFunctionTypes": true
16
+ },
17
+ "files": ["index.d.ts", "tests.ts"]
18
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }