@scaleway/sdk 1.6.0 → 1.7.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 +1 -1
- package/dist/api/baremetal/v1/api.gen.js +1 -1
- package/dist/api/baremetal/v1/api.utils.js +1 -1
- package/dist/api/cockpit/v1beta1/api.gen.js +41 -31
- package/dist/api/container/v1beta1/api.gen.js +34 -28
- package/dist/api/container/v1beta1/marshalling.gen.js +1 -1
- package/dist/api/domain/v2beta1/api.gen.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +1 -1
- 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.utils.js +7 -13
- package/dist/api/iot/v1/api.gen.js +1 -1
- package/dist/api/k8s/v1/api.gen.js +3 -3
- 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 +35 -12
- 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 +3 -3
- package/dist/api/secret/v1alpha1/api.gen.js +26 -15
- package/dist/api/secret/v1alpha1/marshalling.gen.js +8 -1
- package/dist/api/tem/v1alpha1/api.gen.js +2 -2
- 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 +241 -117
- package/dist/index.d.ts +825 -257
- 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
|
@@ -154,7 +154,7 @@ class API extends API$1 {
|
|
|
154
154
|
* @param options - The waiting options
|
|
155
155
|
* @returns A Promise of Server
|
|
156
156
|
*/
|
|
157
|
-
this.waitForServer = (request, options) => waitForResource(
|
|
157
|
+
this.waitForServer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
158
158
|
/**
|
|
159
159
|
* Update a server. Update the parameters of an existing Apple silicon server,
|
|
160
160
|
* specified by its server ID.
|
|
@@ -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).
|
|
@@ -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
|
|
|
@@ -11,9 +11,12 @@ const jsonContentHeaders = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Cockpit API.
|
|
14
|
+
* Cockpit API documentation.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* Cockpit's API allows you to monitor your applications and their
|
|
17
|
+
* infrastructure. Cockpit's API allows you to activate your Cockpit on your
|
|
18
|
+
* Projects. Scaleway's Cockpit stores metrics and logs and provides a dedicated
|
|
19
|
+
* Grafana for dashboarding to visualize them.
|
|
17
20
|
*/
|
|
18
21
|
class API extends API$1 {
|
|
19
22
|
constructor() {
|
|
@@ -21,8 +24,7 @@ class API extends API$1 {
|
|
|
21
24
|
super(...arguments);
|
|
22
25
|
_this = this;
|
|
23
26
|
/**
|
|
24
|
-
* Activate a
|
|
25
|
-
* ID.
|
|
27
|
+
* Activate a Cockpit. Activate the Cockpit of the specified Project ID.
|
|
26
28
|
*
|
|
27
29
|
* @param request - The request {@link ActivateCockpitRequest}
|
|
28
30
|
* @returns A Promise of Cockpit
|
|
@@ -39,7 +41,7 @@ class API extends API$1 {
|
|
|
39
41
|
}, unmarshalCockpit);
|
|
40
42
|
};
|
|
41
43
|
/**
|
|
42
|
-
* Get
|
|
44
|
+
* Get a Cockpit. Retrieve the Cockpit of the specified Project ID.
|
|
43
45
|
*
|
|
44
46
|
* @param request - The request {@link GetCockpitRequest}
|
|
45
47
|
* @returns A Promise of Cockpit
|
|
@@ -65,10 +67,11 @@ class API extends API$1 {
|
|
|
65
67
|
if (request === void 0) {
|
|
66
68
|
request = {};
|
|
67
69
|
}
|
|
68
|
-
return waitForResource(
|
|
70
|
+
return waitForResource(options?.stop ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))), _this.getCockpit, request, options);
|
|
69
71
|
};
|
|
70
72
|
/**
|
|
71
|
-
* Get
|
|
73
|
+
* Get Cockpit metrics. Get metrics from your Cockpit with the specified
|
|
74
|
+
* Project ID.
|
|
72
75
|
*
|
|
73
76
|
* @param request - The request {@link GetCockpitMetricsRequest}
|
|
74
77
|
* @returns A Promise of CockpitMetrics
|
|
@@ -84,8 +87,7 @@ class API extends API$1 {
|
|
|
84
87
|
}, unmarshalCockpitMetrics);
|
|
85
88
|
};
|
|
86
89
|
/**
|
|
87
|
-
* Deactivate a
|
|
88
|
-
* project ID.
|
|
90
|
+
* Deactivate a Cockpit. Deactivate the Cockpit of the specified Project ID.
|
|
89
91
|
*
|
|
90
92
|
* @param request - The request {@link DeactivateCockpitRequest}
|
|
91
93
|
* @returns A Promise of Cockpit
|
|
@@ -102,8 +104,8 @@ class API extends API$1 {
|
|
|
102
104
|
}, unmarshalCockpit);
|
|
103
105
|
};
|
|
104
106
|
/**
|
|
105
|
-
* Reset Grafana. Reset
|
|
106
|
-
*
|
|
107
|
+
* Reset a Grafana. Reset your Cockpit's Grafana associated with the specified
|
|
108
|
+
* Project ID.
|
|
107
109
|
*
|
|
108
110
|
* @param request - The request {@link ResetCockpitGrafanaRequest}
|
|
109
111
|
* @returns A Promise of Cockpit
|
|
@@ -120,7 +122,7 @@ class API extends API$1 {
|
|
|
120
122
|
}, unmarshalCockpit);
|
|
121
123
|
};
|
|
122
124
|
/**
|
|
123
|
-
* Create a token. Create a token associated with the
|
|
125
|
+
* Create a token. Create a token associated with the specified Project ID.
|
|
124
126
|
*
|
|
125
127
|
* @param request - The request {@link CreateTokenRequest}
|
|
126
128
|
* @returns A Promise of Token
|
|
@@ -147,7 +149,7 @@ class API extends API$1 {
|
|
|
147
149
|
}, unmarshalListTokensResponse);
|
|
148
150
|
};
|
|
149
151
|
/**
|
|
150
|
-
* List tokens.
|
|
152
|
+
* List tokens. Get a list of tokens associated with the specified Project ID.
|
|
151
153
|
*
|
|
152
154
|
* @param request - The request {@link ListTokensRequest}
|
|
153
155
|
* @returns A Promise of ListTokensResponse
|
|
@@ -159,7 +161,7 @@ class API extends API$1 {
|
|
|
159
161
|
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
160
162
|
};
|
|
161
163
|
/**
|
|
162
|
-
* Get token.
|
|
164
|
+
* Get a token. Retrieve the token associated with the specified token ID.
|
|
163
165
|
*
|
|
164
166
|
* @param request - The request {@link GetTokenRequest}
|
|
165
167
|
* @returns A Promise of Token
|
|
@@ -169,7 +171,7 @@ class API extends API$1 {
|
|
|
169
171
|
path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
170
172
|
}, unmarshalToken);
|
|
171
173
|
/**
|
|
172
|
-
* Delete token. Delete the token associated with the
|
|
174
|
+
* Delete a token. Delete the token associated with the specified token ID.
|
|
173
175
|
*
|
|
174
176
|
* @param request - The request {@link DeleteTokenRequest}
|
|
175
177
|
*/
|
|
@@ -178,7 +180,7 @@ class API extends API$1 {
|
|
|
178
180
|
path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
179
181
|
});
|
|
180
182
|
/**
|
|
181
|
-
* Create
|
|
183
|
+
* Create a contact point. Create a contact point to receive alerts for the
|
|
182
184
|
* default receiver.
|
|
183
185
|
*
|
|
184
186
|
* @param request - The request {@link CreateContactPointRequest}
|
|
@@ -206,8 +208,8 @@ class API extends API$1 {
|
|
|
206
208
|
}, unmarshalListContactPointsResponse);
|
|
207
209
|
};
|
|
208
210
|
/**
|
|
209
|
-
* List
|
|
210
|
-
*
|
|
211
|
+
* List contact points. Get a list of contact points for the Cockpit
|
|
212
|
+
* associated with the specified Project ID.
|
|
211
213
|
*
|
|
212
214
|
* @param request - The request {@link ListContactPointsRequest}
|
|
213
215
|
* @returns A Promise of ListContactPointsResponse
|
|
@@ -219,8 +221,8 @@ class API extends API$1 {
|
|
|
219
221
|
return enrichForPagination('contactPoints', _this.pageOfListContactPoints, request);
|
|
220
222
|
};
|
|
221
223
|
/**
|
|
222
|
-
* Delete an alert contact point. Delete
|
|
223
|
-
*
|
|
224
|
+
* Delete an alert contact point. Delete a contact point for the default
|
|
225
|
+
* receiver.
|
|
224
226
|
*
|
|
225
227
|
* @param request - The request {@link DeleteContactPointRequest}
|
|
226
228
|
*/
|
|
@@ -236,7 +238,8 @@ class API extends API$1 {
|
|
|
236
238
|
});
|
|
237
239
|
};
|
|
238
240
|
/**
|
|
239
|
-
* Enable managed alerts.
|
|
241
|
+
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
242
|
+
* specified Project's Cockpit.
|
|
240
243
|
*
|
|
241
244
|
* @param request - The request {@link EnableManagedAlertsRequest}
|
|
242
245
|
*/
|
|
@@ -252,7 +255,8 @@ class API extends API$1 {
|
|
|
252
255
|
});
|
|
253
256
|
};
|
|
254
257
|
/**
|
|
255
|
-
* Disable managed alerts.
|
|
258
|
+
* Disable managed alerts. Disable the sending of managed alerts for the
|
|
259
|
+
* specified Project's Cockpit.
|
|
256
260
|
*
|
|
257
261
|
* @param request - The request {@link DisableManagedAlertsRequest}
|
|
258
262
|
*/
|
|
@@ -268,7 +272,8 @@ class API extends API$1 {
|
|
|
268
272
|
});
|
|
269
273
|
};
|
|
270
274
|
/**
|
|
271
|
-
* Trigger a test alert. Trigger a test alert to all
|
|
275
|
+
* Trigger a test alert. Trigger a test alert to all of the Cockpit's
|
|
276
|
+
* receivers.
|
|
272
277
|
*
|
|
273
278
|
* @param request - The request {@link TriggerTestAlertRequest}
|
|
274
279
|
*/
|
|
@@ -284,7 +289,9 @@ class API extends API$1 {
|
|
|
284
289
|
});
|
|
285
290
|
};
|
|
286
291
|
/**
|
|
287
|
-
* Create a
|
|
292
|
+
* Create a Grafana user. Create a Grafana user for your Cockpit's Grafana
|
|
293
|
+
* instance. Make sure you save the automatically-generated password and the
|
|
294
|
+
* Grafana user ID.
|
|
288
295
|
*
|
|
289
296
|
* @param request - The request {@link CreateGrafanaUserRequest}
|
|
290
297
|
* @returns A Promise of GrafanaUser
|
|
@@ -306,8 +313,8 @@ class API extends API$1 {
|
|
|
306
313
|
}, unmarshalListGrafanaUsersResponse);
|
|
307
314
|
};
|
|
308
315
|
/**
|
|
309
|
-
* List
|
|
310
|
-
*
|
|
316
|
+
* List Grafana users. Get a list of Grafana users who are able to connect to
|
|
317
|
+
* the Cockpit's Grafana instance.
|
|
311
318
|
*
|
|
312
319
|
* @param request - The request {@link ListGrafanaUsersRequest}
|
|
313
320
|
* @returns A Promise of ListGrafanaUsersResponse
|
|
@@ -319,7 +326,8 @@ class API extends API$1 {
|
|
|
319
326
|
return enrichForPagination('grafanaUsers', _this.pageOfListGrafanaUsers, request);
|
|
320
327
|
};
|
|
321
328
|
/**
|
|
322
|
-
* Delete a
|
|
329
|
+
* Delete a Grafana user. Delete a Grafana user from a Grafana instance,
|
|
330
|
+
* specified by the Cockpit's Project ID and the Grafana user ID.
|
|
323
331
|
*
|
|
324
332
|
* @param request - The request {@link DeleteGrafanaUserRequest}
|
|
325
333
|
*/
|
|
@@ -330,8 +338,8 @@ class API extends API$1 {
|
|
|
330
338
|
path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/delete`
|
|
331
339
|
});
|
|
332
340
|
/**
|
|
333
|
-
* Reset Grafana user password. Reset
|
|
334
|
-
*
|
|
341
|
+
* Reset a Grafana user's password. Reset a Grafana user's password specified
|
|
342
|
+
* by the Cockpit's Project ID and the Grafana user ID.
|
|
335
343
|
*
|
|
336
344
|
* @param request - The request {@link ResetGrafanaUserPasswordRequest}
|
|
337
345
|
* @returns A Promise of GrafanaUser
|
|
@@ -353,7 +361,7 @@ class API extends API$1 {
|
|
|
353
361
|
}, unmarshalListPlansResponse);
|
|
354
362
|
};
|
|
355
363
|
/**
|
|
356
|
-
* List plans.
|
|
364
|
+
* List pricing plans. Get a list of all pricing plans available.
|
|
357
365
|
*
|
|
358
366
|
* @param request - The request {@link ListPlansRequest}
|
|
359
367
|
* @returns A Promise of ListPlansResponse
|
|
@@ -365,7 +373,9 @@ class API extends API$1 {
|
|
|
365
373
|
return enrichForPagination('plans', _this.pageOfListPlans, request);
|
|
366
374
|
};
|
|
367
375
|
/**
|
|
368
|
-
* Select pricing plan. Select
|
|
376
|
+
* Select pricing plan. Select your chosen pricing plan for your Cockpit,
|
|
377
|
+
* specifying the Cockpit's Project ID and the pricing plan's ID in the
|
|
378
|
+
* request.
|
|
369
379
|
*
|
|
370
380
|
* @param request - The request {@link SelectPlanRequest}
|
|
371
381
|
* @returns A Promise of SelectPlanResponse
|
|
@@ -31,7 +31,7 @@ class API extends API$1 {
|
|
|
31
31
|
}, unmarshalListNamespacesResponse);
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* List all your namespaces.
|
|
34
|
+
* List all your namespaces. List all namespaces in a specified region.
|
|
35
35
|
*
|
|
36
36
|
* @param request - The request {@link ListNamespacesRequest}
|
|
37
37
|
* @returns A Promise of ListNamespacesResponse
|
|
@@ -43,7 +43,7 @@ class API extends API$1 {
|
|
|
43
43
|
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
|
-
* Get a namespace. Get the namespace associated with the
|
|
46
|
+
* Get a namespace. Get the namespace associated with the specified ID.
|
|
47
47
|
*
|
|
48
48
|
* @param request - The request {@link GetNamespaceRequest}
|
|
49
49
|
* @returns A Promise of Namespace
|
|
@@ -59,9 +59,9 @@ class API extends API$1 {
|
|
|
59
59
|
* @param options - The waiting options
|
|
60
60
|
* @returns A Promise of Namespace
|
|
61
61
|
*/
|
|
62
|
-
this.waitForNamespace = (request, options) => waitForResource(
|
|
62
|
+
this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
63
63
|
/**
|
|
64
|
-
* Create a new namespace.
|
|
64
|
+
* Create a new namespace. Create a new namespace in a specified region.
|
|
65
65
|
*
|
|
66
66
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
67
67
|
* @returns A Promise of Namespace
|
|
@@ -78,8 +78,8 @@ class API extends API$1 {
|
|
|
78
78
|
}, unmarshalNamespace);
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
81
|
-
* Update an existing namespace. Update the space associated with the
|
|
82
|
-
*
|
|
81
|
+
* Update an existing namespace. Update the space associated with the
|
|
82
|
+
* specified ID.
|
|
83
83
|
*
|
|
84
84
|
* @param request - The request {@link UpdateNamespaceRequest}
|
|
85
85
|
* @returns A Promise of Namespace
|
|
@@ -92,7 +92,7 @@ class API extends API$1 {
|
|
|
92
92
|
}, unmarshalNamespace);
|
|
93
93
|
/**
|
|
94
94
|
* Delete an existing namespace. Delete the namespace associated with the
|
|
95
|
-
*
|
|
95
|
+
* specified ID.
|
|
96
96
|
*
|
|
97
97
|
* @param request - The request {@link DeleteNamespaceRequest}
|
|
98
98
|
* @returns A Promise of Namespace
|
|
@@ -107,14 +107,14 @@ class API extends API$1 {
|
|
|
107
107
|
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
108
|
}, unmarshalListContainersResponse);
|
|
109
109
|
/**
|
|
110
|
-
* List all your containers.
|
|
110
|
+
* List all your containers. List all containers for a specified region.
|
|
111
111
|
*
|
|
112
112
|
* @param request - The request {@link ListContainersRequest}
|
|
113
113
|
* @returns A Promise of ListContainersResponse
|
|
114
114
|
*/
|
|
115
115
|
this.listContainers = request => enrichForPagination('containers', this.pageOfListContainers, request);
|
|
116
116
|
/**
|
|
117
|
-
* Get a container. Get the container associated with the
|
|
117
|
+
* Get a container. Get the container associated with the specified ID.
|
|
118
118
|
*
|
|
119
119
|
* @param request - The request {@link GetContainerRequest}
|
|
120
120
|
* @returns A Promise of Container
|
|
@@ -130,9 +130,9 @@ class API extends API$1 {
|
|
|
130
130
|
* @param options - The waiting options
|
|
131
131
|
* @returns A Promise of Container
|
|
132
132
|
*/
|
|
133
|
-
this.waitForContainer = (request, options) => waitForResource(
|
|
133
|
+
this.waitForContainer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
|
|
134
134
|
/**
|
|
135
|
-
* Create a new container.
|
|
135
|
+
* Create a new container. Create a new container in the specified region.
|
|
136
136
|
*
|
|
137
137
|
* @param request - The request {@link CreateContainerRequest}
|
|
138
138
|
* @returns A Promise of Container
|
|
@@ -145,7 +145,7 @@ class API extends API$1 {
|
|
|
145
145
|
}, unmarshalContainer);
|
|
146
146
|
/**
|
|
147
147
|
* Update an existing container. Update the container associated with the
|
|
148
|
-
*
|
|
148
|
+
* specified ID.
|
|
149
149
|
*
|
|
150
150
|
* @param request - The request {@link UpdateContainerRequest}
|
|
151
151
|
* @returns A Promise of Container
|
|
@@ -157,7 +157,7 @@ class API extends API$1 {
|
|
|
157
157
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
|
|
158
158
|
}, unmarshalContainer);
|
|
159
159
|
/**
|
|
160
|
-
* Delete a container. Delete the container associated with the
|
|
160
|
+
* Delete a container. Delete the container associated with the specified ID.
|
|
161
161
|
*
|
|
162
162
|
* @param request - The request {@link DeleteContainerRequest}
|
|
163
163
|
* @returns A Promise of Container
|
|
@@ -167,7 +167,7 @@ class API extends API$1 {
|
|
|
167
167
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
|
|
168
168
|
}, unmarshalContainer);
|
|
169
169
|
/**
|
|
170
|
-
* Deploy a container. Deploy a container associated with the
|
|
170
|
+
* Deploy a container. Deploy a container associated with the specified ID.
|
|
171
171
|
*
|
|
172
172
|
* @param request - The request {@link DeployContainerRequest}
|
|
173
173
|
* @returns A Promise of Container
|
|
@@ -191,7 +191,7 @@ class API extends API$1 {
|
|
|
191
191
|
*/
|
|
192
192
|
this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
|
|
193
193
|
/**
|
|
194
|
-
* Get a cron. Get the cron associated with the
|
|
194
|
+
* Get a cron. Get the cron associated with the specified ID.
|
|
195
195
|
*
|
|
196
196
|
* @param request - The request {@link GetCronRequest}
|
|
197
197
|
* @returns A Promise of Cron
|
|
@@ -207,7 +207,7 @@ class API extends API$1 {
|
|
|
207
207
|
* @param options - The waiting options
|
|
208
208
|
* @returns A Promise of Cron
|
|
209
209
|
*/
|
|
210
|
-
this.waitForCron = (request, options) => waitForResource(
|
|
210
|
+
this.waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
211
211
|
/**
|
|
212
212
|
* Create a new cron.
|
|
213
213
|
*
|
|
@@ -221,7 +221,7 @@ class API extends API$1 {
|
|
|
221
221
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
222
222
|
}, unmarshalCron);
|
|
223
223
|
/**
|
|
224
|
-
* Update an existing cron. Update the cron associated with the
|
|
224
|
+
* Update an existing cron. Update the cron associated with the specified ID.
|
|
225
225
|
*
|
|
226
226
|
* @param request - The request {@link UpdateCronRequest}
|
|
227
227
|
* @returns A Promise of Cron
|
|
@@ -233,7 +233,7 @@ class API extends API$1 {
|
|
|
233
233
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
234
234
|
}, unmarshalCron);
|
|
235
235
|
/**
|
|
236
|
-
* Delete an existing cron. Delete the cron associated with the
|
|
236
|
+
* Delete an existing cron. Delete the cron associated with the specified ID.
|
|
237
237
|
*
|
|
238
238
|
* @param request - The request {@link DeleteCronRequest}
|
|
239
239
|
* @returns A Promise of Cron
|
|
@@ -248,7 +248,8 @@ class API extends API$1 {
|
|
|
248
248
|
urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
249
249
|
}, unmarshalListLogsResponse);
|
|
250
250
|
/**
|
|
251
|
-
* List your container logs.
|
|
251
|
+
* List your container logs. List the logs of the container with the specified
|
|
252
|
+
* ID.
|
|
252
253
|
*
|
|
253
254
|
* @param request - The request {@link ListLogsRequest}
|
|
254
255
|
* @returns A Promise of ListLogsResponse
|
|
@@ -260,14 +261,16 @@ class API extends API$1 {
|
|
|
260
261
|
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
262
|
}, unmarshalListDomainsResponse);
|
|
262
263
|
/**
|
|
263
|
-
* List all domain name bindings.
|
|
264
|
+
* List all domain name bindings. List all domain name bindings in a specified
|
|
265
|
+
* region.
|
|
264
266
|
*
|
|
265
267
|
* @param request - The request {@link ListDomainsRequest}
|
|
266
268
|
* @returns A Promise of ListDomainsResponse
|
|
267
269
|
*/
|
|
268
270
|
this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
269
271
|
/**
|
|
270
|
-
* Get a domain name binding.
|
|
272
|
+
* Get a domain name binding. Get a domain name binding for the container with
|
|
273
|
+
* the specified ID.
|
|
271
274
|
*
|
|
272
275
|
* @param request - The request {@link GetDomainRequest}
|
|
273
276
|
* @returns A Promise of Domain
|
|
@@ -283,9 +286,10 @@ class API extends API$1 {
|
|
|
283
286
|
* @param options - The waiting options
|
|
284
287
|
* @returns A Promise of Domain
|
|
285
288
|
*/
|
|
286
|
-
this.waitForDomain = (request, options) => waitForResource(
|
|
289
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
287
290
|
/**
|
|
288
|
-
* Create a domain name binding.
|
|
291
|
+
* Create a domain name binding. Create a domain name binding for the
|
|
292
|
+
* container with the specified ID.
|
|
289
293
|
*
|
|
290
294
|
* @param request - The request {@link CreateDomainRequest}
|
|
291
295
|
* @returns A Promise of Domain
|
|
@@ -297,7 +301,8 @@ class API extends API$1 {
|
|
|
297
301
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
298
302
|
}, unmarshalDomain);
|
|
299
303
|
/**
|
|
300
|
-
* Delete a domain name binding.
|
|
304
|
+
* Delete a domain name binding. Delete the domain name binding with the
|
|
305
|
+
* specific ID.
|
|
301
306
|
*
|
|
302
307
|
* @param request - The request {@link DeleteDomainRequest}
|
|
303
308
|
* @returns A Promise of Domain
|
|
@@ -345,7 +350,7 @@ class API extends API$1 {
|
|
|
345
350
|
}, unmarshalToken);
|
|
346
351
|
};
|
|
347
352
|
/**
|
|
348
|
-
* Get a token.
|
|
353
|
+
* Get a token. Get a token with a specified ID.
|
|
349
354
|
*
|
|
350
355
|
* @param request - The request {@link GetTokenRequest}
|
|
351
356
|
* @returns A Promise of Token
|
|
@@ -361,7 +366,7 @@ class API extends API$1 {
|
|
|
361
366
|
* @param options - The waiting options
|
|
362
367
|
* @returns A Promise of Token
|
|
363
368
|
*/
|
|
364
|
-
this.waitForToken = (request, options) => waitForResource(
|
|
369
|
+
this.waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
365
370
|
this.pageOfListTokens = function (request) {
|
|
366
371
|
if (request === void 0) {
|
|
367
372
|
request = {};
|
|
@@ -373,7 +378,8 @@ class API extends API$1 {
|
|
|
373
378
|
}, unmarshalListTokensResponse);
|
|
374
379
|
};
|
|
375
380
|
/**
|
|
376
|
-
* List all tokens.
|
|
381
|
+
* List all tokens. List all tokens belonging to a specified Organization or
|
|
382
|
+
* Project.
|
|
377
383
|
*
|
|
378
384
|
* @param request - The request {@link ListTokensRequest}
|
|
379
385
|
* @returns A Promise of ListTokensResponse
|
|
@@ -385,7 +391,7 @@ class API extends API$1 {
|
|
|
385
391
|
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
386
392
|
};
|
|
387
393
|
/**
|
|
388
|
-
* Delete a token.
|
|
394
|
+
* Delete a token. Delete a token with a specified ID.
|
|
389
395
|
*
|
|
390
396
|
* @param request - The request {@link DeleteTokenRequest}
|
|
391
397
|
* @returns A Promise of Token
|
|
@@ -179,7 +179,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
179
179
|
max_scale: request.maxScale,
|
|
180
180
|
memory_limit: request.memoryLimit,
|
|
181
181
|
min_scale: request.minScale,
|
|
182
|
-
name: request.name
|
|
182
|
+
name: request.name,
|
|
183
183
|
namespace_id: request.namespaceId,
|
|
184
184
|
port: request.port,
|
|
185
185
|
privacy: request.privacy ?? 'unknown_privacy',
|
|
@@ -275,7 +275,7 @@ class API extends API$1 {
|
|
|
275
275
|
* @param options - The waiting options
|
|
276
276
|
* @returns A Promise of SSLCertificate
|
|
277
277
|
*/
|
|
278
|
-
this.waitForSSLCertificate = (request, options) => waitForResource(
|
|
278
|
+
this.waitForSSLCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getSSLCertificate, request, options);
|
|
279
279
|
/**
|
|
280
280
|
* Create or return the zone TLS certificate.
|
|
281
281
|
*
|
|
@@ -571,7 +571,7 @@ class RegistrarAPI extends API$1 {
|
|
|
571
571
|
* @param options - The waiting options
|
|
572
572
|
* @returns A Promise of Domain
|
|
573
573
|
*/
|
|
574
|
-
this.waitForDomain = (request, options) => waitForResource(
|
|
574
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
575
575
|
/**
|
|
576
576
|
* Update a domain. Update the domain contacts or create a new one.<br/> If
|
|
577
577
|
* you add the same contact for multiple roles. Only one ID will be created
|
|
@@ -45,7 +45,7 @@ class API extends API$1 {
|
|
|
45
45
|
* @param options - The waiting options
|
|
46
46
|
* @returns A Promise of FlexibleIP
|
|
47
47
|
*/
|
|
48
|
-
this.waitForFlexibleIP = (request, options) => waitForResource(
|
|
48
|
+
this.waitForFlexibleIP = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!FLEXIBLE_IP_TRANSIENT_STATUSES.includes(res.status))), this.getFlexibleIP, request, options);
|
|
49
49
|
this.pageOfListFlexibleIPs = function (request) {
|
|
50
50
|
if (request === void 0) {
|
|
51
51
|
request = {};
|