@scaleway/sdk 1.16.0 → 1.18.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/k8s/v1/api.gen.js +13 -1
- package/dist/api/k8s/v1/marshalling.gen.js +13 -1
- 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 +30 -1
- package/dist/api/secret/v1alpha1/marshalling.gen.js +4 -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 +308 -23
- package/dist/index.d.ts +471 -112
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -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 };
|
|
@@ -114,6 +114,35 @@ class API extends API$1 {
|
|
|
114
114
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
|
|
115
115
|
});
|
|
116
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Protect a secret. Protect a given secret specified by the `secret_id`
|
|
119
|
+
* parameter. A protected secret can be read and modified but cannot be
|
|
120
|
+
* deleted.
|
|
121
|
+
*
|
|
122
|
+
* @param request - The request {@link ProtectSecretRequest}
|
|
123
|
+
* @returns A Promise of Secret
|
|
124
|
+
*/
|
|
125
|
+
protectSecret = request => this.client.fetch({
|
|
126
|
+
body: '{}',
|
|
127
|
+
headers: jsonContentHeaders,
|
|
128
|
+
method: 'POST',
|
|
129
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/protect`
|
|
130
|
+
}, unmarshalSecret);
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Unprotect a secret. Unprotect a given secret specified by the `secret_id`
|
|
134
|
+
* parameter. An unprotected secret can be read, modified and deleted.
|
|
135
|
+
*
|
|
136
|
+
* @param request - The request {@link UnprotectSecretRequest}
|
|
137
|
+
* @returns A Promise of Secret
|
|
138
|
+
*/
|
|
139
|
+
unprotectSecret = request => this.client.fetch({
|
|
140
|
+
body: '{}',
|
|
141
|
+
headers: jsonContentHeaders,
|
|
142
|
+
method: 'POST',
|
|
143
|
+
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/unprotect`
|
|
144
|
+
}, unmarshalSecret);
|
|
145
|
+
|
|
117
146
|
/**
|
|
118
147
|
* Allow a product to use the secret.
|
|
119
148
|
*
|
|
@@ -309,7 +338,7 @@ class API extends API$1 {
|
|
|
309
338
|
})();
|
|
310
339
|
|
|
311
340
|
/**
|
|
312
|
-
* List tags. List all tags associated
|
|
341
|
+
* List tags. List all tags associated with secrets within a given Project.
|
|
313
342
|
*
|
|
314
343
|
* @param request - The request {@link ListTagsRequest}
|
|
315
344
|
* @returns A Promise of ListTagsResponse
|
|
@@ -12,11 +12,13 @@ const unmarshalSecret = data => {
|
|
|
12
12
|
description: data.description,
|
|
13
13
|
id: data.id,
|
|
14
14
|
isManaged: data.is_managed,
|
|
15
|
+
isProtected: data.is_protected,
|
|
15
16
|
name: data.name,
|
|
16
17
|
projectId: data.project_id,
|
|
17
18
|
region: data.region,
|
|
18
19
|
status: data.status,
|
|
19
20
|
tags: data.tags,
|
|
21
|
+
type: data.type,
|
|
20
22
|
updatedAt: unmarshalDate(data.updated_at),
|
|
21
23
|
versionCount: data.version_count
|
|
22
24
|
};
|
|
@@ -88,7 +90,8 @@ const marshalCreateSecretRequest = (request, defaults) => ({
|
|
|
88
90
|
description: request.description,
|
|
89
91
|
name: request.name,
|
|
90
92
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
91
|
-
tags: request.tags
|
|
93
|
+
tags: request.tags,
|
|
94
|
+
type: request.type ?? 'unknown_secret_type'
|
|
92
95
|
});
|
|
93
96
|
const marshalCreateSecretVersionRequest = (request, defaults) => ({
|
|
94
97
|
data: request.data,
|
|
@@ -98,7 +98,7 @@ class API extends API$1 {
|
|
|
98
98
|
return _this3.client.fetch({
|
|
99
99
|
method: 'GET',
|
|
100
100
|
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/private-networks`,
|
|
101
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
101
|
+
urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
102
102
|
}, unmarshalListPrivateNetworksResponse);
|
|
103
103
|
};
|
|
104
104
|
})();
|
|
@@ -206,6 +206,21 @@ class API extends API$1 {
|
|
|
206
206
|
};
|
|
207
207
|
})();
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|
|
211
|
+
* Private Network. Note that you will not be able to deactivate it
|
|
212
|
+
* afterwards.
|
|
213
|
+
*
|
|
214
|
+
* @param request - The request {@link EnableDHCPRequest}
|
|
215
|
+
* @returns A Promise of PrivateNetwork
|
|
216
|
+
*/
|
|
217
|
+
enableDHCP = request => this.client.fetch({
|
|
218
|
+
body: '{}',
|
|
219
|
+
headers: jsonContentHeaders,
|
|
220
|
+
method: 'POST',
|
|
221
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/enable-dhcp`
|
|
222
|
+
}, unmarshalPrivateNetwork);
|
|
223
|
+
|
|
209
224
|
/**
|
|
210
225
|
* Set the subnets of a Private Network. Set subnets for an existing Private
|
|
211
226
|
* Network. Note that the method is PUT and not PATCH. Any existing subnets
|
|
@@ -14,7 +14,7 @@ const jsonContentHeaders = {
|
|
|
14
14
|
/** Public Gateways API. */
|
|
15
15
|
class API extends API$1 {
|
|
16
16
|
/** Lists the available zones of the API. */
|
|
17
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
17
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
18
18
|
pageOfListGateways = (() => {
|
|
19
19
|
var _this = this;
|
|
20
20
|
return function (request) {
|