@scaleway/sdk 0.1.0-beta.8 → 1.0.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/README.md +1 -1
- package/dist/api/account/index.js +2 -2
- package/dist/api/account/v2/api.gen.js +5 -18
- package/dist/api/account/v2/index.gen.js +3 -0
- package/dist/api/account/v2/marshalling.gen.js +0 -2
- package/dist/api/account/v2alpha1/api.gen.js +3 -13
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
- package/dist/api/applesilicon/index.js +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
- package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
- package/dist/api/baremetal/v1/api.gen.js +47 -49
- package/dist/api/baremetal/v1/api.utils.js +2 -10
- package/dist/api/baremetal/v1/content.gen.js +6 -3
- package/dist/api/baremetal/v1/index.js +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
- package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
- package/dist/api/container/index.js +2 -2
- package/dist/api/container/v1beta1/api.gen.js +5 -51
- package/dist/api/container/v1beta1/content.gen.js +4 -4
- package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
- package/dist/api/domain/index.js +2 -2
- package/dist/api/domain/v2beta1/api.gen.js +55 -85
- package/dist/api/domain/v2beta1/content.gen.js +22 -1
- package/dist/api/domain/v2beta1/index.gen.js +4 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
- package/dist/api/flexibleip/index.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
- package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
- package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/function/index.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +54 -57
- package/dist/api/function/v1beta1/content.gen.js +8 -5
- package/dist/api/function/v1beta1/index.gen.js +4 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
- package/dist/api/iam/index.js +2 -2
- package/dist/api/iam/v1alpha1/api.gen.js +15 -62
- package/dist/api/iam/v1alpha1/index.gen.js +5 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
- package/dist/api/instance/v1/api.gen.js +38 -118
- package/dist/api/instance/v1/api.utils.js +59 -51
- package/dist/api/instance/v1/content.gen.js +7 -7
- package/dist/api/instance/v1/marshalling.gen.js +46 -168
- package/dist/api/instance/v1/marshalling.utils.js +63 -0
- package/dist/api/iot/index.js +2 -2
- package/dist/api/iot/v1/api.gen.js +5 -56
- package/dist/api/iot/v1/index.gen.js +4 -0
- package/dist/api/iot/v1/marshalling.gen.js +2 -51
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +17 -43
- package/dist/api/k8s/v1/content.gen.js +2 -2
- package/dist/api/k8s/v1/index.gen.js +6 -0
- package/dist/api/k8s/v1/marshalling.gen.js +18 -36
- package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
- package/dist/api/lb/v1/api.gen.js +8 -163
- package/dist/api/lb/v1/api.utils.js +3 -9
- package/dist/api/lb/v1/content.gen.js +3 -3
- package/dist/api/lb/v1/marshalling.gen.js +74 -101
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v1/api.gen.js +3 -13
- package/dist/api/marketplace/v1/index.gen.js +3 -0
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
- package/dist/api/marketplace/v2/api.gen.js +85 -0
- package/dist/api/marketplace/v2/index.gen.js +3 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
- package/dist/api/mnq/index.js +2 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
- package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
- package/dist/api/rdb/index.js +2 -2
- package/dist/api/rdb/v1/api.gen.js +15 -89
- package/dist/api/rdb/v1/content.gen.js +10 -4
- package/dist/api/rdb/v1/index.gen.js +4 -0
- package/dist/api/rdb/v1/marshalling.gen.js +25 -81
- package/dist/api/redis/index.js +2 -2
- package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
- package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
- package/dist/api/redis/v1/index.gen.js +4 -0
- package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
- package/dist/api/registry/index.js +2 -2
- package/dist/api/registry/v1/api.gen.js +5 -29
- package/dist/api/registry/v1/content.gen.js +2 -2
- package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/registry/v1/marshalling.gen.js +2 -8
- package/dist/api/secret/index.js +2 -0
- package/dist/api/secret/v1alpha1/api.gen.js +135 -0
- package/dist/api/secret/v1alpha1/index.gen.js +3 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
- package/dist/api/tem/index.js +2 -0
- package/dist/api/tem/v1alpha1/api.gen.js +109 -0
- package/dist/api/tem/v1alpha1/content.gen.js +10 -0
- package/dist/api/tem/v1alpha1/index.gen.js +4 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
- package/dist/api/test/index.js +2 -2
- package/dist/api/test/v1/api.gen.js +6 -20
- package/dist/api/test/v1/index.gen.js +4 -0
- package/dist/api/test/v1/marshalling.gen.js +2 -5
- package/dist/api/vpc/index.js +2 -2
- package/dist/api/vpc/v1/api.gen.js +6 -17
- package/dist/api/vpc/v1/index.gen.js +3 -0
- package/dist/api/vpc/v1/marshalling.gen.js +1 -3
- package/dist/api/vpcgw/index.js +2 -2
- package/dist/api/vpcgw/v1/api.gen.js +5 -64
- package/dist/api/vpcgw/v1/content.gen.js +2 -2
- package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
- package/dist/helpers/json.js +1 -2
- package/dist/helpers/marshalling.js +7 -20
- package/dist/index.cjs +3870 -2948
- package/dist/index.d.ts +7218 -4335
- package/dist/index.js +10 -6
- package/dist/internal/async/interval-retrier.js +10 -16
- package/dist/internal/interceptors/interceptor.js +3 -1
- package/dist/internal/interceptors/request.js +1 -3
- package/dist/internal/logger/console-logger.js +3 -5
- package/dist/internal/logger/index.js +3 -5
- package/dist/internal/logger/level-resolver.js +0 -3
- package/dist/internal/validations/string-validation.js +8 -10
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/api.js +3 -4
- package/dist/scw/auth.js +3 -5
- package/dist/scw/client-ini-factory.js +32 -15
- package/dist/scw/client-ini-profile.js +10 -4
- package/dist/scw/client-settings.js +32 -15
- package/dist/scw/client.js +5 -6
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +8 -14
- package/dist/scw/errors/error-parser.js +2 -21
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
- package/dist/scw/errors/scw-error.js +20 -20
- package/dist/scw/errors/standard/already-exists-error.js +3 -4
- package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
- package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
- package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
- package/dist/scw/errors/standard/resource-expired-error.js +3 -4
- package/dist/scw/errors/standard/resource-locked-error.js +3 -4
- package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
- package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
- package/dist/scw/errors/standard/transient-state-error.js +3 -4
- package/dist/scw/errors/types.js +0 -3
- package/dist/scw/fetch/build-fetcher.js +1 -9
- package/dist/scw/fetch/http-dumper.js +4 -7
- package/dist/scw/fetch/http-interceptors.js +9 -12
- package/dist/scw/fetch/resource-paginator.js +18 -16
- package/dist/scw/fetch/response-parser.js +17 -23
- package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
- package/node_modules/@scaleway/random-name/dist/index.js +5 -246
- package/node_modules/@scaleway/random-name/package.json +6 -5
- package/package.json +4 -5
- package/dist/api/account/v2/index.js +0 -1
- package/dist/api/applesilicon/v1alpha1/index.js +0 -2
- package/dist/api/domain/v2beta1/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/index.js +0 -2
- package/dist/api/function/v1beta1/index.js +0 -2
- package/dist/api/iam/v1alpha1/index.js +0 -1
- package/dist/api/iot/v1/index.js +0 -2
- package/dist/api/k8s/v1/index.js +0 -2
- package/dist/api/marketplace/v1/index.js +0 -1
- package/dist/api/mnq/v1alpha1/index.js +0 -1
- package/dist/api/rdb/v1/index.js +0 -2
- package/dist/api/redis/v1alpha1/index.js +0 -2
- package/dist/api/test/v1/index.js +0 -1
- package/dist/api/vpc/v1/index.js +0 -1
- package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
- package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
3
|
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
-
|
|
7
6
|
const unmarshalMaintenanceWindow = data => {
|
|
8
7
|
if (!isJSONObject(data)) {
|
|
9
8
|
throw new TypeError(`Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
return {
|
|
13
11
|
day: data.day,
|
|
14
12
|
startHour: data.start_hour
|
|
15
13
|
};
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
const unmarshalClusterAutoUpgrade = data => {
|
|
19
16
|
if (!isJSONObject(data)) {
|
|
20
17
|
throw new TypeError(`Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`);
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
return {
|
|
24
20
|
enabled: data.enabled,
|
|
25
21
|
maintenanceWindow: data.maintenance_window ? unmarshalMaintenanceWindow(data.maintenance_window) : undefined
|
|
26
22
|
};
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
const unmarshalClusterAutoscalerConfig = data => {
|
|
30
25
|
if (!isJSONObject(data)) {
|
|
31
26
|
throw new TypeError(`Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`);
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
return {
|
|
35
29
|
balanceSimilarNodeGroups: data.balance_similar_node_groups,
|
|
36
30
|
estimator: data.estimator,
|
|
@@ -44,12 +38,10 @@ const unmarshalClusterAutoscalerConfig = data => {
|
|
|
44
38
|
scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
|
|
45
39
|
};
|
|
46
40
|
};
|
|
47
|
-
|
|
48
41
|
const unmarshalClusterOpenIDConnectConfig = data => {
|
|
49
42
|
if (!isJSONObject(data)) {
|
|
50
43
|
throw new TypeError(`Unmarshalling the type 'ClusterOpenIDConnectConfig' failed as data isn't a dictionary.`);
|
|
51
44
|
}
|
|
52
|
-
|
|
53
45
|
return {
|
|
54
46
|
clientId: data.client_id,
|
|
55
47
|
groupsClaim: data.groups_claim,
|
|
@@ -60,23 +52,19 @@ const unmarshalClusterOpenIDConnectConfig = data => {
|
|
|
60
52
|
usernamePrefix: data.username_prefix
|
|
61
53
|
};
|
|
62
54
|
};
|
|
63
|
-
|
|
64
55
|
const unmarshalPoolUpgradePolicy = data => {
|
|
65
56
|
if (!isJSONObject(data)) {
|
|
66
57
|
throw new TypeError(`Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`);
|
|
67
58
|
}
|
|
68
|
-
|
|
69
59
|
return {
|
|
70
60
|
maxSurge: data.max_surge,
|
|
71
61
|
maxUnavailable: data.max_unavailable
|
|
72
62
|
};
|
|
73
63
|
};
|
|
74
|
-
|
|
75
64
|
const unmarshalCluster = data => {
|
|
76
65
|
if (!isJSONObject(data)) {
|
|
77
66
|
throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
|
|
78
67
|
}
|
|
79
|
-
|
|
80
68
|
return {
|
|
81
69
|
admissionPlugins: data.admission_plugins,
|
|
82
70
|
apiserverCertSans: data.apiserver_cert_sans,
|
|
@@ -108,7 +96,6 @@ const unmarshalNode = data => {
|
|
|
108
96
|
if (!isJSONObject(data)) {
|
|
109
97
|
throw new TypeError(`Unmarshalling the type 'Node' failed as data isn't a dictionary.`);
|
|
110
98
|
}
|
|
111
|
-
|
|
112
99
|
return {
|
|
113
100
|
clusterId: data.cluster_id,
|
|
114
101
|
conditions: data.conditions,
|
|
@@ -129,7 +116,6 @@ const unmarshalPool = data => {
|
|
|
129
116
|
if (!isJSONObject(data)) {
|
|
130
117
|
throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
|
|
131
118
|
}
|
|
132
|
-
|
|
133
119
|
return {
|
|
134
120
|
autohealing: data.autohealing,
|
|
135
121
|
autoscaling: data.autoscaling,
|
|
@@ -159,7 +145,6 @@ const unmarshalVersion = data => {
|
|
|
159
145
|
if (!isJSONObject(data)) {
|
|
160
146
|
throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
|
|
161
147
|
}
|
|
162
|
-
|
|
163
148
|
return {
|
|
164
149
|
availableAdmissionPlugins: data.available_admission_plugins,
|
|
165
150
|
availableCnis: data.available_cnis,
|
|
@@ -172,11 +157,24 @@ const unmarshalVersion = data => {
|
|
|
172
157
|
region: data.region
|
|
173
158
|
};
|
|
174
159
|
};
|
|
160
|
+
const unmarshalExternalNode = data => {
|
|
161
|
+
if (!isJSONObject(data)) {
|
|
162
|
+
throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
clusterCa: data.cluster_ca,
|
|
166
|
+
clusterUrl: data.cluster_url,
|
|
167
|
+
clusterVersion: data.cluster_version,
|
|
168
|
+
id: data.id,
|
|
169
|
+
kubeletConfig: data.kubelet_config,
|
|
170
|
+
kubeToken: data.kube_token,
|
|
171
|
+
name: data.name
|
|
172
|
+
};
|
|
173
|
+
};
|
|
175
174
|
const unmarshalListClusterAvailableVersionsResponse = data => {
|
|
176
175
|
if (!isJSONObject(data)) {
|
|
177
176
|
throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
|
|
178
177
|
}
|
|
179
|
-
|
|
180
178
|
return {
|
|
181
179
|
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
182
180
|
};
|
|
@@ -185,7 +183,6 @@ const unmarshalListClustersResponse = data => {
|
|
|
185
183
|
if (!isJSONObject(data)) {
|
|
186
184
|
throw new TypeError(`Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`);
|
|
187
185
|
}
|
|
188
|
-
|
|
189
186
|
return {
|
|
190
187
|
clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
|
|
191
188
|
totalCount: data.total_count
|
|
@@ -195,7 +192,6 @@ const unmarshalListNodesResponse = data => {
|
|
|
195
192
|
if (!isJSONObject(data)) {
|
|
196
193
|
throw new TypeError(`Unmarshalling the type 'ListNodesResponse' failed as data isn't a dictionary.`);
|
|
197
194
|
}
|
|
198
|
-
|
|
199
195
|
return {
|
|
200
196
|
nodes: unmarshalArrayOfObject(data.nodes, unmarshalNode),
|
|
201
197
|
totalCount: data.total_count
|
|
@@ -205,7 +201,6 @@ const unmarshalListPoolsResponse = data => {
|
|
|
205
201
|
if (!isJSONObject(data)) {
|
|
206
202
|
throw new TypeError(`Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`);
|
|
207
203
|
}
|
|
208
|
-
|
|
209
204
|
return {
|
|
210
205
|
pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
|
|
211
206
|
totalCount: data.total_count
|
|
@@ -215,27 +210,22 @@ const unmarshalListVersionsResponse = data => {
|
|
|
215
210
|
if (!isJSONObject(data)) {
|
|
216
211
|
throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
|
|
217
212
|
}
|
|
218
|
-
|
|
219
213
|
return {
|
|
220
214
|
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
221
215
|
};
|
|
222
216
|
};
|
|
223
|
-
|
|
224
217
|
const marshalCreateClusterRequestPoolConfigUpgradePolicy = (request, defaults) => ({
|
|
225
218
|
max_surge: request.maxSurge,
|
|
226
219
|
max_unavailable: request.maxUnavailable
|
|
227
220
|
});
|
|
228
|
-
|
|
229
221
|
const marshalMaintenanceWindow = (request, defaults) => ({
|
|
230
222
|
day: request.day,
|
|
231
223
|
start_hour: request.startHour
|
|
232
224
|
});
|
|
233
|
-
|
|
234
225
|
const marshalCreateClusterRequestAutoUpgrade = (request, defaults) => ({
|
|
235
226
|
enable: request.enable,
|
|
236
227
|
maintenance_window: request.maintenanceWindow ? marshalMaintenanceWindow(request.maintenanceWindow) : undefined
|
|
237
228
|
});
|
|
238
|
-
|
|
239
229
|
const marshalCreateClusterRequestAutoscalerConfig = (request, defaults) => ({
|
|
240
230
|
balance_similar_node_groups: request.balanceSimilarNodeGroups,
|
|
241
231
|
estimator: request.estimator,
|
|
@@ -248,7 +238,6 @@ const marshalCreateClusterRequestAutoscalerConfig = (request, defaults) => ({
|
|
|
248
238
|
scale_down_unneeded_time: request.scaleDownUnneededTime,
|
|
249
239
|
scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
|
|
250
240
|
});
|
|
251
|
-
|
|
252
241
|
const marshalCreateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
|
|
253
242
|
client_id: request.clientId,
|
|
254
243
|
groups_claim: request.groupsClaim,
|
|
@@ -258,7 +247,6 @@ const marshalCreateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
|
|
|
258
247
|
username_claim: request.usernameClaim,
|
|
259
248
|
username_prefix: request.usernamePrefix
|
|
260
249
|
});
|
|
261
|
-
|
|
262
250
|
const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
263
251
|
autohealing: request.autohealing,
|
|
264
252
|
autoscaling: request.autoscaling,
|
|
@@ -276,17 +264,14 @@ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
|
276
264
|
upgrade_policy: request.upgradePolicy ? marshalCreateClusterRequestPoolConfigUpgradePolicy(request.upgradePolicy) : undefined,
|
|
277
265
|
zone: request.zone
|
|
278
266
|
});
|
|
279
|
-
|
|
280
267
|
const marshalCreatePoolRequestUpgradePolicy = (request, defaults) => ({
|
|
281
268
|
max_surge: request.maxSurge,
|
|
282
269
|
max_unavailable: request.maxUnavailable
|
|
283
270
|
});
|
|
284
|
-
|
|
285
271
|
const marshalUpdateClusterRequestAutoUpgrade = (request, defaults) => ({
|
|
286
272
|
enable: request.enable,
|
|
287
273
|
maintenance_window: request.maintenanceWindow ? marshalMaintenanceWindow(request.maintenanceWindow) : undefined
|
|
288
274
|
});
|
|
289
|
-
|
|
290
275
|
const marshalUpdateClusterRequestAutoscalerConfig = (request, defaults) => ({
|
|
291
276
|
balance_similar_node_groups: request.balanceSimilarNodeGroups,
|
|
292
277
|
estimator: request.estimator,
|
|
@@ -299,7 +284,6 @@ const marshalUpdateClusterRequestAutoscalerConfig = (request, defaults) => ({
|
|
|
299
284
|
scale_down_unneeded_time: request.scaleDownUnneededTime,
|
|
300
285
|
scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
|
|
301
286
|
});
|
|
302
|
-
|
|
303
287
|
const marshalUpdateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
|
|
304
288
|
client_id: request.clientId,
|
|
305
289
|
groups_claim: request.groupsClaim,
|
|
@@ -309,12 +293,10 @@ const marshalUpdateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
|
|
|
309
293
|
username_claim: request.usernameClaim,
|
|
310
294
|
username_prefix: request.usernamePrefix
|
|
311
295
|
});
|
|
312
|
-
|
|
313
296
|
const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
|
|
314
297
|
max_surge: request.maxSurge,
|
|
315
298
|
max_unavailable: request.maxUnavailable
|
|
316
299
|
});
|
|
317
|
-
|
|
318
300
|
const marshalCreateClusterRequest = (request, defaults) => ({
|
|
319
301
|
admission_plugins: request.admissionPlugins,
|
|
320
302
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
@@ -344,7 +326,7 @@ const marshalCreateClusterRequest = (request, defaults) => ({
|
|
|
344
326
|
const marshalCreatePoolRequest = (request, defaults) => ({
|
|
345
327
|
autohealing: request.autohealing,
|
|
346
328
|
autoscaling: request.autoscaling,
|
|
347
|
-
container_runtime: request.containerRuntime,
|
|
329
|
+
container_runtime: request.containerRuntime ?? 'unknown_runtime',
|
|
348
330
|
kubelet_args: request.kubeletArgs,
|
|
349
331
|
max_size: request.maxSize,
|
|
350
332
|
min_size: request.minSize,
|
|
@@ -352,7 +334,7 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
352
334
|
node_type: request.nodeType,
|
|
353
335
|
placement_group_id: request.placementGroupId,
|
|
354
336
|
root_volume_size: request.rootVolumeSize,
|
|
355
|
-
root_volume_type: request.rootVolumeType,
|
|
337
|
+
root_volume_type: request.rootVolumeType ?? 'default_volume_type',
|
|
356
338
|
size: request.size,
|
|
357
339
|
tags: request.tags,
|
|
358
340
|
upgrade_policy: request.upgradePolicy ? marshalCreatePoolRequestUpgradePolicy(request.upgradePolicy) : undefined,
|
|
@@ -389,4 +371,4 @@ const marshalUpgradePoolRequest = (request, defaults) => ({
|
|
|
389
371
|
version: request.version
|
|
390
372
|
});
|
|
391
373
|
|
|
392
|
-
export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalListClusterAvailableVersionsResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
|
|
374
|
+
export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableVersionsResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
|
|
@@ -0,0 +1,92 @@
|
|
|
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 CreateClusterRequest = {
|
|
5
|
+
name: {
|
|
6
|
+
minLength: 1
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const CreateClusterRequestAutoscalerConfig = {
|
|
10
|
+
scaleDownUtilizationThreshold: {
|
|
11
|
+
greaterThan: 0,
|
|
12
|
+
lessThan: 1
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const CreateClusterRequestOpenIDConnectConfig = {
|
|
16
|
+
clientId: {
|
|
17
|
+
minLength: 1
|
|
18
|
+
},
|
|
19
|
+
groupsPrefix: {
|
|
20
|
+
minLength: 1
|
|
21
|
+
},
|
|
22
|
+
usernameClaim: {
|
|
23
|
+
minLength: 1
|
|
24
|
+
},
|
|
25
|
+
usernamePrefix: {
|
|
26
|
+
minLength: 1
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const CreateClusterRequestPoolConfig = {
|
|
30
|
+
name: {
|
|
31
|
+
minLength: 1
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const CreatePoolRequest = {
|
|
35
|
+
name: {
|
|
36
|
+
minLength: 1
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const ListClustersRequest = {
|
|
40
|
+
name: {
|
|
41
|
+
minLength: 1
|
|
42
|
+
},
|
|
43
|
+
page: {
|
|
44
|
+
greaterThan: 0
|
|
45
|
+
},
|
|
46
|
+
pageSize: {
|
|
47
|
+
greaterThan: 0,
|
|
48
|
+
lessThanOrEqual: 100
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const ListNodesRequest = {
|
|
52
|
+
name: {
|
|
53
|
+
minLength: 1
|
|
54
|
+
},
|
|
55
|
+
page: {
|
|
56
|
+
greaterThan: 0
|
|
57
|
+
},
|
|
58
|
+
pageSize: {
|
|
59
|
+
greaterThan: 0,
|
|
60
|
+
lessThanOrEqual: 100
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const ListPoolsRequest = {
|
|
64
|
+
name: {
|
|
65
|
+
minLength: 1
|
|
66
|
+
},
|
|
67
|
+
page: {
|
|
68
|
+
greaterThan: 0
|
|
69
|
+
},
|
|
70
|
+
pageSize: {
|
|
71
|
+
greaterThan: 0,
|
|
72
|
+
lessThanOrEqual: 100
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const MaintenanceWindow = {
|
|
76
|
+
startHour: {
|
|
77
|
+
lessThanOrEqual: 23
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const UpdateClusterRequest = {
|
|
81
|
+
name: {
|
|
82
|
+
minLength: 1
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const UpdateClusterRequestAutoscalerConfig = {
|
|
86
|
+
scaleDownUtilizationThreshold: {
|
|
87
|
+
greaterThan: 0,
|
|
88
|
+
lessThan: 1
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { CreateClusterRequest, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreatePoolRequest, ListClustersRequest, ListNodesRequest, ListPoolsRequest, MaintenanceWindow, UpdateClusterRequest, UpdateClusterRequestAutoscalerConfig };
|