@scaleway/sdk 1.16.0 → 1.17.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/container/v1beta1/api.gen.js +99 -2
- package/dist/api/container/v1beta1/content.gen.js +4 -1
- package/dist/api/container/v1beta1/index.gen.js +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +107 -1
- package/dist/api/instance/v1/marshalling.gen.js +1 -0
- package/dist/api/lb/v1/api.gen.js +72 -49
- package/dist/api/lb/v1/marshalling.gen.js +0 -4
- package/dist/api/marketplace/v2/api.gen.js +1 -1
- package/dist/api/marketplace/v2/marshalling.gen.js +1 -0
- package/dist/api/rdb/v1/index.gen.js +2 -0
- package/dist/api/rdb/v1/marshalling.gen.js +2 -0
- package/dist/api/rdb/v1/validation-rules.gen.js +10 -0
- package/dist/api/secret/v1alpha1/api.gen.js +1 -1
- package/dist/api/secret/v1alpha1/marshalling.gen.js +3 -1
- package/dist/api/vpc/v2/api.gen.js +16 -1
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +1 -1
- package/dist/index.cjs +254 -23
- package/dist/index.d.ts +393 -110
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -2,8 +2,8 @@ import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
|
2
2
|
import { API as API$1 } from '../../../scw/api.js';
|
|
3
3
|
import { validatePathParam, urlParams, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
-
import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListContainersResponse, unmarshalContainer, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListLogsResponse, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse } from './marshalling.gen.js';
|
|
5
|
+
import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
+
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListContainersResponse, unmarshalContainer, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListLogsResponse, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -447,6 +447,103 @@ class API extends API$1 {
|
|
|
447
447
|
method: 'DELETE',
|
|
448
448
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
449
449
|
}, unmarshalToken);
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Create a trigger. Create a new trigger for a specified container.
|
|
453
|
+
*
|
|
454
|
+
* @param request - The request {@link CreateTriggerRequest}
|
|
455
|
+
* @returns A Promise of Trigger
|
|
456
|
+
*/
|
|
457
|
+
createTrigger = request => this.client.fetch({
|
|
458
|
+
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
459
|
+
headers: jsonContentHeaders,
|
|
460
|
+
method: 'POST',
|
|
461
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
462
|
+
}, unmarshalTrigger);
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Get a trigger. Get a trigger with a specified ID.
|
|
466
|
+
*
|
|
467
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
468
|
+
* @returns A Promise of Trigger
|
|
469
|
+
*/
|
|
470
|
+
getTrigger = request => this.client.fetch({
|
|
471
|
+
method: 'GET',
|
|
472
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
473
|
+
}, unmarshalTrigger);
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Waits for {@link Trigger} to be in a final state.
|
|
477
|
+
*
|
|
478
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
479
|
+
* @param options - The waiting options
|
|
480
|
+
* @returns A Promise of Trigger
|
|
481
|
+
*/
|
|
482
|
+
waitForTrigger = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
483
|
+
pageOfListTriggers = (() => {
|
|
484
|
+
var _this8 = this;
|
|
485
|
+
return function (request) {
|
|
486
|
+
if (request === void 0) {
|
|
487
|
+
request = {};
|
|
488
|
+
}
|
|
489
|
+
return _this8.client.fetch({
|
|
490
|
+
method: 'GET',
|
|
491
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/triggers`,
|
|
492
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
493
|
+
default: _this8.client.settings.defaultProjectId,
|
|
494
|
+
param: 'project_id',
|
|
495
|
+
value: request.projectId
|
|
496
|
+
}, {
|
|
497
|
+
param: 'container_id',
|
|
498
|
+
value: request.containerId
|
|
499
|
+
}, {
|
|
500
|
+
param: 'namespace_id',
|
|
501
|
+
value: request.namespaceId
|
|
502
|
+
}])))
|
|
503
|
+
}, unmarshalListTriggersResponse);
|
|
504
|
+
};
|
|
505
|
+
})();
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* List all triggers. List all triggers belonging to a specified Organization
|
|
509
|
+
* or Project.
|
|
510
|
+
*
|
|
511
|
+
* @param request - The request {@link ListTriggersRequest}
|
|
512
|
+
* @returns A Promise of ListTriggersResponse
|
|
513
|
+
*/
|
|
514
|
+
listTriggers = (() => {
|
|
515
|
+
var _this9 = this;
|
|
516
|
+
return function (request) {
|
|
517
|
+
if (request === void 0) {
|
|
518
|
+
request = {};
|
|
519
|
+
}
|
|
520
|
+
return enrichForPagination('triggers', _this9.pageOfListTriggers, request);
|
|
521
|
+
};
|
|
522
|
+
})();
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Update a trigger. Update a trigger with a specified ID.
|
|
526
|
+
*
|
|
527
|
+
* @param request - The request {@link UpdateTriggerRequest}
|
|
528
|
+
* @returns A Promise of Trigger
|
|
529
|
+
*/
|
|
530
|
+
updateTrigger = request => this.client.fetch({
|
|
531
|
+
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
532
|
+
headers: jsonContentHeaders,
|
|
533
|
+
method: 'PATCH',
|
|
534
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
535
|
+
}, unmarshalTrigger);
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Delete a trigger. Delete a trigger with a specified ID.
|
|
539
|
+
*
|
|
540
|
+
* @param request - The request {@link DeleteTriggerRequest}
|
|
541
|
+
* @returns A Promise of Trigger
|
|
542
|
+
*/
|
|
543
|
+
deleteTrigger = request => this.client.fetch({
|
|
544
|
+
method: 'DELETE',
|
|
545
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
546
|
+
}, unmarshalTrigger);
|
|
450
547
|
}
|
|
451
548
|
|
|
452
549
|
export { API };
|
|
@@ -16,4 +16,7 @@ const NAMESPACE_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
|
16
16
|
/** Lists transient statutes of the enum {@link TokenStatus}. */
|
|
17
17
|
const TOKEN_TRANSIENT_STATUSES = ['deleting', 'creating'];
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
/** Lists transient statutes of the enum {@link TriggerStatus}. */
|
|
20
|
+
const TRIGGER_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
21
|
+
|
|
22
|
+
export { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { API } from './api.gen.js';
|
|
2
|
-
export { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
2
|
+
export { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
3
|
|
|
4
4
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
5
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -13,6 +13,41 @@ const unmarshalSecretHashedValue = data => {
|
|
|
13
13
|
key: data.key
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
17
|
+
if (!isJSONObject(data)) {
|
|
18
|
+
throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
mnqCredentialId: data.mnq_credential_id,
|
|
22
|
+
mnqNamespaceId: data.mnq_namespace_id,
|
|
23
|
+
mnqProjectId: data.mnq_project_id,
|
|
24
|
+
mnqRegion: data.mnq_region,
|
|
25
|
+
subject: data.subject
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const unmarshalTriggerMnqSqsClientConfig = data => {
|
|
29
|
+
if (!isJSONObject(data)) {
|
|
30
|
+
throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
mnqCredentialId: data.mnq_credential_id,
|
|
34
|
+
mnqNamespaceId: data.mnq_namespace_id,
|
|
35
|
+
mnqProjectId: data.mnq_project_id,
|
|
36
|
+
mnqRegion: data.mnq_region,
|
|
37
|
+
queue: data.queue
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const unmarshalTriggerSqsClientConfig = data => {
|
|
41
|
+
if (!isJSONObject(data)) {
|
|
42
|
+
throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
accessKey: data.access_key,
|
|
46
|
+
endpoint: data.endpoint,
|
|
47
|
+
queueUrl: data.queue_url,
|
|
48
|
+
secretKey: data.secret_key
|
|
49
|
+
};
|
|
50
|
+
};
|
|
16
51
|
const unmarshalContainer = data => {
|
|
17
52
|
if (!isJSONObject(data)) {
|
|
18
53
|
throw new TypeError(`Unmarshalling the type 'Container' failed as data isn't a dictionary.`);
|
|
@@ -114,6 +149,23 @@ const unmarshalToken = data => {
|
|
|
114
149
|
token: data.token
|
|
115
150
|
};
|
|
116
151
|
};
|
|
152
|
+
const unmarshalTrigger = data => {
|
|
153
|
+
if (!isJSONObject(data)) {
|
|
154
|
+
throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
containerId: data.container_id,
|
|
158
|
+
description: data.description,
|
|
159
|
+
errorMessage: data.error_message,
|
|
160
|
+
id: data.id,
|
|
161
|
+
inputType: data.input_type,
|
|
162
|
+
name: data.name,
|
|
163
|
+
scwNatsConfig: data.scw_nats_config ? unmarshalTriggerMnqNatsClientConfig(data.scw_nats_config) : undefined,
|
|
164
|
+
scwSqsConfig: data.scw_sqs_config ? unmarshalTriggerMnqSqsClientConfig(data.scw_sqs_config) : undefined,
|
|
165
|
+
sqsConfig: data.sqs_config ? unmarshalTriggerSqsClientConfig(data.sqs_config) : undefined,
|
|
166
|
+
status: data.status
|
|
167
|
+
};
|
|
168
|
+
};
|
|
117
169
|
const unmarshalListContainersResponse = data => {
|
|
118
170
|
if (!isJSONObject(data)) {
|
|
119
171
|
throw new TypeError(`Unmarshalling the type 'ListContainersResponse' failed as data isn't a dictionary.`);
|
|
@@ -168,10 +220,41 @@ const unmarshalListTokensResponse = data => {
|
|
|
168
220
|
totalCount: data.total_count
|
|
169
221
|
};
|
|
170
222
|
};
|
|
223
|
+
const unmarshalListTriggersResponse = data => {
|
|
224
|
+
if (!isJSONObject(data)) {
|
|
225
|
+
throw new TypeError(`Unmarshalling the type 'ListTriggersResponse' failed as data isn't a dictionary.`);
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
totalCount: data.total_count,
|
|
229
|
+
triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
233
|
+
mnq_namespace_id: request.mnqNamespaceId,
|
|
234
|
+
mnq_project_id: request.mnqProjectId,
|
|
235
|
+
mnq_region: request.mnqRegion,
|
|
236
|
+
subject: request.subject
|
|
237
|
+
});
|
|
238
|
+
const marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
239
|
+
mnq_namespace_id: request.mnqNamespaceId,
|
|
240
|
+
mnq_project_id: request.mnqProjectId,
|
|
241
|
+
mnq_region: request.mnqRegion,
|
|
242
|
+
queue: request.queue
|
|
243
|
+
});
|
|
244
|
+
const marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
245
|
+
access_key: request.accessKey,
|
|
246
|
+
endpoint: request.endpoint,
|
|
247
|
+
queue_url: request.queueUrl,
|
|
248
|
+
secret_key: request.secretKey
|
|
249
|
+
});
|
|
171
250
|
const marshalSecret = (request, defaults) => ({
|
|
172
251
|
key: request.key,
|
|
173
252
|
value: request.value
|
|
174
253
|
});
|
|
254
|
+
const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
255
|
+
access_key: request.accessKey,
|
|
256
|
+
secret_key: request.secretKey
|
|
257
|
+
});
|
|
175
258
|
const marshalCreateContainerRequest = (request, defaults) => ({
|
|
176
259
|
cpu_limit: request.cpuLimit,
|
|
177
260
|
description: request.description,
|
|
@@ -218,6 +301,21 @@ const marshalCreateTokenRequest = (request, defaults) => ({
|
|
|
218
301
|
value: request.namespaceId
|
|
219
302
|
}])
|
|
220
303
|
});
|
|
304
|
+
const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
305
|
+
container_id: request.containerId,
|
|
306
|
+
description: request.description,
|
|
307
|
+
name: request.name,
|
|
308
|
+
...resolveOneOf([{
|
|
309
|
+
param: 'scw_sqs_config',
|
|
310
|
+
value: request.scwSqsConfig ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
|
|
311
|
+
}, {
|
|
312
|
+
param: 'sqs_config',
|
|
313
|
+
value: request.sqsConfig ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
|
|
314
|
+
}, {
|
|
315
|
+
param: 'scw_nats_config',
|
|
316
|
+
value: request.scwNatsConfig ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
|
|
317
|
+
}])
|
|
318
|
+
});
|
|
221
319
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
222
320
|
cpu_limit: request.cpuLimit,
|
|
223
321
|
description: request.description,
|
|
@@ -246,5 +344,13 @@ const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
|
246
344
|
environment_variables: request.environmentVariables,
|
|
247
345
|
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
|
|
248
346
|
});
|
|
347
|
+
const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
348
|
+
description: request.description,
|
|
349
|
+
name: request.name,
|
|
350
|
+
...resolveOneOf([{
|
|
351
|
+
param: 'sqs_config',
|
|
352
|
+
value: request.sqsConfig ? marshalUpdateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
|
|
353
|
+
}])
|
|
354
|
+
});
|
|
249
355
|
|
|
250
|
-
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListLogsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalNamespace, unmarshalToken };
|
|
356
|
+
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListLogsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalToken, unmarshalTrigger };
|
|
@@ -1093,6 +1093,7 @@ const marshalCreatePlacementGroupRequest = (request, defaults) => ({
|
|
|
1093
1093
|
}])
|
|
1094
1094
|
});
|
|
1095
1095
|
const marshalCreatePrivateNICRequest = (request, defaults) => ({
|
|
1096
|
+
ip_ids: request.ipIds,
|
|
1096
1097
|
private_network_id: request.privateNetworkId,
|
|
1097
1098
|
tags: request.tags
|
|
1098
1099
|
});
|
|
@@ -154,12 +154,20 @@ class API extends API$1 {
|
|
|
154
154
|
* @param request - The request {@link CreateIpRequest}
|
|
155
155
|
* @returns A Promise of Ip
|
|
156
156
|
*/
|
|
157
|
-
createIp =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
createIp = (() => {
|
|
158
|
+
var _this5 = this;
|
|
159
|
+
return function (request) {
|
|
160
|
+
if (request === void 0) {
|
|
161
|
+
request = {};
|
|
162
|
+
}
|
|
163
|
+
return _this5.client.fetch({
|
|
164
|
+
body: JSON.stringify(marshalCreateIpRequest(request, _this5.client.settings)),
|
|
165
|
+
headers: jsonContentHeaders,
|
|
166
|
+
method: 'POST',
|
|
167
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/ips`
|
|
168
|
+
}, unmarshalIp);
|
|
169
|
+
};
|
|
170
|
+
})();
|
|
163
171
|
|
|
164
172
|
/**
|
|
165
173
|
* Get an IP.
|
|
@@ -367,15 +375,15 @@ class API extends API$1 {
|
|
|
367
375
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
368
376
|
});
|
|
369
377
|
pageOfListRoutes = (() => {
|
|
370
|
-
var
|
|
378
|
+
var _this6 = this;
|
|
371
379
|
return function (request) {
|
|
372
380
|
if (request === void 0) {
|
|
373
381
|
request = {};
|
|
374
382
|
}
|
|
375
|
-
return
|
|
383
|
+
return _this6.client.fetch({
|
|
376
384
|
method: 'GET',
|
|
377
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ??
|
|
378
|
-
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
385
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/routes`,
|
|
386
|
+
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
|
|
379
387
|
}, unmarshalListRoutesResponse);
|
|
380
388
|
};
|
|
381
389
|
})();
|
|
@@ -387,12 +395,12 @@ class API extends API$1 {
|
|
|
387
395
|
* @returns A Promise of ListRoutesResponse
|
|
388
396
|
*/
|
|
389
397
|
listRoutes = (() => {
|
|
390
|
-
var
|
|
398
|
+
var _this7 = this;
|
|
391
399
|
return function (request) {
|
|
392
400
|
if (request === void 0) {
|
|
393
401
|
request = {};
|
|
394
402
|
}
|
|
395
|
-
return enrichForPagination('routes',
|
|
403
|
+
return enrichForPagination('routes', _this7.pageOfListRoutes, request);
|
|
396
404
|
};
|
|
397
405
|
})();
|
|
398
406
|
|
|
@@ -460,6 +468,13 @@ class API extends API$1 {
|
|
|
460
468
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backend-stats`,
|
|
461
469
|
urlParams: urlParams(['backend_id', request.backendId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
462
470
|
}, unmarshalListBackendStatsResponse);
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* List backend server statistics.
|
|
474
|
+
*
|
|
475
|
+
* @param request - The request {@link ListBackendStatsRequest}
|
|
476
|
+
* @returns A Promise of ListBackendStatsResponse
|
|
477
|
+
*/
|
|
463
478
|
listBackendStats = request => enrichForPagination('backendServersStats', this.pageOfListBackendStats, request);
|
|
464
479
|
pageOfListAcls = request => this.client.fetch({
|
|
465
480
|
method: 'GET',
|
|
@@ -592,15 +607,15 @@ class API extends API$1 {
|
|
|
592
607
|
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
593
608
|
});
|
|
594
609
|
pageOfListLbTypes = (() => {
|
|
595
|
-
var
|
|
610
|
+
var _this8 = this;
|
|
596
611
|
return function (request) {
|
|
597
612
|
if (request === void 0) {
|
|
598
613
|
request = {};
|
|
599
614
|
}
|
|
600
|
-
return
|
|
615
|
+
return _this8.client.fetch({
|
|
601
616
|
method: 'GET',
|
|
602
|
-
path: `/lb/v1/regions/${validatePathParam('region', request.region ??
|
|
603
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ??
|
|
617
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/lb-types`,
|
|
618
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize])
|
|
604
619
|
}, unmarshalListLbTypesResponse);
|
|
605
620
|
};
|
|
606
621
|
})();
|
|
@@ -612,12 +627,12 @@ class API extends API$1 {
|
|
|
612
627
|
* @returns A Promise of ListLbTypesResponse
|
|
613
628
|
*/
|
|
614
629
|
listLbTypes = (() => {
|
|
615
|
-
var
|
|
630
|
+
var _this9 = this;
|
|
616
631
|
return function (request) {
|
|
617
632
|
if (request === void 0) {
|
|
618
633
|
request = {};
|
|
619
634
|
}
|
|
620
|
-
return enrichForPagination('lbTypes',
|
|
635
|
+
return enrichForPagination('lbTypes', _this9.pageOfListLbTypes, request);
|
|
621
636
|
};
|
|
622
637
|
})();
|
|
623
638
|
|
|
@@ -752,17 +767,17 @@ class API extends API$1 {
|
|
|
752
767
|
*/
|
|
753
768
|
class ZonedAPI extends API$1 {
|
|
754
769
|
/** Lists the available zones of the API. */
|
|
755
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
770
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
756
771
|
pageOfListLbs = (() => {
|
|
757
|
-
var
|
|
772
|
+
var _this10 = this;
|
|
758
773
|
return function (request) {
|
|
759
774
|
if (request === void 0) {
|
|
760
775
|
request = {};
|
|
761
776
|
}
|
|
762
|
-
return
|
|
777
|
+
return _this10.client.fetch({
|
|
763
778
|
method: 'GET',
|
|
764
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ??
|
|
765
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
779
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this10.client.settings.defaultZone)}/lbs`,
|
|
780
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
766
781
|
}, unmarshalListLbsResponse);
|
|
767
782
|
};
|
|
768
783
|
})();
|
|
@@ -777,12 +792,12 @@ class ZonedAPI extends API$1 {
|
|
|
777
792
|
* @returns A Promise of ListLbsResponse
|
|
778
793
|
*/
|
|
779
794
|
listLbs = (() => {
|
|
780
|
-
var
|
|
795
|
+
var _this11 = this;
|
|
781
796
|
return function (request) {
|
|
782
797
|
if (request === void 0) {
|
|
783
798
|
request = {};
|
|
784
799
|
}
|
|
785
|
-
return enrichForPagination('lbs',
|
|
800
|
+
return enrichForPagination('lbs', _this11.pageOfListLbs, request);
|
|
786
801
|
};
|
|
787
802
|
})();
|
|
788
803
|
|
|
@@ -867,15 +882,15 @@ class ZonedAPI extends API$1 {
|
|
|
867
882
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/migrate`
|
|
868
883
|
}, unmarshalLb);
|
|
869
884
|
pageOfListIPs = (() => {
|
|
870
|
-
var
|
|
885
|
+
var _this12 = this;
|
|
871
886
|
return function (request) {
|
|
872
887
|
if (request === void 0) {
|
|
873
888
|
request = {};
|
|
874
889
|
}
|
|
875
|
-
return
|
|
890
|
+
return _this12.client.fetch({
|
|
876
891
|
method: 'GET',
|
|
877
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ??
|
|
878
|
-
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
892
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this12.client.settings.defaultZone)}/ips`,
|
|
893
|
+
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this12.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
879
894
|
}, unmarshalListIpsResponse);
|
|
880
895
|
};
|
|
881
896
|
})();
|
|
@@ -889,12 +904,12 @@ class ZonedAPI extends API$1 {
|
|
|
889
904
|
* @returns A Promise of ListIpsResponse
|
|
890
905
|
*/
|
|
891
906
|
listIPs = (() => {
|
|
892
|
-
var
|
|
907
|
+
var _this13 = this;
|
|
893
908
|
return function (request) {
|
|
894
909
|
if (request === void 0) {
|
|
895
910
|
request = {};
|
|
896
911
|
}
|
|
897
|
-
return enrichForPagination('ips',
|
|
912
|
+
return enrichForPagination('ips', _this13.pageOfListIPs, request);
|
|
898
913
|
};
|
|
899
914
|
})();
|
|
900
915
|
|
|
@@ -906,12 +921,20 @@ class ZonedAPI extends API$1 {
|
|
|
906
921
|
* @param request - The request {@link ZonedApiCreateIpRequest}
|
|
907
922
|
* @returns A Promise of Ip
|
|
908
923
|
*/
|
|
909
|
-
createIp =
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
924
|
+
createIp = (() => {
|
|
925
|
+
var _this14 = this;
|
|
926
|
+
return function (request) {
|
|
927
|
+
if (request === void 0) {
|
|
928
|
+
request = {};
|
|
929
|
+
}
|
|
930
|
+
return _this14.client.fetch({
|
|
931
|
+
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, _this14.client.settings)),
|
|
932
|
+
headers: jsonContentHeaders,
|
|
933
|
+
method: 'POST',
|
|
934
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this14.client.settings.defaultZone)}/ips`
|
|
935
|
+
}, unmarshalIp);
|
|
936
|
+
};
|
|
937
|
+
})();
|
|
915
938
|
|
|
916
939
|
/**
|
|
917
940
|
* Get an IP address. Retrieve the full details of a Load Balancer flexible IP
|
|
@@ -1161,15 +1184,15 @@ class ZonedAPI extends API$1 {
|
|
|
1161
1184
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
1162
1185
|
});
|
|
1163
1186
|
pageOfListRoutes = (() => {
|
|
1164
|
-
var
|
|
1187
|
+
var _this15 = this;
|
|
1165
1188
|
return function (request) {
|
|
1166
1189
|
if (request === void 0) {
|
|
1167
1190
|
request = {};
|
|
1168
1191
|
}
|
|
1169
|
-
return
|
|
1192
|
+
return _this15.client.fetch({
|
|
1170
1193
|
method: 'GET',
|
|
1171
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ??
|
|
1172
|
-
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
1194
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this15.client.settings.defaultZone)}/routes`,
|
|
1195
|
+
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize])
|
|
1173
1196
|
}, unmarshalListRoutesResponse);
|
|
1174
1197
|
};
|
|
1175
1198
|
})();
|
|
@@ -1184,12 +1207,12 @@ class ZonedAPI extends API$1 {
|
|
|
1184
1207
|
* @returns A Promise of ListRoutesResponse
|
|
1185
1208
|
*/
|
|
1186
1209
|
listRoutes = (() => {
|
|
1187
|
-
var
|
|
1210
|
+
var _this16 = this;
|
|
1188
1211
|
return function (request) {
|
|
1189
1212
|
if (request === void 0) {
|
|
1190
1213
|
request = {};
|
|
1191
1214
|
}
|
|
1192
|
-
return enrichForPagination('routes',
|
|
1215
|
+
return enrichForPagination('routes', _this16.pageOfListRoutes, request);
|
|
1193
1216
|
};
|
|
1194
1217
|
})();
|
|
1195
1218
|
|
|
@@ -1438,15 +1461,15 @@ class ZonedAPI extends API$1 {
|
|
|
1438
1461
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
1439
1462
|
});
|
|
1440
1463
|
pageOfListLbTypes = (() => {
|
|
1441
|
-
var
|
|
1464
|
+
var _this17 = this;
|
|
1442
1465
|
return function (request) {
|
|
1443
1466
|
if (request === void 0) {
|
|
1444
1467
|
request = {};
|
|
1445
1468
|
}
|
|
1446
|
-
return
|
|
1469
|
+
return _this17.client.fetch({
|
|
1447
1470
|
method: 'GET',
|
|
1448
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ??
|
|
1449
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ??
|
|
1471
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this17.client.settings.defaultZone)}/lb-types`,
|
|
1472
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
|
|
1450
1473
|
}, unmarshalListLbTypesResponse);
|
|
1451
1474
|
};
|
|
1452
1475
|
})();
|
|
@@ -1460,12 +1483,12 @@ class ZonedAPI extends API$1 {
|
|
|
1460
1483
|
* @returns A Promise of ListLbTypesResponse
|
|
1461
1484
|
*/
|
|
1462
1485
|
listLbTypes = (() => {
|
|
1463
|
-
var
|
|
1486
|
+
var _this18 = this;
|
|
1464
1487
|
return function (request) {
|
|
1465
1488
|
if (request === void 0) {
|
|
1466
1489
|
request = {};
|
|
1467
1490
|
}
|
|
1468
|
-
return enrichForPagination('lbTypes',
|
|
1491
|
+
return enrichForPagination('lbTypes', _this18.pageOfListLbTypes, request);
|
|
1469
1492
|
};
|
|
1470
1493
|
})();
|
|
1471
1494
|
|
|
@@ -646,7 +646,6 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
|
|
|
646
646
|
timeout_client: request.timeoutClient
|
|
647
647
|
});
|
|
648
648
|
const marshalCreateIpRequest = (request, defaults) => ({
|
|
649
|
-
is_ipv6: request.isIpv6,
|
|
650
649
|
reverse: request.reverse,
|
|
651
650
|
...resolveOneOf([{
|
|
652
651
|
default: defaults.defaultProjectId,
|
|
@@ -662,7 +661,6 @@ const marshalCreateLbRequest = (request, defaults) => ({
|
|
|
662
661
|
assign_flexible_ip: request.assignFlexibleIp,
|
|
663
662
|
description: request.description,
|
|
664
663
|
ip_id: request.ipId,
|
|
665
|
-
ip_ids: request.ipIds,
|
|
666
664
|
name: request.name || randomName('lb'),
|
|
667
665
|
ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
|
|
668
666
|
tags: request.tags,
|
|
@@ -871,7 +869,6 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
|
|
|
871
869
|
timeout_client: request.timeoutClient
|
|
872
870
|
});
|
|
873
871
|
const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
874
|
-
is_ipv6: request.isIpv6,
|
|
875
872
|
reverse: request.reverse,
|
|
876
873
|
...resolveOneOf([{
|
|
877
874
|
default: defaults.defaultProjectId,
|
|
@@ -887,7 +884,6 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
|
|
|
887
884
|
assign_flexible_ip: request.assignFlexibleIp,
|
|
888
885
|
description: request.description,
|
|
889
886
|
ip_id: request.ipId,
|
|
890
|
-
ip_ids: request.ipIds,
|
|
891
887
|
name: request.name || randomName('lb'),
|
|
892
888
|
ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
|
|
893
889
|
tags: request.tags,
|
|
@@ -69,7 +69,7 @@ class API extends API$1 {
|
|
|
69
69
|
return _this.client.fetch({
|
|
70
70
|
method: 'GET',
|
|
71
71
|
path: `/marketplace/v2/local-images`,
|
|
72
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['zone', request.zone ?? _this.client.settings.defaultZone], ...Object.entries(resolveOneOf([{
|
|
72
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['type', request.type ?? 'unknown_type'], ['zone', request.zone ?? _this.client.settings.defaultZone], ...Object.entries(resolveOneOf([{
|
|
73
73
|
param: 'image_id',
|
|
74
74
|
value: request.imageId
|
|
75
75
|
}, {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { API } from './api.gen.js';
|
|
2
2
|
export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
|
+
import * as validationRules_gen from './validation-rules.gen.js';
|
|
4
|
+
export { validationRules_gen as ValidationRules };
|
|
3
5
|
|
|
4
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -67,6 +67,7 @@ const unmarshalBackupSchedule = data => {
|
|
|
67
67
|
return {
|
|
68
68
|
disabled: data.disabled,
|
|
69
69
|
frequency: data.frequency,
|
|
70
|
+
nextRunAt: unmarshalDate(data.next_run_at),
|
|
70
71
|
retention: data.retention
|
|
71
72
|
};
|
|
72
73
|
};
|
|
@@ -654,6 +655,7 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
|
654
655
|
backup_same_region: request.backupSameRegion,
|
|
655
656
|
backup_schedule_frequency: request.backupScheduleFrequency,
|
|
656
657
|
backup_schedule_retention: request.backupScheduleRetention,
|
|
658
|
+
backup_schedule_start_hour: request.backupScheduleStartHour,
|
|
657
659
|
is_backup_schedule_disabled: request.isBackupScheduleDisabled,
|
|
658
660
|
logs_policy: request.logsPolicy ? marshalLogsPolicy(request.logsPolicy) : undefined,
|
|
659
661
|
name: request.name,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
const UpdateInstanceRequest = {
|
|
5
|
+
backupScheduleStartHour: {
|
|
6
|
+
lessThanOrEqual: 23
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { UpdateInstanceRequest };
|