@scaleway/sdk 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/applesilicon/v1alpha1/api.gen.js +5 -4
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/api.utils.js +1 -1
- package/dist/api/cockpit/v1beta1/api.gen.js +39 -30
- package/dist/api/container/v1beta1/api.gen.js +35 -33
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -1
- package/dist/api/domain/v2beta1/api.gen.js +63 -54
- package/dist/api/flexibleip/v1alpha1/api.gen.js +28 -15
- package/dist/api/function/v1beta1/api.gen.js +39 -30
- package/dist/api/function/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/iam/v1alpha1/api.gen.js +2 -3
- package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/instance/v1/api.gen.js +2 -2
- package/dist/api/instance/v1/api.utils.js +7 -13
- package/dist/api/iot/v1/api.gen.js +68 -36
- package/dist/api/k8s/v1/api.gen.js +4 -4
- package/dist/api/lb/v1/api.gen.js +4 -4
- package/dist/api/lb/v1/api.utils.js +4 -4
- package/dist/api/marketplace/v2/api.gen.js +46 -3
- package/dist/api/mnq/v1alpha1/api.gen.js +36 -13
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +3 -9
- package/dist/api/rdb/v1/api.gen.js +5 -5
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/registry/v1/api.gen.js +44 -22
- package/dist/api/secret/v1alpha1/api.gen.js +29 -18
- package/dist/api/secret/v1alpha1/marshalling.gen.js +8 -1
- package/dist/api/tem/v1alpha1/api.gen.js +3 -7
- package/dist/api/test/v1/api.gen.js +1 -1
- package/dist/api/vpc/v1/api.gen.js +13 -5
- package/dist/api/vpcgw/v1/api.gen.js +2 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +1 -1
- package/dist/helpers/marshalling.js +1 -1
- package/dist/index.cjs +457 -269
- package/dist/index.d.ts +1412 -736
- package/dist/internal/async/interval-retrier.js +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +4 -7
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ const jsonContentHeaders = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Apple silicon.
|
|
14
|
+
* Apple silicon API.
|
|
15
15
|
*
|
|
16
16
|
* Apple Mac mini as a service. Scaleway Apple silicon as-a-Service is built
|
|
17
17
|
* using the latest generation of Apple Mac mini hardware (fifth generation).
|
|
@@ -54,7 +54,8 @@ class API extends API$1 {
|
|
|
54
54
|
}, unmarshalListServerTypesResponse);
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
|
-
* Get a server type. Get
|
|
57
|
+
* Get a server type. Get technical details (CPU, disk size etc.) of a server
|
|
58
|
+
* type.
|
|
58
59
|
*
|
|
59
60
|
* @param request - The request {@link GetServerTypeRequest}
|
|
60
61
|
* @returns A Promise of ServerType
|
|
@@ -111,7 +112,7 @@ class API extends API$1 {
|
|
|
111
112
|
}, unmarshalListOSResponse);
|
|
112
113
|
};
|
|
113
114
|
/**
|
|
114
|
-
* List all Operating
|
|
115
|
+
* List all Operating Systems (OS). List all Operating Systems (OS). The
|
|
115
116
|
* response will include the total number of OS as well as their associated
|
|
116
117
|
* IDs, names and labels.
|
|
117
118
|
*
|
|
@@ -154,7 +155,7 @@ class API extends API$1 {
|
|
|
154
155
|
* @param options - The waiting options
|
|
155
156
|
* @returns A Promise of Server
|
|
156
157
|
*/
|
|
157
|
-
this.waitForServer = (request, options) => waitForResource(
|
|
158
|
+
this.waitForServer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
158
159
|
/**
|
|
159
160
|
* Update a server. Update the parameters of an existing Apple silicon server,
|
|
160
161
|
* specified by its server ID.
|
|
@@ -31,8 +31,8 @@ class API extends API$1 {
|
|
|
31
31
|
}, unmarshalListServersResponse);
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* List Elastic Metal servers for an
|
|
35
|
-
* for a specific
|
|
34
|
+
* List Elastic Metal servers for an Organization. List Elastic Metal servers
|
|
35
|
+
* for a specific Organization.
|
|
36
36
|
*
|
|
37
37
|
* @param request - The request {@link ListServersRequest}
|
|
38
38
|
* @returns A Promise of ListServersResponse
|
|
@@ -61,7 +61,7 @@ class API extends API$1 {
|
|
|
61
61
|
* @param options - The waiting options
|
|
62
62
|
* @returns A Promise of Server
|
|
63
63
|
*/
|
|
64
|
-
this.waitForServer = (request, options) => waitForResource(
|
|
64
|
+
this.waitForServer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
65
65
|
/**
|
|
66
66
|
* Create an Elastic Metal server. Create a new Elastic Metal server. Once the
|
|
67
67
|
* server is created, proceed with the [installation of an OS](#post-3e949e).
|
|
@@ -332,7 +332,7 @@ class API extends API$1 {
|
|
|
332
332
|
}, unmarshalListSettingsResponse);
|
|
333
333
|
};
|
|
334
334
|
/**
|
|
335
|
-
* List all settings. Return all settings for a
|
|
335
|
+
* List all settings. Return all settings for a Project ID.
|
|
336
336
|
*
|
|
337
337
|
* @param request - The request {@link ListSettingsRequest}
|
|
338
338
|
* @returns A Promise of ListSettingsResponse
|
|
@@ -344,7 +344,7 @@ class API extends API$1 {
|
|
|
344
344
|
return enrichForPagination('settings', _this.pageOfListSettings, request);
|
|
345
345
|
};
|
|
346
346
|
/**
|
|
347
|
-
* Update setting. Update a setting for a
|
|
347
|
+
* Update setting. Update a setting for a Project ID (enable or disable).
|
|
348
348
|
*
|
|
349
349
|
* @param request - The request {@link UpdateSettingRequest}
|
|
350
350
|
* @returns A Promise of Setting
|
|
@@ -379,7 +379,7 @@ class API extends API$1 {
|
|
|
379
379
|
return enrichForPagination('os', _this.pageOfListOS, request);
|
|
380
380
|
};
|
|
381
381
|
/**
|
|
382
|
-
* Get
|
|
382
|
+
* Get OS with an ID. Return the specific OS for the ID.
|
|
383
383
|
*
|
|
384
384
|
* @param request - The request {@link GetOSRequest}
|
|
385
385
|
* @returns A Promise of OS
|
|
@@ -23,7 +23,7 @@ class BaremetalV1UtilsAPI extends API {
|
|
|
23
23
|
done: !SERVER_INSTALL_TRANSIENT_STATUSES.includes(value.status),
|
|
24
24
|
value
|
|
25
25
|
};
|
|
26
|
-
}, createExponentialBackoffStrategy(
|
|
26
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -13,7 +13,9 @@ const jsonContentHeaders = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Cockpit API.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* Cockpit API. Cockpit's API allows you to activate your Cockpit on your
|
|
17
|
+
* Projects. Scaleway's Cockpit stores metrics and logs and provides a dedicated
|
|
18
|
+
* Grafana for dashboarding to visualize them.
|
|
17
19
|
*/
|
|
18
20
|
class API extends API$1 {
|
|
19
21
|
constructor() {
|
|
@@ -21,8 +23,7 @@ class API extends API$1 {
|
|
|
21
23
|
super(...arguments);
|
|
22
24
|
_this = this;
|
|
23
25
|
/**
|
|
24
|
-
* Activate a
|
|
25
|
-
* ID.
|
|
26
|
+
* Activate a Cockpit. Activate the Cockpit of the specified Project ID.
|
|
26
27
|
*
|
|
27
28
|
* @param request - The request {@link ActivateCockpitRequest}
|
|
28
29
|
* @returns A Promise of Cockpit
|
|
@@ -39,7 +40,7 @@ class API extends API$1 {
|
|
|
39
40
|
}, unmarshalCockpit);
|
|
40
41
|
};
|
|
41
42
|
/**
|
|
42
|
-
* Get
|
|
43
|
+
* Get a Cockpit. Retrieve the Cockpit of the specified Project ID.
|
|
43
44
|
*
|
|
44
45
|
* @param request - The request {@link GetCockpitRequest}
|
|
45
46
|
* @returns A Promise of Cockpit
|
|
@@ -65,10 +66,11 @@ class API extends API$1 {
|
|
|
65
66
|
if (request === void 0) {
|
|
66
67
|
request = {};
|
|
67
68
|
}
|
|
68
|
-
return waitForResource(
|
|
69
|
+
return waitForResource(options?.stop ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))), _this.getCockpit, request, options);
|
|
69
70
|
};
|
|
70
71
|
/**
|
|
71
|
-
* Get
|
|
72
|
+
* Get Cockpit metrics. Get metrics from your Cockpit with the specified
|
|
73
|
+
* Project ID.
|
|
72
74
|
*
|
|
73
75
|
* @param request - The request {@link GetCockpitMetricsRequest}
|
|
74
76
|
* @returns A Promise of CockpitMetrics
|
|
@@ -84,8 +86,7 @@ class API extends API$1 {
|
|
|
84
86
|
}, unmarshalCockpitMetrics);
|
|
85
87
|
};
|
|
86
88
|
/**
|
|
87
|
-
* Deactivate a
|
|
88
|
-
* project ID.
|
|
89
|
+
* Deactivate a Cockpit. Deactivate the Cockpit of the specified Project ID.
|
|
89
90
|
*
|
|
90
91
|
* @param request - The request {@link DeactivateCockpitRequest}
|
|
91
92
|
* @returns A Promise of Cockpit
|
|
@@ -102,8 +103,8 @@ class API extends API$1 {
|
|
|
102
103
|
}, unmarshalCockpit);
|
|
103
104
|
};
|
|
104
105
|
/**
|
|
105
|
-
* Reset Grafana. Reset
|
|
106
|
-
*
|
|
106
|
+
* Reset a Grafana. Reset your Cockpit's Grafana associated with the specified
|
|
107
|
+
* Project ID.
|
|
107
108
|
*
|
|
108
109
|
* @param request - The request {@link ResetCockpitGrafanaRequest}
|
|
109
110
|
* @returns A Promise of Cockpit
|
|
@@ -120,7 +121,7 @@ class API extends API$1 {
|
|
|
120
121
|
}, unmarshalCockpit);
|
|
121
122
|
};
|
|
122
123
|
/**
|
|
123
|
-
* Create a token. Create a token associated with the
|
|
124
|
+
* Create a token. Create a token associated with the specified Project ID.
|
|
124
125
|
*
|
|
125
126
|
* @param request - The request {@link CreateTokenRequest}
|
|
126
127
|
* @returns A Promise of Token
|
|
@@ -147,7 +148,7 @@ class API extends API$1 {
|
|
|
147
148
|
}, unmarshalListTokensResponse);
|
|
148
149
|
};
|
|
149
150
|
/**
|
|
150
|
-
* List tokens.
|
|
151
|
+
* List tokens. Get a list of tokens associated with the specified Project ID.
|
|
151
152
|
*
|
|
152
153
|
* @param request - The request {@link ListTokensRequest}
|
|
153
154
|
* @returns A Promise of ListTokensResponse
|
|
@@ -159,7 +160,7 @@ class API extends API$1 {
|
|
|
159
160
|
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
160
161
|
};
|
|
161
162
|
/**
|
|
162
|
-
* Get token.
|
|
163
|
+
* Get a token. Retrieve the token associated with the specified token ID.
|
|
163
164
|
*
|
|
164
165
|
* @param request - The request {@link GetTokenRequest}
|
|
165
166
|
* @returns A Promise of Token
|
|
@@ -169,7 +170,7 @@ class API extends API$1 {
|
|
|
169
170
|
path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
170
171
|
}, unmarshalToken);
|
|
171
172
|
/**
|
|
172
|
-
* Delete token. Delete the token associated with the
|
|
173
|
+
* Delete a token. Delete the token associated with the specified token ID.
|
|
173
174
|
*
|
|
174
175
|
* @param request - The request {@link DeleteTokenRequest}
|
|
175
176
|
*/
|
|
@@ -178,7 +179,7 @@ class API extends API$1 {
|
|
|
178
179
|
path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
179
180
|
});
|
|
180
181
|
/**
|
|
181
|
-
* Create
|
|
182
|
+
* Create a contact point. Create a contact point to receive alerts for the
|
|
182
183
|
* default receiver.
|
|
183
184
|
*
|
|
184
185
|
* @param request - The request {@link CreateContactPointRequest}
|
|
@@ -206,8 +207,8 @@ class API extends API$1 {
|
|
|
206
207
|
}, unmarshalListContactPointsResponse);
|
|
207
208
|
};
|
|
208
209
|
/**
|
|
209
|
-
* List
|
|
210
|
-
*
|
|
210
|
+
* List contact points. Get a list of contact points for the Cockpit
|
|
211
|
+
* associated with the specified Project ID.
|
|
211
212
|
*
|
|
212
213
|
* @param request - The request {@link ListContactPointsRequest}
|
|
213
214
|
* @returns A Promise of ListContactPointsResponse
|
|
@@ -219,8 +220,8 @@ class API extends API$1 {
|
|
|
219
220
|
return enrichForPagination('contactPoints', _this.pageOfListContactPoints, request);
|
|
220
221
|
};
|
|
221
222
|
/**
|
|
222
|
-
* Delete an alert contact point. Delete
|
|
223
|
-
*
|
|
223
|
+
* Delete an alert contact point. Delete a contact point for the default
|
|
224
|
+
* receiver.
|
|
224
225
|
*
|
|
225
226
|
* @param request - The request {@link DeleteContactPointRequest}
|
|
226
227
|
*/
|
|
@@ -236,7 +237,8 @@ class API extends API$1 {
|
|
|
236
237
|
});
|
|
237
238
|
};
|
|
238
239
|
/**
|
|
239
|
-
* Enable managed alerts.
|
|
240
|
+
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
241
|
+
* specified Project's Cockpit.
|
|
240
242
|
*
|
|
241
243
|
* @param request - The request {@link EnableManagedAlertsRequest}
|
|
242
244
|
*/
|
|
@@ -252,7 +254,8 @@ class API extends API$1 {
|
|
|
252
254
|
});
|
|
253
255
|
};
|
|
254
256
|
/**
|
|
255
|
-
* Disable managed alerts.
|
|
257
|
+
* Disable managed alerts. Disable the sending of managed alerts for the
|
|
258
|
+
* specified Project's Cockpit.
|
|
256
259
|
*
|
|
257
260
|
* @param request - The request {@link DisableManagedAlertsRequest}
|
|
258
261
|
*/
|
|
@@ -268,7 +271,8 @@ class API extends API$1 {
|
|
|
268
271
|
});
|
|
269
272
|
};
|
|
270
273
|
/**
|
|
271
|
-
* Trigger a test alert. Trigger a test alert to all
|
|
274
|
+
* Trigger a test alert. Trigger a test alert to all of the Cockpit's
|
|
275
|
+
* receivers.
|
|
272
276
|
*
|
|
273
277
|
* @param request - The request {@link TriggerTestAlertRequest}
|
|
274
278
|
*/
|
|
@@ -284,7 +288,9 @@ class API extends API$1 {
|
|
|
284
288
|
});
|
|
285
289
|
};
|
|
286
290
|
/**
|
|
287
|
-
* Create a
|
|
291
|
+
* Create a Grafana user. Create a Grafana user for your Cockpit's Grafana
|
|
292
|
+
* instance. Make sure you save the automatically-generated password and the
|
|
293
|
+
* Grafana user ID.
|
|
288
294
|
*
|
|
289
295
|
* @param request - The request {@link CreateGrafanaUserRequest}
|
|
290
296
|
* @returns A Promise of GrafanaUser
|
|
@@ -306,8 +312,8 @@ class API extends API$1 {
|
|
|
306
312
|
}, unmarshalListGrafanaUsersResponse);
|
|
307
313
|
};
|
|
308
314
|
/**
|
|
309
|
-
* List
|
|
310
|
-
*
|
|
315
|
+
* List Grafana users. Get a list of Grafana users who are able to connect to
|
|
316
|
+
* the Cockpit's Grafana instance.
|
|
311
317
|
*
|
|
312
318
|
* @param request - The request {@link ListGrafanaUsersRequest}
|
|
313
319
|
* @returns A Promise of ListGrafanaUsersResponse
|
|
@@ -319,7 +325,8 @@ class API extends API$1 {
|
|
|
319
325
|
return enrichForPagination('grafanaUsers', _this.pageOfListGrafanaUsers, request);
|
|
320
326
|
};
|
|
321
327
|
/**
|
|
322
|
-
* Delete a
|
|
328
|
+
* Delete a Grafana user. Delete a Grafana user from a Grafana instance,
|
|
329
|
+
* specified by the Cockpit's Project ID and the Grafana user ID.
|
|
323
330
|
*
|
|
324
331
|
* @param request - The request {@link DeleteGrafanaUserRequest}
|
|
325
332
|
*/
|
|
@@ -330,8 +337,8 @@ class API extends API$1 {
|
|
|
330
337
|
path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/delete`
|
|
331
338
|
});
|
|
332
339
|
/**
|
|
333
|
-
* Reset Grafana user password. Reset
|
|
334
|
-
*
|
|
340
|
+
* Reset a Grafana user's password. Reset a Grafana user's password specified
|
|
341
|
+
* by the Cockpit's Project ID and the Grafana user ID.
|
|
335
342
|
*
|
|
336
343
|
* @param request - The request {@link ResetGrafanaUserPasswordRequest}
|
|
337
344
|
* @returns A Promise of GrafanaUser
|
|
@@ -353,7 +360,7 @@ class API extends API$1 {
|
|
|
353
360
|
}, unmarshalListPlansResponse);
|
|
354
361
|
};
|
|
355
362
|
/**
|
|
356
|
-
* List plans.
|
|
363
|
+
* List pricing plans. Get a list of all pricing plans available.
|
|
357
364
|
*
|
|
358
365
|
* @param request - The request {@link ListPlansRequest}
|
|
359
366
|
* @returns A Promise of ListPlansResponse
|
|
@@ -365,7 +372,9 @@ class API extends API$1 {
|
|
|
365
372
|
return enrichForPagination('plans', _this.pageOfListPlans, request);
|
|
366
373
|
};
|
|
367
374
|
/**
|
|
368
|
-
* Select pricing plan. Select
|
|
375
|
+
* Select pricing plan. Select your chosen pricing plan for your Cockpit,
|
|
376
|
+
* specifying the Cockpit's Project ID and the pricing plan's ID in the
|
|
377
|
+
* request.
|
|
369
378
|
*
|
|
370
379
|
* @param request - The request {@link SelectPlanRequest}
|
|
371
380
|
* @returns A Promise of SelectPlanResponse
|
|
@@ -10,11 +10,7 @@ const jsonContentHeaders = {
|
|
|
10
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Containers API.
|
|
15
|
-
*
|
|
16
|
-
* Serverless Containers API. Containers API.
|
|
17
|
-
*/
|
|
13
|
+
/** Serverless Containers API. */
|
|
18
14
|
class API extends API$1 {
|
|
19
15
|
constructor() {
|
|
20
16
|
var _this;
|
|
@@ -31,7 +27,7 @@ class API extends API$1 {
|
|
|
31
27
|
}, unmarshalListNamespacesResponse);
|
|
32
28
|
};
|
|
33
29
|
/**
|
|
34
|
-
* List all your namespaces.
|
|
30
|
+
* List all your namespaces. List all namespaces in a specified region.
|
|
35
31
|
*
|
|
36
32
|
* @param request - The request {@link ListNamespacesRequest}
|
|
37
33
|
* @returns A Promise of ListNamespacesResponse
|
|
@@ -43,7 +39,7 @@ class API extends API$1 {
|
|
|
43
39
|
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
44
40
|
};
|
|
45
41
|
/**
|
|
46
|
-
* Get a namespace. Get the namespace associated with the
|
|
42
|
+
* Get a namespace. Get the namespace associated with the specified ID.
|
|
47
43
|
*
|
|
48
44
|
* @param request - The request {@link GetNamespaceRequest}
|
|
49
45
|
* @returns A Promise of Namespace
|
|
@@ -59,9 +55,9 @@ class API extends API$1 {
|
|
|
59
55
|
* @param options - The waiting options
|
|
60
56
|
* @returns A Promise of Namespace
|
|
61
57
|
*/
|
|
62
|
-
this.waitForNamespace = (request, options) => waitForResource(
|
|
58
|
+
this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
63
59
|
/**
|
|
64
|
-
* Create a new namespace.
|
|
60
|
+
* Create a new namespace. Create a new namespace in a specified region.
|
|
65
61
|
*
|
|
66
62
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
67
63
|
* @returns A Promise of Namespace
|
|
@@ -78,8 +74,8 @@ class API extends API$1 {
|
|
|
78
74
|
}, unmarshalNamespace);
|
|
79
75
|
};
|
|
80
76
|
/**
|
|
81
|
-
* Update an existing namespace. Update the space associated with the
|
|
82
|
-
*
|
|
77
|
+
* Update an existing namespace. Update the space associated with the
|
|
78
|
+
* specified ID.
|
|
83
79
|
*
|
|
84
80
|
* @param request - The request {@link UpdateNamespaceRequest}
|
|
85
81
|
* @returns A Promise of Namespace
|
|
@@ -92,7 +88,7 @@ class API extends API$1 {
|
|
|
92
88
|
}, unmarshalNamespace);
|
|
93
89
|
/**
|
|
94
90
|
* Delete an existing namespace. Delete the namespace associated with the
|
|
95
|
-
*
|
|
91
|
+
* specified ID.
|
|
96
92
|
*
|
|
97
93
|
* @param request - The request {@link DeleteNamespaceRequest}
|
|
98
94
|
* @returns A Promise of Namespace
|
|
@@ -107,14 +103,14 @@ class API extends API$1 {
|
|
|
107
103
|
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
108
104
|
}, unmarshalListContainersResponse);
|
|
109
105
|
/**
|
|
110
|
-
* List all your containers.
|
|
106
|
+
* List all your containers. List all containers for a specified region.
|
|
111
107
|
*
|
|
112
108
|
* @param request - The request {@link ListContainersRequest}
|
|
113
109
|
* @returns A Promise of ListContainersResponse
|
|
114
110
|
*/
|
|
115
111
|
this.listContainers = request => enrichForPagination('containers', this.pageOfListContainers, request);
|
|
116
112
|
/**
|
|
117
|
-
* Get a container. Get the container associated with the
|
|
113
|
+
* Get a container. Get the container associated with the specified ID.
|
|
118
114
|
*
|
|
119
115
|
* @param request - The request {@link GetContainerRequest}
|
|
120
116
|
* @returns A Promise of Container
|
|
@@ -130,9 +126,9 @@ class API extends API$1 {
|
|
|
130
126
|
* @param options - The waiting options
|
|
131
127
|
* @returns A Promise of Container
|
|
132
128
|
*/
|
|
133
|
-
this.waitForContainer = (request, options) => waitForResource(
|
|
129
|
+
this.waitForContainer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
|
|
134
130
|
/**
|
|
135
|
-
* Create a new container.
|
|
131
|
+
* Create a new container. Create a new container in the specified region.
|
|
136
132
|
*
|
|
137
133
|
* @param request - The request {@link CreateContainerRequest}
|
|
138
134
|
* @returns A Promise of Container
|
|
@@ -145,7 +141,7 @@ class API extends API$1 {
|
|
|
145
141
|
}, unmarshalContainer);
|
|
146
142
|
/**
|
|
147
143
|
* Update an existing container. Update the container associated with the
|
|
148
|
-
*
|
|
144
|
+
* specified ID.
|
|
149
145
|
*
|
|
150
146
|
* @param request - The request {@link UpdateContainerRequest}
|
|
151
147
|
* @returns A Promise of Container
|
|
@@ -157,7 +153,7 @@ class API extends API$1 {
|
|
|
157
153
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
|
|
158
154
|
}, unmarshalContainer);
|
|
159
155
|
/**
|
|
160
|
-
* Delete a container. Delete the container associated with the
|
|
156
|
+
* Delete a container. Delete the container associated with the specified ID.
|
|
161
157
|
*
|
|
162
158
|
* @param request - The request {@link DeleteContainerRequest}
|
|
163
159
|
* @returns A Promise of Container
|
|
@@ -167,7 +163,7 @@ class API extends API$1 {
|
|
|
167
163
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
|
|
168
164
|
}, unmarshalContainer);
|
|
169
165
|
/**
|
|
170
|
-
* Deploy a container. Deploy a container associated with the
|
|
166
|
+
* Deploy a container. Deploy a container associated with the specified ID.
|
|
171
167
|
*
|
|
172
168
|
* @param request - The request {@link DeployContainerRequest}
|
|
173
169
|
* @returns A Promise of Container
|
|
@@ -191,7 +187,7 @@ class API extends API$1 {
|
|
|
191
187
|
*/
|
|
192
188
|
this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
|
|
193
189
|
/**
|
|
194
|
-
* Get a cron. Get the cron associated with the
|
|
190
|
+
* Get a cron. Get the cron associated with the specified ID.
|
|
195
191
|
*
|
|
196
192
|
* @param request - The request {@link GetCronRequest}
|
|
197
193
|
* @returns A Promise of Cron
|
|
@@ -207,7 +203,7 @@ class API extends API$1 {
|
|
|
207
203
|
* @param options - The waiting options
|
|
208
204
|
* @returns A Promise of Cron
|
|
209
205
|
*/
|
|
210
|
-
this.waitForCron = (request, options) => waitForResource(
|
|
206
|
+
this.waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
211
207
|
/**
|
|
212
208
|
* Create a new cron.
|
|
213
209
|
*
|
|
@@ -221,7 +217,7 @@ class API extends API$1 {
|
|
|
221
217
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
222
218
|
}, unmarshalCron);
|
|
223
219
|
/**
|
|
224
|
-
* Update an existing cron. Update the cron associated with the
|
|
220
|
+
* Update an existing cron. Update the cron associated with the specified ID.
|
|
225
221
|
*
|
|
226
222
|
* @param request - The request {@link UpdateCronRequest}
|
|
227
223
|
* @returns A Promise of Cron
|
|
@@ -233,7 +229,7 @@ class API extends API$1 {
|
|
|
233
229
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
234
230
|
}, unmarshalCron);
|
|
235
231
|
/**
|
|
236
|
-
* Delete an existing cron. Delete the cron associated with the
|
|
232
|
+
* Delete an existing cron. Delete the cron associated with the specified ID.
|
|
237
233
|
*
|
|
238
234
|
* @param request - The request {@link DeleteCronRequest}
|
|
239
235
|
* @returns A Promise of Cron
|
|
@@ -248,7 +244,8 @@ class API extends API$1 {
|
|
|
248
244
|
urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
249
245
|
}, unmarshalListLogsResponse);
|
|
250
246
|
/**
|
|
251
|
-
* List your container logs.
|
|
247
|
+
* List your container logs. List the logs of the container with the specified
|
|
248
|
+
* ID.
|
|
252
249
|
*
|
|
253
250
|
* @param request - The request {@link ListLogsRequest}
|
|
254
251
|
* @returns A Promise of ListLogsResponse
|
|
@@ -260,14 +257,16 @@ class API extends API$1 {
|
|
|
260
257
|
urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
261
258
|
}, unmarshalListDomainsResponse);
|
|
262
259
|
/**
|
|
263
|
-
* List all domain name bindings.
|
|
260
|
+
* List all domain name bindings. List all domain name bindings in a specified
|
|
261
|
+
* region.
|
|
264
262
|
*
|
|
265
263
|
* @param request - The request {@link ListDomainsRequest}
|
|
266
264
|
* @returns A Promise of ListDomainsResponse
|
|
267
265
|
*/
|
|
268
266
|
this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
269
267
|
/**
|
|
270
|
-
* Get a domain name binding.
|
|
268
|
+
* Get a domain name binding. Get a domain name binding for the container with
|
|
269
|
+
* the specified ID.
|
|
271
270
|
*
|
|
272
271
|
* @param request - The request {@link GetDomainRequest}
|
|
273
272
|
* @returns A Promise of Domain
|
|
@@ -283,9 +282,10 @@ class API extends API$1 {
|
|
|
283
282
|
* @param options - The waiting options
|
|
284
283
|
* @returns A Promise of Domain
|
|
285
284
|
*/
|
|
286
|
-
this.waitForDomain = (request, options) => waitForResource(
|
|
285
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
287
286
|
/**
|
|
288
|
-
* Create a domain name binding.
|
|
287
|
+
* Create a domain name binding. Create a domain name binding for the
|
|
288
|
+
* container with the specified ID.
|
|
289
289
|
*
|
|
290
290
|
* @param request - The request {@link CreateDomainRequest}
|
|
291
291
|
* @returns A Promise of Domain
|
|
@@ -297,7 +297,8 @@ class API extends API$1 {
|
|
|
297
297
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
298
298
|
}, unmarshalDomain);
|
|
299
299
|
/**
|
|
300
|
-
* Delete a domain name binding.
|
|
300
|
+
* Delete a domain name binding. Delete the domain name binding with the
|
|
301
|
+
* specific ID.
|
|
301
302
|
*
|
|
302
303
|
* @param request - The request {@link DeleteDomainRequest}
|
|
303
304
|
* @returns A Promise of Domain
|
|
@@ -345,7 +346,7 @@ class API extends API$1 {
|
|
|
345
346
|
}, unmarshalToken);
|
|
346
347
|
};
|
|
347
348
|
/**
|
|
348
|
-
* Get a token.
|
|
349
|
+
* Get a token. Get a token with a specified ID.
|
|
349
350
|
*
|
|
350
351
|
* @param request - The request {@link GetTokenRequest}
|
|
351
352
|
* @returns A Promise of Token
|
|
@@ -361,7 +362,7 @@ class API extends API$1 {
|
|
|
361
362
|
* @param options - The waiting options
|
|
362
363
|
* @returns A Promise of Token
|
|
363
364
|
*/
|
|
364
|
-
this.waitForToken = (request, options) => waitForResource(
|
|
365
|
+
this.waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
365
366
|
this.pageOfListTokens = function (request) {
|
|
366
367
|
if (request === void 0) {
|
|
367
368
|
request = {};
|
|
@@ -373,7 +374,8 @@ class API extends API$1 {
|
|
|
373
374
|
}, unmarshalListTokensResponse);
|
|
374
375
|
};
|
|
375
376
|
/**
|
|
376
|
-
* List all tokens.
|
|
377
|
+
* List all tokens. List all tokens belonging to a specified Organization or
|
|
378
|
+
* Project.
|
|
377
379
|
*
|
|
378
380
|
* @param request - The request {@link ListTokensRequest}
|
|
379
381
|
* @returns A Promise of ListTokensResponse
|
|
@@ -385,7 +387,7 @@ class API extends API$1 {
|
|
|
385
387
|
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
386
388
|
};
|
|
387
389
|
/**
|
|
388
|
-
* Delete a token.
|
|
390
|
+
* Delete a token. Delete a token with a specified ID.
|
|
389
391
|
*
|
|
390
392
|
* @param request - The request {@link DeleteTokenRequest}
|
|
391
393
|
* @returns A Promise of Token
|
|
@@ -172,6 +172,7 @@ const marshalSecret = (request, defaults) => ({
|
|
|
172
172
|
value: request.value
|
|
173
173
|
});
|
|
174
174
|
const marshalCreateContainerRequest = (request, defaults) => ({
|
|
175
|
+
cpu_limit: request.cpuLimit,
|
|
175
176
|
description: request.description,
|
|
176
177
|
environment_variables: request.environmentVariables,
|
|
177
178
|
http_option: request.httpOption ?? 'unknown_http_option',
|
|
@@ -179,7 +180,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
179
180
|
max_scale: request.maxScale,
|
|
180
181
|
memory_limit: request.memoryLimit,
|
|
181
182
|
min_scale: request.minScale,
|
|
182
|
-
name: request.name
|
|
183
|
+
name: request.name,
|
|
183
184
|
namespace_id: request.namespaceId,
|
|
184
185
|
port: request.port,
|
|
185
186
|
privacy: request.privacy ?? 'unknown_privacy',
|
|
@@ -217,6 +218,7 @@ const marshalCreateTokenRequest = (request, defaults) => ({
|
|
|
217
218
|
}])
|
|
218
219
|
});
|
|
219
220
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
221
|
+
cpu_limit: request.cpuLimit,
|
|
220
222
|
description: request.description,
|
|
221
223
|
environment_variables: request.environmentVariables,
|
|
222
224
|
http_option: request.httpOption ?? 'unknown_http_option',
|