@maxim_mazurok/gapi.client.assuredworkloads-v1 0.0.20220729
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 +789 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +160 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,789 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Assured Workloads API v1 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
|
+
// TypeScript Version: 2.8
|
|
8
|
+
|
|
9
|
+
// IMPORTANT
|
|
10
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
11
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
12
|
+
// Generated from: https://assuredworkloads.googleapis.com/$discovery/rest?version=v1
|
|
13
|
+
// Revision: 20220729
|
|
14
|
+
|
|
15
|
+
/// <reference types="gapi.client" />
|
|
16
|
+
|
|
17
|
+
declare namespace gapi.client {
|
|
18
|
+
/** Load Assured Workloads API v1 */
|
|
19
|
+
function load(urlOrObject: "https://assuredworkloads.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
|
|
20
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
21
|
+
function load(name: "assuredworkloads", version: "v1"): Promise<void>;
|
|
22
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
23
|
+
function load(name: "assuredworkloads", version: "v1", callback: () => any): void;
|
|
24
|
+
|
|
25
|
+
namespace assuredworkloads {
|
|
26
|
+
interface GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata {
|
|
27
|
+
/** Optional. Compliance controls that should be applied to the resources managed by the workload. */
|
|
28
|
+
complianceRegime?: string;
|
|
29
|
+
/** Optional. Time when the operation was created. */
|
|
30
|
+
createTime?: string;
|
|
31
|
+
/** Optional. The display name of the workload. */
|
|
32
|
+
displayName?: string;
|
|
33
|
+
/** Optional. The parent of the workload. */
|
|
34
|
+
parent?: string;
|
|
35
|
+
/** Optional. Resource properties in the input that are used for creating/customizing workload resources. */
|
|
36
|
+
resourceSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[];
|
|
37
|
+
}
|
|
38
|
+
interface GoogleCloudAssuredworkloadsV1beta1Workload {
|
|
39
|
+
/**
|
|
40
|
+
* Input only. 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
|
|
41
|
+
* Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form
|
|
42
|
+
* `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.
|
|
43
|
+
*/
|
|
44
|
+
billingAccount?: string;
|
|
45
|
+
/** Input only. Immutable. Settings specific to resources needed for CJIS. */
|
|
46
|
+
cjisSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings;
|
|
47
|
+
/** Required. Immutable. Compliance Regime associated with this workload. */
|
|
48
|
+
complianceRegime?: string;
|
|
49
|
+
/** Output only. Immutable. The Workload creation timestamp. */
|
|
50
|
+
createTime?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 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,
|
|
53
|
+
* hyphen, and spaces. Example: My Workload
|
|
54
|
+
*/
|
|
55
|
+
displayName?: string;
|
|
56
|
+
/** Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. */
|
|
57
|
+
enableSovereignControls?: boolean;
|
|
58
|
+
/** Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. */
|
|
59
|
+
etag?: string;
|
|
60
|
+
/** Input only. Immutable. Settings specific to resources needed for FedRAMP High. */
|
|
61
|
+
fedrampHighSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings;
|
|
62
|
+
/** Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. */
|
|
63
|
+
fedrampModerateSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings;
|
|
64
|
+
/** Input only. Immutable. Settings specific to resources needed for IL4. */
|
|
65
|
+
il4Settings?: GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings;
|
|
66
|
+
/** Output only. Represents the KAJ enrollment state of the given workload. */
|
|
67
|
+
kajEnrollmentState?: string;
|
|
68
|
+
/**
|
|
69
|
+
* 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
|
|
70
|
+
* Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
|
|
71
|
+
*/
|
|
72
|
+
kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
|
|
73
|
+
/** Optional. Labels applied to the workload. */
|
|
74
|
+
labels?: { [P in string]: string };
|
|
75
|
+
/** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
|
|
76
|
+
name?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 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
|
|
79
|
+
* specified all resources are created under the parent organization. Format: folders/{folder_id}
|
|
80
|
+
*/
|
|
81
|
+
provisionedResourcesParent?: string;
|
|
82
|
+
/**
|
|
83
|
+
* 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
|
|
84
|
+
* will fail. Always read only.
|
|
85
|
+
*/
|
|
86
|
+
resources?: GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo[];
|
|
87
|
+
/**
|
|
88
|
+
* 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.
|
|
89
|
+
* This field is optional.
|
|
90
|
+
*/
|
|
91
|
+
resourceSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[];
|
|
92
|
+
/**
|
|
93
|
+
* 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
|
|
94
|
+
* is shown in SAA details page.
|
|
95
|
+
*/
|
|
96
|
+
saaEnrollmentResponse?: GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse;
|
|
97
|
+
}
|
|
98
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings {
|
|
99
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
100
|
+
kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
|
|
101
|
+
}
|
|
102
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings {
|
|
103
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
104
|
+
kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
|
|
105
|
+
}
|
|
106
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings {
|
|
107
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
108
|
+
kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
|
|
109
|
+
}
|
|
110
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings {
|
|
111
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
112
|
+
kmsSettings?: GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings;
|
|
113
|
+
}
|
|
114
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings {
|
|
115
|
+
/** 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. */
|
|
116
|
+
nextRotationTime?: string;
|
|
117
|
+
/**
|
|
118
|
+
* 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
|
|
119
|
+
* most 876,000 hours.
|
|
120
|
+
*/
|
|
121
|
+
rotationPeriod?: string;
|
|
122
|
+
}
|
|
123
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo {
|
|
124
|
+
/** Resource identifier. For a project this represents project_number. */
|
|
125
|
+
resourceId?: string;
|
|
126
|
+
/** Indicates the type of resource. */
|
|
127
|
+
resourceType?: string;
|
|
128
|
+
}
|
|
129
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings {
|
|
130
|
+
/** User-assigned resource display name. If not empty it will be used to create a resource with the specified name. */
|
|
131
|
+
displayName?: string;
|
|
132
|
+
/**
|
|
133
|
+
* 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
|
|
134
|
+
* folder, don't set this value as folder_id is assigned by Google.
|
|
135
|
+
*/
|
|
136
|
+
resourceId?: string;
|
|
137
|
+
/** 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) */
|
|
138
|
+
resourceType?: string;
|
|
139
|
+
}
|
|
140
|
+
interface GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse {
|
|
141
|
+
/** Indicates SAA enrollment setup error if any. */
|
|
142
|
+
setupErrors?: string[];
|
|
143
|
+
/** Indicates SAA enrollment status of a given workload. */
|
|
144
|
+
setupStatus?: string;
|
|
145
|
+
}
|
|
146
|
+
interface GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata {
|
|
147
|
+
/** Optional. Compliance controls that should be applied to the resources managed by the workload. */
|
|
148
|
+
complianceRegime?: string;
|
|
149
|
+
/** Optional. Time when the operation was created. */
|
|
150
|
+
createTime?: string;
|
|
151
|
+
/** Optional. The display name of the workload. */
|
|
152
|
+
displayName?: string;
|
|
153
|
+
/** Optional. The parent of the workload. */
|
|
154
|
+
parent?: string;
|
|
155
|
+
}
|
|
156
|
+
interface GoogleCloudAssuredworkloadsV1ListWorkloadsResponse {
|
|
157
|
+
/** The next page token. Return empty if reached the last page. */
|
|
158
|
+
nextPageToken?: string;
|
|
159
|
+
/** List of Workloads under a given parent. */
|
|
160
|
+
workloads?: GoogleCloudAssuredworkloadsV1Workload[];
|
|
161
|
+
}
|
|
162
|
+
interface GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest {
|
|
163
|
+
/** Required. The type of restriction for using gcp products in the Workload environment. */
|
|
164
|
+
restrictionType?: string;
|
|
165
|
+
}
|
|
166
|
+
// tslint:disable-next-line:no-empty-interface
|
|
167
|
+
interface GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse {
|
|
168
|
+
}
|
|
169
|
+
interface GoogleCloudAssuredworkloadsV1Workload {
|
|
170
|
+
/**
|
|
171
|
+
* 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
|
|
172
|
+
* Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form
|
|
173
|
+
* `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.
|
|
174
|
+
*/
|
|
175
|
+
billingAccount?: string;
|
|
176
|
+
/** Required. Immutable. Compliance Regime associated with this workload. */
|
|
177
|
+
complianceRegime?: string;
|
|
178
|
+
/** Output only. Immutable. The Workload creation timestamp. */
|
|
179
|
+
createTime?: string;
|
|
180
|
+
/**
|
|
181
|
+
* 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,
|
|
182
|
+
* hyphen, and spaces. Example: My Workload
|
|
183
|
+
*/
|
|
184
|
+
displayName?: string;
|
|
185
|
+
/** Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. */
|
|
186
|
+
enableSovereignControls?: boolean;
|
|
187
|
+
/** Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. */
|
|
188
|
+
etag?: string;
|
|
189
|
+
/** Output only. Represents the KAJ enrollment state of the given workload. */
|
|
190
|
+
kajEnrollmentState?: string;
|
|
191
|
+
/**
|
|
192
|
+
* 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
|
|
193
|
+
* Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
|
|
194
|
+
*/
|
|
195
|
+
kmsSettings?: GoogleCloudAssuredworkloadsV1WorkloadKMSSettings;
|
|
196
|
+
/** Optional. Labels applied to the workload. */
|
|
197
|
+
labels?: { [P in string]: string };
|
|
198
|
+
/** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
|
|
199
|
+
name?: string;
|
|
200
|
+
/**
|
|
201
|
+
* 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
|
|
202
|
+
* specified all resources are created under the parent organization. Format: folders/{folder_id}
|
|
203
|
+
*/
|
|
204
|
+
provisionedResourcesParent?: string;
|
|
205
|
+
/**
|
|
206
|
+
* 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
|
|
207
|
+
* will fail. Always read only.
|
|
208
|
+
*/
|
|
209
|
+
resources?: GoogleCloudAssuredworkloadsV1WorkloadResourceInfo[];
|
|
210
|
+
/**
|
|
211
|
+
* 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.
|
|
212
|
+
* This field is optional.
|
|
213
|
+
*/
|
|
214
|
+
resourceSettings?: GoogleCloudAssuredworkloadsV1WorkloadResourceSettings[];
|
|
215
|
+
/**
|
|
216
|
+
* 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
|
|
217
|
+
* is shown in SAA details page.
|
|
218
|
+
*/
|
|
219
|
+
saaEnrollmentResponse?: GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse;
|
|
220
|
+
}
|
|
221
|
+
interface GoogleCloudAssuredworkloadsV1WorkloadKMSSettings {
|
|
222
|
+
/** 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. */
|
|
223
|
+
nextRotationTime?: string;
|
|
224
|
+
/**
|
|
225
|
+
* 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
|
|
226
|
+
* most 876,000 hours.
|
|
227
|
+
*/
|
|
228
|
+
rotationPeriod?: string;
|
|
229
|
+
}
|
|
230
|
+
interface GoogleCloudAssuredworkloadsV1WorkloadResourceInfo {
|
|
231
|
+
/** Resource identifier. For a project this represents project_number. */
|
|
232
|
+
resourceId?: string;
|
|
233
|
+
/** Indicates the type of resource. */
|
|
234
|
+
resourceType?: string;
|
|
235
|
+
}
|
|
236
|
+
interface GoogleCloudAssuredworkloadsV1WorkloadResourceSettings {
|
|
237
|
+
/** User-assigned resource display name. If not empty it will be used to create a resource with the specified name. */
|
|
238
|
+
displayName?: string;
|
|
239
|
+
/**
|
|
240
|
+
* 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
|
|
241
|
+
* folder, don't set this value as folder_id is assigned by Google.
|
|
242
|
+
*/
|
|
243
|
+
resourceId?: string;
|
|
244
|
+
/** 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) */
|
|
245
|
+
resourceType?: string;
|
|
246
|
+
}
|
|
247
|
+
interface GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse {
|
|
248
|
+
/** Indicates SAA enrollment setup error if any. */
|
|
249
|
+
setupErrors?: string[];
|
|
250
|
+
/** Indicates SAA enrollment status of a given workload. */
|
|
251
|
+
setupStatus?: string;
|
|
252
|
+
}
|
|
253
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata {
|
|
254
|
+
/** Optional. Compliance controls that should be applied to the resources managed by the workload. */
|
|
255
|
+
complianceRegime?: string;
|
|
256
|
+
/** Optional. Time when the operation was created. */
|
|
257
|
+
createTime?: string;
|
|
258
|
+
/** Optional. The display name of the workload. */
|
|
259
|
+
displayName?: string;
|
|
260
|
+
/** Optional. The parent of the workload. */
|
|
261
|
+
parent?: string;
|
|
262
|
+
/** Optional. Resource properties in the input that are used for creating/customizing workload resources. */
|
|
263
|
+
resourceSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings[];
|
|
264
|
+
}
|
|
265
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkload {
|
|
266
|
+
/**
|
|
267
|
+
* Input only. 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
|
|
268
|
+
* Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form
|
|
269
|
+
* `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.
|
|
270
|
+
*/
|
|
271
|
+
billingAccount?: string;
|
|
272
|
+
/** Required. Input only. Immutable. Settings specific to resources needed for CJIS. */
|
|
273
|
+
cjisSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings;
|
|
274
|
+
/** Required. Immutable. Compliance Regime associated with this workload. */
|
|
275
|
+
complianceRegime?: string;
|
|
276
|
+
/** Output only. Count of active Violations in the Workload. */
|
|
277
|
+
complianceStatus?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus;
|
|
278
|
+
/** Output only. Immutable. The Workload creation timestamp. */
|
|
279
|
+
createTime?: string;
|
|
280
|
+
/**
|
|
281
|
+
* 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,
|
|
282
|
+
* hyphen, and spaces. Example: My Workload
|
|
283
|
+
*/
|
|
284
|
+
displayName?: string;
|
|
285
|
+
/** Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. */
|
|
286
|
+
enableSovereignControls?: boolean;
|
|
287
|
+
/** Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. */
|
|
288
|
+
etag?: string;
|
|
289
|
+
/** Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High. */
|
|
290
|
+
fedrampHighSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings;
|
|
291
|
+
/** Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. */
|
|
292
|
+
fedrampModerateSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings;
|
|
293
|
+
/** Required. Input only. Immutable. Settings specific to resources needed for IL4. */
|
|
294
|
+
il4Settings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings;
|
|
295
|
+
/** Output only. Represents the KAJ enrollment state of the given workload. */
|
|
296
|
+
kajEnrollmentState?: string;
|
|
297
|
+
/**
|
|
298
|
+
* 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
|
|
299
|
+
* Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
|
|
300
|
+
*/
|
|
301
|
+
kmsSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings;
|
|
302
|
+
/** Optional. Labels applied to the workload. */
|
|
303
|
+
labels?: { [P in string]: string };
|
|
304
|
+
/** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
|
|
305
|
+
name?: string;
|
|
306
|
+
/**
|
|
307
|
+
* 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
|
|
308
|
+
* specified all resources are created under the parent organization. Format: folders/{folder_id}
|
|
309
|
+
*/
|
|
310
|
+
provisionedResourcesParent?: string;
|
|
311
|
+
/**
|
|
312
|
+
* 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
|
|
313
|
+
* will fail. Always read only.
|
|
314
|
+
*/
|
|
315
|
+
resources?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo[];
|
|
316
|
+
/**
|
|
317
|
+
* 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.
|
|
318
|
+
* This field is optional.
|
|
319
|
+
*/
|
|
320
|
+
resourceSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings[];
|
|
321
|
+
/**
|
|
322
|
+
* 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
|
|
323
|
+
* is shown in SAA details page.
|
|
324
|
+
*/
|
|
325
|
+
saaEnrollmentResponse?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse;
|
|
326
|
+
}
|
|
327
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings {
|
|
328
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
329
|
+
kmsSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings;
|
|
330
|
+
}
|
|
331
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus {
|
|
332
|
+
/** Count of active Violations which are acknowledged in the Workload. */
|
|
333
|
+
acknowledgedViolationCount?: number;
|
|
334
|
+
/** Count of active Violations which haven't been acknowledged. */
|
|
335
|
+
activeViolationCount?: number;
|
|
336
|
+
}
|
|
337
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings {
|
|
338
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
339
|
+
kmsSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings;
|
|
340
|
+
}
|
|
341
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings {
|
|
342
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
343
|
+
kmsSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings;
|
|
344
|
+
}
|
|
345
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings {
|
|
346
|
+
/** Input only. Immutable. Settings used to create a CMEK crypto key. */
|
|
347
|
+
kmsSettings?: GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings;
|
|
348
|
+
}
|
|
349
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings {
|
|
350
|
+
/** 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. */
|
|
351
|
+
nextRotationTime?: string;
|
|
352
|
+
/**
|
|
353
|
+
* 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
|
|
354
|
+
* most 876,000 hours.
|
|
355
|
+
*/
|
|
356
|
+
rotationPeriod?: string;
|
|
357
|
+
}
|
|
358
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo {
|
|
359
|
+
/** Resource identifier. For a project this represents project_number. */
|
|
360
|
+
resourceId?: string;
|
|
361
|
+
/** Indicates the type of resource. */
|
|
362
|
+
resourceType?: string;
|
|
363
|
+
}
|
|
364
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings {
|
|
365
|
+
/** User-assigned resource display name. If not empty it will be used to create a resource with the specified name. */
|
|
366
|
+
displayName?: string;
|
|
367
|
+
/**
|
|
368
|
+
* 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
|
|
369
|
+
* folder, don't set this value as folder_id is assigned by Google.
|
|
370
|
+
*/
|
|
371
|
+
resourceId?: string;
|
|
372
|
+
/** 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) */
|
|
373
|
+
resourceType?: string;
|
|
374
|
+
}
|
|
375
|
+
interface GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse {
|
|
376
|
+
/** Indicates SAA enrollment setup error if any. */
|
|
377
|
+
setupErrors?: string[];
|
|
378
|
+
/** Indicates SAA enrollment status of a given workload. */
|
|
379
|
+
setupStatus?: string;
|
|
380
|
+
}
|
|
381
|
+
interface GoogleLongrunningListOperationsResponse {
|
|
382
|
+
/** The standard List next-page token. */
|
|
383
|
+
nextPageToken?: string;
|
|
384
|
+
/** A list of operations that matches the specified filter in the request. */
|
|
385
|
+
operations?: GoogleLongrunningOperation[];
|
|
386
|
+
}
|
|
387
|
+
interface GoogleLongrunningOperation {
|
|
388
|
+
/** 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. */
|
|
389
|
+
done?: boolean;
|
|
390
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
391
|
+
error?: GoogleRpcStatus;
|
|
392
|
+
/**
|
|
393
|
+
* 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
|
|
394
|
+
* metadata. Any method that returns a long-running operation should document the metadata type, if any.
|
|
395
|
+
*/
|
|
396
|
+
metadata?: { [P in string]: any };
|
|
397
|
+
/**
|
|
398
|
+
* 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
|
|
399
|
+
* with `operations/{unique_id}`.
|
|
400
|
+
*/
|
|
401
|
+
name?: string;
|
|
402
|
+
/**
|
|
403
|
+
* 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
|
|
404
|
+
* 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
|
|
405
|
+
* original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
|
|
406
|
+
*/
|
|
407
|
+
response?: { [P in string]: any };
|
|
408
|
+
}
|
|
409
|
+
// tslint:disable-next-line:no-empty-interface
|
|
410
|
+
interface GoogleProtobufEmpty {
|
|
411
|
+
}
|
|
412
|
+
interface GoogleRpcStatus {
|
|
413
|
+
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
414
|
+
code?: number;
|
|
415
|
+
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
416
|
+
details?: Array<{ [P in string]: any }>;
|
|
417
|
+
/**
|
|
418
|
+
* 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
|
|
419
|
+
* client.
|
|
420
|
+
*/
|
|
421
|
+
message?: string;
|
|
422
|
+
}
|
|
423
|
+
interface OperationsResource {
|
|
424
|
+
/** 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. */
|
|
425
|
+
get(request?: {
|
|
426
|
+
/** V1 error format. */
|
|
427
|
+
"$.xgafv"?: string;
|
|
428
|
+
/** OAuth access token. */
|
|
429
|
+
access_token?: string;
|
|
430
|
+
/** Data format for response. */
|
|
431
|
+
alt?: string;
|
|
432
|
+
/** JSONP */
|
|
433
|
+
callback?: string;
|
|
434
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
435
|
+
fields?: string;
|
|
436
|
+
/** 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. */
|
|
437
|
+
key?: string;
|
|
438
|
+
/** The name of the operation resource. */
|
|
439
|
+
name: string;
|
|
440
|
+
/** OAuth 2.0 token for the current user. */
|
|
441
|
+
oauth_token?: string;
|
|
442
|
+
/** Returns response with indentations and line breaks. */
|
|
443
|
+
prettyPrint?: boolean;
|
|
444
|
+
/** 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. */
|
|
445
|
+
quotaUser?: string;
|
|
446
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
447
|
+
upload_protocol?: string;
|
|
448
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
449
|
+
uploadType?: string;
|
|
450
|
+
}): Request<GoogleLongrunningOperation>;
|
|
451
|
+
/**
|
|
452
|
+
* 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
|
|
453
|
+
* 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
|
|
454
|
+
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
455
|
+
* ensure the name binding is the parent resource, without the operations collection id.
|
|
456
|
+
*/
|
|
457
|
+
list(request?: {
|
|
458
|
+
/** V1 error format. */
|
|
459
|
+
"$.xgafv"?: string;
|
|
460
|
+
/** OAuth access token. */
|
|
461
|
+
access_token?: string;
|
|
462
|
+
/** Data format for response. */
|
|
463
|
+
alt?: string;
|
|
464
|
+
/** JSONP */
|
|
465
|
+
callback?: string;
|
|
466
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
467
|
+
fields?: string;
|
|
468
|
+
/** The standard list filter. */
|
|
469
|
+
filter?: string;
|
|
470
|
+
/** 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. */
|
|
471
|
+
key?: string;
|
|
472
|
+
/** The name of the operation's parent resource. */
|
|
473
|
+
name: string;
|
|
474
|
+
/** OAuth 2.0 token for the current user. */
|
|
475
|
+
oauth_token?: string;
|
|
476
|
+
/** The standard list page size. */
|
|
477
|
+
pageSize?: number;
|
|
478
|
+
/** The standard list page token. */
|
|
479
|
+
pageToken?: 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<GoogleLongrunningListOperationsResponse>;
|
|
489
|
+
}
|
|
490
|
+
interface WorkloadsResource {
|
|
491
|
+
/** Creates Assured Workload. */
|
|
492
|
+
create(request: {
|
|
493
|
+
/** V1 error format. */
|
|
494
|
+
"$.xgafv"?: string;
|
|
495
|
+
/** OAuth access token. */
|
|
496
|
+
access_token?: string;
|
|
497
|
+
/** Data format for response. */
|
|
498
|
+
alt?: string;
|
|
499
|
+
/** JSONP */
|
|
500
|
+
callback?: string;
|
|
501
|
+
/**
|
|
502
|
+
* 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
|
|
503
|
+
* identifier will add a label to the workload and contained projects with the identifier as the value.
|
|
504
|
+
*/
|
|
505
|
+
externalId?: string;
|
|
506
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
507
|
+
fields?: string;
|
|
508
|
+
/** 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. */
|
|
509
|
+
key?: string;
|
|
510
|
+
/** OAuth 2.0 token for the current user. */
|
|
511
|
+
oauth_token?: string;
|
|
512
|
+
/** Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. */
|
|
513
|
+
parent: string;
|
|
514
|
+
/** Returns response with indentations and line breaks. */
|
|
515
|
+
prettyPrint?: boolean;
|
|
516
|
+
/** 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. */
|
|
517
|
+
quotaUser?: string;
|
|
518
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
519
|
+
upload_protocol?: string;
|
|
520
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
521
|
+
uploadType?: string;
|
|
522
|
+
/** Request body */
|
|
523
|
+
resource: GoogleCloudAssuredworkloadsV1Workload;
|
|
524
|
+
}): Request<GoogleLongrunningOperation>;
|
|
525
|
+
create(request: {
|
|
526
|
+
/** V1 error format. */
|
|
527
|
+
"$.xgafv"?: string;
|
|
528
|
+
/** OAuth access token. */
|
|
529
|
+
access_token?: string;
|
|
530
|
+
/** Data format for response. */
|
|
531
|
+
alt?: string;
|
|
532
|
+
/** JSONP */
|
|
533
|
+
callback?: string;
|
|
534
|
+
/**
|
|
535
|
+
* 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
|
|
536
|
+
* identifier will add a label to the workload and contained projects with the identifier as the value.
|
|
537
|
+
*/
|
|
538
|
+
externalId?: string;
|
|
539
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
540
|
+
fields?: string;
|
|
541
|
+
/** 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. */
|
|
542
|
+
key?: string;
|
|
543
|
+
/** OAuth 2.0 token for the current user. */
|
|
544
|
+
oauth_token?: string;
|
|
545
|
+
/** Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id}/locations/{location_id}`. */
|
|
546
|
+
parent: string;
|
|
547
|
+
/** Returns response with indentations and line breaks. */
|
|
548
|
+
prettyPrint?: boolean;
|
|
549
|
+
/** 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. */
|
|
550
|
+
quotaUser?: string;
|
|
551
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
552
|
+
upload_protocol?: string;
|
|
553
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
554
|
+
uploadType?: string;
|
|
555
|
+
},
|
|
556
|
+
body: GoogleCloudAssuredworkloadsV1Workload): Request<GoogleLongrunningOperation>;
|
|
557
|
+
/** 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. */
|
|
558
|
+
delete(request?: {
|
|
559
|
+
/** V1 error format. */
|
|
560
|
+
"$.xgafv"?: string;
|
|
561
|
+
/** OAuth access token. */
|
|
562
|
+
access_token?: string;
|
|
563
|
+
/** Data format for response. */
|
|
564
|
+
alt?: string;
|
|
565
|
+
/** JSONP */
|
|
566
|
+
callback?: string;
|
|
567
|
+
/** Optional. The etag of the workload. If this is provided, it must match the server's etag. */
|
|
568
|
+
etag?: string;
|
|
569
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
570
|
+
fields?: string;
|
|
571
|
+
/** 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. */
|
|
572
|
+
key?: string;
|
|
573
|
+
/** Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id} */
|
|
574
|
+
name: string;
|
|
575
|
+
/** OAuth 2.0 token for the current user. */
|
|
576
|
+
oauth_token?: string;
|
|
577
|
+
/** Returns response with indentations and line breaks. */
|
|
578
|
+
prettyPrint?: boolean;
|
|
579
|
+
/** 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. */
|
|
580
|
+
quotaUser?: string;
|
|
581
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
582
|
+
upload_protocol?: string;
|
|
583
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
584
|
+
uploadType?: string;
|
|
585
|
+
}): Request<{}>;
|
|
586
|
+
/** Gets Assured Workload associated with a CRM Node */
|
|
587
|
+
get(request?: {
|
|
588
|
+
/** V1 error format. */
|
|
589
|
+
"$.xgafv"?: string;
|
|
590
|
+
/** OAuth access token. */
|
|
591
|
+
access_token?: string;
|
|
592
|
+
/** Data format for response. */
|
|
593
|
+
alt?: string;
|
|
594
|
+
/** JSONP */
|
|
595
|
+
callback?: string;
|
|
596
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
597
|
+
fields?: string;
|
|
598
|
+
/** 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. */
|
|
599
|
+
key?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as
|
|
602
|
+
* "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".
|
|
603
|
+
*/
|
|
604
|
+
name: string;
|
|
605
|
+
/** OAuth 2.0 token for the current user. */
|
|
606
|
+
oauth_token?: string;
|
|
607
|
+
/** Returns response with indentations and line breaks. */
|
|
608
|
+
prettyPrint?: boolean;
|
|
609
|
+
/** 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. */
|
|
610
|
+
quotaUser?: string;
|
|
611
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
612
|
+
upload_protocol?: string;
|
|
613
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
614
|
+
uploadType?: string;
|
|
615
|
+
}): Request<GoogleCloudAssuredworkloadsV1Workload>;
|
|
616
|
+
/** Lists Assured Workloads under a CRM Node. */
|
|
617
|
+
list(request?: {
|
|
618
|
+
/** V1 error format. */
|
|
619
|
+
"$.xgafv"?: string;
|
|
620
|
+
/** OAuth access token. */
|
|
621
|
+
access_token?: string;
|
|
622
|
+
/** Data format for response. */
|
|
623
|
+
alt?: string;
|
|
624
|
+
/** JSONP */
|
|
625
|
+
callback?: string;
|
|
626
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
627
|
+
fields?: string;
|
|
628
|
+
/** A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported. */
|
|
629
|
+
filter?: string;
|
|
630
|
+
/** 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. */
|
|
631
|
+
key?: string;
|
|
632
|
+
/** OAuth 2.0 token for the current user. */
|
|
633
|
+
oauth_token?: string;
|
|
634
|
+
/** Page size. */
|
|
635
|
+
pageSize?: number;
|
|
636
|
+
/** 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. */
|
|
637
|
+
pageToken?: string;
|
|
638
|
+
/** Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id}/locations/{location}`. */
|
|
639
|
+
parent: string;
|
|
640
|
+
/** Returns response with indentations and line breaks. */
|
|
641
|
+
prettyPrint?: boolean;
|
|
642
|
+
/** 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. */
|
|
643
|
+
quotaUser?: string;
|
|
644
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
645
|
+
upload_protocol?: string;
|
|
646
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
647
|
+
uploadType?: string;
|
|
648
|
+
}): Request<GoogleCloudAssuredworkloadsV1ListWorkloadsResponse>;
|
|
649
|
+
/**
|
|
650
|
+
* 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
|
|
651
|
+
* workload can be in progress.
|
|
652
|
+
*/
|
|
653
|
+
patch(request: {
|
|
654
|
+
/** V1 error format. */
|
|
655
|
+
"$.xgafv"?: string;
|
|
656
|
+
/** OAuth access token. */
|
|
657
|
+
access_token?: string;
|
|
658
|
+
/** Data format for response. */
|
|
659
|
+
alt?: string;
|
|
660
|
+
/** JSONP */
|
|
661
|
+
callback?: string;
|
|
662
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
663
|
+
fields?: string;
|
|
664
|
+
/** 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. */
|
|
665
|
+
key?: string;
|
|
666
|
+
/** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
|
|
667
|
+
name: string;
|
|
668
|
+
/** OAuth 2.0 token for the current user. */
|
|
669
|
+
oauth_token?: string;
|
|
670
|
+
/** Returns response with indentations and line breaks. */
|
|
671
|
+
prettyPrint?: boolean;
|
|
672
|
+
/** 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. */
|
|
673
|
+
quotaUser?: string;
|
|
674
|
+
/** Required. The list of fields to be updated. */
|
|
675
|
+
updateMask?: string;
|
|
676
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
677
|
+
upload_protocol?: string;
|
|
678
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
679
|
+
uploadType?: string;
|
|
680
|
+
/** Request body */
|
|
681
|
+
resource: GoogleCloudAssuredworkloadsV1Workload;
|
|
682
|
+
}): Request<GoogleCloudAssuredworkloadsV1Workload>;
|
|
683
|
+
patch(request: {
|
|
684
|
+
/** V1 error format. */
|
|
685
|
+
"$.xgafv"?: string;
|
|
686
|
+
/** OAuth access token. */
|
|
687
|
+
access_token?: string;
|
|
688
|
+
/** Data format for response. */
|
|
689
|
+
alt?: string;
|
|
690
|
+
/** JSONP */
|
|
691
|
+
callback?: string;
|
|
692
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
693
|
+
fields?: string;
|
|
694
|
+
/** 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. */
|
|
695
|
+
key?: string;
|
|
696
|
+
/** Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only. */
|
|
697
|
+
name: string;
|
|
698
|
+
/** OAuth 2.0 token for the current user. */
|
|
699
|
+
oauth_token?: string;
|
|
700
|
+
/** Returns response with indentations and line breaks. */
|
|
701
|
+
prettyPrint?: boolean;
|
|
702
|
+
/** 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. */
|
|
703
|
+
quotaUser?: string;
|
|
704
|
+
/** Required. The list of fields to be updated. */
|
|
705
|
+
updateMask?: string;
|
|
706
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
707
|
+
upload_protocol?: string;
|
|
708
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
709
|
+
uploadType?: string;
|
|
710
|
+
},
|
|
711
|
+
body: GoogleCloudAssuredworkloadsV1Workload): Request<GoogleCloudAssuredworkloadsV1Workload>;
|
|
712
|
+
/**
|
|
713
|
+
* Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at
|
|
714
|
+
* https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set
|
|
715
|
+
* permission on the folder resource to use this functionality.
|
|
716
|
+
*/
|
|
717
|
+
restrictAllowedResources(request: {
|
|
718
|
+
/** V1 error format. */
|
|
719
|
+
"$.xgafv"?: string;
|
|
720
|
+
/** OAuth access token. */
|
|
721
|
+
access_token?: string;
|
|
722
|
+
/** Data format for response. */
|
|
723
|
+
alt?: string;
|
|
724
|
+
/** JSONP */
|
|
725
|
+
callback?: string;
|
|
726
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
727
|
+
fields?: string;
|
|
728
|
+
/** 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. */
|
|
729
|
+
key?: string;
|
|
730
|
+
/**
|
|
731
|
+
* Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as
|
|
732
|
+
* "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".
|
|
733
|
+
*/
|
|
734
|
+
name: string;
|
|
735
|
+
/** OAuth 2.0 token for the current user. */
|
|
736
|
+
oauth_token?: string;
|
|
737
|
+
/** Returns response with indentations and line breaks. */
|
|
738
|
+
prettyPrint?: boolean;
|
|
739
|
+
/** 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. */
|
|
740
|
+
quotaUser?: string;
|
|
741
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
742
|
+
upload_protocol?: string;
|
|
743
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
744
|
+
uploadType?: string;
|
|
745
|
+
/** Request body */
|
|
746
|
+
resource: GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest;
|
|
747
|
+
}): Request<{}>;
|
|
748
|
+
restrictAllowedResources(request: {
|
|
749
|
+
/** V1 error format. */
|
|
750
|
+
"$.xgafv"?: string;
|
|
751
|
+
/** OAuth access token. */
|
|
752
|
+
access_token?: string;
|
|
753
|
+
/** Data format for response. */
|
|
754
|
+
alt?: string;
|
|
755
|
+
/** JSONP */
|
|
756
|
+
callback?: string;
|
|
757
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
758
|
+
fields?: string;
|
|
759
|
+
/** 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. */
|
|
760
|
+
key?: string;
|
|
761
|
+
/**
|
|
762
|
+
* Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as
|
|
763
|
+
* "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".
|
|
764
|
+
*/
|
|
765
|
+
name: string;
|
|
766
|
+
/** OAuth 2.0 token for the current user. */
|
|
767
|
+
oauth_token?: string;
|
|
768
|
+
/** Returns response with indentations and line breaks. */
|
|
769
|
+
prettyPrint?: boolean;
|
|
770
|
+
/** 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. */
|
|
771
|
+
quotaUser?: string;
|
|
772
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
773
|
+
upload_protocol?: string;
|
|
774
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
775
|
+
uploadType?: string;
|
|
776
|
+
},
|
|
777
|
+
body: GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest): Request<{}>;
|
|
778
|
+
}
|
|
779
|
+
interface LocationsResource {
|
|
780
|
+
operations: OperationsResource;
|
|
781
|
+
workloads: WorkloadsResource;
|
|
782
|
+
}
|
|
783
|
+
interface OrganizationsResource {
|
|
784
|
+
locations: LocationsResource;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
const organizations: OrganizationsResource;
|
|
788
|
+
}
|
|
789
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.assuredworkloads-v1",
|
|
3
|
+
"version": "0.0.20220729",
|
|
4
|
+
"description": "TypeScript typings for Assured Workloads API v1",
|
|
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 v1
|
|
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-v1 --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=v1', () => {
|
|
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', 'v1', () => {
|
|
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,160 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.assuredworkloads-v1 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: 20220729
|
|
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=v1');
|
|
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
|
+
complianceRegime: "Test string",
|
|
55
|
+
createTime: "Test string",
|
|
56
|
+
displayName: "Test string",
|
|
57
|
+
enableSovereignControls: true,
|
|
58
|
+
etag: "Test string",
|
|
59
|
+
kajEnrollmentState: "Test string",
|
|
60
|
+
kmsSettings: {
|
|
61
|
+
nextRotationTime: "Test string",
|
|
62
|
+
rotationPeriod: "Test string",
|
|
63
|
+
},
|
|
64
|
+
labels: {
|
|
65
|
+
A: "Test string"
|
|
66
|
+
},
|
|
67
|
+
name: "Test string",
|
|
68
|
+
provisionedResourcesParent: "Test string",
|
|
69
|
+
resources: [
|
|
70
|
+
{
|
|
71
|
+
resourceId: "Test string",
|
|
72
|
+
resourceType: "Test string",
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
resourceSettings: [
|
|
76
|
+
{
|
|
77
|
+
displayName: "Test string",
|
|
78
|
+
resourceId: "Test string",
|
|
79
|
+
resourceType: "Test string",
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
saaEnrollmentResponse: {
|
|
83
|
+
setupErrors: [
|
|
84
|
+
"Test string"
|
|
85
|
+
],
|
|
86
|
+
setupStatus: "Test string",
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
/** 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. */
|
|
90
|
+
await gapi.client.assuredworkloads.organizations.locations.workloads.delete({
|
|
91
|
+
etag: "Test string",
|
|
92
|
+
name: "Test string",
|
|
93
|
+
});
|
|
94
|
+
/** Gets Assured Workload associated with a CRM Node */
|
|
95
|
+
await gapi.client.assuredworkloads.organizations.locations.workloads.get({
|
|
96
|
+
name: "Test string",
|
|
97
|
+
});
|
|
98
|
+
/** Lists Assured Workloads under a CRM Node. */
|
|
99
|
+
await gapi.client.assuredworkloads.organizations.locations.workloads.list({
|
|
100
|
+
filter: "Test string",
|
|
101
|
+
pageSize: 42,
|
|
102
|
+
pageToken: "Test string",
|
|
103
|
+
parent: "Test string",
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* 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
|
|
107
|
+
* workload can be in progress.
|
|
108
|
+
*/
|
|
109
|
+
await gapi.client.assuredworkloads.organizations.locations.workloads.patch({
|
|
110
|
+
name: "Test string",
|
|
111
|
+
updateMask: "Test string",
|
|
112
|
+
}, {
|
|
113
|
+
billingAccount: "Test string",
|
|
114
|
+
complianceRegime: "Test string",
|
|
115
|
+
createTime: "Test string",
|
|
116
|
+
displayName: "Test string",
|
|
117
|
+
enableSovereignControls: true,
|
|
118
|
+
etag: "Test string",
|
|
119
|
+
kajEnrollmentState: "Test string",
|
|
120
|
+
kmsSettings: {
|
|
121
|
+
nextRotationTime: "Test string",
|
|
122
|
+
rotationPeriod: "Test string",
|
|
123
|
+
},
|
|
124
|
+
labels: {
|
|
125
|
+
A: "Test string"
|
|
126
|
+
},
|
|
127
|
+
name: "Test string",
|
|
128
|
+
provisionedResourcesParent: "Test string",
|
|
129
|
+
resources: [
|
|
130
|
+
{
|
|
131
|
+
resourceId: "Test string",
|
|
132
|
+
resourceType: "Test string",
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
resourceSettings: [
|
|
136
|
+
{
|
|
137
|
+
displayName: "Test string",
|
|
138
|
+
resourceId: "Test string",
|
|
139
|
+
resourceType: "Test string",
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
saaEnrollmentResponse: {
|
|
143
|
+
setupErrors: [
|
|
144
|
+
"Test string"
|
|
145
|
+
],
|
|
146
|
+
setupStatus: "Test string",
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
/**
|
|
150
|
+
* Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at
|
|
151
|
+
* 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
|
|
152
|
+
* on the folder resource to use this functionality.
|
|
153
|
+
*/
|
|
154
|
+
await gapi.client.assuredworkloads.organizations.locations.workloads.restrictAllowedResources({
|
|
155
|
+
name: "Test string",
|
|
156
|
+
}, {
|
|
157
|
+
restrictionType: "Test string",
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
});
|
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
|
+
}
|