@scaleway/sdk 2.24.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/applesilicon/v1alpha1/api.gen.js +2 -2
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +12 -2
- package/dist/api/cockpit/index.js +4 -2
- package/dist/api/cockpit/v1/api.gen.js +456 -0
- package/dist/api/cockpit/v1/index.gen.js +6 -0
- package/dist/api/cockpit/v1/marshalling.gen.js +253 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +46 -0
- package/dist/api/instance/v1/api.gen.js +11 -10
- package/dist/api/k8s/v1/api.gen.js +14 -0
- package/dist/api/k8s/v1/marshalling.gen.js +1 -0
- package/dist/api/rdb/v1/marshalling.gen.js +1 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +21 -3
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +17 -1
- package/dist/index.cjs +1029 -204
- package/dist/index.d.ts +1195 -138
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
const version = 'v2.
|
|
500
|
+
const version = 'v2.25.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () =>
|
|
@@ -2068,7 +2068,7 @@ const marshalUpdateProjectRequest = (request, defaults) => ({
|
|
|
2068
2068
|
|
|
2069
2069
|
// This file was automatically generated. DO NOT EDIT.
|
|
2070
2070
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
2071
|
-
const jsonContentHeaders$
|
|
2071
|
+
const jsonContentHeaders$y = {
|
|
2072
2072
|
'Content-Type': 'application/json; charset=utf-8'
|
|
2073
2073
|
};
|
|
2074
2074
|
|
|
@@ -2089,7 +2089,7 @@ let API$y = class API extends API$z {
|
|
|
2089
2089
|
*/
|
|
2090
2090
|
createProject = (request = {}) => this.client.fetch({
|
|
2091
2091
|
body: JSON.stringify(marshalCreateProjectRequest(request, this.client.settings)),
|
|
2092
|
-
headers: jsonContentHeaders$
|
|
2092
|
+
headers: jsonContentHeaders$y,
|
|
2093
2093
|
method: 'POST',
|
|
2094
2094
|
path: `/account/v2/projects`
|
|
2095
2095
|
}, unmarshalProject$1);
|
|
@@ -2153,7 +2153,7 @@ let API$y = class API extends API$z {
|
|
|
2153
2153
|
*/
|
|
2154
2154
|
updateProject = (request = {}) => this.client.fetch({
|
|
2155
2155
|
body: JSON.stringify(marshalUpdateProjectRequest(request, this.client.settings)),
|
|
2156
|
-
headers: jsonContentHeaders$
|
|
2156
|
+
headers: jsonContentHeaders$y,
|
|
2157
2157
|
method: 'PATCH',
|
|
2158
2158
|
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
2159
2159
|
}, unmarshalProject$1);
|
|
@@ -2162,7 +2162,7 @@ let API$y = class API extends API$z {
|
|
|
2162
2162
|
// This file was automatically generated. DO NOT EDIT.
|
|
2163
2163
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
2164
2164
|
|
|
2165
|
-
var index_gen$
|
|
2165
|
+
var index_gen$y = /*#__PURE__*/Object.freeze({
|
|
2166
2166
|
__proto__: null,
|
|
2167
2167
|
API: API$y
|
|
2168
2168
|
});
|
|
@@ -2203,7 +2203,7 @@ const marshalProjectApiUpdateProjectRequest = (request, defaults) => ({
|
|
|
2203
2203
|
|
|
2204
2204
|
// This file was automatically generated. DO NOT EDIT.
|
|
2205
2205
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
2206
|
-
const jsonContentHeaders$
|
|
2206
|
+
const jsonContentHeaders$x = {
|
|
2207
2207
|
'Content-Type': 'application/json; charset=utf-8'
|
|
2208
2208
|
};
|
|
2209
2209
|
|
|
@@ -2222,7 +2222,7 @@ class ProjectAPI extends API$z {
|
|
|
2222
2222
|
*/
|
|
2223
2223
|
createProject = request => this.client.fetch({
|
|
2224
2224
|
body: JSON.stringify(marshalProjectApiCreateProjectRequest(request, this.client.settings)),
|
|
2225
|
-
headers: jsonContentHeaders$
|
|
2225
|
+
headers: jsonContentHeaders$x,
|
|
2226
2226
|
method: 'POST',
|
|
2227
2227
|
path: `/account/v3/projects`
|
|
2228
2228
|
}, unmarshalProject);
|
|
@@ -2278,7 +2278,7 @@ class ProjectAPI extends API$z {
|
|
|
2278
2278
|
*/
|
|
2279
2279
|
updateProject = (request = {}) => this.client.fetch({
|
|
2280
2280
|
body: JSON.stringify(marshalProjectApiUpdateProjectRequest(request, this.client.settings)),
|
|
2281
|
-
headers: jsonContentHeaders$
|
|
2281
|
+
headers: jsonContentHeaders$x,
|
|
2282
2282
|
method: 'PATCH',
|
|
2283
2283
|
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
2284
2284
|
}, unmarshalProject);
|
|
@@ -2322,7 +2322,7 @@ const ProjectApiUpdateProjectRequest = {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
};
|
|
2324
2324
|
|
|
2325
|
-
var validationRules_gen$
|
|
2325
|
+
var validationRules_gen$i = /*#__PURE__*/Object.freeze({
|
|
2326
2326
|
__proto__: null,
|
|
2327
2327
|
ProjectApiCreateProjectRequest: ProjectApiCreateProjectRequest,
|
|
2328
2328
|
ProjectApiListProjectsRequest: ProjectApiListProjectsRequest,
|
|
@@ -2332,16 +2332,16 @@ var validationRules_gen$h = /*#__PURE__*/Object.freeze({
|
|
|
2332
2332
|
// This file was automatically generated. DO NOT EDIT.
|
|
2333
2333
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
2334
2334
|
|
|
2335
|
-
var index_gen$
|
|
2335
|
+
var index_gen$x = /*#__PURE__*/Object.freeze({
|
|
2336
2336
|
__proto__: null,
|
|
2337
2337
|
ProjectAPI: ProjectAPI,
|
|
2338
|
-
ValidationRules: validationRules_gen$
|
|
2338
|
+
ValidationRules: validationRules_gen$i
|
|
2339
2339
|
});
|
|
2340
2340
|
|
|
2341
2341
|
var index$A = /*#__PURE__*/Object.freeze({
|
|
2342
2342
|
__proto__: null,
|
|
2343
|
-
v2: index_gen$
|
|
2344
|
-
v3: index_gen$
|
|
2343
|
+
v2: index_gen$y,
|
|
2344
|
+
v3: index_gen$x
|
|
2345
2345
|
});
|
|
2346
2346
|
|
|
2347
2347
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -2358,10 +2358,14 @@ const unmarshalOS$2 = data => {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
return {
|
|
2360
2360
|
compatibleServerTypes: data.compatible_server_types,
|
|
2361
|
+
family: data.family,
|
|
2361
2362
|
id: data.id,
|
|
2362
2363
|
imageUrl: data.image_url,
|
|
2364
|
+
isBeta: data.is_beta,
|
|
2363
2365
|
label: data.label,
|
|
2364
|
-
name: data.name
|
|
2366
|
+
name: data.name,
|
|
2367
|
+
version: data.version,
|
|
2368
|
+
xcodeVersion: data.xcode_version
|
|
2365
2369
|
};
|
|
2366
2370
|
};
|
|
2367
2371
|
const unmarshalServerTypeCPU = data => {
|
|
@@ -2397,6 +2401,7 @@ const unmarshalServerType$1 = data => {
|
|
|
2397
2401
|
}
|
|
2398
2402
|
return {
|
|
2399
2403
|
cpu: data.cpu ? unmarshalServerTypeCPU(data.cpu) : undefined,
|
|
2404
|
+
defaultOs: data.default_os ? unmarshalOS$2(data.default_os) : undefined,
|
|
2400
2405
|
disk: data.disk ? unmarshalServerTypeDisk(data.disk) : undefined,
|
|
2401
2406
|
memory: data.memory ? unmarshalServerTypeMemory(data.memory) : undefined,
|
|
2402
2407
|
minimumLeaseDuration: data.minimum_lease_duration,
|
|
@@ -2415,6 +2420,7 @@ const unmarshalServer$3 = data => {
|
|
|
2415
2420
|
ip: data.ip,
|
|
2416
2421
|
name: data.name,
|
|
2417
2422
|
organizationId: data.organization_id,
|
|
2423
|
+
os: data.os ? unmarshalOS$2(data.os) : undefined,
|
|
2418
2424
|
projectId: data.project_id,
|
|
2419
2425
|
status: data.status,
|
|
2420
2426
|
type: data.type,
|
|
@@ -2451,16 +2457,20 @@ const unmarshalListServersResponse$3 = data => {
|
|
|
2451
2457
|
};
|
|
2452
2458
|
const marshalCreateServerRequest$3 = (request, defaults) => ({
|
|
2453
2459
|
name: request.name || randomName('as'),
|
|
2460
|
+
os_id: request.osId,
|
|
2454
2461
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
2455
2462
|
type: request.type
|
|
2456
2463
|
});
|
|
2464
|
+
const marshalReinstallServerRequest = (request, defaults) => ({
|
|
2465
|
+
os_id: request.osId
|
|
2466
|
+
});
|
|
2457
2467
|
const marshalUpdateServerRequest$3 = (request, defaults) => ({
|
|
2458
2468
|
name: request.name
|
|
2459
2469
|
});
|
|
2460
2470
|
|
|
2461
2471
|
// This file was automatically generated. DO NOT EDIT.
|
|
2462
2472
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
2463
|
-
const jsonContentHeaders$
|
|
2473
|
+
const jsonContentHeaders$w = {
|
|
2464
2474
|
'Content-Type': 'application/json; charset=utf-8'
|
|
2465
2475
|
};
|
|
2466
2476
|
|
|
@@ -2503,7 +2513,7 @@ let API$x = class API extends API$z {
|
|
|
2503
2513
|
*/
|
|
2504
2514
|
createServer = request => this.client.fetch({
|
|
2505
2515
|
body: JSON.stringify(marshalCreateServerRequest$3(request, this.client.settings)),
|
|
2506
|
-
headers: jsonContentHeaders$
|
|
2516
|
+
headers: jsonContentHeaders$w,
|
|
2507
2517
|
method: 'POST',
|
|
2508
2518
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
2509
2519
|
}, unmarshalServer$3);
|
|
@@ -2581,7 +2591,7 @@ let API$x = class API extends API$z {
|
|
|
2581
2591
|
*/
|
|
2582
2592
|
updateServer = request => this.client.fetch({
|
|
2583
2593
|
body: JSON.stringify(marshalUpdateServerRequest$3(request, this.client.settings)),
|
|
2584
|
-
headers: jsonContentHeaders$
|
|
2594
|
+
headers: jsonContentHeaders$w,
|
|
2585
2595
|
method: 'PATCH',
|
|
2586
2596
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
2587
2597
|
}, unmarshalServer$3);
|
|
@@ -2608,7 +2618,7 @@ let API$x = class API extends API$z {
|
|
|
2608
2618
|
*/
|
|
2609
2619
|
rebootServer = request => this.client.fetch({
|
|
2610
2620
|
body: '{}',
|
|
2611
|
-
headers: jsonContentHeaders$
|
|
2621
|
+
headers: jsonContentHeaders$w,
|
|
2612
2622
|
method: 'POST',
|
|
2613
2623
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reboot`
|
|
2614
2624
|
}, unmarshalServer$3);
|
|
@@ -2623,8 +2633,8 @@ let API$x = class API extends API$z {
|
|
|
2623
2633
|
* @returns A Promise of Server
|
|
2624
2634
|
*/
|
|
2625
2635
|
reinstallServer = request => this.client.fetch({
|
|
2626
|
-
body:
|
|
2627
|
-
headers: jsonContentHeaders$
|
|
2636
|
+
body: JSON.stringify(marshalReinstallServerRequest(request, this.client.settings)),
|
|
2637
|
+
headers: jsonContentHeaders$w,
|
|
2628
2638
|
method: 'POST',
|
|
2629
2639
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reinstall`
|
|
2630
2640
|
}, unmarshalServer$3);
|
|
@@ -2633,7 +2643,7 @@ let API$x = class API extends API$z {
|
|
|
2633
2643
|
// This file was automatically generated. DO NOT EDIT.
|
|
2634
2644
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
2635
2645
|
|
|
2636
|
-
var index_gen$
|
|
2646
|
+
var index_gen$w = /*#__PURE__*/Object.freeze({
|
|
2637
2647
|
__proto__: null,
|
|
2638
2648
|
API: API$x,
|
|
2639
2649
|
SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES$3
|
|
@@ -2641,7 +2651,7 @@ var index_gen$v = /*#__PURE__*/Object.freeze({
|
|
|
2641
2651
|
|
|
2642
2652
|
var index$z = /*#__PURE__*/Object.freeze({
|
|
2643
2653
|
__proto__: null,
|
|
2644
|
-
v1alpha1: index_gen$
|
|
2654
|
+
v1alpha1: index_gen$w
|
|
2645
2655
|
});
|
|
2646
2656
|
|
|
2647
2657
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -3059,7 +3069,7 @@ const marshalUpdateSettingRequest = (request, defaults) => ({
|
|
|
3059
3069
|
|
|
3060
3070
|
// This file was automatically generated. DO NOT EDIT.
|
|
3061
3071
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3062
|
-
const jsonContentHeaders$
|
|
3072
|
+
const jsonContentHeaders$v = {
|
|
3063
3073
|
'Content-Type': 'application/json; charset=utf-8'
|
|
3064
3074
|
};
|
|
3065
3075
|
|
|
@@ -3116,7 +3126,7 @@ let API$w = class API extends API$z {
|
|
|
3116
3126
|
*/
|
|
3117
3127
|
createServer = request => this.client.fetch({
|
|
3118
3128
|
body: JSON.stringify(marshalCreateServerRequest$2(request, this.client.settings)),
|
|
3119
|
-
headers: jsonContentHeaders$
|
|
3129
|
+
headers: jsonContentHeaders$v,
|
|
3120
3130
|
method: 'POST',
|
|
3121
3131
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
3122
3132
|
}, unmarshalServer$2);
|
|
@@ -3131,7 +3141,7 @@ let API$w = class API extends API$z {
|
|
|
3131
3141
|
*/
|
|
3132
3142
|
updateServer = request => this.client.fetch({
|
|
3133
3143
|
body: JSON.stringify(marshalUpdateServerRequest$2(request, this.client.settings)),
|
|
3134
|
-
headers: jsonContentHeaders$
|
|
3144
|
+
headers: jsonContentHeaders$v,
|
|
3135
3145
|
method: 'PATCH',
|
|
3136
3146
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
3137
3147
|
}, unmarshalServer$2);
|
|
@@ -3145,7 +3155,7 @@ let API$w = class API extends API$z {
|
|
|
3145
3155
|
*/
|
|
3146
3156
|
installServer = request => this.client.fetch({
|
|
3147
3157
|
body: JSON.stringify(marshalInstallServerRequest$1(request, this.client.settings)),
|
|
3148
|
-
headers: jsonContentHeaders$
|
|
3158
|
+
headers: jsonContentHeaders$v,
|
|
3149
3159
|
method: 'POST',
|
|
3150
3160
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/install`
|
|
3151
3161
|
}, unmarshalServer$2);
|
|
@@ -3183,7 +3193,7 @@ let API$w = class API extends API$z {
|
|
|
3183
3193
|
*/
|
|
3184
3194
|
rebootServer = request => this.client.fetch({
|
|
3185
3195
|
body: JSON.stringify(marshalRebootServerRequest(request, this.client.settings)),
|
|
3186
|
-
headers: jsonContentHeaders$
|
|
3196
|
+
headers: jsonContentHeaders$v,
|
|
3187
3197
|
method: 'POST',
|
|
3188
3198
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/reboot`
|
|
3189
3199
|
}, unmarshalServer$2);
|
|
@@ -3196,7 +3206,7 @@ let API$w = class API extends API$z {
|
|
|
3196
3206
|
*/
|
|
3197
3207
|
startServer = request => this.client.fetch({
|
|
3198
3208
|
body: JSON.stringify(marshalStartServerRequest(request, this.client.settings)),
|
|
3199
|
-
headers: jsonContentHeaders$
|
|
3209
|
+
headers: jsonContentHeaders$v,
|
|
3200
3210
|
method: 'POST',
|
|
3201
3211
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/start`
|
|
3202
3212
|
}, unmarshalServer$2);
|
|
@@ -3211,7 +3221,7 @@ let API$w = class API extends API$z {
|
|
|
3211
3221
|
*/
|
|
3212
3222
|
stopServer = request => this.client.fetch({
|
|
3213
3223
|
body: '{}',
|
|
3214
|
-
headers: jsonContentHeaders$
|
|
3224
|
+
headers: jsonContentHeaders$v,
|
|
3215
3225
|
method: 'POST',
|
|
3216
3226
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/stop`
|
|
3217
3227
|
}, unmarshalServer$2);
|
|
@@ -3249,7 +3259,7 @@ let API$w = class API extends API$z {
|
|
|
3249
3259
|
*/
|
|
3250
3260
|
startBMCAccess = request => this.client.fetch({
|
|
3251
3261
|
body: JSON.stringify(marshalStartBMCAccessRequest$1(request, this.client.settings)),
|
|
3252
|
-
headers: jsonContentHeaders$
|
|
3262
|
+
headers: jsonContentHeaders$v,
|
|
3253
3263
|
method: 'POST',
|
|
3254
3264
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/bmc-access`
|
|
3255
3265
|
}, unmarshalBMCAccess$1);
|
|
@@ -3287,7 +3297,7 @@ let API$w = class API extends API$z {
|
|
|
3287
3297
|
*/
|
|
3288
3298
|
updateIP = request => this.client.fetch({
|
|
3289
3299
|
body: JSON.stringify(marshalUpdateIPRequest$2(request, this.client.settings)),
|
|
3290
|
-
headers: jsonContentHeaders$
|
|
3300
|
+
headers: jsonContentHeaders$v,
|
|
3291
3301
|
method: 'PATCH',
|
|
3292
3302
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
3293
3303
|
}, unmarshalIP$3);
|
|
@@ -3301,7 +3311,7 @@ let API$w = class API extends API$z {
|
|
|
3301
3311
|
*/
|
|
3302
3312
|
addOptionServer = request => this.client.fetch({
|
|
3303
3313
|
body: JSON.stringify(marshalAddOptionServerRequest(request, this.client.settings)),
|
|
3304
|
-
headers: jsonContentHeaders$
|
|
3314
|
+
headers: jsonContentHeaders$v,
|
|
3305
3315
|
method: 'POST',
|
|
3306
3316
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/options/${validatePathParam('optionId', request.optionId)}`
|
|
3307
3317
|
}, unmarshalServer$2);
|
|
@@ -3386,7 +3396,7 @@ let API$w = class API extends API$z {
|
|
|
3386
3396
|
*/
|
|
3387
3397
|
updateSetting = request => this.client.fetch({
|
|
3388
3398
|
body: JSON.stringify(marshalUpdateSettingRequest(request, this.client.settings)),
|
|
3389
|
-
headers: jsonContentHeaders$
|
|
3399
|
+
headers: jsonContentHeaders$v,
|
|
3390
3400
|
method: 'PATCH',
|
|
3391
3401
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/settings/${validatePathParam('settingId', request.settingId)}`
|
|
3392
3402
|
}, unmarshalSetting);
|
|
@@ -3431,7 +3441,7 @@ class PrivateNetworkAPI extends API$z {
|
|
|
3431
3441
|
*/
|
|
3432
3442
|
addServerPrivateNetwork = request => this.client.fetch({
|
|
3433
3443
|
body: JSON.stringify(marshalPrivateNetworkApiAddServerPrivateNetworkRequest(request, this.client.settings)),
|
|
3434
|
-
headers: jsonContentHeaders$
|
|
3444
|
+
headers: jsonContentHeaders$v,
|
|
3435
3445
|
method: 'POST',
|
|
3436
3446
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks`
|
|
3437
3447
|
}, unmarshalServerPrivateNetwork);
|
|
@@ -3445,7 +3455,7 @@ class PrivateNetworkAPI extends API$z {
|
|
|
3445
3455
|
*/
|
|
3446
3456
|
setServerPrivateNetworks = request => this.client.fetch({
|
|
3447
3457
|
body: JSON.stringify(marshalPrivateNetworkApiSetServerPrivateNetworksRequest(request, this.client.settings)),
|
|
3448
|
-
headers: jsonContentHeaders$
|
|
3458
|
+
headers: jsonContentHeaders$v,
|
|
3449
3459
|
method: 'PUT',
|
|
3450
3460
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks`
|
|
3451
3461
|
}, unmarshalSetServerPrivateNetworksResponse);
|
|
@@ -3606,7 +3616,7 @@ const UpdateServerRequest$1 = {
|
|
|
3606
3616
|
}
|
|
3607
3617
|
};
|
|
3608
3618
|
|
|
3609
|
-
var validationRules_gen$
|
|
3619
|
+
var validationRules_gen$h = /*#__PURE__*/Object.freeze({
|
|
3610
3620
|
__proto__: null,
|
|
3611
3621
|
CreateServerRequest: CreateServerRequest,
|
|
3612
3622
|
CreateServerRequestInstall: CreateServerRequestInstall,
|
|
@@ -3627,7 +3637,7 @@ var index$y = /*#__PURE__*/Object.freeze({
|
|
|
3627
3637
|
SERVER_INSTALL_TRANSIENT_STATUSES: SERVER_INSTALL_TRANSIENT_STATUSES$1,
|
|
3628
3638
|
SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
|
|
3629
3639
|
SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES$2,
|
|
3630
|
-
ValidationRules: validationRules_gen$
|
|
3640
|
+
ValidationRules: validationRules_gen$h
|
|
3631
3641
|
});
|
|
3632
3642
|
|
|
3633
3643
|
var index$x = /*#__PURE__*/Object.freeze({
|
|
@@ -3796,7 +3806,7 @@ let API$v = class API extends API$z {
|
|
|
3796
3806
|
// This file was automatically generated. DO NOT EDIT.
|
|
3797
3807
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3798
3808
|
|
|
3799
|
-
var index_gen$
|
|
3809
|
+
var index_gen$v = /*#__PURE__*/Object.freeze({
|
|
3800
3810
|
__proto__: null,
|
|
3801
3811
|
API: API$v
|
|
3802
3812
|
});
|
|
@@ -4044,15 +4054,15 @@ let API$u = class API extends API$z {
|
|
|
4044
4054
|
// This file was automatically generated. DO NOT EDIT.
|
|
4045
4055
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4046
4056
|
|
|
4047
|
-
var index_gen$
|
|
4057
|
+
var index_gen$u = /*#__PURE__*/Object.freeze({
|
|
4048
4058
|
__proto__: null,
|
|
4049
4059
|
API: API$u
|
|
4050
4060
|
});
|
|
4051
4061
|
|
|
4052
4062
|
var index$w = /*#__PURE__*/Object.freeze({
|
|
4053
4063
|
__proto__: null,
|
|
4054
|
-
v2alpha1: index_gen$
|
|
4055
|
-
v2beta1: index_gen$
|
|
4064
|
+
v2alpha1: index_gen$v,
|
|
4065
|
+
v2beta1: index_gen$u
|
|
4056
4066
|
});
|
|
4057
4067
|
|
|
4058
4068
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -4222,245 +4232,1015 @@ const marshalUpdateVolumeRequest$2 = (request, defaults) => ({
|
|
|
4222
4232
|
|
|
4223
4233
|
// This file was automatically generated. DO NOT EDIT.
|
|
4224
4234
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4225
|
-
const jsonContentHeaders$
|
|
4235
|
+
const jsonContentHeaders$u = {
|
|
4226
4236
|
'Content-Type': 'application/json; charset=utf-8'
|
|
4227
4237
|
};
|
|
4228
4238
|
|
|
4229
4239
|
/**
|
|
4230
|
-
* Scaleway Block Storage API.
|
|
4240
|
+
* Scaleway Block Storage API.
|
|
4241
|
+
*
|
|
4242
|
+
* This API allows you to use and manage your Block Storage volumes.
|
|
4243
|
+
*/
|
|
4244
|
+
let API$t = class API extends API$z {
|
|
4245
|
+
/** Lists the available zones of the API. */
|
|
4246
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-3', 'pl-waw-3'];
|
|
4247
|
+
pageOfListVolumeTypes = (request = {}) => this.client.fetch({
|
|
4248
|
+
method: 'GET',
|
|
4249
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volume-types`,
|
|
4250
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
4251
|
+
}, unmarshalListVolumeTypesResponse);
|
|
4252
|
+
|
|
4253
|
+
/**
|
|
4254
|
+
* List volume types. List all available volume types in a specified zone. The
|
|
4255
|
+
* volume types listed are ordered by name in ascending order.
|
|
4256
|
+
*
|
|
4257
|
+
* @param request - The request {@link ListVolumeTypesRequest}
|
|
4258
|
+
* @returns A Promise of ListVolumeTypesResponse
|
|
4259
|
+
*/
|
|
4260
|
+
listVolumeTypes = (request = {}) => enrichForPagination('volumeTypes', this.pageOfListVolumeTypes, request);
|
|
4261
|
+
pageOfListVolumes = (request = {}) => this.client.fetch({
|
|
4262
|
+
method: 'GET',
|
|
4263
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes`,
|
|
4264
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['product_resource_id', request.productResourceId], ['project_id', request.projectId])
|
|
4265
|
+
}, unmarshalListVolumesResponse$2);
|
|
4266
|
+
|
|
4267
|
+
/**
|
|
4268
|
+
* List volumes. List all existing volumes in a specified zone. By default,
|
|
4269
|
+
* the volumes listed are ordered by creation date in ascending order. This
|
|
4270
|
+
* can be modified via the `order_by` field.
|
|
4271
|
+
*
|
|
4272
|
+
* @param request - The request {@link ListVolumesRequest}
|
|
4273
|
+
* @returns A Promise of ListVolumesResponse
|
|
4274
|
+
*/
|
|
4275
|
+
listVolumes = (request = {}) => enrichForPagination('volumes', this.pageOfListVolumes, request);
|
|
4276
|
+
|
|
4277
|
+
/**
|
|
4278
|
+
* Create a volume. To create a new volume from scratch, you must specify
|
|
4279
|
+
* `from_empty` and the `size`. To create a volume from an existing snapshot,
|
|
4280
|
+
* specify `from_snapshot` and the `snapshot_id` in the request payload
|
|
4281
|
+
* instead, size is optional and can be specified if you need to extend the
|
|
4282
|
+
* original size. The volume will take on the same volume class and underlying
|
|
4283
|
+
* IOPS limitations as the original snapshot.
|
|
4284
|
+
*
|
|
4285
|
+
* @param request - The request {@link CreateVolumeRequest}
|
|
4286
|
+
* @returns A Promise of Volume
|
|
4287
|
+
*/
|
|
4288
|
+
createVolume = request => this.client.fetch({
|
|
4289
|
+
body: JSON.stringify(marshalCreateVolumeRequest$2(request, this.client.settings)),
|
|
4290
|
+
headers: jsonContentHeaders$u,
|
|
4291
|
+
method: 'POST',
|
|
4292
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes`
|
|
4293
|
+
}, unmarshalVolume$4);
|
|
4294
|
+
|
|
4295
|
+
/**
|
|
4296
|
+
* Get a volume. Retrieve technical information about a specific volume.
|
|
4297
|
+
* Details such as size, type, and status are returned in the response.
|
|
4298
|
+
*
|
|
4299
|
+
* @param request - The request {@link GetVolumeRequest}
|
|
4300
|
+
* @returns A Promise of Volume
|
|
4301
|
+
*/
|
|
4302
|
+
getVolume = request => this.client.fetch({
|
|
4303
|
+
method: 'GET',
|
|
4304
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
4305
|
+
}, unmarshalVolume$4);
|
|
4306
|
+
|
|
4307
|
+
/**
|
|
4308
|
+
* Waits for {@link Volume} to be in a final state.
|
|
4309
|
+
*
|
|
4310
|
+
* @param request - The request {@link GetVolumeRequest}
|
|
4311
|
+
* @param options - The waiting options
|
|
4312
|
+
* @returns A Promise of Volume
|
|
4313
|
+
*/
|
|
4314
|
+
waitForVolume = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!VOLUME_TRANSIENT_STATUSES$1.includes(res.status))), this.getVolume, request, options);
|
|
4315
|
+
|
|
4316
|
+
/**
|
|
4317
|
+
* Delete a detached volume. You must specify the `volume_id` of the volume
|
|
4318
|
+
* you want to delete. The volume must not be in the `in_use` status.
|
|
4319
|
+
*
|
|
4320
|
+
* @param request - The request {@link DeleteVolumeRequest}
|
|
4321
|
+
*/
|
|
4322
|
+
deleteVolume = request => this.client.fetch({
|
|
4323
|
+
method: 'DELETE',
|
|
4324
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
4325
|
+
});
|
|
4326
|
+
|
|
4327
|
+
/**
|
|
4328
|
+
* Update a volume. Update the technical details of a volume, such as its
|
|
4329
|
+
* name, tags, or its new size and `volume_type` (within the same Block
|
|
4330
|
+
* Storage class). You can only resize a volume to a larger size. It is
|
|
4331
|
+
* currently not possible to change your Block Storage Class.
|
|
4332
|
+
*
|
|
4333
|
+
* @param request - The request {@link UpdateVolumeRequest}
|
|
4334
|
+
* @returns A Promise of Volume
|
|
4335
|
+
*/
|
|
4336
|
+
updateVolume = request => this.client.fetch({
|
|
4337
|
+
body: JSON.stringify(marshalUpdateVolumeRequest$2(request, this.client.settings)),
|
|
4338
|
+
headers: jsonContentHeaders$u,
|
|
4339
|
+
method: 'PATCH',
|
|
4340
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
4341
|
+
}, unmarshalVolume$4);
|
|
4342
|
+
pageOfListSnapshots = (request = {}) => this.client.fetch({
|
|
4343
|
+
method: 'GET',
|
|
4344
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`,
|
|
4345
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['volume_id', request.volumeId])
|
|
4346
|
+
}, unmarshalListSnapshotsResponse$3);
|
|
4347
|
+
|
|
4348
|
+
/**
|
|
4349
|
+
* List all snapshots. List all available snapshots in a specified zone. By
|
|
4350
|
+
* default, the snapshots listed are ordered by creation date in ascending
|
|
4351
|
+
* order. This can be modified via the `order_by` field.
|
|
4352
|
+
*
|
|
4353
|
+
* @param request - The request {@link ListSnapshotsRequest}
|
|
4354
|
+
* @returns A Promise of ListSnapshotsResponse
|
|
4355
|
+
*/
|
|
4356
|
+
listSnapshots = (request = {}) => enrichForPagination('snapshots', this.pageOfListSnapshots, request);
|
|
4357
|
+
|
|
4358
|
+
/**
|
|
4359
|
+
* Get a snapshot. Retrieve technical information about a specific snapshot.
|
|
4360
|
+
* Details such as size, volume type, and status are returned in the
|
|
4361
|
+
* response.
|
|
4362
|
+
*
|
|
4363
|
+
* @param request - The request {@link GetSnapshotRequest}
|
|
4364
|
+
* @returns A Promise of Snapshot
|
|
4365
|
+
*/
|
|
4366
|
+
getSnapshot = request => this.client.fetch({
|
|
4367
|
+
method: 'GET',
|
|
4368
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
4369
|
+
}, unmarshalSnapshot$3);
|
|
4370
|
+
|
|
4371
|
+
/**
|
|
4372
|
+
* Waits for {@link Snapshot} to be in a final state.
|
|
4373
|
+
*
|
|
4374
|
+
* @param request - The request {@link GetSnapshotRequest}
|
|
4375
|
+
* @param options - The waiting options
|
|
4376
|
+
* @returns A Promise of Snapshot
|
|
4377
|
+
*/
|
|
4378
|
+
waitForSnapshot = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES$3.includes(res.status))), this.getSnapshot, request, options);
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* Create a snapshot of a volume. To create a snapshot, the volume must be in
|
|
4382
|
+
* the `in_use` or the `available` status. If your volume is in a transient
|
|
4383
|
+
* state, you need to wait until the end of the current operation.
|
|
4384
|
+
*
|
|
4385
|
+
* @param request - The request {@link CreateSnapshotRequest}
|
|
4386
|
+
* @returns A Promise of Snapshot
|
|
4387
|
+
*/
|
|
4388
|
+
createSnapshot = request => this.client.fetch({
|
|
4389
|
+
body: JSON.stringify(marshalCreateSnapshotRequest$3(request, this.client.settings)),
|
|
4390
|
+
headers: jsonContentHeaders$u,
|
|
4391
|
+
method: 'POST',
|
|
4392
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`
|
|
4393
|
+
}, unmarshalSnapshot$3);
|
|
4394
|
+
|
|
4395
|
+
/**
|
|
4396
|
+
* Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
|
|
4397
|
+
* want to delete. The snapshot must not be in use.
|
|
4398
|
+
*
|
|
4399
|
+
* @param request - The request {@link DeleteSnapshotRequest}
|
|
4400
|
+
*/
|
|
4401
|
+
deleteSnapshot = request => this.client.fetch({
|
|
4402
|
+
method: 'DELETE',
|
|
4403
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
4404
|
+
});
|
|
4405
|
+
|
|
4406
|
+
/**
|
|
4407
|
+
* Update a snapshot. Update the name or tags of the snapshot.
|
|
4408
|
+
*
|
|
4409
|
+
* @param request - The request {@link UpdateSnapshotRequest}
|
|
4410
|
+
* @returns A Promise of Snapshot
|
|
4411
|
+
*/
|
|
4412
|
+
updateSnapshot = request => this.client.fetch({
|
|
4413
|
+
body: JSON.stringify(marshalUpdateSnapshotRequest$3(request, this.client.settings)),
|
|
4414
|
+
headers: jsonContentHeaders$u,
|
|
4415
|
+
method: 'PATCH',
|
|
4416
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
4417
|
+
}, unmarshalSnapshot$3);
|
|
4418
|
+
};
|
|
4419
|
+
|
|
4420
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
4421
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4422
|
+
|
|
4423
|
+
const CreateSnapshotRequest = {
|
|
4424
|
+
name: {
|
|
4425
|
+
minLength: 1
|
|
4426
|
+
}
|
|
4427
|
+
};
|
|
4428
|
+
const CreateVolumeRequest = {
|
|
4429
|
+
name: {
|
|
4430
|
+
minLength: 1
|
|
4431
|
+
}
|
|
4432
|
+
};
|
|
4433
|
+
const ListSnapshotsRequest = {
|
|
4434
|
+
page: {
|
|
4435
|
+
greaterThan: 0
|
|
4436
|
+
},
|
|
4437
|
+
pageSize: {
|
|
4438
|
+
greaterThan: 0,
|
|
4439
|
+
lessThanOrEqual: 100
|
|
4440
|
+
}
|
|
4441
|
+
};
|
|
4442
|
+
const ListVolumeTypesRequest = {
|
|
4443
|
+
page: {
|
|
4444
|
+
greaterThan: 0
|
|
4445
|
+
},
|
|
4446
|
+
pageSize: {
|
|
4447
|
+
greaterThan: 0,
|
|
4448
|
+
lessThanOrEqual: 100
|
|
4449
|
+
}
|
|
4450
|
+
};
|
|
4451
|
+
const ListVolumesRequest = {
|
|
4452
|
+
page: {
|
|
4453
|
+
greaterThan: 0
|
|
4454
|
+
},
|
|
4455
|
+
pageSize: {
|
|
4456
|
+
greaterThan: 0,
|
|
4457
|
+
lessThanOrEqual: 100
|
|
4458
|
+
}
|
|
4459
|
+
};
|
|
4460
|
+
const Reference = {
|
|
4461
|
+
productResourceType: {
|
|
4462
|
+
minLength: 1
|
|
4463
|
+
}
|
|
4464
|
+
};
|
|
4465
|
+
|
|
4466
|
+
var validationRules_gen$g = /*#__PURE__*/Object.freeze({
|
|
4467
|
+
__proto__: null,
|
|
4468
|
+
CreateSnapshotRequest: CreateSnapshotRequest,
|
|
4469
|
+
CreateVolumeRequest: CreateVolumeRequest,
|
|
4470
|
+
ListSnapshotsRequest: ListSnapshotsRequest,
|
|
4471
|
+
ListVolumeTypesRequest: ListVolumeTypesRequest,
|
|
4472
|
+
ListVolumesRequest: ListVolumesRequest,
|
|
4473
|
+
Reference: Reference
|
|
4474
|
+
});
|
|
4475
|
+
|
|
4476
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
4477
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4478
|
+
|
|
4479
|
+
var index_gen$t = /*#__PURE__*/Object.freeze({
|
|
4480
|
+
__proto__: null,
|
|
4481
|
+
API: API$t,
|
|
4482
|
+
REFERENCE_TRANSIENT_STATUSES: REFERENCE_TRANSIENT_STATUSES,
|
|
4483
|
+
SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES$3,
|
|
4484
|
+
VOLUME_TRANSIENT_STATUSES: VOLUME_TRANSIENT_STATUSES$1,
|
|
4485
|
+
ValidationRules: validationRules_gen$g
|
|
4486
|
+
});
|
|
4487
|
+
|
|
4488
|
+
var index$v = /*#__PURE__*/Object.freeze({
|
|
4489
|
+
__proto__: null,
|
|
4490
|
+
v1alpha1: index_gen$t
|
|
4491
|
+
});
|
|
4492
|
+
|
|
4493
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
4494
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4495
|
+
const unmarshalContactPointEmail$1 = data => {
|
|
4496
|
+
if (!isJSONObject(data)) {
|
|
4497
|
+
throw new TypeError(`Unmarshalling the type 'ContactPointEmail' failed as data isn't a dictionary.`);
|
|
4498
|
+
}
|
|
4499
|
+
return {
|
|
4500
|
+
to: data.to
|
|
4501
|
+
};
|
|
4502
|
+
};
|
|
4503
|
+
const unmarshalContactPoint$1 = data => {
|
|
4504
|
+
if (!isJSONObject(data)) {
|
|
4505
|
+
throw new TypeError(`Unmarshalling the type 'ContactPoint' failed as data isn't a dictionary.`);
|
|
4506
|
+
}
|
|
4507
|
+
return {
|
|
4508
|
+
email: data.email ? unmarshalContactPointEmail$1(data.email) : undefined,
|
|
4509
|
+
region: data.region
|
|
4510
|
+
};
|
|
4511
|
+
};
|
|
4512
|
+
const unmarshalDataSource = data => {
|
|
4513
|
+
if (!isJSONObject(data)) {
|
|
4514
|
+
throw new TypeError(`Unmarshalling the type 'DataSource' failed as data isn't a dictionary.`);
|
|
4515
|
+
}
|
|
4516
|
+
return {
|
|
4517
|
+
createdAt: unmarshalDate(data.created_at),
|
|
4518
|
+
id: data.id,
|
|
4519
|
+
name: data.name,
|
|
4520
|
+
origin: data.origin,
|
|
4521
|
+
projectId: data.project_id,
|
|
4522
|
+
region: data.region,
|
|
4523
|
+
synchronizedWithGrafana: data.synchronized_with_grafana,
|
|
4524
|
+
type: data.type,
|
|
4525
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
4526
|
+
url: data.url
|
|
4527
|
+
};
|
|
4528
|
+
};
|
|
4529
|
+
const unmarshalGrafanaProductDashboard$1 = data => {
|
|
4530
|
+
if (!isJSONObject(data)) {
|
|
4531
|
+
throw new TypeError(`Unmarshalling the type 'GrafanaProductDashboard' failed as data isn't a dictionary.`);
|
|
4532
|
+
}
|
|
4533
|
+
return {
|
|
4534
|
+
name: data.name,
|
|
4535
|
+
tags: data.tags,
|
|
4536
|
+
title: data.title,
|
|
4537
|
+
url: data.url,
|
|
4538
|
+
variables: data.variables
|
|
4539
|
+
};
|
|
4540
|
+
};
|
|
4541
|
+
const unmarshalGrafanaUser$1 = data => {
|
|
4542
|
+
if (!isJSONObject(data)) {
|
|
4543
|
+
throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
|
|
4544
|
+
}
|
|
4545
|
+
return {
|
|
4546
|
+
id: data.id,
|
|
4547
|
+
login: data.login,
|
|
4548
|
+
password: data.password,
|
|
4549
|
+
role: data.role
|
|
4550
|
+
};
|
|
4551
|
+
};
|
|
4552
|
+
const unmarshalPlan$1 = data => {
|
|
4553
|
+
if (!isJSONObject(data)) {
|
|
4554
|
+
throw new TypeError(`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`);
|
|
4555
|
+
}
|
|
4556
|
+
return {
|
|
4557
|
+
logsIngestionPrice: data.logs_ingestion_price,
|
|
4558
|
+
monthlyPrice: data.monthly_price,
|
|
4559
|
+
name: data.name,
|
|
4560
|
+
retentionLogsInterval: data.retention_logs_interval,
|
|
4561
|
+
retentionMetricsInterval: data.retention_metrics_interval,
|
|
4562
|
+
retentionTracesInterval: data.retention_traces_interval,
|
|
4563
|
+
sampleIngestionPrice: data.sample_ingestion_price,
|
|
4564
|
+
tracesIngestionPrice: data.traces_ingestion_price
|
|
4565
|
+
};
|
|
4566
|
+
};
|
|
4567
|
+
const unmarshalToken$3 = data => {
|
|
4568
|
+
if (!isJSONObject(data)) {
|
|
4569
|
+
throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
|
|
4570
|
+
}
|
|
4571
|
+
return {
|
|
4572
|
+
createdAt: unmarshalDate(data.created_at),
|
|
4573
|
+
id: data.id,
|
|
4574
|
+
name: data.name,
|
|
4575
|
+
projectId: data.project_id,
|
|
4576
|
+
region: data.region,
|
|
4577
|
+
scopes: data.scopes,
|
|
4578
|
+
secretKey: data.secret_key,
|
|
4579
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
4580
|
+
};
|
|
4581
|
+
};
|
|
4582
|
+
const unmarshalAlertManager = data => {
|
|
4583
|
+
if (!isJSONObject(data)) {
|
|
4584
|
+
throw new TypeError(`Unmarshalling the type 'AlertManager' failed as data isn't a dictionary.`);
|
|
4585
|
+
}
|
|
4586
|
+
return {
|
|
4587
|
+
alertManagerEnabled: data.alert_manager_enabled,
|
|
4588
|
+
alertManagerUrl: data.alert_manager_url,
|
|
4589
|
+
managedAlertsEnabled: data.managed_alerts_enabled,
|
|
4590
|
+
region: data.region
|
|
4591
|
+
};
|
|
4592
|
+
};
|
|
4593
|
+
const unmarshalGrafana = data => {
|
|
4594
|
+
if (!isJSONObject(data)) {
|
|
4595
|
+
throw new TypeError(`Unmarshalling the type 'Grafana' failed as data isn't a dictionary.`);
|
|
4596
|
+
}
|
|
4597
|
+
return {
|
|
4598
|
+
grafanaUrl: data.grafana_url
|
|
4599
|
+
};
|
|
4600
|
+
};
|
|
4601
|
+
const unmarshalListContactPointsResponse$1 = data => {
|
|
4602
|
+
if (!isJSONObject(data)) {
|
|
4603
|
+
throw new TypeError(`Unmarshalling the type 'ListContactPointsResponse' failed as data isn't a dictionary.`);
|
|
4604
|
+
}
|
|
4605
|
+
return {
|
|
4606
|
+
contactPoints: unmarshalArrayOfObject(data.contact_points, unmarshalContactPoint$1),
|
|
4607
|
+
hasAdditionalContactPoints: data.has_additional_contact_points,
|
|
4608
|
+
hasAdditionalReceivers: data.has_additional_receivers,
|
|
4609
|
+
totalCount: data.total_count
|
|
4610
|
+
};
|
|
4611
|
+
};
|
|
4612
|
+
const unmarshalListDataSourcesResponse = data => {
|
|
4613
|
+
if (!isJSONObject(data)) {
|
|
4614
|
+
throw new TypeError(`Unmarshalling the type 'ListDataSourcesResponse' failed as data isn't a dictionary.`);
|
|
4615
|
+
}
|
|
4616
|
+
return {
|
|
4617
|
+
dataSources: unmarshalArrayOfObject(data.data_sources, unmarshalDataSource),
|
|
4618
|
+
totalCount: data.total_count
|
|
4619
|
+
};
|
|
4620
|
+
};
|
|
4621
|
+
const unmarshalListGrafanaProductDashboardsResponse$1 = data => {
|
|
4622
|
+
if (!isJSONObject(data)) {
|
|
4623
|
+
throw new TypeError(`Unmarshalling the type 'ListGrafanaProductDashboardsResponse' failed as data isn't a dictionary.`);
|
|
4624
|
+
}
|
|
4625
|
+
return {
|
|
4626
|
+
dashboards: unmarshalArrayOfObject(data.dashboards, unmarshalGrafanaProductDashboard$1),
|
|
4627
|
+
totalCount: data.total_count
|
|
4628
|
+
};
|
|
4629
|
+
};
|
|
4630
|
+
const unmarshalListGrafanaUsersResponse$1 = data => {
|
|
4631
|
+
if (!isJSONObject(data)) {
|
|
4632
|
+
throw new TypeError(`Unmarshalling the type 'ListGrafanaUsersResponse' failed as data isn't a dictionary.`);
|
|
4633
|
+
}
|
|
4634
|
+
return {
|
|
4635
|
+
grafanaUsers: unmarshalArrayOfObject(data.grafana_users, unmarshalGrafanaUser$1),
|
|
4636
|
+
totalCount: data.total_count
|
|
4637
|
+
};
|
|
4638
|
+
};
|
|
4639
|
+
const unmarshalListPlansResponse$1 = data => {
|
|
4640
|
+
if (!isJSONObject(data)) {
|
|
4641
|
+
throw new TypeError(`Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`);
|
|
4642
|
+
}
|
|
4643
|
+
return {
|
|
4644
|
+
plans: unmarshalArrayOfObject(data.plans, unmarshalPlan$1),
|
|
4645
|
+
totalCount: data.total_count
|
|
4646
|
+
};
|
|
4647
|
+
};
|
|
4648
|
+
const unmarshalListTokensResponse$3 = data => {
|
|
4649
|
+
if (!isJSONObject(data)) {
|
|
4650
|
+
throw new TypeError(`Unmarshalling the type 'ListTokensResponse' failed as data isn't a dictionary.`);
|
|
4651
|
+
}
|
|
4652
|
+
return {
|
|
4653
|
+
tokens: unmarshalArrayOfObject(data.tokens, unmarshalToken$3),
|
|
4654
|
+
totalCount: data.total_count
|
|
4655
|
+
};
|
|
4656
|
+
};
|
|
4657
|
+
const unmarshalUsage = data => {
|
|
4658
|
+
if (!isJSONObject(data)) {
|
|
4659
|
+
throw new TypeError(`Unmarshalling the type 'Usage' failed as data isn't a dictionary.`);
|
|
4660
|
+
}
|
|
4661
|
+
return {
|
|
4662
|
+
dataSourceId: data.data_source_id,
|
|
4663
|
+
dataSourceOrigin: data.data_source_origin,
|
|
4664
|
+
dataSourceType: data.data_source_type,
|
|
4665
|
+
interval: data.interval,
|
|
4666
|
+
projectId: data.project_id,
|
|
4667
|
+
quantityOverInterval: data.quantity_over_interval,
|
|
4668
|
+
region: data.region,
|
|
4669
|
+
unit: data.unit
|
|
4670
|
+
};
|
|
4671
|
+
};
|
|
4672
|
+
const unmarshalUsageOverview = data => {
|
|
4673
|
+
if (!isJSONObject(data)) {
|
|
4674
|
+
throw new TypeError(`Unmarshalling the type 'UsageOverview' failed as data isn't a dictionary.`);
|
|
4675
|
+
}
|
|
4676
|
+
return {
|
|
4677
|
+
externalLogsUsage: data.external_logs_usage ? unmarshalUsage(data.external_logs_usage) : undefined,
|
|
4678
|
+
externalMetricsUsage: data.external_metrics_usage ? unmarshalUsage(data.external_metrics_usage) : undefined,
|
|
4679
|
+
externalTracesUsage: data.external_traces_usage ? unmarshalUsage(data.external_traces_usage) : undefined,
|
|
4680
|
+
scalewayLogsUsage: data.scaleway_logs_usage ? unmarshalUsage(data.scaleway_logs_usage) : undefined,
|
|
4681
|
+
scalewayMetricsUsage: data.scaleway_metrics_usage ? unmarshalUsage(data.scaleway_metrics_usage) : undefined
|
|
4682
|
+
};
|
|
4683
|
+
};
|
|
4684
|
+
const marshalGlobalApiCreateGrafanaUserRequest = (request, defaults) => ({
|
|
4685
|
+
login: request.login,
|
|
4686
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
4687
|
+
role: request.role
|
|
4688
|
+
});
|
|
4689
|
+
const marshalGlobalApiResetGrafanaUserPasswordRequest = (request, defaults) => ({
|
|
4690
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4691
|
+
});
|
|
4692
|
+
const marshalGlobalApiSelectPlanRequest = (request, defaults) => ({
|
|
4693
|
+
plan_name: request.planName,
|
|
4694
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4695
|
+
});
|
|
4696
|
+
const marshalGlobalApiSyncGrafanaDataSourcesRequest = (request, defaults) => ({
|
|
4697
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4698
|
+
});
|
|
4699
|
+
const marshalContactPointEmail$1 = (request, defaults) => ({
|
|
4700
|
+
to: request.to
|
|
4701
|
+
});
|
|
4702
|
+
const marshalRegionalApiCreateContactPointRequest = (request, defaults) => ({
|
|
4703
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
4704
|
+
...resolveOneOf([{
|
|
4705
|
+
param: 'email',
|
|
4706
|
+
value: request.email !== undefined ? marshalContactPointEmail$1(request.email) : undefined
|
|
4707
|
+
}])
|
|
4708
|
+
});
|
|
4709
|
+
const marshalRegionalApiCreateDataSourceRequest = (request, defaults) => ({
|
|
4710
|
+
name: request.name,
|
|
4711
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
4712
|
+
type: request.type
|
|
4713
|
+
});
|
|
4714
|
+
const marshalRegionalApiCreateTokenRequest = (request, defaults) => ({
|
|
4715
|
+
name: request.name,
|
|
4716
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
4717
|
+
token_scopes: request.tokenScopes !== undefined ? request.tokenScopes : undefined
|
|
4718
|
+
});
|
|
4719
|
+
const marshalRegionalApiDeleteContactPointRequest = (request, defaults) => ({
|
|
4720
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
4721
|
+
...resolveOneOf([{
|
|
4722
|
+
param: 'email',
|
|
4723
|
+
value: request.email !== undefined ? marshalContactPointEmail$1(request.email) : undefined
|
|
4724
|
+
}])
|
|
4725
|
+
});
|
|
4726
|
+
const marshalRegionalApiDisableAlertManagerRequest = (request, defaults) => ({
|
|
4727
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4728
|
+
});
|
|
4729
|
+
const marshalRegionalApiDisableManagedAlertsRequest = (request, defaults) => ({
|
|
4730
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4731
|
+
});
|
|
4732
|
+
const marshalRegionalApiEnableAlertManagerRequest = (request, defaults) => ({
|
|
4733
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4734
|
+
});
|
|
4735
|
+
const marshalRegionalApiEnableManagedAlertsRequest = (request, defaults) => ({
|
|
4736
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4737
|
+
});
|
|
4738
|
+
const marshalRegionalApiTriggerTestAlertRequest = (request, defaults) => ({
|
|
4739
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4740
|
+
});
|
|
4741
|
+
|
|
4742
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
4743
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4744
|
+
const jsonContentHeaders$t = {
|
|
4745
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
4746
|
+
};
|
|
4747
|
+
|
|
4748
|
+
/**
|
|
4749
|
+
* Cockpit Global API.
|
|
4750
|
+
*
|
|
4751
|
+
* The Cockpit Global API allows you to manage your Cockpit's Grafana and plans.
|
|
4752
|
+
*/
|
|
4753
|
+
class GlobalAPI extends API$z {
|
|
4754
|
+
/**
|
|
4755
|
+
* Get your Cockpit's Grafana. Retrieve information on your Cockpit's Grafana,
|
|
4756
|
+
* specified by the ID of the Project the Cockpit belongs to. The output
|
|
4757
|
+
* returned displays the URL to access your Cockpit's Grafana.
|
|
4758
|
+
*
|
|
4759
|
+
* @param request - The request {@link GlobalApiGetGrafanaRequest}
|
|
4760
|
+
* @returns A Promise of Grafana
|
|
4761
|
+
*/
|
|
4762
|
+
getGrafana = (request = {}) => this.client.fetch({
|
|
4763
|
+
method: 'GET',
|
|
4764
|
+
path: `/cockpit/v1/grafana`,
|
|
4765
|
+
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
4766
|
+
}, unmarshalGrafana);
|
|
4767
|
+
|
|
4768
|
+
/**
|
|
4769
|
+
* Synchronize Grafana data sources. Trigger the synchronization of all your
|
|
4770
|
+
* data sources and the alert manager in the relevant regions. The alert
|
|
4771
|
+
* manager will only be synchronized if you have enabled it.
|
|
4772
|
+
*
|
|
4773
|
+
* @param request - The request {@link GlobalApiSyncGrafanaDataSourcesRequest}
|
|
4774
|
+
*/
|
|
4775
|
+
syncGrafanaDataSources = (request = {}) => this.client.fetch({
|
|
4776
|
+
body: JSON.stringify(marshalGlobalApiSyncGrafanaDataSourcesRequest(request, this.client.settings)),
|
|
4777
|
+
headers: jsonContentHeaders$t,
|
|
4778
|
+
method: 'POST',
|
|
4779
|
+
path: `/cockpit/v1/grafana/sync-data-sources`
|
|
4780
|
+
});
|
|
4781
|
+
|
|
4782
|
+
/**
|
|
4783
|
+
* Create a Grafana user. Create a Grafana user to connect to your Cockpit's
|
|
4784
|
+
* Grafana. Upon creation, your user password displays only once, so make sure
|
|
4785
|
+
* that you save it. Each Grafana user is associated with a role: viewer or
|
|
4786
|
+
* editor. A viewer can only view dashboards, whereas an editor can create and
|
|
4787
|
+
* edit dashboards. Note that the `admin` username is not available for
|
|
4788
|
+
* creation.
|
|
4789
|
+
*
|
|
4790
|
+
* @param request - The request {@link GlobalApiCreateGrafanaUserRequest}
|
|
4791
|
+
* @returns A Promise of GrafanaUser
|
|
4792
|
+
*/
|
|
4793
|
+
createGrafanaUser = request => this.client.fetch({
|
|
4794
|
+
body: JSON.stringify(marshalGlobalApiCreateGrafanaUserRequest(request, this.client.settings)),
|
|
4795
|
+
headers: jsonContentHeaders$t,
|
|
4796
|
+
method: 'POST',
|
|
4797
|
+
path: `/cockpit/v1/grafana/users`
|
|
4798
|
+
}, unmarshalGrafanaUser$1);
|
|
4799
|
+
pageOfListGrafanaUsers = (request = {}) => this.client.fetch({
|
|
4800
|
+
method: 'GET',
|
|
4801
|
+
path: `/cockpit/v1/grafana/users`,
|
|
4802
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
4803
|
+
}, unmarshalListGrafanaUsersResponse$1);
|
|
4804
|
+
|
|
4805
|
+
/**
|
|
4806
|
+
* List Grafana users. List all Grafana users created in your Cockpit's
|
|
4807
|
+
* Grafana. By default, the Grafana users returned in the list are ordered in
|
|
4808
|
+
* ascending order.
|
|
4809
|
+
*
|
|
4810
|
+
* @param request - The request {@link GlobalApiListGrafanaUsersRequest}
|
|
4811
|
+
* @returns A Promise of ListGrafanaUsersResponse
|
|
4812
|
+
*/
|
|
4813
|
+
listGrafanaUsers = (request = {}) => enrichForPagination('grafanaUsers', this.pageOfListGrafanaUsers, request);
|
|
4814
|
+
|
|
4815
|
+
/**
|
|
4816
|
+
* Delete a Grafana user. Delete a Grafana user from your Cockpit's Grafana,
|
|
4817
|
+
* specified by the ID of the Project the Cockpit belongs to, and the ID of
|
|
4818
|
+
* the Grafana user.
|
|
4819
|
+
*
|
|
4820
|
+
* @param request - The request {@link GlobalApiDeleteGrafanaUserRequest}
|
|
4821
|
+
*/
|
|
4822
|
+
deleteGrafanaUser = request => this.client.fetch({
|
|
4823
|
+
method: 'DELETE',
|
|
4824
|
+
path: `/cockpit/v1/grafana/users/${validatePathParam('grafanaUserId', request.grafanaUserId)}`,
|
|
4825
|
+
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
4826
|
+
});
|
|
4827
|
+
|
|
4828
|
+
/**
|
|
4829
|
+
* Reset a Grafana user password. Reset the password of a Grafana user,
|
|
4830
|
+
* specified by the ID of the Project the Cockpit belongs to, and the ID of
|
|
4831
|
+
* the Grafana user. A new password regenerates and only displays once. Make
|
|
4832
|
+
* sure that you save it.
|
|
4833
|
+
*
|
|
4834
|
+
* @param request - The request
|
|
4835
|
+
* {@link GlobalApiResetGrafanaUserPasswordRequest}
|
|
4836
|
+
* @returns A Promise of GrafanaUser
|
|
4837
|
+
*/
|
|
4838
|
+
resetGrafanaUserPassword = request => this.client.fetch({
|
|
4839
|
+
body: JSON.stringify(marshalGlobalApiResetGrafanaUserPasswordRequest(request, this.client.settings)),
|
|
4840
|
+
headers: jsonContentHeaders$t,
|
|
4841
|
+
method: 'POST',
|
|
4842
|
+
path: `/cockpit/v1/grafana/users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
|
|
4843
|
+
}, unmarshalGrafanaUser$1);
|
|
4844
|
+
pageOfListGrafanaProductDashboards = (request = {}) => this.client.fetch({
|
|
4845
|
+
method: 'GET',
|
|
4846
|
+
path: `/cockpit/v1/grafana/product-dashboards`,
|
|
4847
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['tags', request.tags])
|
|
4848
|
+
}, unmarshalListGrafanaProductDashboardsResponse$1);
|
|
4849
|
+
|
|
4850
|
+
/**
|
|
4851
|
+
* List Scaleway resources dashboards. Retrieve a list of available dashboards
|
|
4852
|
+
* in Grafana, for all Scaleway resources which are integrated with Cockpit.
|
|
4853
|
+
*
|
|
4854
|
+
* @param request - The request
|
|
4855
|
+
* {@link GlobalApiListGrafanaProductDashboardsRequest}
|
|
4856
|
+
* @returns A Promise of ListGrafanaProductDashboardsResponse
|
|
4857
|
+
*/
|
|
4858
|
+
listGrafanaProductDashboards = (request = {}) => enrichForPagination('dashboards', this.pageOfListGrafanaProductDashboards, request);
|
|
4859
|
+
|
|
4860
|
+
/**
|
|
4861
|
+
* Get Scaleway resource dashboard. Retrieve information about the dashboard
|
|
4862
|
+
* of a Scaleway resource in Grafana, specified by the ID of the Project the
|
|
4863
|
+
* Cockpit belongs to, and the name of the dashboard.
|
|
4864
|
+
*
|
|
4865
|
+
* @param request - The request
|
|
4866
|
+
* {@link GlobalApiGetGrafanaProductDashboardRequest}
|
|
4867
|
+
* @returns A Promise of GrafanaProductDashboard
|
|
4868
|
+
*/
|
|
4869
|
+
getGrafanaProductDashboard = request => this.client.fetch({
|
|
4870
|
+
method: 'GET',
|
|
4871
|
+
path: `/cockpit/v1/grafana/product-dashboards/${validatePathParam('dashboardName', request.dashboardName)}`,
|
|
4872
|
+
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
4873
|
+
}, unmarshalGrafanaProductDashboard$1);
|
|
4874
|
+
pageOfListPlans = (request = {}) => this.client.fetch({
|
|
4875
|
+
method: 'GET',
|
|
4876
|
+
path: `/cockpit/v1/plans`,
|
|
4877
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
4878
|
+
}, unmarshalListPlansResponse$1);
|
|
4879
|
+
|
|
4880
|
+
/**
|
|
4881
|
+
* List plan types. Retrieve a list of available pricing plan types.
|
|
4882
|
+
*
|
|
4883
|
+
* @param request - The request {@link GlobalApiListPlansRequest}
|
|
4884
|
+
* @returns A Promise of ListPlansResponse
|
|
4885
|
+
*/
|
|
4886
|
+
listPlans = (request = {}) => enrichForPagination('plans', this.pageOfListPlans, request);
|
|
4887
|
+
|
|
4888
|
+
/**
|
|
4889
|
+
* Apply a pricing plan. Apply a pricing plan on a given Project. You must
|
|
4890
|
+
* specify the ID of the pricing plan type. Note that you will be billed for
|
|
4891
|
+
* the plan you apply.
|
|
4892
|
+
*
|
|
4893
|
+
* @param request - The request {@link GlobalApiSelectPlanRequest}
|
|
4894
|
+
* @returns A Promise of Plan
|
|
4895
|
+
*/
|
|
4896
|
+
selectPlan = (request = {}) => this.client.fetch({
|
|
4897
|
+
body: JSON.stringify(marshalGlobalApiSelectPlanRequest(request, this.client.settings)),
|
|
4898
|
+
headers: jsonContentHeaders$t,
|
|
4899
|
+
method: 'PATCH',
|
|
4900
|
+
path: `/cockpit/v1/plans`
|
|
4901
|
+
}, unmarshalPlan$1);
|
|
4902
|
+
|
|
4903
|
+
/**
|
|
4904
|
+
* Get current plan. Retrieve a pricing plan for the given Project, specified
|
|
4905
|
+
* by the ID of the Project.
|
|
4906
|
+
*
|
|
4907
|
+
* @param request - The request {@link GlobalApiGetCurrentPlanRequest}
|
|
4908
|
+
* @returns A Promise of Plan
|
|
4909
|
+
*/
|
|
4910
|
+
getCurrentPlan = (request = {}) => this.client.fetch({
|
|
4911
|
+
method: 'GET',
|
|
4912
|
+
path: `/cockpit/v1/current-plan`,
|
|
4913
|
+
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
4914
|
+
}, unmarshalPlan$1);
|
|
4915
|
+
}
|
|
4916
|
+
|
|
4917
|
+
/**
|
|
4918
|
+
* Cockpit Regional API.
|
|
4231
4919
|
*
|
|
4232
|
-
*
|
|
4920
|
+
* The Cockpit Regional API allows you to create data sources and tokens to
|
|
4921
|
+
* store and query data types such as metrics, logs, and traces. You can also
|
|
4922
|
+
* push your data into Cockpit, and send alerts to your contact points when your
|
|
4923
|
+
* resources may require your attention, using the regional Alert manager.
|
|
4233
4924
|
*/
|
|
4234
|
-
|
|
4235
|
-
/** Lists the available
|
|
4236
|
-
static LOCALITIES = ['fr-par
|
|
4237
|
-
|
|
4925
|
+
class RegionalAPI extends API$z {
|
|
4926
|
+
/** Lists the available regions of the API. */
|
|
4927
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
4928
|
+
|
|
4929
|
+
/**
|
|
4930
|
+
* Create a data source. You must specify the data source type upon creation.
|
|
4931
|
+
* Available data source types include:
|
|
4932
|
+
*
|
|
4933
|
+
* - Metrics
|
|
4934
|
+
* - Logs
|
|
4935
|
+
* - Traces The name of the data source will then be used as reference to name
|
|
4936
|
+
* the associated Grafana data source.
|
|
4937
|
+
*
|
|
4938
|
+
* @param request - The request {@link RegionalApiCreateDataSourceRequest}
|
|
4939
|
+
* @returns A Promise of DataSource
|
|
4940
|
+
*/
|
|
4941
|
+
createDataSource = request => this.client.fetch({
|
|
4942
|
+
body: JSON.stringify(marshalRegionalApiCreateDataSourceRequest(request, this.client.settings)),
|
|
4943
|
+
headers: jsonContentHeaders$t,
|
|
4944
|
+
method: 'POST',
|
|
4945
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources`
|
|
4946
|
+
}, unmarshalDataSource);
|
|
4947
|
+
|
|
4948
|
+
/**
|
|
4949
|
+
* Get a data source. Retrieve information about a given data source,
|
|
4950
|
+
* specified by the data source ID. The data source's information such as its
|
|
4951
|
+
* name, type, URL, origin, and retention period, is returned.
|
|
4952
|
+
*
|
|
4953
|
+
* @param request - The request {@link RegionalApiGetDataSourceRequest}
|
|
4954
|
+
* @returns A Promise of DataSource
|
|
4955
|
+
*/
|
|
4956
|
+
getDataSource = request => this.client.fetch({
|
|
4238
4957
|
method: 'GET',
|
|
4239
|
-
path: `/
|
|
4240
|
-
|
|
4241
|
-
}, unmarshalListVolumeTypesResponse);
|
|
4958
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources/${validatePathParam('dataSourceId', request.dataSourceId)}`
|
|
4959
|
+
}, unmarshalDataSource);
|
|
4242
4960
|
|
|
4243
4961
|
/**
|
|
4244
|
-
*
|
|
4245
|
-
*
|
|
4962
|
+
* Delete a data source. Delete a given data source, specified by the data
|
|
4963
|
+
* source ID. Note that deleting a data source is irreversible, and cannot be
|
|
4964
|
+
* undone.
|
|
4246
4965
|
*
|
|
4247
|
-
* @param request - The request {@link
|
|
4248
|
-
* @returns A Promise of ListVolumeTypesResponse
|
|
4966
|
+
* @param request - The request {@link RegionalApiDeleteDataSourceRequest}
|
|
4249
4967
|
*/
|
|
4250
|
-
|
|
4251
|
-
|
|
4968
|
+
deleteDataSource = request => this.client.fetch({
|
|
4969
|
+
method: 'DELETE',
|
|
4970
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources/${validatePathParam('dataSourceId', request.dataSourceId)}`
|
|
4971
|
+
});
|
|
4972
|
+
pageOfListDataSources = (request = {}) => this.client.fetch({
|
|
4252
4973
|
method: 'GET',
|
|
4253
|
-
path: `/
|
|
4254
|
-
urlParams: urlParams(['
|
|
4255
|
-
},
|
|
4974
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/data-sources`,
|
|
4975
|
+
urlParams: urlParams(['order_by', request.orderBy], ['origin', request.origin], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['types', request.types])
|
|
4976
|
+
}, unmarshalListDataSourcesResponse);
|
|
4256
4977
|
|
|
4257
4978
|
/**
|
|
4258
|
-
* List
|
|
4259
|
-
*
|
|
4260
|
-
*
|
|
4979
|
+
* List data sources. Retrieve the list of data sources available in the
|
|
4980
|
+
* specified region. By default, the data sources returned in the list are
|
|
4981
|
+
* ordered by creation date, in ascending order. You can list data sources by
|
|
4982
|
+
* Project, type and origin.
|
|
4261
4983
|
*
|
|
4262
|
-
* @param request - The request {@link
|
|
4263
|
-
* @returns A Promise of
|
|
4984
|
+
* @param request - The request {@link RegionalApiListDataSourcesRequest}
|
|
4985
|
+
* @returns A Promise of ListDataSourcesResponse
|
|
4264
4986
|
*/
|
|
4265
|
-
|
|
4987
|
+
listDataSources = (request = {}) => enrichForPagination('dataSources', this.pageOfListDataSources, request);
|
|
4266
4988
|
|
|
4267
4989
|
/**
|
|
4268
|
-
*
|
|
4269
|
-
*
|
|
4270
|
-
* specify `from_snapshot` and the `snapshot_id` in the request payload
|
|
4271
|
-
* instead, size is optional and can be specified if you need to extend the
|
|
4272
|
-
* original size. The volume will take on the same volume class and underlying
|
|
4273
|
-
* IOPS limitations as the original snapshot.
|
|
4990
|
+
* Get data source usage overview. Retrieve the data source usage overview per
|
|
4991
|
+
* type for the specified Project.
|
|
4274
4992
|
*
|
|
4275
|
-
* @param request - The request {@link
|
|
4276
|
-
* @returns A Promise of
|
|
4993
|
+
* @param request - The request {@link RegionalApiGetUsageOverviewRequest}
|
|
4994
|
+
* @returns A Promise of UsageOverview
|
|
4277
4995
|
*/
|
|
4278
|
-
|
|
4279
|
-
|
|
4996
|
+
getUsageOverview = (request = {}) => this.client.fetch({
|
|
4997
|
+
method: 'GET',
|
|
4998
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/usage-overview`,
|
|
4999
|
+
urlParams: urlParams(['interval', request.interval], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
5000
|
+
}, unmarshalUsageOverview);
|
|
5001
|
+
|
|
5002
|
+
/**
|
|
5003
|
+
* Create a token. Give your token the relevant scopes to ensure it has the
|
|
5004
|
+
* right permissions to interact with your data sources and the Alert manager.
|
|
5005
|
+
* Make sure that you create your token in the same regions as the data
|
|
5006
|
+
* sources you want to use it for. Upon creation, your token's secret key
|
|
5007
|
+
* display only once. Make sure that you save it.
|
|
5008
|
+
*
|
|
5009
|
+
* @param request - The request {@link RegionalApiCreateTokenRequest}
|
|
5010
|
+
* @returns A Promise of Token
|
|
5011
|
+
*/
|
|
5012
|
+
createToken = request => this.client.fetch({
|
|
5013
|
+
body: JSON.stringify(marshalRegionalApiCreateTokenRequest(request, this.client.settings)),
|
|
4280
5014
|
headers: jsonContentHeaders$t,
|
|
4281
5015
|
method: 'POST',
|
|
4282
|
-
path: `/
|
|
4283
|
-
},
|
|
5016
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens`
|
|
5017
|
+
}, unmarshalToken$3);
|
|
5018
|
+
pageOfListTokens = (request = {}) => this.client.fetch({
|
|
5019
|
+
method: 'GET',
|
|
5020
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens`,
|
|
5021
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['token_scopes', request.tokenScopes])
|
|
5022
|
+
}, unmarshalListTokensResponse$3);
|
|
4284
5023
|
|
|
4285
5024
|
/**
|
|
4286
|
-
*
|
|
4287
|
-
*
|
|
5025
|
+
* List tokens. Retrieve a list of all tokens in the specified region. By
|
|
5026
|
+
* default, tokens returned in the list are ordered by creation date, in
|
|
5027
|
+
* ascending order. You can filter tokens by Project ID and token scopes.
|
|
4288
5028
|
*
|
|
4289
|
-
* @param request - The request {@link
|
|
4290
|
-
* @returns A Promise of
|
|
5029
|
+
* @param request - The request {@link RegionalApiListTokensRequest}
|
|
5030
|
+
* @returns A Promise of ListTokensResponse
|
|
4291
5031
|
*/
|
|
4292
|
-
|
|
4293
|
-
method: 'GET',
|
|
4294
|
-
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
4295
|
-
}, unmarshalVolume$4);
|
|
5032
|
+
listTokens = (request = {}) => enrichForPagination('tokens', this.pageOfListTokens, request);
|
|
4296
5033
|
|
|
4297
5034
|
/**
|
|
4298
|
-
*
|
|
5035
|
+
* Get a token. Retrieve information about a given token, specified by the
|
|
5036
|
+
* token ID. The token's information such as its scopes, is returned.
|
|
4299
5037
|
*
|
|
4300
|
-
* @param request - The request {@link
|
|
4301
|
-
* @
|
|
4302
|
-
* @returns A Promise of Volume
|
|
5038
|
+
* @param request - The request {@link RegionalApiGetTokenRequest}
|
|
5039
|
+
* @returns A Promise of Token
|
|
4303
5040
|
*/
|
|
4304
|
-
|
|
5041
|
+
getToken = request => this.client.fetch({
|
|
5042
|
+
method: 'GET',
|
|
5043
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
5044
|
+
}, unmarshalToken$3);
|
|
4305
5045
|
|
|
4306
5046
|
/**
|
|
4307
|
-
* Delete a
|
|
4308
|
-
*
|
|
5047
|
+
* Delete a token. Delete a given token, specified by the token ID. Deleting a
|
|
5048
|
+
* token is irreversible and cannot be undone.
|
|
4309
5049
|
*
|
|
4310
|
-
* @param request - The request {@link
|
|
5050
|
+
* @param request - The request {@link RegionalApiDeleteTokenRequest}
|
|
4311
5051
|
*/
|
|
4312
|
-
|
|
5052
|
+
deleteToken = request => this.client.fetch({
|
|
4313
5053
|
method: 'DELETE',
|
|
4314
|
-
path: `/
|
|
5054
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
4315
5055
|
});
|
|
4316
5056
|
|
|
4317
5057
|
/**
|
|
4318
|
-
*
|
|
4319
|
-
*
|
|
4320
|
-
*
|
|
4321
|
-
*
|
|
5058
|
+
* Get the Alert manager. Retrieve information about the Alert manager which
|
|
5059
|
+
* is unique per Project and region. By default the Alert manager is disabled.
|
|
5060
|
+
* The output returned displays a URL to access the Alert manager, and whether
|
|
5061
|
+
* the Alert manager and managed alerts are enabled.
|
|
4322
5062
|
*
|
|
4323
|
-
* @param request - The request {@link
|
|
4324
|
-
* @returns A Promise of
|
|
5063
|
+
* @param request - The request {@link RegionalApiGetAlertManagerRequest}
|
|
5064
|
+
* @returns A Promise of AlertManager
|
|
4325
5065
|
*/
|
|
4326
|
-
|
|
4327
|
-
body: JSON.stringify(marshalUpdateVolumeRequest$2(request, this.client.settings)),
|
|
4328
|
-
headers: jsonContentHeaders$t,
|
|
4329
|
-
method: 'PATCH',
|
|
4330
|
-
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
4331
|
-
}, unmarshalVolume$4);
|
|
4332
|
-
pageOfListSnapshots = (request = {}) => this.client.fetch({
|
|
5066
|
+
getAlertManager = (request = {}) => this.client.fetch({
|
|
4333
5067
|
method: 'GET',
|
|
4334
|
-
path: `/
|
|
4335
|
-
urlParams: urlParams(['
|
|
4336
|
-
},
|
|
5068
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager`,
|
|
5069
|
+
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
5070
|
+
}, unmarshalAlertManager);
|
|
4337
5071
|
|
|
4338
5072
|
/**
|
|
4339
|
-
*
|
|
4340
|
-
*
|
|
4341
|
-
*
|
|
5073
|
+
* Enable the Alert manager. Enabling the Alert manager allows you to enable
|
|
5074
|
+
* managed alerts and create contact points in the specified Project and
|
|
5075
|
+
* region, to be notified when your Scaleway resources may require your
|
|
5076
|
+
* attention.
|
|
4342
5077
|
*
|
|
4343
|
-
* @param request - The request {@link
|
|
4344
|
-
* @returns A Promise of
|
|
5078
|
+
* @param request - The request {@link RegionalApiEnableAlertManagerRequest}
|
|
5079
|
+
* @returns A Promise of AlertManager
|
|
4345
5080
|
*/
|
|
4346
|
-
|
|
5081
|
+
enableAlertManager = (request = {}) => this.client.fetch({
|
|
5082
|
+
body: JSON.stringify(marshalRegionalApiEnableAlertManagerRequest(request, this.client.settings)),
|
|
5083
|
+
headers: jsonContentHeaders$t,
|
|
5084
|
+
method: 'POST',
|
|
5085
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/enable`
|
|
5086
|
+
}, unmarshalAlertManager);
|
|
4347
5087
|
|
|
4348
5088
|
/**
|
|
4349
|
-
*
|
|
4350
|
-
*
|
|
4351
|
-
*
|
|
5089
|
+
* Disable the Alert manager. Disabling the Alert manager deletes the contact
|
|
5090
|
+
* points you have created and disables managed alerts in the specified
|
|
5091
|
+
* Project and region.
|
|
4352
5092
|
*
|
|
4353
|
-
* @param request - The request {@link
|
|
4354
|
-
* @returns A Promise of
|
|
5093
|
+
* @param request - The request {@link RegionalApiDisableAlertManagerRequest}
|
|
5094
|
+
* @returns A Promise of AlertManager
|
|
4355
5095
|
*/
|
|
4356
|
-
|
|
5096
|
+
disableAlertManager = (request = {}) => this.client.fetch({
|
|
5097
|
+
body: JSON.stringify(marshalRegionalApiDisableAlertManagerRequest(request, this.client.settings)),
|
|
5098
|
+
headers: jsonContentHeaders$t,
|
|
5099
|
+
method: 'POST',
|
|
5100
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/disable`
|
|
5101
|
+
}, unmarshalAlertManager);
|
|
5102
|
+
|
|
5103
|
+
/**
|
|
5104
|
+
* Create a contact point. Contact points are email addresses associated with
|
|
5105
|
+
* the default receiver, that the Alert manager sends alerts to. The source of
|
|
5106
|
+
* the alerts are data sources within the same Project and region as the Alert
|
|
5107
|
+
* manager. If you need to receive alerts for other receivers, you can create
|
|
5108
|
+
* additional contact points and receivers in Grafana. Make sure that you
|
|
5109
|
+
* select the Scaleway Alert manager.
|
|
5110
|
+
*
|
|
5111
|
+
* @param request - The request {@link RegionalApiCreateContactPointRequest}
|
|
5112
|
+
* @returns A Promise of ContactPoint
|
|
5113
|
+
*/
|
|
5114
|
+
createContactPoint = (request = {}) => this.client.fetch({
|
|
5115
|
+
body: JSON.stringify(marshalRegionalApiCreateContactPointRequest(request, this.client.settings)),
|
|
5116
|
+
headers: jsonContentHeaders$t,
|
|
5117
|
+
method: 'POST',
|
|
5118
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points`
|
|
5119
|
+
}, unmarshalContactPoint$1);
|
|
5120
|
+
pageOfListContactPoints = (request = {}) => this.client.fetch({
|
|
4357
5121
|
method: 'GET',
|
|
4358
|
-
path: `/
|
|
4359
|
-
|
|
5122
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points`,
|
|
5123
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
5124
|
+
}, unmarshalListContactPointsResponse$1);
|
|
4360
5125
|
|
|
4361
5126
|
/**
|
|
4362
|
-
*
|
|
5127
|
+
* List contact points. Retrieve a list of contact points for the specified
|
|
5128
|
+
* Project. The response lists all contact points and receivers created in
|
|
5129
|
+
* Grafana or via the API.
|
|
4363
5130
|
*
|
|
4364
|
-
* @param request - The request {@link
|
|
4365
|
-
* @
|
|
4366
|
-
* @returns A Promise of Snapshot
|
|
5131
|
+
* @param request - The request {@link RegionalApiListContactPointsRequest}
|
|
5132
|
+
* @returns A Promise of ListContactPointsResponse
|
|
4367
5133
|
*/
|
|
4368
|
-
|
|
5134
|
+
listContactPoints = (request = {}) => enrichForPagination('contactPoints', this.pageOfListContactPoints, request);
|
|
4369
5135
|
|
|
4370
5136
|
/**
|
|
4371
|
-
*
|
|
4372
|
-
*
|
|
4373
|
-
* state, you need to wait until the end of the current operation.
|
|
5137
|
+
* Delete a contact point. Delete a contact point associated with the default
|
|
5138
|
+
* receiver.
|
|
4374
5139
|
*
|
|
4375
|
-
* @param request - The request {@link
|
|
4376
|
-
* @returns A Promise of Snapshot
|
|
5140
|
+
* @param request - The request {@link RegionalApiDeleteContactPointRequest}
|
|
4377
5141
|
*/
|
|
4378
|
-
|
|
4379
|
-
body: JSON.stringify(
|
|
5142
|
+
deleteContactPoint = (request = {}) => this.client.fetch({
|
|
5143
|
+
body: JSON.stringify(marshalRegionalApiDeleteContactPointRequest(request, this.client.settings)),
|
|
4380
5144
|
headers: jsonContentHeaders$t,
|
|
4381
5145
|
method: 'POST',
|
|
4382
|
-
path: `/
|
|
4383
|
-
}
|
|
5146
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`
|
|
5147
|
+
});
|
|
4384
5148
|
|
|
4385
5149
|
/**
|
|
4386
|
-
*
|
|
4387
|
-
*
|
|
5150
|
+
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
5151
|
+
* specified Project. Managed alerts are predefined alerts that apply to
|
|
5152
|
+
* Scaleway recources integrated with Cockpit by default.
|
|
4388
5153
|
*
|
|
4389
|
-
* @param request - The request {@link
|
|
5154
|
+
* @param request - The request {@link RegionalApiEnableManagedAlertsRequest}
|
|
5155
|
+
* @returns A Promise of AlertManager
|
|
4390
5156
|
*/
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
5157
|
+
enableManagedAlerts = (request = {}) => this.client.fetch({
|
|
5158
|
+
body: JSON.stringify(marshalRegionalApiEnableManagedAlertsRequest(request, this.client.settings)),
|
|
5159
|
+
headers: jsonContentHeaders$t,
|
|
5160
|
+
method: 'POST',
|
|
5161
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/managed-alerts/enable`
|
|
5162
|
+
}, unmarshalAlertManager);
|
|
4395
5163
|
|
|
4396
5164
|
/**
|
|
4397
|
-
*
|
|
5165
|
+
* Disable managed alerts. Disable the sending of managed alerts for the
|
|
5166
|
+
* specified Project.
|
|
4398
5167
|
*
|
|
4399
|
-
* @param request - The request {@link
|
|
4400
|
-
* @returns A Promise of
|
|
5168
|
+
* @param request - The request {@link RegionalApiDisableManagedAlertsRequest}
|
|
5169
|
+
* @returns A Promise of AlertManager
|
|
4401
5170
|
*/
|
|
4402
|
-
|
|
4403
|
-
body: JSON.stringify(
|
|
5171
|
+
disableManagedAlerts = (request = {}) => this.client.fetch({
|
|
5172
|
+
body: JSON.stringify(marshalRegionalApiDisableManagedAlertsRequest(request, this.client.settings)),
|
|
4404
5173
|
headers: jsonContentHeaders$t,
|
|
4405
|
-
method: '
|
|
4406
|
-
path: `/
|
|
4407
|
-
},
|
|
4408
|
-
|
|
5174
|
+
method: 'POST',
|
|
5175
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/managed-alerts/disable`
|
|
5176
|
+
}, unmarshalAlertManager);
|
|
5177
|
+
|
|
5178
|
+
/**
|
|
5179
|
+
* Trigger a test alert. Send a test alert to the Alert manager to make sure
|
|
5180
|
+
* your contact points get notified.
|
|
5181
|
+
*
|
|
5182
|
+
* @param request - The request {@link RegionalApiTriggerTestAlertRequest}
|
|
5183
|
+
*/
|
|
5184
|
+
triggerTestAlert = (request = {}) => this.client.fetch({
|
|
5185
|
+
body: JSON.stringify(marshalRegionalApiTriggerTestAlertRequest(request, this.client.settings)),
|
|
5186
|
+
headers: jsonContentHeaders$t,
|
|
5187
|
+
method: 'POST',
|
|
5188
|
+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/trigger-test-alert`
|
|
5189
|
+
});
|
|
5190
|
+
}
|
|
4409
5191
|
|
|
4410
5192
|
// This file was automatically generated. DO NOT EDIT.
|
|
4411
5193
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4412
5194
|
|
|
4413
|
-
const
|
|
5195
|
+
const RegionalApiCreateDataSourceRequest = {
|
|
4414
5196
|
name: {
|
|
4415
|
-
|
|
5197
|
+
maxLength: 50,
|
|
5198
|
+
minLength: 3,
|
|
5199
|
+
pattern: /^[A-Za-z0-9-_. ]+$/
|
|
4416
5200
|
}
|
|
4417
5201
|
};
|
|
4418
|
-
const
|
|
5202
|
+
const RegionalApiCreateTokenRequest = {
|
|
4419
5203
|
name: {
|
|
4420
|
-
|
|
5204
|
+
maxLength: 50,
|
|
5205
|
+
minLength: 3,
|
|
5206
|
+
pattern: /^[A-Za-z0-9-_]+$/
|
|
4421
5207
|
}
|
|
4422
5208
|
};
|
|
4423
|
-
const
|
|
5209
|
+
const RegionalApiListContactPointsRequest = {
|
|
4424
5210
|
page: {
|
|
4425
|
-
|
|
5211
|
+
greaterThanOrEqual: 1
|
|
4426
5212
|
},
|
|
4427
5213
|
pageSize: {
|
|
4428
|
-
|
|
4429
|
-
lessThanOrEqual:
|
|
5214
|
+
greaterThanOrEqual: 1,
|
|
5215
|
+
lessThanOrEqual: 1000
|
|
4430
5216
|
}
|
|
4431
5217
|
};
|
|
4432
|
-
const
|
|
5218
|
+
const RegionalApiListDataSourcesRequest = {
|
|
4433
5219
|
page: {
|
|
4434
|
-
|
|
5220
|
+
greaterThanOrEqual: 1
|
|
4435
5221
|
},
|
|
4436
5222
|
pageSize: {
|
|
4437
|
-
|
|
4438
|
-
lessThanOrEqual:
|
|
5223
|
+
greaterThanOrEqual: 1,
|
|
5224
|
+
lessThanOrEqual: 1000
|
|
4439
5225
|
}
|
|
4440
5226
|
};
|
|
4441
|
-
const
|
|
5227
|
+
const RegionalApiListTokensRequest = {
|
|
4442
5228
|
page: {
|
|
4443
|
-
|
|
5229
|
+
greaterThanOrEqual: 1
|
|
4444
5230
|
},
|
|
4445
5231
|
pageSize: {
|
|
4446
|
-
|
|
4447
|
-
lessThanOrEqual:
|
|
4448
|
-
}
|
|
4449
|
-
};
|
|
4450
|
-
const Reference = {
|
|
4451
|
-
productResourceType: {
|
|
4452
|
-
minLength: 1
|
|
5232
|
+
greaterThanOrEqual: 1,
|
|
5233
|
+
lessThanOrEqual: 1000
|
|
4453
5234
|
}
|
|
4454
5235
|
};
|
|
4455
5236
|
|
|
4456
5237
|
var validationRules_gen$f = /*#__PURE__*/Object.freeze({
|
|
4457
5238
|
__proto__: null,
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
Reference: Reference
|
|
5239
|
+
RegionalApiCreateDataSourceRequest: RegionalApiCreateDataSourceRequest,
|
|
5240
|
+
RegionalApiCreateTokenRequest: RegionalApiCreateTokenRequest,
|
|
5241
|
+
RegionalApiListContactPointsRequest: RegionalApiListContactPointsRequest,
|
|
5242
|
+
RegionalApiListDataSourcesRequest: RegionalApiListDataSourcesRequest,
|
|
5243
|
+
RegionalApiListTokensRequest: RegionalApiListTokensRequest
|
|
4464
5244
|
});
|
|
4465
5245
|
|
|
4466
5246
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -4468,18 +5248,11 @@ var validationRules_gen$f = /*#__PURE__*/Object.freeze({
|
|
|
4468
5248
|
|
|
4469
5249
|
var index_gen$s = /*#__PURE__*/Object.freeze({
|
|
4470
5250
|
__proto__: null,
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES$3,
|
|
4474
|
-
VOLUME_TRANSIENT_STATUSES: VOLUME_TRANSIENT_STATUSES$1,
|
|
5251
|
+
GlobalAPI: GlobalAPI,
|
|
5252
|
+
RegionalAPI: RegionalAPI,
|
|
4475
5253
|
ValidationRules: validationRules_gen$f
|
|
4476
5254
|
});
|
|
4477
5255
|
|
|
4478
|
-
var index$v = /*#__PURE__*/Object.freeze({
|
|
4479
|
-
__proto__: null,
|
|
4480
|
-
v1alpha1: index_gen$s
|
|
4481
|
-
});
|
|
4482
|
-
|
|
4483
5256
|
// This file was automatically generated. DO NOT EDIT.
|
|
4484
5257
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
4485
5258
|
|
|
@@ -5108,6 +5881,7 @@ var index_gen$r = /*#__PURE__*/Object.freeze({
|
|
|
5108
5881
|
|
|
5109
5882
|
var index$u = /*#__PURE__*/Object.freeze({
|
|
5110
5883
|
__proto__: null,
|
|
5884
|
+
v1: index_gen$s,
|
|
5111
5885
|
v1beta1: index_gen$r
|
|
5112
5886
|
});
|
|
5113
5887
|
|
|
@@ -16489,7 +17263,7 @@ let API$k = class API extends API$z {
|
|
|
16489
17263
|
pageOfListServers = (request = {}) => this.client.fetch({
|
|
16490
17264
|
method: 'GET',
|
|
16491
17265
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
16492
|
-
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['servers', request.servers && request.servers.length > 0 ? request.servers.join(',') : undefined], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
|
|
17266
|
+
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['servers', request.servers && request.servers.length > 0 ? request.servers.join(',') : undefined], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['with_ip', request.withIp], ['without_ip', request.withoutIp])
|
|
16493
17267
|
}, unmarshalListServersResponse);
|
|
16494
17268
|
|
|
16495
17269
|
/**
|
|
@@ -17260,12 +18034,13 @@ let API$k = class API extends API$z {
|
|
|
17260
18034
|
|
|
17261
18035
|
/**
|
|
17262
18036
|
* Get a volume or snapshot's migration plan. Given a volume or snapshot,
|
|
17263
|
-
* returns the migration plan for a call to the
|
|
17264
|
-
* plan will include zero or one volume, and zero or more
|
|
17265
|
-
* will need to be migrated together. This
|
|
17266
|
-
* migration itself,
|
|
17267
|
-
* value returned by this
|
|
17268
|
-
*
|
|
18037
|
+
* returns the migration plan for a call to the "Apply a migration plan"
|
|
18038
|
+
* endpoint. This plan will include zero or one volume, and zero or more
|
|
18039
|
+
* snapshots, which will need to be migrated together. This endpoint does not
|
|
18040
|
+
* perform the actual migration itself, the "Apply a migration plan" endpoint
|
|
18041
|
+
* must be used. The validation_key value returned by this endpoint must be
|
|
18042
|
+
* provided to the call to the "Apply a migration plan" endpoint to confirm
|
|
18043
|
+
* that all resources listed in the plan should be migrated.
|
|
17269
18044
|
*
|
|
17270
18045
|
* @param request - The request {@link PlanBlockMigrationRequest}
|
|
17271
18046
|
* @returns A Promise of MigrationPlan
|
|
@@ -17279,9 +18054,9 @@ let API$k = class API extends API$z {
|
|
|
17279
18054
|
|
|
17280
18055
|
/**
|
|
17281
18056
|
* Migrate a volume and/or snapshots to SBS (Scaleway Block Storage). To be
|
|
17282
|
-
* used, this
|
|
17283
|
-
* all resources mentioned in the
|
|
17284
|
-
* in the
|
|
18057
|
+
* used, the call to this endpoint must be preceded by a call to the "Plan a
|
|
18058
|
+
* migration" endpoint. To migrate all resources mentioned in the migration
|
|
18059
|
+
* plan, the validation_key returned in the plan must be provided.
|
|
17285
18060
|
*
|
|
17286
18061
|
* @param request - The request {@link ApplyBlockMigrationRequest}
|
|
17287
18062
|
*/
|
|
@@ -19737,6 +20512,7 @@ const unmarshalCluster$1 = data => {
|
|
|
19737
20512
|
privateNetworkId: data.private_network_id,
|
|
19738
20513
|
projectId: data.project_id,
|
|
19739
20514
|
region: data.region,
|
|
20515
|
+
routedIpEnabled: data.routed_ip_enabled,
|
|
19740
20516
|
status: data.status,
|
|
19741
20517
|
tags: data.tags,
|
|
19742
20518
|
type: data.type,
|
|
@@ -20212,6 +20988,20 @@ let API$f = class API extends API$z {
|
|
|
20212
20988
|
method: 'POST',
|
|
20213
20989
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/migrate-to-private-network`
|
|
20214
20990
|
}, unmarshalCluster$1);
|
|
20991
|
+
|
|
20992
|
+
/**
|
|
20993
|
+
* Migrate a cluster to Routed IPs. Migrate the nodes of an existing cluster
|
|
20994
|
+
* to Routed IPs and enable Routed IPs for all future nodes.
|
|
20995
|
+
*
|
|
20996
|
+
* @param request - The request {@link MigrateClusterToRoutedIPsRequest}
|
|
20997
|
+
* @returns A Promise of Cluster
|
|
20998
|
+
*/
|
|
20999
|
+
migrateClusterToRoutedIPs = request => this.client.fetch({
|
|
21000
|
+
body: '{}',
|
|
21001
|
+
headers: jsonContentHeaders$f,
|
|
21002
|
+
method: 'POST',
|
|
21003
|
+
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/migrate-to-routed-ips`
|
|
21004
|
+
}, unmarshalCluster$1);
|
|
20215
21005
|
pageOfListPools = request => this.client.fetch({
|
|
20216
21006
|
method: 'GET',
|
|
20217
21007
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/pools`,
|
|
@@ -24710,6 +25500,7 @@ const unmarshalEndpointPrivateNetworkDetails = data => {
|
|
|
24710
25500
|
}
|
|
24711
25501
|
return {
|
|
24712
25502
|
privateNetworkId: data.private_network_id,
|
|
25503
|
+
provisioningMode: data.provisioning_mode,
|
|
24713
25504
|
serviceIp: data.service_ip,
|
|
24714
25505
|
zone: data.zone
|
|
24715
25506
|
};
|
|
@@ -30985,6 +31776,22 @@ const unmarshalListOffersResponse = data => {
|
|
|
30985
31776
|
offers: unmarshalArrayOfObject(data.offers, unmarshalOffer)
|
|
30986
31777
|
};
|
|
30987
31778
|
};
|
|
31779
|
+
const unmarshalResetHostingPasswordResponse = data => {
|
|
31780
|
+
if (!isJSONObject(data)) {
|
|
31781
|
+
throw new TypeError(`Unmarshalling the type 'ResetHostingPasswordResponse' failed as data isn't a dictionary.`);
|
|
31782
|
+
}
|
|
31783
|
+
return {
|
|
31784
|
+
password: data.password
|
|
31785
|
+
};
|
|
31786
|
+
};
|
|
31787
|
+
const unmarshalSession = data => {
|
|
31788
|
+
if (!isJSONObject(data)) {
|
|
31789
|
+
throw new TypeError(`Unmarshalling the type 'Session' failed as data isn't a dictionary.`);
|
|
31790
|
+
}
|
|
31791
|
+
return {
|
|
31792
|
+
url: data.url
|
|
31793
|
+
};
|
|
31794
|
+
};
|
|
30988
31795
|
const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
|
|
30989
31796
|
update_all_records: request.updateAllRecords,
|
|
30990
31797
|
update_mail_record: request.updateMailRecord,
|
|
@@ -31148,13 +31955,31 @@ class API extends API$z {
|
|
|
31148
31955
|
}, unmarshalListControlPanelsResponse);
|
|
31149
31956
|
|
|
31150
31957
|
/**
|
|
31151
|
-
* List
|
|
31152
|
-
* plesk.
|
|
31958
|
+
* "List the control panels type: cpanel or plesk.".
|
|
31153
31959
|
*
|
|
31154
31960
|
* @param request - The request {@link ListControlPanelsRequest}
|
|
31155
31961
|
* @returns A Promise of ListControlPanelsResponse
|
|
31156
31962
|
*/
|
|
31157
31963
|
listControlPanels = (request = {}) => enrichForPagination('controlPanels', this.pageOfListControlPanels, request);
|
|
31964
|
+
|
|
31965
|
+
/**
|
|
31966
|
+
* Create a user session.
|
|
31967
|
+
*
|
|
31968
|
+
* @param request - The request {@link CreateSessionRequest}
|
|
31969
|
+
* @returns A Promise of Session
|
|
31970
|
+
*/
|
|
31971
|
+
createSession = request => this.client.fetch({
|
|
31972
|
+
body: '{}',
|
|
31973
|
+
headers: jsonContentHeaders,
|
|
31974
|
+
method: 'POST',
|
|
31975
|
+
path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}/sessions`
|
|
31976
|
+
}, unmarshalSession);
|
|
31977
|
+
resetHostingPassword = request => this.client.fetch({
|
|
31978
|
+
body: '{}',
|
|
31979
|
+
headers: jsonContentHeaders,
|
|
31980
|
+
method: 'POST',
|
|
31981
|
+
path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}/reset-password`
|
|
31982
|
+
}, unmarshalResetHostingPasswordResponse);
|
|
31158
31983
|
}
|
|
31159
31984
|
|
|
31160
31985
|
// This file was automatically generated. DO NOT EDIT.
|