@maxim_mazurok/gapi.client.workstations-v1 0.0.20230802
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 +2626 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +584 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.workstations-v1",
|
|
3
|
+
"version": "0.0.20230802",
|
|
4
|
+
"description": "TypeScript typings for Cloud Workstations 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-v1": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# TypeScript typings for Cloud Workstations API v1
|
|
2
|
+
|
|
3
|
+
Allows administrators to create managed developer environments in the cloud.
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/workstations).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Cloud Workstations API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.workstations-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://workstations.googleapis.com/$discovery/rest?version=v1', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.workstations
|
|
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('workstations', 'v1', () => {
|
|
37
|
+
// now we can use:
|
|
38
|
+
// gapi.client.workstations
|
|
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 Cloud Workstations API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.workstations-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: 20230802
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://workstations.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.workstations */
|
|
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 information about a location. */
|
|
33
|
+
await gapi.client.workstations.projects.locations.get({
|
|
34
|
+
name: "Test string",
|
|
35
|
+
});
|
|
36
|
+
/** Lists information about the supported locations for this service. */
|
|
37
|
+
await gapi.client.workstations.projects.locations.list({
|
|
38
|
+
filter: "Test string",
|
|
39
|
+
name: "Test string",
|
|
40
|
+
pageSize: 42,
|
|
41
|
+
pageToken: "Test string",
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
|
|
45
|
+
* method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
|
|
46
|
+
* completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
|
|
47
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
48
|
+
*/
|
|
49
|
+
await gapi.client.workstations.projects.locations.operations.cancel({
|
|
50
|
+
name: "Test string",
|
|
51
|
+
}, {
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
|
|
55
|
+
* this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
56
|
+
*/
|
|
57
|
+
await gapi.client.workstations.projects.locations.operations.delete({
|
|
58
|
+
name: "Test string",
|
|
59
|
+
});
|
|
60
|
+
/** 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. */
|
|
61
|
+
await gapi.client.workstations.projects.locations.operations.get({
|
|
62
|
+
name: "Test string",
|
|
63
|
+
});
|
|
64
|
+
/** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
|
|
65
|
+
await gapi.client.workstations.projects.locations.operations.list({
|
|
66
|
+
filter: "Test string",
|
|
67
|
+
name: "Test string",
|
|
68
|
+
pageSize: 42,
|
|
69
|
+
pageToken: "Test string",
|
|
70
|
+
});
|
|
71
|
+
/** Creates a new workstation cluster. */
|
|
72
|
+
await gapi.client.workstations.projects.locations.workstationClusters.create({
|
|
73
|
+
parent: "Test string",
|
|
74
|
+
validateOnly: true,
|
|
75
|
+
workstationClusterId: "Test string",
|
|
76
|
+
}, {
|
|
77
|
+
annotations: {
|
|
78
|
+
A: "Test string"
|
|
79
|
+
},
|
|
80
|
+
conditions: [
|
|
81
|
+
{
|
|
82
|
+
code: 42,
|
|
83
|
+
details: [
|
|
84
|
+
{
|
|
85
|
+
A: 42
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
message: "Test string",
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
controlPlaneIp: "Test string",
|
|
92
|
+
createTime: "Test string",
|
|
93
|
+
degraded: true,
|
|
94
|
+
deleteTime: "Test string",
|
|
95
|
+
displayName: "Test string",
|
|
96
|
+
etag: "Test string",
|
|
97
|
+
labels: {
|
|
98
|
+
A: "Test string"
|
|
99
|
+
},
|
|
100
|
+
name: "Test string",
|
|
101
|
+
network: "Test string",
|
|
102
|
+
privateClusterConfig: {
|
|
103
|
+
allowedProjects: [
|
|
104
|
+
"Test string"
|
|
105
|
+
],
|
|
106
|
+
clusterHostname: "Test string",
|
|
107
|
+
enablePrivateEndpoint: true,
|
|
108
|
+
serviceAttachmentUri: "Test string",
|
|
109
|
+
},
|
|
110
|
+
reconciling: true,
|
|
111
|
+
subnetwork: "Test string",
|
|
112
|
+
uid: "Test string",
|
|
113
|
+
updateTime: "Test string",
|
|
114
|
+
});
|
|
115
|
+
/** Deletes the specified workstation cluster. */
|
|
116
|
+
await gapi.client.workstations.projects.locations.workstationClusters.delete({
|
|
117
|
+
etag: "Test string",
|
|
118
|
+
force: true,
|
|
119
|
+
name: "Test string",
|
|
120
|
+
validateOnly: true,
|
|
121
|
+
});
|
|
122
|
+
/** Returns the requested workstation cluster. */
|
|
123
|
+
await gapi.client.workstations.projects.locations.workstationClusters.get({
|
|
124
|
+
name: "Test string",
|
|
125
|
+
});
|
|
126
|
+
/** Returns all workstation clusters in the specified location. */
|
|
127
|
+
await gapi.client.workstations.projects.locations.workstationClusters.list({
|
|
128
|
+
pageSize: 42,
|
|
129
|
+
pageToken: "Test string",
|
|
130
|
+
parent: "Test string",
|
|
131
|
+
});
|
|
132
|
+
/** Updates an existing workstation cluster. */
|
|
133
|
+
await gapi.client.workstations.projects.locations.workstationClusters.patch({
|
|
134
|
+
allowMissing: true,
|
|
135
|
+
name: "Test string",
|
|
136
|
+
updateMask: "Test string",
|
|
137
|
+
validateOnly: true,
|
|
138
|
+
}, {
|
|
139
|
+
annotations: {
|
|
140
|
+
A: "Test string"
|
|
141
|
+
},
|
|
142
|
+
conditions: [
|
|
143
|
+
{
|
|
144
|
+
code: 42,
|
|
145
|
+
details: [
|
|
146
|
+
{
|
|
147
|
+
A: 42
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
message: "Test string",
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
controlPlaneIp: "Test string",
|
|
154
|
+
createTime: "Test string",
|
|
155
|
+
degraded: true,
|
|
156
|
+
deleteTime: "Test string",
|
|
157
|
+
displayName: "Test string",
|
|
158
|
+
etag: "Test string",
|
|
159
|
+
labels: {
|
|
160
|
+
A: "Test string"
|
|
161
|
+
},
|
|
162
|
+
name: "Test string",
|
|
163
|
+
network: "Test string",
|
|
164
|
+
privateClusterConfig: {
|
|
165
|
+
allowedProjects: [
|
|
166
|
+
"Test string"
|
|
167
|
+
],
|
|
168
|
+
clusterHostname: "Test string",
|
|
169
|
+
enablePrivateEndpoint: true,
|
|
170
|
+
serviceAttachmentUri: "Test string",
|
|
171
|
+
},
|
|
172
|
+
reconciling: true,
|
|
173
|
+
subnetwork: "Test string",
|
|
174
|
+
uid: "Test string",
|
|
175
|
+
updateTime: "Test string",
|
|
176
|
+
});
|
|
177
|
+
/** Creates a new workstation configuration. */
|
|
178
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.create({
|
|
179
|
+
parent: "Test string",
|
|
180
|
+
validateOnly: true,
|
|
181
|
+
workstationConfigId: "Test string",
|
|
182
|
+
}, {
|
|
183
|
+
annotations: {
|
|
184
|
+
A: "Test string"
|
|
185
|
+
},
|
|
186
|
+
conditions: [
|
|
187
|
+
{
|
|
188
|
+
code: 42,
|
|
189
|
+
details: [
|
|
190
|
+
{
|
|
191
|
+
A: 42
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
message: "Test string",
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
container: {
|
|
198
|
+
args: [
|
|
199
|
+
"Test string"
|
|
200
|
+
],
|
|
201
|
+
command: [
|
|
202
|
+
"Test string"
|
|
203
|
+
],
|
|
204
|
+
env: {
|
|
205
|
+
A: "Test string"
|
|
206
|
+
},
|
|
207
|
+
image: "Test string",
|
|
208
|
+
runAsUser: 42,
|
|
209
|
+
workingDir: "Test string",
|
|
210
|
+
},
|
|
211
|
+
createTime: "Test string",
|
|
212
|
+
degraded: true,
|
|
213
|
+
deleteTime: "Test string",
|
|
214
|
+
displayName: "Test string",
|
|
215
|
+
encryptionKey: {
|
|
216
|
+
kmsKey: "Test string",
|
|
217
|
+
kmsKeyServiceAccount: "Test string",
|
|
218
|
+
},
|
|
219
|
+
etag: "Test string",
|
|
220
|
+
host: {
|
|
221
|
+
gceInstance: {
|
|
222
|
+
bootDiskSizeGb: 42,
|
|
223
|
+
confidentialInstanceConfig: {
|
|
224
|
+
enableConfidentialCompute: true,
|
|
225
|
+
},
|
|
226
|
+
disablePublicIpAddresses: true,
|
|
227
|
+
enableNestedVirtualization: true,
|
|
228
|
+
machineType: "Test string",
|
|
229
|
+
pooledInstances: 42,
|
|
230
|
+
poolSize: 42,
|
|
231
|
+
serviceAccount: "Test string",
|
|
232
|
+
shieldedInstanceConfig: {
|
|
233
|
+
enableIntegrityMonitoring: true,
|
|
234
|
+
enableSecureBoot: true,
|
|
235
|
+
enableVtpm: true,
|
|
236
|
+
},
|
|
237
|
+
tags: [
|
|
238
|
+
"Test string"
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
idleTimeout: "Test string",
|
|
243
|
+
labels: {
|
|
244
|
+
A: "Test string"
|
|
245
|
+
},
|
|
246
|
+
name: "Test string",
|
|
247
|
+
persistentDirectories: [
|
|
248
|
+
{
|
|
249
|
+
gcePd: {
|
|
250
|
+
diskType: "Test string",
|
|
251
|
+
fsType: "Test string",
|
|
252
|
+
reclaimPolicy: "Test string",
|
|
253
|
+
sizeGb: 42,
|
|
254
|
+
sourceSnapshot: "Test string",
|
|
255
|
+
},
|
|
256
|
+
mountPath: "Test string",
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
readinessChecks: [
|
|
260
|
+
{
|
|
261
|
+
path: "Test string",
|
|
262
|
+
port: 42,
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
reconciling: true,
|
|
266
|
+
runningTimeout: "Test string",
|
|
267
|
+
uid: "Test string",
|
|
268
|
+
updateTime: "Test string",
|
|
269
|
+
});
|
|
270
|
+
/** Deletes the specified workstation configuration. */
|
|
271
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.delete({
|
|
272
|
+
etag: "Test string",
|
|
273
|
+
force: true,
|
|
274
|
+
name: "Test string",
|
|
275
|
+
validateOnly: true,
|
|
276
|
+
});
|
|
277
|
+
/** Returns the requested workstation configuration. */
|
|
278
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.get({
|
|
279
|
+
name: "Test string",
|
|
280
|
+
});
|
|
281
|
+
/** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
|
|
282
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy({
|
|
283
|
+
"options.requestedPolicyVersion": 42,
|
|
284
|
+
resource: "Test string",
|
|
285
|
+
});
|
|
286
|
+
/** Returns all workstation configurations in the specified cluster. */
|
|
287
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.list({
|
|
288
|
+
pageSize: 42,
|
|
289
|
+
pageToken: "Test string",
|
|
290
|
+
parent: "Test string",
|
|
291
|
+
});
|
|
292
|
+
/** Returns all workstation configurations in the specified cluster on which the caller has the "workstations.workstation.create" permission. */
|
|
293
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.listUsable({
|
|
294
|
+
pageSize: 42,
|
|
295
|
+
pageToken: "Test string",
|
|
296
|
+
parent: "Test string",
|
|
297
|
+
});
|
|
298
|
+
/** Updates an existing workstation configuration. */
|
|
299
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.patch({
|
|
300
|
+
allowMissing: true,
|
|
301
|
+
name: "Test string",
|
|
302
|
+
updateMask: "Test string",
|
|
303
|
+
validateOnly: true,
|
|
304
|
+
}, {
|
|
305
|
+
annotations: {
|
|
306
|
+
A: "Test string"
|
|
307
|
+
},
|
|
308
|
+
conditions: [
|
|
309
|
+
{
|
|
310
|
+
code: 42,
|
|
311
|
+
details: [
|
|
312
|
+
{
|
|
313
|
+
A: 42
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
message: "Test string",
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
container: {
|
|
320
|
+
args: [
|
|
321
|
+
"Test string"
|
|
322
|
+
],
|
|
323
|
+
command: [
|
|
324
|
+
"Test string"
|
|
325
|
+
],
|
|
326
|
+
env: {
|
|
327
|
+
A: "Test string"
|
|
328
|
+
},
|
|
329
|
+
image: "Test string",
|
|
330
|
+
runAsUser: 42,
|
|
331
|
+
workingDir: "Test string",
|
|
332
|
+
},
|
|
333
|
+
createTime: "Test string",
|
|
334
|
+
degraded: true,
|
|
335
|
+
deleteTime: "Test string",
|
|
336
|
+
displayName: "Test string",
|
|
337
|
+
encryptionKey: {
|
|
338
|
+
kmsKey: "Test string",
|
|
339
|
+
kmsKeyServiceAccount: "Test string",
|
|
340
|
+
},
|
|
341
|
+
etag: "Test string",
|
|
342
|
+
host: {
|
|
343
|
+
gceInstance: {
|
|
344
|
+
bootDiskSizeGb: 42,
|
|
345
|
+
confidentialInstanceConfig: {
|
|
346
|
+
enableConfidentialCompute: true,
|
|
347
|
+
},
|
|
348
|
+
disablePublicIpAddresses: true,
|
|
349
|
+
enableNestedVirtualization: true,
|
|
350
|
+
machineType: "Test string",
|
|
351
|
+
pooledInstances: 42,
|
|
352
|
+
poolSize: 42,
|
|
353
|
+
serviceAccount: "Test string",
|
|
354
|
+
shieldedInstanceConfig: {
|
|
355
|
+
enableIntegrityMonitoring: true,
|
|
356
|
+
enableSecureBoot: true,
|
|
357
|
+
enableVtpm: true,
|
|
358
|
+
},
|
|
359
|
+
tags: [
|
|
360
|
+
"Test string"
|
|
361
|
+
],
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
idleTimeout: "Test string",
|
|
365
|
+
labels: {
|
|
366
|
+
A: "Test string"
|
|
367
|
+
},
|
|
368
|
+
name: "Test string",
|
|
369
|
+
persistentDirectories: [
|
|
370
|
+
{
|
|
371
|
+
gcePd: {
|
|
372
|
+
diskType: "Test string",
|
|
373
|
+
fsType: "Test string",
|
|
374
|
+
reclaimPolicy: "Test string",
|
|
375
|
+
sizeGb: 42,
|
|
376
|
+
sourceSnapshot: "Test string",
|
|
377
|
+
},
|
|
378
|
+
mountPath: "Test string",
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
readinessChecks: [
|
|
382
|
+
{
|
|
383
|
+
path: "Test string",
|
|
384
|
+
port: 42,
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
reconciling: true,
|
|
388
|
+
runningTimeout: "Test string",
|
|
389
|
+
uid: "Test string",
|
|
390
|
+
updateTime: "Test string",
|
|
391
|
+
});
|
|
392
|
+
/** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
|
|
393
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy({
|
|
394
|
+
resource: "Test string",
|
|
395
|
+
}, {
|
|
396
|
+
policy: {
|
|
397
|
+
auditConfigs: [
|
|
398
|
+
{
|
|
399
|
+
auditLogConfigs: [
|
|
400
|
+
{
|
|
401
|
+
exemptedMembers: [
|
|
402
|
+
"Test string"
|
|
403
|
+
],
|
|
404
|
+
logType: "Test string",
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
service: "Test string",
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
bindings: [
|
|
411
|
+
{
|
|
412
|
+
condition: {
|
|
413
|
+
description: "Test string",
|
|
414
|
+
expression: "Test string",
|
|
415
|
+
location: "Test string",
|
|
416
|
+
title: "Test string",
|
|
417
|
+
},
|
|
418
|
+
members: [
|
|
419
|
+
"Test string"
|
|
420
|
+
],
|
|
421
|
+
role: "Test string",
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
etag: "Test string",
|
|
425
|
+
version: 42,
|
|
426
|
+
},
|
|
427
|
+
updateMask: "Test string",
|
|
428
|
+
});
|
|
429
|
+
/**
|
|
430
|
+
* Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
|
|
431
|
+
* operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
|
|
432
|
+
*/
|
|
433
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions({
|
|
434
|
+
resource: "Test string",
|
|
435
|
+
}, {
|
|
436
|
+
permissions: [
|
|
437
|
+
"Test string"
|
|
438
|
+
],
|
|
439
|
+
});
|
|
440
|
+
/** Creates a new workstation. */
|
|
441
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create({
|
|
442
|
+
parent: "Test string",
|
|
443
|
+
validateOnly: true,
|
|
444
|
+
workstationId: "Test string",
|
|
445
|
+
}, {
|
|
446
|
+
annotations: {
|
|
447
|
+
A: "Test string"
|
|
448
|
+
},
|
|
449
|
+
createTime: "Test string",
|
|
450
|
+
deleteTime: "Test string",
|
|
451
|
+
displayName: "Test string",
|
|
452
|
+
etag: "Test string",
|
|
453
|
+
host: "Test string",
|
|
454
|
+
labels: {
|
|
455
|
+
A: "Test string"
|
|
456
|
+
},
|
|
457
|
+
name: "Test string",
|
|
458
|
+
reconciling: true,
|
|
459
|
+
state: "Test string",
|
|
460
|
+
uid: "Test string",
|
|
461
|
+
updateTime: "Test string",
|
|
462
|
+
});
|
|
463
|
+
/** Deletes the specified workstation. */
|
|
464
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete({
|
|
465
|
+
etag: "Test string",
|
|
466
|
+
name: "Test string",
|
|
467
|
+
validateOnly: true,
|
|
468
|
+
});
|
|
469
|
+
/** Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. */
|
|
470
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken({
|
|
471
|
+
workstation: "Test string",
|
|
472
|
+
}, {
|
|
473
|
+
expireTime: "Test string",
|
|
474
|
+
ttl: "Test string",
|
|
475
|
+
});
|
|
476
|
+
/** Returns the requested workstation. */
|
|
477
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get({
|
|
478
|
+
name: "Test string",
|
|
479
|
+
});
|
|
480
|
+
/** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
|
|
481
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy({
|
|
482
|
+
"options.requestedPolicyVersion": 42,
|
|
483
|
+
resource: "Test string",
|
|
484
|
+
});
|
|
485
|
+
/** Returns all Workstations using the specified workstation configuration. */
|
|
486
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list({
|
|
487
|
+
pageSize: 42,
|
|
488
|
+
pageToken: "Test string",
|
|
489
|
+
parent: "Test string",
|
|
490
|
+
});
|
|
491
|
+
/** Returns all workstations using the specified workstation configuration on which the caller has the "workstations.workstations.use" permission. */
|
|
492
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable({
|
|
493
|
+
pageSize: 42,
|
|
494
|
+
pageToken: "Test string",
|
|
495
|
+
parent: "Test string",
|
|
496
|
+
});
|
|
497
|
+
/** Updates an existing workstation. */
|
|
498
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch({
|
|
499
|
+
allowMissing: true,
|
|
500
|
+
name: "Test string",
|
|
501
|
+
updateMask: "Test string",
|
|
502
|
+
validateOnly: true,
|
|
503
|
+
}, {
|
|
504
|
+
annotations: {
|
|
505
|
+
A: "Test string"
|
|
506
|
+
},
|
|
507
|
+
createTime: "Test string",
|
|
508
|
+
deleteTime: "Test string",
|
|
509
|
+
displayName: "Test string",
|
|
510
|
+
etag: "Test string",
|
|
511
|
+
host: "Test string",
|
|
512
|
+
labels: {
|
|
513
|
+
A: "Test string"
|
|
514
|
+
},
|
|
515
|
+
name: "Test string",
|
|
516
|
+
reconciling: true,
|
|
517
|
+
state: "Test string",
|
|
518
|
+
uid: "Test string",
|
|
519
|
+
updateTime: "Test string",
|
|
520
|
+
});
|
|
521
|
+
/** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
|
|
522
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy({
|
|
523
|
+
resource: "Test string",
|
|
524
|
+
}, {
|
|
525
|
+
policy: {
|
|
526
|
+
auditConfigs: [
|
|
527
|
+
{
|
|
528
|
+
auditLogConfigs: [
|
|
529
|
+
{
|
|
530
|
+
exemptedMembers: [
|
|
531
|
+
"Test string"
|
|
532
|
+
],
|
|
533
|
+
logType: "Test string",
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
service: "Test string",
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
bindings: [
|
|
540
|
+
{
|
|
541
|
+
condition: {
|
|
542
|
+
description: "Test string",
|
|
543
|
+
expression: "Test string",
|
|
544
|
+
location: "Test string",
|
|
545
|
+
title: "Test string",
|
|
546
|
+
},
|
|
547
|
+
members: [
|
|
548
|
+
"Test string"
|
|
549
|
+
],
|
|
550
|
+
role: "Test string",
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
etag: "Test string",
|
|
554
|
+
version: 42,
|
|
555
|
+
},
|
|
556
|
+
updateMask: "Test string",
|
|
557
|
+
});
|
|
558
|
+
/** Starts running a workstation so that users can connect to it. */
|
|
559
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start({
|
|
560
|
+
name: "Test string",
|
|
561
|
+
}, {
|
|
562
|
+
etag: "Test string",
|
|
563
|
+
validateOnly: true,
|
|
564
|
+
});
|
|
565
|
+
/** Stops running a workstation, reducing costs. */
|
|
566
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop({
|
|
567
|
+
name: "Test string",
|
|
568
|
+
}, {
|
|
569
|
+
etag: "Test string",
|
|
570
|
+
validateOnly: true,
|
|
571
|
+
});
|
|
572
|
+
/**
|
|
573
|
+
* Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
|
|
574
|
+
* operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
|
|
575
|
+
*/
|
|
576
|
+
await gapi.client.workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions({
|
|
577
|
+
resource: "Test string",
|
|
578
|
+
}, {
|
|
579
|
+
permissions: [
|
|
580
|
+
"Test string"
|
|
581
|
+
],
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
});
|
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
|
+
}
|