@scaleway/sdk 1.34.0 → 2.0.0-alpha.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/account/v2/api.gen.js +1 -1
- package/dist/api/account/v3/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
- package/dist/api/billing/v2alpha1/api.gen.js +3 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
- package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
- package/dist/api/container/v1beta1/api.gen.js +11 -11
- package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
- package/dist/api/document_db/v1beta1/api.gen.js +6 -6
- package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
- package/dist/api/domain/v2beta1/api.gen.js +45 -38
- package/dist/api/domain/v2beta1/index.gen.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
- package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +11 -11
- package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
- package/dist/api/iam/v1alpha1/api.gen.js +64 -32
- package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +397 -602
- package/dist/api/iot/v1/api.gen.js +35 -27
- package/dist/api/iot/v1/marshalling.gen.js +111 -162
- package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
- package/dist/api/k8s/v1/api.gen.js +3 -3
- package/dist/api/k8s/v1/marshalling.gen.js +109 -194
- package/dist/api/lb/v1/api.gen.js +583 -552
- package/dist/api/lb/v1/marshalling.gen.js +245 -361
- package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
- package/dist/api/marketplace/v2/api.gen.js +6 -6
- package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
- package/dist/api/rdb/v1/api.gen.js +7 -7
- package/dist/api/rdb/v1/marshalling.gen.js +184 -240
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +73 -97
- package/dist/api/registry/v1/api.gen.js +3 -3
- package/dist/api/registry/v1/marshalling.gen.js +5 -7
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
- package/dist/api/tem/v1alpha1/api.gen.js +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
- package/dist/api/test/v1/api.gen.js +8 -25
- package/dist/api/test/v1/marshalling.gen.js +5 -7
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +2 -2
- package/dist/api/vpc/v2/marshalling.gen.js +3 -5
- package/dist/api/vpcgw/v1/api.gen.js +6 -6
- package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
- package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +3127 -3989
- package/dist/index.d.ts +9658 -12221
- package/package.json +2 -2
|
@@ -33,74 +33,50 @@ const unmarshalEndpoint = data => {
|
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
35
|
directAccess: data.direct_access ? unmarshalEndpointDirectAccessDetails(data.direct_access) : undefined,
|
|
36
|
-
hostname: data.hostname,
|
|
36
|
+
hostname: data.hostname ? data.hostname : undefined,
|
|
37
37
|
id: data.id,
|
|
38
|
-
ip: data.ip,
|
|
38
|
+
ip: data.ip ? data.ip : undefined,
|
|
39
39
|
loadBalancer: data.load_balancer ? unmarshalEndpointLoadBalancerDetails(data.load_balancer) : undefined,
|
|
40
|
-
name: data.name,
|
|
40
|
+
name: data.name ? data.name : undefined,
|
|
41
41
|
port: data.port,
|
|
42
42
|
privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : undefined
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
const
|
|
46
|
-
if (!isJSONObject(data)) {
|
|
47
|
-
throw new TypeError(`Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary.`);
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
defaultValue: data.default_value,
|
|
51
|
-
description: data.description,
|
|
52
|
-
floatMax: data.float_max,
|
|
53
|
-
floatMin: data.float_min,
|
|
54
|
-
hotConfigurable: data.hot_configurable,
|
|
55
|
-
intMax: data.int_max,
|
|
56
|
-
intMin: data.int_min,
|
|
57
|
-
name: data.name,
|
|
58
|
-
propertyType: data.property_type,
|
|
59
|
-
stringConstraint: data.string_constraint,
|
|
60
|
-
unit: data.unit
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
const unmarshalBackupSchedule = data => {
|
|
64
|
-
if (!isJSONObject(data)) {
|
|
65
|
-
throw new TypeError(`Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary.`);
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
disabled: data.disabled,
|
|
69
|
-
frequency: data.frequency,
|
|
70
|
-
nextRunAt: unmarshalDate(data.next_run_at),
|
|
71
|
-
retention: data.retention
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
const unmarshalEngineVersion = data => {
|
|
45
|
+
const unmarshalReadReplica = data => {
|
|
75
46
|
if (!isJSONObject(data)) {
|
|
76
|
-
throw new TypeError(`Unmarshalling the type '
|
|
47
|
+
throw new TypeError(`Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary.`);
|
|
77
48
|
}
|
|
78
49
|
return {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
name: data.name,
|
|
85
|
-
version: data.version
|
|
50
|
+
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
51
|
+
id: data.id,
|
|
52
|
+
region: data.region,
|
|
53
|
+
sameZone: data.same_zone,
|
|
54
|
+
status: data.status
|
|
86
55
|
};
|
|
87
56
|
};
|
|
88
|
-
const
|
|
57
|
+
const unmarshalDatabase = data => {
|
|
89
58
|
if (!isJSONObject(data)) {
|
|
90
|
-
throw new TypeError(`Unmarshalling the type '
|
|
59
|
+
throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
91
60
|
}
|
|
92
61
|
return {
|
|
62
|
+
managed: data.managed,
|
|
93
63
|
name: data.name,
|
|
94
|
-
|
|
64
|
+
owner: data.owner,
|
|
65
|
+
size: data.size
|
|
95
66
|
};
|
|
96
67
|
};
|
|
97
|
-
const
|
|
68
|
+
const unmarshalInstanceLog = data => {
|
|
98
69
|
if (!isJSONObject(data)) {
|
|
99
|
-
throw new TypeError(`Unmarshalling the type '
|
|
70
|
+
throw new TypeError(`Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary.`);
|
|
100
71
|
}
|
|
101
72
|
return {
|
|
102
|
-
|
|
103
|
-
|
|
73
|
+
createdAt: unmarshalDate(data.created_at),
|
|
74
|
+
downloadUrl: data.download_url ? data.download_url : undefined,
|
|
75
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
76
|
+
id: data.id,
|
|
77
|
+
nodeName: data.node_name,
|
|
78
|
+
region: data.region,
|
|
79
|
+
status: data.status
|
|
104
80
|
};
|
|
105
81
|
};
|
|
106
82
|
const unmarshalMaintenance = data => {
|
|
@@ -115,37 +91,33 @@ const unmarshalMaintenance = data => {
|
|
|
115
91
|
stopsAt: unmarshalDate(data.stops_at)
|
|
116
92
|
};
|
|
117
93
|
};
|
|
118
|
-
const
|
|
94
|
+
const unmarshalLogsPolicy = data => {
|
|
119
95
|
if (!isJSONObject(data)) {
|
|
120
|
-
throw new TypeError(`Unmarshalling the type '
|
|
96
|
+
throw new TypeError(`Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary.`);
|
|
121
97
|
}
|
|
122
98
|
return {
|
|
123
|
-
|
|
124
|
-
|
|
99
|
+
maxAgeRetention: data.max_age_retention ? data.max_age_retention : undefined,
|
|
100
|
+
totalDiskRetention: data.total_disk_retention ? data.total_disk_retention : undefined
|
|
125
101
|
};
|
|
126
102
|
};
|
|
127
|
-
const
|
|
103
|
+
const unmarshalBackupSchedule = data => {
|
|
128
104
|
if (!isJSONObject(data)) {
|
|
129
|
-
throw new TypeError(`Unmarshalling the type '
|
|
105
|
+
throw new TypeError(`Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary.`);
|
|
130
106
|
}
|
|
131
107
|
return {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
type: data.type
|
|
108
|
+
disabled: data.disabled,
|
|
109
|
+
frequency: data.frequency,
|
|
110
|
+
nextRunAt: unmarshalDate(data.next_run_at),
|
|
111
|
+
retention: data.retention
|
|
137
112
|
};
|
|
138
113
|
};
|
|
139
|
-
const
|
|
114
|
+
const unmarshalInstanceSetting = data => {
|
|
140
115
|
if (!isJSONObject(data)) {
|
|
141
|
-
throw new TypeError(`Unmarshalling the type '
|
|
116
|
+
throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
|
|
142
117
|
}
|
|
143
118
|
return {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
region: data.region,
|
|
147
|
-
sameZone: data.same_zone,
|
|
148
|
-
status: data.status
|
|
119
|
+
name: data.name,
|
|
120
|
+
value: data.value
|
|
149
121
|
};
|
|
150
122
|
};
|
|
151
123
|
const unmarshalUpgradableVersion = data => {
|
|
@@ -168,48 +140,13 @@ const unmarshalVolume = data => {
|
|
|
168
140
|
type: data.type
|
|
169
141
|
};
|
|
170
142
|
};
|
|
171
|
-
const unmarshalACLRule = data => {
|
|
172
|
-
if (!isJSONObject(data)) {
|
|
173
|
-
throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
|
|
174
|
-
}
|
|
175
|
-
return {
|
|
176
|
-
action: data.action,
|
|
177
|
-
description: data.description,
|
|
178
|
-
direction: data.direction,
|
|
179
|
-
ip: data.ip,
|
|
180
|
-
port: data.port,
|
|
181
|
-
protocol: data.protocol
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
const unmarshalDatabase = data => {
|
|
185
|
-
if (!isJSONObject(data)) {
|
|
186
|
-
throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
187
|
-
}
|
|
188
|
-
return {
|
|
189
|
-
managed: data.managed,
|
|
190
|
-
name: data.name,
|
|
191
|
-
owner: data.owner,
|
|
192
|
-
size: data.size
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
const unmarshalDatabaseEngine = data => {
|
|
196
|
-
if (!isJSONObject(data)) {
|
|
197
|
-
throw new TypeError(`Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary.`);
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
logoUrl: data.logo_url,
|
|
201
|
-
name: data.name,
|
|
202
|
-
region: data.region,
|
|
203
|
-
versions: unmarshalArrayOfObject(data.versions, unmarshalEngineVersion)
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
143
|
const unmarshalInstance = data => {
|
|
207
144
|
if (!isJSONObject(data)) {
|
|
208
145
|
throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
|
|
209
146
|
}
|
|
210
147
|
return {
|
|
211
148
|
backupSameRegion: data.backup_same_region,
|
|
212
|
-
backupSchedule:
|
|
149
|
+
backupSchedule: unmarshalBackupSchedule(data.backup_schedule),
|
|
213
150
|
createdAt: unmarshalDate(data.created_at),
|
|
214
151
|
endpoint: data.endpoint ? unmarshalEndpoint(data.endpoint) : undefined,
|
|
215
152
|
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
@@ -217,7 +154,7 @@ const unmarshalInstance = data => {
|
|
|
217
154
|
id: data.id,
|
|
218
155
|
initSettings: unmarshalArrayOfObject(data.init_settings, unmarshalInstanceSetting),
|
|
219
156
|
isHaCluster: data.is_ha_cluster,
|
|
220
|
-
logsPolicy:
|
|
157
|
+
logsPolicy: unmarshalLogsPolicy(data.logs_policy),
|
|
221
158
|
maintenances: unmarshalArrayOfObject(data.maintenances, unmarshalMaintenance),
|
|
222
159
|
name: data.name,
|
|
223
160
|
nodeType: data.node_type,
|
|
@@ -229,51 +166,7 @@ const unmarshalInstance = data => {
|
|
|
229
166
|
status: data.status,
|
|
230
167
|
tags: data.tags,
|
|
231
168
|
upgradableVersion: unmarshalArrayOfObject(data.upgradable_version, unmarshalUpgradableVersion),
|
|
232
|
-
volume:
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
const unmarshalInstanceLog = data => {
|
|
236
|
-
if (!isJSONObject(data)) {
|
|
237
|
-
throw new TypeError(`Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary.`);
|
|
238
|
-
}
|
|
239
|
-
return {
|
|
240
|
-
createdAt: unmarshalDate(data.created_at),
|
|
241
|
-
downloadUrl: data.download_url,
|
|
242
|
-
expiresAt: unmarshalDate(data.expires_at),
|
|
243
|
-
id: data.id,
|
|
244
|
-
nodeName: data.node_name,
|
|
245
|
-
region: data.region,
|
|
246
|
-
status: data.status
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
const unmarshalListInstanceLogsDetailsResponseInstanceLogDetail = data => {
|
|
250
|
-
if (!isJSONObject(data)) {
|
|
251
|
-
throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary.`);
|
|
252
|
-
}
|
|
253
|
-
return {
|
|
254
|
-
logName: data.log_name,
|
|
255
|
-
size: data.size
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
const unmarshalNodeType = data => {
|
|
259
|
-
if (!isJSONObject(data)) {
|
|
260
|
-
throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
|
|
261
|
-
}
|
|
262
|
-
return {
|
|
263
|
-
availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
|
|
264
|
-
beta: data.beta,
|
|
265
|
-
description: data.description,
|
|
266
|
-
disabled: data.disabled,
|
|
267
|
-
generation: data.generation,
|
|
268
|
-
instanceRange: data.instance_range,
|
|
269
|
-
isBssdCompatible: data.is_bssd_compatible,
|
|
270
|
-
isHaRequired: data.is_ha_required,
|
|
271
|
-
memory: data.memory,
|
|
272
|
-
name: data.name,
|
|
273
|
-
region: data.region,
|
|
274
|
-
stockStatus: data.stock_status,
|
|
275
|
-
vcpus: data.vcpus,
|
|
276
|
-
volumeConstraint: data.volume_constraint ? unmarshalNodeTypeVolumeConstraintSizes(data.volume_constraint) : undefined
|
|
169
|
+
volume: unmarshalVolume(data.volume)
|
|
277
170
|
};
|
|
278
171
|
};
|
|
279
172
|
const unmarshalPrivilege = data => {
|
|
@@ -299,7 +192,7 @@ const unmarshalSnapshot = data => {
|
|
|
299
192
|
name: data.name,
|
|
300
193
|
nodeType: data.node_type,
|
|
301
194
|
region: data.region,
|
|
302
|
-
size: data.size,
|
|
195
|
+
size: data.size ? data.size : undefined,
|
|
303
196
|
status: data.status,
|
|
304
197
|
updatedAt: unmarshalDate(data.updated_at)
|
|
305
198
|
};
|
|
@@ -313,6 +206,19 @@ const unmarshalUser = data => {
|
|
|
313
206
|
name: data.name
|
|
314
207
|
};
|
|
315
208
|
};
|
|
209
|
+
const unmarshalACLRule = data => {
|
|
210
|
+
if (!isJSONObject(data)) {
|
|
211
|
+
throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
action: data.action,
|
|
215
|
+
description: data.description,
|
|
216
|
+
direction: data.direction,
|
|
217
|
+
ip: data.ip,
|
|
218
|
+
port: data.port ? data.port : undefined,
|
|
219
|
+
protocol: data.protocol
|
|
220
|
+
};
|
|
221
|
+
};
|
|
316
222
|
const unmarshalAddInstanceACLRulesResponse = data => {
|
|
317
223
|
if (!isJSONObject(data)) {
|
|
318
224
|
throw new TypeError(`Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
@@ -353,6 +259,49 @@ const unmarshalInstanceMetrics = data => {
|
|
|
353
259
|
timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries)
|
|
354
260
|
};
|
|
355
261
|
};
|
|
262
|
+
const unmarshalEngineSetting = data => {
|
|
263
|
+
if (!isJSONObject(data)) {
|
|
264
|
+
throw new TypeError(`Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary.`);
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
defaultValue: data.default_value,
|
|
268
|
+
description: data.description,
|
|
269
|
+
floatMax: data.float_max ? data.float_max : undefined,
|
|
270
|
+
floatMin: data.float_min ? data.float_min : undefined,
|
|
271
|
+
hotConfigurable: data.hot_configurable,
|
|
272
|
+
intMax: data.int_max ? data.int_max : undefined,
|
|
273
|
+
intMin: data.int_min ? data.int_min : undefined,
|
|
274
|
+
name: data.name,
|
|
275
|
+
propertyType: data.property_type,
|
|
276
|
+
stringConstraint: data.string_constraint ? data.string_constraint : undefined,
|
|
277
|
+
unit: data.unit ? data.unit : undefined
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
const unmarshalEngineVersion = data => {
|
|
281
|
+
if (!isJSONObject(data)) {
|
|
282
|
+
throw new TypeError(`Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary.`);
|
|
283
|
+
}
|
|
284
|
+
return {
|
|
285
|
+
availableInitSettings: unmarshalArrayOfObject(data.available_init_settings, unmarshalEngineSetting),
|
|
286
|
+
availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalEngineSetting),
|
|
287
|
+
beta: data.beta,
|
|
288
|
+
disabled: data.disabled,
|
|
289
|
+
endOfLife: unmarshalDate(data.end_of_life),
|
|
290
|
+
name: data.name,
|
|
291
|
+
version: data.version
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
const unmarshalDatabaseEngine = data => {
|
|
295
|
+
if (!isJSONObject(data)) {
|
|
296
|
+
throw new TypeError(`Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary.`);
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
logoUrl: data.logo_url,
|
|
300
|
+
name: data.name,
|
|
301
|
+
region: data.region,
|
|
302
|
+
versions: unmarshalArrayOfObject(data.versions, unmarshalEngineVersion)
|
|
303
|
+
};
|
|
304
|
+
};
|
|
356
305
|
const unmarshalListDatabaseEnginesResponse = data => {
|
|
357
306
|
if (!isJSONObject(data)) {
|
|
358
307
|
throw new TypeError(`Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary.`);
|
|
@@ -380,6 +329,15 @@ const unmarshalListInstanceACLRulesResponse = data => {
|
|
|
380
329
|
totalCount: data.total_count
|
|
381
330
|
};
|
|
382
331
|
};
|
|
332
|
+
const unmarshalListInstanceLogsDetailsResponseInstanceLogDetail = data => {
|
|
333
|
+
if (!isJSONObject(data)) {
|
|
334
|
+
throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary.`);
|
|
335
|
+
}
|
|
336
|
+
return {
|
|
337
|
+
logName: data.log_name,
|
|
338
|
+
size: data.size
|
|
339
|
+
};
|
|
340
|
+
};
|
|
383
341
|
const unmarshalListInstanceLogsDetailsResponse = data => {
|
|
384
342
|
if (!isJSONObject(data)) {
|
|
385
343
|
throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary.`);
|
|
@@ -405,6 +363,48 @@ const unmarshalListInstancesResponse = data => {
|
|
|
405
363
|
totalCount: data.total_count
|
|
406
364
|
};
|
|
407
365
|
};
|
|
366
|
+
const unmarshalNodeTypeVolumeType = data => {
|
|
367
|
+
if (!isJSONObject(data)) {
|
|
368
|
+
throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
chunkSize: data.chunk_size,
|
|
372
|
+
description: data.description,
|
|
373
|
+
maxSize: data.max_size,
|
|
374
|
+
minSize: data.min_size,
|
|
375
|
+
type: data.type
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
const unmarshalNodeTypeVolumeConstraintSizes = data => {
|
|
379
|
+
if (!isJSONObject(data)) {
|
|
380
|
+
throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary.`);
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
maxSize: data.max_size,
|
|
384
|
+
minSize: data.min_size
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
const unmarshalNodeType = data => {
|
|
388
|
+
if (!isJSONObject(data)) {
|
|
389
|
+
throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
|
|
390
|
+
}
|
|
391
|
+
return {
|
|
392
|
+
availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
|
|
393
|
+
beta: data.beta,
|
|
394
|
+
description: data.description,
|
|
395
|
+
disabled: data.disabled,
|
|
396
|
+
generation: data.generation,
|
|
397
|
+
instanceRange: data.instance_range,
|
|
398
|
+
isBssdCompatible: data.is_bssd_compatible ? data.is_bssd_compatible : undefined,
|
|
399
|
+
isHaRequired: data.is_ha_required,
|
|
400
|
+
memory: data.memory,
|
|
401
|
+
name: data.name,
|
|
402
|
+
region: data.region,
|
|
403
|
+
stockStatus: data.stock_status,
|
|
404
|
+
vcpus: data.vcpus,
|
|
405
|
+
volumeConstraint: data.volume_constraint ? unmarshalNodeTypeVolumeConstraintSizes(data.volume_constraint) : undefined
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
408
|
const unmarshalListNodeTypesResponse = data => {
|
|
409
409
|
if (!isJSONObject(data)) {
|
|
410
410
|
throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
@@ -457,65 +457,11 @@ const unmarshalSetInstanceSettingsResponse = data => {
|
|
|
457
457
|
settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting)
|
|
458
458
|
};
|
|
459
459
|
};
|
|
460
|
-
const marshalEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
|
|
461
|
-
const marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
|
|
462
|
-
const marshalEndpointSpecLoadBalancer = (request, defaults) => ({});
|
|
463
|
-
const marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
464
|
-
private_network_id: request.privateNetworkId,
|
|
465
|
-
...resolveOneOf([{
|
|
466
|
-
param: 'service_ip',
|
|
467
|
-
value: request.serviceIp
|
|
468
|
-
}, {
|
|
469
|
-
param: 'ipam_config',
|
|
470
|
-
value: request.ipamConfig ? marshalEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : undefined
|
|
471
|
-
}])
|
|
472
|
-
});
|
|
473
|
-
const marshalReadReplicaEndpointSpecDirectAccess = (request, defaults) => ({});
|
|
474
|
-
const marshalReadReplicaEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
475
|
-
private_network_id: request.privateNetworkId,
|
|
476
|
-
...resolveOneOf([{
|
|
477
|
-
param: 'service_ip',
|
|
478
|
-
value: request.serviceIp
|
|
479
|
-
}, {
|
|
480
|
-
param: 'ipam_config',
|
|
481
|
-
value: request.ipamConfig ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : undefined
|
|
482
|
-
}])
|
|
483
|
-
});
|
|
484
|
-
const marshalACLRuleRequest = (request, defaults) => ({
|
|
485
|
-
description: request.description,
|
|
486
|
-
ip: request.ip
|
|
487
|
-
});
|
|
488
|
-
const marshalEndpointSpec = (request, defaults) => ({
|
|
489
|
-
...resolveOneOf([{
|
|
490
|
-
param: 'load_balancer',
|
|
491
|
-
value: request.loadBalancer ? marshalEndpointSpecLoadBalancer(request.loadBalancer) : undefined
|
|
492
|
-
}, {
|
|
493
|
-
param: 'private_network',
|
|
494
|
-
value: request.privateNetwork ? marshalEndpointSpecPrivateNetwork(request.privateNetwork) : undefined
|
|
495
|
-
}])
|
|
496
|
-
});
|
|
497
|
-
const marshalInstanceSetting = (request, defaults) => ({
|
|
498
|
-
name: request.name,
|
|
499
|
-
value: request.value
|
|
500
|
-
});
|
|
501
|
-
const marshalLogsPolicy = (request, defaults) => ({
|
|
502
|
-
max_age_retention: request.maxAgeRetention,
|
|
503
|
-
total_disk_retention: request.totalDiskRetention
|
|
504
|
-
});
|
|
505
|
-
const marshalReadReplicaEndpointSpec = (request, defaults) => ({
|
|
506
|
-
...resolveOneOf([{
|
|
507
|
-
param: 'direct_access',
|
|
508
|
-
value: request.directAccess ? marshalReadReplicaEndpointSpecDirectAccess(request.directAccess) : undefined
|
|
509
|
-
}, {
|
|
510
|
-
param: 'private_network',
|
|
511
|
-
value: request.privateNetwork ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork) : undefined
|
|
512
|
-
}])
|
|
513
|
-
});
|
|
514
460
|
const marshalAddInstanceACLRulesRequest = (request, defaults) => ({
|
|
515
|
-
rules: request.rules
|
|
461
|
+
rules: request.rules
|
|
516
462
|
});
|
|
517
463
|
const marshalAddInstanceSettingsRequest = (request, defaults) => ({
|
|
518
|
-
settings: request.settings
|
|
464
|
+
settings: request.settings
|
|
519
465
|
});
|
|
520
466
|
const marshalCloneInstanceRequest = (request, defaults) => ({
|
|
521
467
|
name: request.name,
|
|
@@ -525,7 +471,7 @@ const marshalCreateDatabaseRequest = (request, defaults) => ({
|
|
|
525
471
|
name: request.name
|
|
526
472
|
});
|
|
527
473
|
const marshalCreateEndpointRequest = (request, defaults) => ({
|
|
528
|
-
endpoint_spec: request.endpointSpec
|
|
474
|
+
endpoint_spec: request.endpointSpec
|
|
529
475
|
});
|
|
530
476
|
const marshalCreateInstanceFromSnapshotRequest = (request, defaults) => ({
|
|
531
477
|
instance_name: request.instanceName,
|
|
@@ -536,8 +482,8 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
|
536
482
|
backup_same_region: request.backupSameRegion,
|
|
537
483
|
disable_backup: request.disableBackup,
|
|
538
484
|
engine: request.engine,
|
|
539
|
-
init_endpoints: request.initEndpoints
|
|
540
|
-
init_settings: request.initSettings
|
|
485
|
+
init_endpoints: request.initEndpoints,
|
|
486
|
+
init_settings: request.initSettings,
|
|
541
487
|
is_ha_cluster: request.isHaCluster,
|
|
542
488
|
name: request.name || randomName('ins'),
|
|
543
489
|
node_type: request.nodeType,
|
|
@@ -545,22 +491,20 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
|
545
491
|
tags: request.tags,
|
|
546
492
|
user_name: request.userName,
|
|
547
493
|
volume_size: request.volumeSize,
|
|
548
|
-
volume_type: request.volumeType
|
|
494
|
+
volume_type: request.volumeType,
|
|
549
495
|
...resolveOneOf([{
|
|
550
|
-
default: defaults.defaultProjectId,
|
|
551
|
-
param: 'project_id',
|
|
552
|
-
value: request.projectId
|
|
553
|
-
}, {
|
|
554
|
-
default: defaults.defaultOrganizationId,
|
|
555
496
|
param: 'organization_id',
|
|
556
497
|
value: request.organizationId
|
|
498
|
+
}, {
|
|
499
|
+
param: 'project_id',
|
|
500
|
+
value: request.projectId
|
|
557
501
|
}])
|
|
558
502
|
});
|
|
559
503
|
const marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({
|
|
560
|
-
endpoint_spec: request.endpointSpec
|
|
504
|
+
endpoint_spec: request.endpointSpec
|
|
561
505
|
});
|
|
562
506
|
const marshalCreateReadReplicaRequest = (request, defaults) => ({
|
|
563
|
-
endpoint_spec: request.endpointSpec
|
|
507
|
+
endpoint_spec: request.endpointSpec,
|
|
564
508
|
instance_id: request.instanceId,
|
|
565
509
|
same_zone: request.sameZone
|
|
566
510
|
});
|
|
@@ -586,14 +530,14 @@ const marshalPurgeInstanceLogsRequest = (request, defaults) => ({
|
|
|
586
530
|
log_name: request.logName
|
|
587
531
|
});
|
|
588
532
|
const marshalSetInstanceACLRulesRequest = (request, defaults) => ({
|
|
589
|
-
rules: request.rules
|
|
533
|
+
rules: request.rules
|
|
590
534
|
});
|
|
591
535
|
const marshalSetInstanceSettingsRequest = (request, defaults) => ({
|
|
592
|
-
settings: request.settings
|
|
536
|
+
settings: request.settings
|
|
593
537
|
});
|
|
594
538
|
const marshalSetPrivilegeRequest = (request, defaults) => ({
|
|
595
539
|
database_name: request.databaseName,
|
|
596
|
-
permission: request.permission
|
|
540
|
+
permission: request.permission,
|
|
597
541
|
user_name: request.userName
|
|
598
542
|
});
|
|
599
543
|
const marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
@@ -602,7 +546,7 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
|
602
546
|
backup_schedule_retention: request.backupScheduleRetention,
|
|
603
547
|
backup_schedule_start_hour: request.backupScheduleStartHour,
|
|
604
548
|
is_backup_schedule_disabled: request.isBackupScheduleDisabled,
|
|
605
|
-
logs_policy: request.logsPolicy
|
|
549
|
+
logs_policy: request.logsPolicy,
|
|
606
550
|
name: request.name,
|
|
607
551
|
tags: request.tags
|
|
608
552
|
});
|
|
@@ -616,20 +560,20 @@ const marshalUpdateUserRequest = (request, defaults) => ({
|
|
|
616
560
|
});
|
|
617
561
|
const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
618
562
|
...resolveOneOf([{
|
|
563
|
+
param: 'enable_ha',
|
|
564
|
+
value: request.enableHa
|
|
565
|
+
}, {
|
|
619
566
|
param: 'node_type',
|
|
620
567
|
value: request.nodeType
|
|
621
568
|
}, {
|
|
622
|
-
param: '
|
|
623
|
-
value: request.
|
|
569
|
+
param: 'upgradable_version_id',
|
|
570
|
+
value: request.upgradableVersionId
|
|
624
571
|
}, {
|
|
625
572
|
param: 'volume_size',
|
|
626
573
|
value: request.volumeSize
|
|
627
574
|
}, {
|
|
628
575
|
param: 'volume_type',
|
|
629
576
|
value: request.volumeType
|
|
630
|
-
}, {
|
|
631
|
-
param: 'upgradable_version_id',
|
|
632
|
-
value: request.upgradableVersionId
|
|
633
577
|
}])
|
|
634
578
|
});
|
|
635
579
|
|