@scaleway/sdk 1.35.0 → 1.36.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/block/v1alpha1/api.gen.js +7 -1
- package/dist/api/block/v1alpha1/marshalling.gen.js +8 -1
- package/dist/api/block/v1alpha1/validation-rules.gen.js +6 -1
- package/dist/api/cockpit/v1beta1/api.gen.js +43 -1
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +22 -1
- package/dist/api/instance/v1/marshalling.gen.js +6 -4
- package/dist/api/mnq/index.js +2 -0
- package/dist/api/mnq/v1beta1/api.gen.js +516 -0
- package/dist/api/mnq/v1beta1/index.gen.js +6 -0
- package/dist/api/mnq/v1beta1/marshalling.gen.js +212 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.js +47 -0
- package/dist/api/rdb/v1/marshalling.gen.js +2 -0
- package/dist/index.cjs +1056 -320
- package/dist/index.d.ts +1676 -762
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { VOLUME_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalUpdateSnapshotRequest } from './marshalling.gen.js';
|
|
6
|
+
import { unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalVolume, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -215,6 +215,12 @@ class API extends API$1 {
|
|
|
215
215
|
method: 'POST',
|
|
216
216
|
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots`
|
|
217
217
|
}, unmarshalSnapshot);
|
|
218
|
+
importSnapshotFromS3 = request => this.client.fetch({
|
|
219
|
+
body: JSON.stringify(marshalImportSnapshotFromS3Request(request, this.client.settings)),
|
|
220
|
+
headers: jsonContentHeaders,
|
|
221
|
+
method: 'POST',
|
|
222
|
+
path: `/block/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/import-from-s3`
|
|
223
|
+
}, unmarshalSnapshot);
|
|
218
224
|
|
|
219
225
|
/**
|
|
220
226
|
* Delete a snapshot. You must specify the `snapshot_id` of the snapshot you
|
|
@@ -161,6 +161,13 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
161
161
|
value: request.perfIops
|
|
162
162
|
}], true)
|
|
163
163
|
});
|
|
164
|
+
const marshalImportSnapshotFromS3Request = (request, defaults) => ({
|
|
165
|
+
bucket: request.bucket,
|
|
166
|
+
key: request.key,
|
|
167
|
+
name: request.name,
|
|
168
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
169
|
+
tags: request.tags
|
|
170
|
+
});
|
|
164
171
|
const marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
165
172
|
name: request.name,
|
|
166
173
|
tags: request.tags
|
|
@@ -172,4 +179,4 @@ const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
|
172
179
|
tags: request.tags
|
|
173
180
|
});
|
|
174
181
|
|
|
175
|
-
export { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume };
|
|
182
|
+
export { marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalImportSnapshotFromS3Request, marshalUpdateSnapshotRequest, marshalUpdateVolumeRequest, unmarshalListSnapshotsResponse, unmarshalListVolumeTypesResponse, unmarshalListVolumesResponse, unmarshalSnapshot, unmarshalVolume };
|
|
@@ -11,6 +11,11 @@ const CreateVolumeRequest = {
|
|
|
11
11
|
minLength: 1
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
+
const ImportSnapshotFromS3Request = {
|
|
15
|
+
name: {
|
|
16
|
+
minLength: 1
|
|
17
|
+
}
|
|
18
|
+
};
|
|
14
19
|
const ListSnapshotsRequest = {
|
|
15
20
|
page: {
|
|
16
21
|
greaterThan: 0
|
|
@@ -39,4 +44,4 @@ const ListVolumesRequest = {
|
|
|
39
44
|
}
|
|
40
45
|
};
|
|
41
46
|
|
|
42
|
-
export { CreateSnapshotRequest, CreateVolumeRequest, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest };
|
|
47
|
+
export { CreateSnapshotRequest, CreateVolumeRequest, ImportSnapshotFromS3Request, ListSnapshotsRequest, ListVolumeTypesRequest, ListVolumesRequest };
|
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { COCKPIT_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { marshalActivateCockpitRequest, unmarshalCockpit, unmarshalCockpitMetrics, marshalDeactivateCockpitRequest, marshalResetCockpitGrafanaRequest, marshalCreateDatasourceRequest, unmarshalDatasource, unmarshalListDatasourcesResponse, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalDeleteContactPointRequest, marshalEnableManagedAlertsRequest, marshalDisableManagedAlertsRequest, marshalTriggerTestAlertRequest, marshalCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalDeleteGrafanaUserRequest, marshalResetGrafanaUserPasswordRequest, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalSelectPlanResponse } from './marshalling.gen.js';
|
|
6
|
+
import { marshalActivateCockpitRequest, unmarshalCockpit, unmarshalCockpitMetrics, marshalDeactivateCockpitRequest, marshalResetCockpitGrafanaRequest, marshalCreateDatasourceRequest, unmarshalDatasource, unmarshalListDatasourcesResponse, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateContactPointRequest, unmarshalContactPoint, unmarshalListContactPointsResponse, marshalDeleteContactPointRequest, marshalEnableManagedAlertsRequest, marshalDisableManagedAlertsRequest, marshalTriggerTestAlertRequest, marshalCreateGrafanaUserRequest, unmarshalGrafanaUser, unmarshalListGrafanaUsersResponse, marshalDeleteGrafanaUserRequest, marshalResetGrafanaUserPasswordRequest, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalSelectPlanResponse, unmarshalListGrafanaProductDashboardsResponse, unmarshalGrafanaProductDashboard } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -496,6 +496,48 @@ class API extends API$1 {
|
|
|
496
496
|
method: 'POST',
|
|
497
497
|
path: `/cockpit/v1beta1/select-plan`
|
|
498
498
|
}, unmarshalSelectPlanResponse);
|
|
499
|
+
pageOfListGrafanaProductDashboards = (() => {
|
|
500
|
+
var _this23 = this;
|
|
501
|
+
return function (request) {
|
|
502
|
+
if (request === void 0) {
|
|
503
|
+
request = {};
|
|
504
|
+
}
|
|
505
|
+
return _this23.client.fetch({
|
|
506
|
+
method: 'GET',
|
|
507
|
+
path: `/cockpit/v1beta1/grafana-product-dashboards`,
|
|
508
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this23.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this23.client.settings.defaultProjectId], ['tags', request.tags])
|
|
509
|
+
}, unmarshalListGrafanaProductDashboardsResponse);
|
|
510
|
+
};
|
|
511
|
+
})();
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* List product dashboards. Get a list of available product dashboards.
|
|
515
|
+
*
|
|
516
|
+
* @param request - The request {@link ListGrafanaProductDashboardsRequest}
|
|
517
|
+
* @returns A Promise of ListGrafanaProductDashboardsResponse
|
|
518
|
+
*/
|
|
519
|
+
listGrafanaProductDashboards = (() => {
|
|
520
|
+
var _this24 = this;
|
|
521
|
+
return function (request) {
|
|
522
|
+
if (request === void 0) {
|
|
523
|
+
request = {};
|
|
524
|
+
}
|
|
525
|
+
return enrichForPagination('dashboards', _this24.pageOfListGrafanaProductDashboards, request);
|
|
526
|
+
};
|
|
527
|
+
})();
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Get a product dashboard. Get a product dashboard specified by the dashboard
|
|
531
|
+
* ID.
|
|
532
|
+
*
|
|
533
|
+
* @param request - The request {@link GetGrafanaProductDashboardRequest}
|
|
534
|
+
* @returns A Promise of GrafanaProductDashboard
|
|
535
|
+
*/
|
|
536
|
+
getGrafanaProductDashboard = request => this.client.fetch({
|
|
537
|
+
method: 'GET',
|
|
538
|
+
path: `/cockpit/v1beta1/grafana-product-dashboards/${validatePathParam('dashboardName', request.dashboardName)}`,
|
|
539
|
+
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
540
|
+
}, unmarshalGrafanaProductDashboard);
|
|
499
541
|
}
|
|
500
542
|
|
|
501
543
|
export { API };
|
|
@@ -60,6 +60,18 @@ const unmarshalDatasource = data => {
|
|
|
60
60
|
url: data.url
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
+
const unmarshalGrafanaProductDashboard = data => {
|
|
64
|
+
if (!isJSONObject(data)) {
|
|
65
|
+
throw new TypeError(`Unmarshalling the type 'GrafanaProductDashboard' failed as data isn't a dictionary.`);
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
dashboardName: data.dashboard_name,
|
|
69
|
+
tags: data.tags,
|
|
70
|
+
title: data.title,
|
|
71
|
+
url: data.url,
|
|
72
|
+
variables: data.variables
|
|
73
|
+
};
|
|
74
|
+
};
|
|
63
75
|
const unmarshalGrafanaUser = data => {
|
|
64
76
|
if (!isJSONObject(data)) {
|
|
65
77
|
throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
|
|
@@ -141,6 +153,15 @@ const unmarshalListDatasourcesResponse = data => {
|
|
|
141
153
|
totalCount: data.total_count
|
|
142
154
|
};
|
|
143
155
|
};
|
|
156
|
+
const unmarshalListGrafanaProductDashboardsResponse = data => {
|
|
157
|
+
if (!isJSONObject(data)) {
|
|
158
|
+
throw new TypeError(`Unmarshalling the type 'ListGrafanaProductDashboardsResponse' failed as data isn't a dictionary.`);
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
dashboards: unmarshalArrayOfObject(data.dashboards, unmarshalGrafanaProductDashboard),
|
|
162
|
+
totalCount: data.total_count
|
|
163
|
+
};
|
|
164
|
+
};
|
|
144
165
|
const unmarshalListGrafanaUsersResponse = data => {
|
|
145
166
|
if (!isJSONObject(data)) {
|
|
146
167
|
throw new TypeError(`Unmarshalling the type 'ListGrafanaUsersResponse' failed as data isn't a dictionary.`);
|
|
@@ -246,4 +267,4 @@ const marshalTriggerTestAlertRequest = (request, defaults) => ({
|
|
|
246
267
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
247
268
|
});
|
|
248
269
|
|
|
249
|
-
export { marshalActivateCockpitRequest, marshalCreateContactPointRequest, marshalCreateDatasourceRequest, marshalCreateGrafanaUserRequest, marshalCreateTokenRequest, marshalDeactivateCockpitRequest, marshalDeleteContactPointRequest, marshalDeleteGrafanaUserRequest, marshalDisableManagedAlertsRequest, marshalEnableManagedAlertsRequest, marshalResetCockpitGrafanaRequest, marshalResetGrafanaUserPasswordRequest, marshalSelectPlanRequest, marshalTriggerTestAlertRequest, unmarshalCockpit, unmarshalCockpitMetrics, unmarshalContactPoint, unmarshalDatasource, unmarshalGrafanaUser, unmarshalListContactPointsResponse, unmarshalListDatasourcesResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListTokensResponse, unmarshalSelectPlanResponse, unmarshalToken };
|
|
270
|
+
export { marshalActivateCockpitRequest, marshalCreateContactPointRequest, marshalCreateDatasourceRequest, marshalCreateGrafanaUserRequest, marshalCreateTokenRequest, marshalDeactivateCockpitRequest, marshalDeleteContactPointRequest, marshalDeleteGrafanaUserRequest, marshalDisableManagedAlertsRequest, marshalEnableManagedAlertsRequest, marshalResetCockpitGrafanaRequest, marshalResetGrafanaUserPasswordRequest, marshalSelectPlanRequest, marshalTriggerTestAlertRequest, unmarshalCockpit, unmarshalCockpitMetrics, unmarshalContactPoint, unmarshalDatasource, unmarshalGrafanaProductDashboard, unmarshalGrafanaUser, unmarshalListContactPointsResponse, unmarshalListDatasourcesResponse, unmarshalListGrafanaProductDashboardsResponse, unmarshalListGrafanaUsersResponse, unmarshalListPlansResponse, unmarshalListTokensResponse, unmarshalSelectPlanResponse, unmarshalToken };
|
|
@@ -152,7 +152,8 @@ const unmarshalServerIp = data => {
|
|
|
152
152
|
gateway: data.gateway,
|
|
153
153
|
id: data.id,
|
|
154
154
|
netmask: data.netmask,
|
|
155
|
-
provisioningMode: data.provisioning_mode
|
|
155
|
+
provisioningMode: data.provisioning_mode,
|
|
156
|
+
tags: data.tags
|
|
156
157
|
};
|
|
157
158
|
};
|
|
158
159
|
const unmarshalServerIpv6 = data => {
|
|
@@ -994,7 +995,8 @@ const marshalServerIp = (request, defaults) => ({
|
|
|
994
995
|
gateway: request.gateway,
|
|
995
996
|
id: request.id,
|
|
996
997
|
netmask: request.netmask,
|
|
997
|
-
provisioning_mode: request.provisioningMode
|
|
998
|
+
provisioning_mode: request.provisioningMode,
|
|
999
|
+
tags: request.tags
|
|
998
1000
|
});
|
|
999
1001
|
const marshalServerIpv6 = (request, defaults) => ({
|
|
1000
1002
|
address: request.address,
|
|
@@ -1388,9 +1390,9 @@ const marshalUpdateServerRequest = (request, defaults) => ({
|
|
|
1388
1390
|
enable_ipv6: request.enableIpv6,
|
|
1389
1391
|
name: request.name,
|
|
1390
1392
|
placement_group: request.placementGroup,
|
|
1391
|
-
private_nics: request.privateNics
|
|
1393
|
+
private_nics: request.privateNics,
|
|
1392
1394
|
protected: request.protected,
|
|
1393
|
-
public_ips: request.publicIps
|
|
1395
|
+
public_ips: request.publicIps,
|
|
1394
1396
|
routed_ip_enabled: request.routedIpEnabled,
|
|
1395
1397
|
security_group: request.securityGroup ? marshalSecurityGroupTemplate(request.securityGroup) : undefined,
|
|
1396
1398
|
tags: request.tags,
|
package/dist/api/mnq/index.js
CHANGED