@scaleway/sdk 2.52.0 → 2.53.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/marshalling.gen.cjs +1 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +2 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.cjs +66 -6
- package/dist/api/container/v1beta1/marshalling.gen.js +67 -7
- package/dist/api/container/v1beta1/types.gen.d.ts +59 -2
- package/dist/api/container/v1beta1/validation-rules.gen.cjs +14 -0
- package/dist/api/container/v1beta1/validation-rules.gen.d.ts +12 -0
- package/dist/api/container/v1beta1/validation-rules.gen.js +14 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.cjs +4 -1
- package/dist/api/flexibleip/v1alpha1/api.gen.js +4 -1
- package/dist/api/function/v1beta1/marshalling.gen.cjs +10 -4
- package/dist/api/function/v1beta1/marshalling.gen.js +11 -5
- package/dist/api/function/v1beta1/types.gen.d.ts +12 -0
- package/dist/api/iam/v1alpha1/api.gen.cjs +37 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +22 -1
- package/dist/api/iam/v1alpha1/api.gen.js +37 -0
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/types.gen.d.ts +12 -0
- package/dist/api/inference/v1beta1/types.gen.d.ts +3 -3
- package/dist/api/instance/v1/api.gen.cjs +2 -2
- package/dist/api/instance/v1/api.gen.d.ts +2 -2
- package/dist/api/instance/v1/api.gen.js +2 -2
- package/dist/api/instance/v1/types.gen.d.ts +2 -2
- package/dist/api/iot/v1/api.gen.cjs +4 -3
- package/dist/api/iot/v1/api.gen.d.ts +4 -3
- package/dist/api/iot/v1/api.gen.js +4 -3
- package/dist/api/iot/v1/types.gen.d.ts +6 -6
- package/dist/api/k8s/v1/api.gen.cjs +64 -0
- package/dist/api/k8s/v1/api.gen.d.ts +32 -1
- package/dist/api/k8s/v1/api.gen.js +65 -1
- package/dist/api/k8s/v1/index.gen.d.ts +1 -1
- package/dist/api/k8s/v1/marshalling.gen.cjs +62 -0
- package/dist/api/k8s/v1/marshalling.gen.d.ts +6 -1
- package/dist/api/k8s/v1/marshalling.gen.js +62 -0
- package/dist/api/k8s/v1/types.gen.d.ts +92 -0
- package/dist/api/k8s/v1/validation-rules.gen.cjs +6 -0
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +5 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +6 -0
- package/dist/api/lb/v1/types.gen.d.ts +15 -10
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +33 -15
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +26 -18
- package/dist/api/mongodb/v1alpha1/api.gen.js +34 -16
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +5 -0
- package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.js +5 -0
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +38 -25
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +12 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +11 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +12 -0
- package/dist/api/rdb/v1/marshalling.gen.cjs +2 -1
- package/dist/api/rdb/v1/marshalling.gen.js +2 -1
- package/dist/api/rdb/v1/types.gen.d.ts +22 -13
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CreateInstanceRequest, CreateSnapshotRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
|
|
3
|
+
import type { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
|
|
4
4
|
/**
|
|
5
|
-
* Managed Database for MongoDB
|
|
5
|
+
* Managed Database for MongoDB®.
|
|
6
6
|
*
|
|
7
|
-
* This API allows you to manage your Managed Databases for MongoDB
|
|
7
|
+
* This API allows you to manage your Managed Databases for MongoDB®.
|
|
8
8
|
*/
|
|
9
9
|
export declare class API extends ParentAPI {
|
|
10
10
|
/** Lists the available regions of the API. */
|
|
@@ -22,7 +22,7 @@ export declare class API extends ParentAPI {
|
|
|
22
22
|
};
|
|
23
23
|
protected pageOfListVersions: (request?: Readonly<ListVersionsRequest>) => Promise<ListVersionsResponse>;
|
|
24
24
|
/**
|
|
25
|
-
* List available MongoDB
|
|
25
|
+
* List available MongoDB® versions.
|
|
26
26
|
*
|
|
27
27
|
* @param request - The request {@link ListVersionsRequest}
|
|
28
28
|
* @returns A Promise of ListVersionsResponse
|
|
@@ -33,14 +33,13 @@ export declare class API extends ParentAPI {
|
|
|
33
33
|
};
|
|
34
34
|
protected pageOfListInstances: (request?: Readonly<ListInstancesRequest>) => Promise<ListInstancesResponse>;
|
|
35
35
|
/**
|
|
36
|
-
* List MongoDB
|
|
37
|
-
* the specified region
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* the parameter.
|
|
36
|
+
* List MongoDB® Database Instances. List all MongoDB® Database Instances in
|
|
37
|
+
* the specified region. By default, the MongoDB® Database Instances returned
|
|
38
|
+
* in the list are ordered by creation date in ascending order, though this
|
|
39
|
+
* can be modified via the order_by field. You can define additional
|
|
40
|
+
* parameters for your query, such as `tags` and `name`. For the `name`
|
|
41
|
+
* parameter, the value you include will be checked against the whole name
|
|
42
|
+
* string to see if it includes the string you put in the parameter.
|
|
44
43
|
*
|
|
45
44
|
* @param request - The request {@link ListInstancesRequest}
|
|
46
45
|
* @returns A Promise of ListInstancesResponse
|
|
@@ -50,8 +49,8 @@ export declare class API extends ParentAPI {
|
|
|
50
49
|
[Symbol.asyncIterator]: () => AsyncGenerator<Instance[], void, void>;
|
|
51
50
|
};
|
|
52
51
|
/**
|
|
53
|
-
* Get a MongoDB
|
|
54
|
-
* MongoDB
|
|
52
|
+
* Get a MongoDB® Database Instance. Retrieve information about a given
|
|
53
|
+
* MongoDB® Database Instance, specified by the `region` and `instance_id`
|
|
55
54
|
* parameters. Its full details, including name, status, IP address and port,
|
|
56
55
|
* are returned in the response object.
|
|
57
56
|
*
|
|
@@ -68,7 +67,7 @@ export declare class API extends ParentAPI {
|
|
|
68
67
|
*/
|
|
69
68
|
waitForInstance: (request: Readonly<GetInstanceRequest>, options?: Readonly<WaitForOptions<Instance>>) => Promise<Instance>;
|
|
70
69
|
/**
|
|
71
|
-
* Create a MongoDB
|
|
70
|
+
* Create a MongoDB® Database Instance. Create a new MongoDB® Database
|
|
72
71
|
* Instance.
|
|
73
72
|
*
|
|
74
73
|
* @param request - The request {@link CreateInstanceRequest}
|
|
@@ -76,7 +75,7 @@ export declare class API extends ParentAPI {
|
|
|
76
75
|
*/
|
|
77
76
|
createInstance: (request: Readonly<CreateInstanceRequest>) => Promise<Instance>;
|
|
78
77
|
/**
|
|
79
|
-
* Update a MongoDB
|
|
78
|
+
* Update a MongoDB® Database Instance. Update the parameters of a MongoDB®
|
|
80
79
|
* Database Instance.
|
|
81
80
|
*
|
|
82
81
|
* @param request - The request {@link UpdateInstanceRequest}
|
|
@@ -84,9 +83,9 @@ export declare class API extends ParentAPI {
|
|
|
84
83
|
*/
|
|
85
84
|
updateInstance: (request: Readonly<UpdateInstanceRequest>) => Promise<Instance>;
|
|
86
85
|
/**
|
|
87
|
-
* Delete a MongoDB
|
|
86
|
+
* Delete a MongoDB® Database Instance. Delete a given MongoDB® Database
|
|
88
87
|
* Instance, specified by the `region` and `instance_id` parameters. Deleting
|
|
89
|
-
* a MongoDB
|
|
88
|
+
* a MongoDB® Database Instance is permanent, and cannot be undone. Note that
|
|
90
89
|
* upon deletion all your data will be lost.
|
|
91
90
|
*
|
|
92
91
|
* @param request - The request {@link DeleteInstanceRequest}
|
|
@@ -191,6 +190,15 @@ export declare class API extends ParentAPI {
|
|
|
191
190
|
all: () => Promise<User[]>;
|
|
192
191
|
[Symbol.asyncIterator]: () => AsyncGenerator<User[], void, void>;
|
|
193
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Create an user on a Database Instance. Create an user on a Database
|
|
195
|
+
* Instance. You must define the `name`, `password` of the user and
|
|
196
|
+
* `instance_id` parameters in the request.
|
|
197
|
+
*
|
|
198
|
+
* @param request - The request {@link CreateUserRequest}
|
|
199
|
+
* @returns A Promise of User
|
|
200
|
+
*/
|
|
201
|
+
createUser: (request: Readonly<CreateUserRequest>) => Promise<User>;
|
|
194
202
|
/**
|
|
195
203
|
* Update a user on a Database Instance. Update the parameters of a user on a
|
|
196
204
|
* Database Instance. You can update the `password` parameter, but you cannot
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { INSTANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListNodeTypesResponse, unmarshalListVersionsResponse, unmarshalListInstancesResponse, unmarshalInstance, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalUpgradeInstanceRequest, marshalCreateSnapshotRequest, unmarshalSnapshot, marshalUpdateSnapshotRequest, marshalRestoreSnapshotRequest, unmarshalListSnapshotsResponse, unmarshalListUsersResponse,
|
|
7
|
+
import { unmarshalListNodeTypesResponse, unmarshalListVersionsResponse, unmarshalListInstancesResponse, unmarshalInstance, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalUpgradeInstanceRequest, marshalCreateSnapshotRequest, unmarshalSnapshot, marshalUpdateSnapshotRequest, marshalRestoreSnapshotRequest, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -49,7 +49,7 @@ class API extends API$1 {
|
|
|
49
49
|
unmarshalListVersionsResponse
|
|
50
50
|
);
|
|
51
51
|
/**
|
|
52
|
-
* List available MongoDB
|
|
52
|
+
* List available MongoDB® versions.
|
|
53
53
|
*
|
|
54
54
|
* @param request - The request {@link ListVersionsRequest}
|
|
55
55
|
* @returns A Promise of ListVersionsResponse
|
|
@@ -81,22 +81,21 @@ class API extends API$1 {
|
|
|
81
81
|
unmarshalListInstancesResponse
|
|
82
82
|
);
|
|
83
83
|
/**
|
|
84
|
-
* List MongoDB
|
|
85
|
-
* the specified region
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* the parameter.
|
|
84
|
+
* List MongoDB® Database Instances. List all MongoDB® Database Instances in
|
|
85
|
+
* the specified region. By default, the MongoDB® Database Instances returned
|
|
86
|
+
* in the list are ordered by creation date in ascending order, though this
|
|
87
|
+
* can be modified via the order_by field. You can define additional
|
|
88
|
+
* parameters for your query, such as `tags` and `name`. For the `name`
|
|
89
|
+
* parameter, the value you include will be checked against the whole name
|
|
90
|
+
* string to see if it includes the string you put in the parameter.
|
|
92
91
|
*
|
|
93
92
|
* @param request - The request {@link ListInstancesRequest}
|
|
94
93
|
* @returns A Promise of ListInstancesResponse
|
|
95
94
|
*/
|
|
96
95
|
listInstances = (request = {}) => enrichForPagination("instances", this.pageOfListInstances, request);
|
|
97
96
|
/**
|
|
98
|
-
* Get a MongoDB
|
|
99
|
-
* MongoDB
|
|
97
|
+
* Get a MongoDB® Database Instance. Retrieve information about a given
|
|
98
|
+
* MongoDB® Database Instance, specified by the `region` and `instance_id`
|
|
100
99
|
* parameters. Its full details, including name, status, IP address and port,
|
|
101
100
|
* are returned in the response object.
|
|
102
101
|
*
|
|
@@ -124,7 +123,7 @@ class API extends API$1 {
|
|
|
124
123
|
options
|
|
125
124
|
);
|
|
126
125
|
/**
|
|
127
|
-
* Create a MongoDB
|
|
126
|
+
* Create a MongoDB® Database Instance. Create a new MongoDB® Database
|
|
128
127
|
* Instance.
|
|
129
128
|
*
|
|
130
129
|
* @param request - The request {@link CreateInstanceRequest}
|
|
@@ -142,7 +141,7 @@ class API extends API$1 {
|
|
|
142
141
|
unmarshalInstance
|
|
143
142
|
);
|
|
144
143
|
/**
|
|
145
|
-
* Update a MongoDB
|
|
144
|
+
* Update a MongoDB® Database Instance. Update the parameters of a MongoDB®
|
|
146
145
|
* Database Instance.
|
|
147
146
|
*
|
|
148
147
|
* @param request - The request {@link UpdateInstanceRequest}
|
|
@@ -160,9 +159,9 @@ class API extends API$1 {
|
|
|
160
159
|
unmarshalInstance
|
|
161
160
|
);
|
|
162
161
|
/**
|
|
163
|
-
* Delete a MongoDB
|
|
162
|
+
* Delete a MongoDB® Database Instance. Delete a given MongoDB® Database
|
|
164
163
|
* Instance, specified by the `region` and `instance_id` parameters. Deleting
|
|
165
|
-
* a MongoDB
|
|
164
|
+
* a MongoDB® Database Instance is permanent, and cannot be undone. Note that
|
|
166
165
|
* upon deletion all your data will be lost.
|
|
167
166
|
*
|
|
168
167
|
* @param request - The request {@link DeleteInstanceRequest}
|
|
@@ -368,6 +367,25 @@ class API extends API$1 {
|
|
|
368
367
|
* @returns A Promise of ListUsersResponse
|
|
369
368
|
*/
|
|
370
369
|
listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
|
|
370
|
+
/**
|
|
371
|
+
* Create an user on a Database Instance. Create an user on a Database
|
|
372
|
+
* Instance. You must define the `name`, `password` of the user and
|
|
373
|
+
* `instance_id` parameters in the request.
|
|
374
|
+
*
|
|
375
|
+
* @param request - The request {@link CreateUserRequest}
|
|
376
|
+
* @returns A Promise of User
|
|
377
|
+
*/
|
|
378
|
+
createUser = (request) => this.client.fetch(
|
|
379
|
+
{
|
|
380
|
+
body: JSON.stringify(
|
|
381
|
+
marshalCreateUserRequest(request, this.client.settings)
|
|
382
|
+
),
|
|
383
|
+
headers: jsonContentHeaders,
|
|
384
|
+
method: "POST",
|
|
385
|
+
path: `/mongodb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users`
|
|
386
|
+
},
|
|
387
|
+
unmarshalUser
|
|
388
|
+
);
|
|
371
389
|
/**
|
|
372
390
|
* Update a user on a Database Instance. Update the parameters of a user on a
|
|
373
391
|
* Database Instance. You can update the `password` parameter, but you cannot
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateInstanceRequest, CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceStatus, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, RestoreSnapshotRequestVolumeDetails, Setting, SettingPropertyType, Snapshot, SnapshotStatus, SnapshotVolumeType, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Version, Volume, VolumeType, } from './types.gen';
|
|
3
|
+
export type { CreateInstanceRequest, CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, CreateUserRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceStatus, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, RestoreSnapshotRequestVolumeDetails, Setting, SettingPropertyType, Snapshot, SnapshotStatus, SnapshotVolumeType, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Version, Volume, VolumeType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -285,6 +285,10 @@ const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
|
285
285
|
expires_at: request.expiresAt,
|
|
286
286
|
name: request.name
|
|
287
287
|
});
|
|
288
|
+
const marshalCreateUserRequest = (request, defaults) => ({
|
|
289
|
+
name: request.name,
|
|
290
|
+
password: request.password
|
|
291
|
+
});
|
|
288
292
|
const marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({
|
|
289
293
|
volume_type: request.volumeType
|
|
290
294
|
});
|
|
@@ -310,6 +314,7 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
|
310
314
|
});
|
|
311
315
|
exports.marshalCreateInstanceRequest = marshalCreateInstanceRequest;
|
|
312
316
|
exports.marshalCreateSnapshotRequest = marshalCreateSnapshotRequest;
|
|
317
|
+
exports.marshalCreateUserRequest = marshalCreateUserRequest;
|
|
313
318
|
exports.marshalRestoreSnapshotRequest = marshalRestoreSnapshotRequest;
|
|
314
319
|
exports.marshalUpdateInstanceRequest = marshalUpdateInstanceRequest;
|
|
315
320
|
exports.marshalUpdateSnapshotRequest = marshalUpdateSnapshotRequest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateInstanceRequest, CreateSnapshotRequest, Instance, InstanceSetting, ListInstancesResponse, ListNodeTypesResponse, ListSnapshotsResponse, ListUsersResponse, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Volume } from './types.gen';
|
|
2
|
+
import type { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Instance, InstanceSetting, ListInstancesResponse, ListNodeTypesResponse, ListSnapshotsResponse, ListUsersResponse, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Volume } from './types.gen';
|
|
3
3
|
export declare const unmarshalInstanceSetting: (data: unknown) => InstanceSetting;
|
|
4
4
|
export declare const unmarshalVolume: (data: unknown) => Volume;
|
|
5
5
|
export declare const unmarshalInstance: (data: unknown) => Instance;
|
|
@@ -12,6 +12,7 @@ export declare const unmarshalListUsersResponse: (data: unknown) => ListUsersRes
|
|
|
12
12
|
export declare const unmarshalListVersionsResponse: (data: unknown) => ListVersionsResponse;
|
|
13
13
|
export declare const marshalCreateInstanceRequest: (request: CreateInstanceRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
14
|
export declare const marshalCreateSnapshotRequest: (request: CreateSnapshotRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
|
+
export declare const marshalCreateUserRequest: (request: CreateUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
16
|
export declare const marshalRestoreSnapshotRequest: (request: RestoreSnapshotRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
17
|
export declare const marshalUpdateInstanceRequest: (request: UpdateInstanceRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
17
18
|
export declare const marshalUpdateSnapshotRequest: (request: UpdateSnapshotRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -283,6 +283,10 @@ const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
|
283
283
|
expires_at: request.expiresAt,
|
|
284
284
|
name: request.name
|
|
285
285
|
});
|
|
286
|
+
const marshalCreateUserRequest = (request, defaults) => ({
|
|
287
|
+
name: request.name,
|
|
288
|
+
password: request.password
|
|
289
|
+
});
|
|
286
290
|
const marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({
|
|
287
291
|
volume_type: request.volumeType
|
|
288
292
|
});
|
|
@@ -309,6 +313,7 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
|
309
313
|
export {
|
|
310
314
|
marshalCreateInstanceRequest,
|
|
311
315
|
marshalCreateSnapshotRequest,
|
|
316
|
+
marshalCreateUserRequest,
|
|
312
317
|
marshalRestoreSnapshotRequest,
|
|
313
318
|
marshalUpdateInstanceRequest,
|
|
314
319
|
marshalUpdateSnapshotRequest,
|
|
@@ -9,13 +9,13 @@ export type SnapshotStatus = 'unknown_status' | 'creating' | 'ready' | 'restorin
|
|
|
9
9
|
export type VolumeType = 'unknown_type' | 'sbs_5k' | 'sbs_15k';
|
|
10
10
|
/** Private Network details. */
|
|
11
11
|
export interface EndpointPrivateNetworkDetails {
|
|
12
|
-
/** UUID of the
|
|
12
|
+
/** UUID of the Private Network. */
|
|
13
13
|
privateNetworkId: string;
|
|
14
14
|
}
|
|
15
15
|
export interface EndpointPublicDetails {
|
|
16
16
|
}
|
|
17
17
|
export interface EndpointSpecPrivateNetworkDetails {
|
|
18
|
-
/** UUID of the
|
|
18
|
+
/** UUID of the Private Network. */
|
|
19
19
|
privateNetworkId: string;
|
|
20
20
|
}
|
|
21
21
|
export interface EndpointSpecPublicDetails {
|
|
@@ -57,11 +57,11 @@ export interface Volume {
|
|
|
57
57
|
export interface NodeTypeVolumeType {
|
|
58
58
|
/** Volume Type. */
|
|
59
59
|
type: VolumeType;
|
|
60
|
-
/** The description of the
|
|
60
|
+
/** The description of the volume. */
|
|
61
61
|
description: string;
|
|
62
|
-
/** Mimimum size required for the
|
|
62
|
+
/** Mimimum size required for the volume. */
|
|
63
63
|
minSize: number;
|
|
64
|
-
/** Maximum size required for the
|
|
64
|
+
/** Maximum size required for the volume. */
|
|
65
65
|
maxSize: number;
|
|
66
66
|
/** Minimum increment level for a Block Storage volume size. */
|
|
67
67
|
chunkSize: number;
|
|
@@ -114,7 +114,7 @@ export interface Instance {
|
|
|
114
114
|
projectId: string;
|
|
115
115
|
/** Status of the Database Instance. */
|
|
116
116
|
status: InstanceStatus;
|
|
117
|
-
/** MongoDB
|
|
117
|
+
/** MongoDB® engine version of the Database Instance. */
|
|
118
118
|
version: string;
|
|
119
119
|
/** List of tags applied to the Database Instance. */
|
|
120
120
|
tags: string[];
|
|
@@ -134,9 +134,9 @@ export interface Instance {
|
|
|
134
134
|
region: Region;
|
|
135
135
|
}
|
|
136
136
|
export interface NodeType {
|
|
137
|
-
/** Node
|
|
137
|
+
/** Node type name identifier. */
|
|
138
138
|
name: string;
|
|
139
|
-
/** Current stock status for the
|
|
139
|
+
/** Current stock status for the node type. */
|
|
140
140
|
stockStatus: NodeTypeStock;
|
|
141
141
|
/** Current specs of the offer. */
|
|
142
142
|
description: string;
|
|
@@ -144,13 +144,13 @@ export interface NodeType {
|
|
|
144
144
|
vcpus: number;
|
|
145
145
|
/** Quantity of RAM. */
|
|
146
146
|
memory: number;
|
|
147
|
-
/** Available storage options for the
|
|
147
|
+
/** Available storage options for the node type. */
|
|
148
148
|
availableVolumeTypes: NodeTypeVolumeType[];
|
|
149
|
-
/** The
|
|
149
|
+
/** The node type is currently disabled. */
|
|
150
150
|
disabled: boolean;
|
|
151
|
-
/** The
|
|
151
|
+
/** The node type is currently in beta. */
|
|
152
152
|
beta: boolean;
|
|
153
|
-
/** Instance range associated with the
|
|
153
|
+
/** Instance range associated with the node type offer. */
|
|
154
154
|
instanceRange: string;
|
|
155
155
|
}
|
|
156
156
|
export interface Snapshot {
|
|
@@ -174,9 +174,9 @@ export interface Snapshot {
|
|
|
174
174
|
instanceName: string;
|
|
175
175
|
/** Source node type. */
|
|
176
176
|
nodeType: string;
|
|
177
|
-
/** Type of volume where data is stored sbs_5k or sbs_15k. */
|
|
177
|
+
/** Type of volume where data is stored - sbs_5k or sbs_15k. */
|
|
178
178
|
volumeType?: SnapshotVolumeType;
|
|
179
|
-
/** Region of
|
|
179
|
+
/** Region of the snapshot. */
|
|
180
180
|
region: Region;
|
|
181
181
|
}
|
|
182
182
|
export interface User {
|
|
@@ -188,7 +188,7 @@ export interface User {
|
|
|
188
188
|
name: string;
|
|
189
189
|
}
|
|
190
190
|
export interface Version {
|
|
191
|
-
/** MongoDB
|
|
191
|
+
/** MongoDB® engine version. */
|
|
192
192
|
version: string;
|
|
193
193
|
/** Date of End of Life. */
|
|
194
194
|
endOfLifeAt?: Date;
|
|
@@ -209,7 +209,7 @@ export type CreateInstanceRequest = {
|
|
|
209
209
|
projectId?: string;
|
|
210
210
|
/** Name of the Database Instance. */
|
|
211
211
|
name?: string;
|
|
212
|
-
/** Version of the MongoDB
|
|
212
|
+
/** Version of the MongoDB® engine. */
|
|
213
213
|
version: string;
|
|
214
214
|
/** Tags to apply to the Database Instance. */
|
|
215
215
|
tags?: string[];
|
|
@@ -239,6 +239,19 @@ export type CreateSnapshotRequest = {
|
|
|
239
239
|
/** Expiration date of the snapshot (must follow the ISO 8601 format). */
|
|
240
240
|
expiresAt?: Date;
|
|
241
241
|
};
|
|
242
|
+
export type CreateUserRequest = {
|
|
243
|
+
/**
|
|
244
|
+
* Region to target. If none is passed will use default region from the
|
|
245
|
+
* config.
|
|
246
|
+
*/
|
|
247
|
+
region?: Region;
|
|
248
|
+
/** UUID of the Database Instance the user belongs to. */
|
|
249
|
+
instanceId: string;
|
|
250
|
+
/** Name of the database user. */
|
|
251
|
+
name: string;
|
|
252
|
+
/** Password of the database user. */
|
|
253
|
+
password: string;
|
|
254
|
+
};
|
|
242
255
|
export type DeleteInstanceRequest = {
|
|
243
256
|
/**
|
|
244
257
|
* Region to target. If none is passed will use default region from the
|
|
@@ -296,9 +309,9 @@ export type ListInstancesRequest = {
|
|
|
296
309
|
name?: string;
|
|
297
310
|
/** Criteria to use when ordering Database Instance listings. */
|
|
298
311
|
orderBy?: ListInstancesRequestOrderBy;
|
|
299
|
-
/** Organization ID the Database Instance
|
|
312
|
+
/** Organization ID of the Database Instance. */
|
|
300
313
|
organizationId?: string;
|
|
301
|
-
/** Project ID
|
|
314
|
+
/** Project ID. */
|
|
302
315
|
projectId?: string;
|
|
303
316
|
page?: number;
|
|
304
317
|
pageSize?: number;
|
|
@@ -306,7 +319,7 @@ export type ListInstancesRequest = {
|
|
|
306
319
|
export interface ListInstancesResponse {
|
|
307
320
|
/** List of all Database Instances available in an Organization or Project. */
|
|
308
321
|
instances: Instance[];
|
|
309
|
-
/** Total count of Database Instances available in
|
|
322
|
+
/** Total count of Database Instances available in an Organization or Project. */
|
|
310
323
|
totalCount: number;
|
|
311
324
|
}
|
|
312
325
|
export type ListNodeTypesRequest = {
|
|
@@ -334,7 +347,7 @@ export type ListSnapshotsRequest = {
|
|
|
334
347
|
region?: Region;
|
|
335
348
|
/** Instance ID the snapshots belongs to. */
|
|
336
349
|
instanceId?: string;
|
|
337
|
-
/** Lists
|
|
350
|
+
/** Lists database snapshots that match a name pattern. */
|
|
338
351
|
name?: string;
|
|
339
352
|
/** Criteria to use when ordering snapshot listings. */
|
|
340
353
|
orderBy?: ListSnapshotsRequestOrderBy;
|
|
@@ -346,9 +359,9 @@ export type ListSnapshotsRequest = {
|
|
|
346
359
|
pageSize?: number;
|
|
347
360
|
};
|
|
348
361
|
export interface ListSnapshotsResponse {
|
|
349
|
-
/** List of all
|
|
362
|
+
/** List of all database snapshots available in an Organization or Project. */
|
|
350
363
|
snapshots: Snapshot[];
|
|
351
|
-
/** Total count of
|
|
364
|
+
/** Total count of database snapshots available in a Organization or Project. */
|
|
352
365
|
totalCount: number;
|
|
353
366
|
}
|
|
354
367
|
export type ListUsersRequest = {
|
|
@@ -383,9 +396,9 @@ export type ListVersionsRequest = {
|
|
|
383
396
|
pageSize?: number;
|
|
384
397
|
};
|
|
385
398
|
export interface ListVersionsResponse {
|
|
386
|
-
/** Available MongoDB
|
|
399
|
+
/** Available MongoDB® engine version. */
|
|
387
400
|
versions: Version[];
|
|
388
|
-
/** Total count of MongoDB
|
|
401
|
+
/** Total count of MongoDB® engine version available. */
|
|
389
402
|
totalCount: number;
|
|
390
403
|
}
|
|
391
404
|
export type RestoreSnapshotRequest = {
|
|
@@ -453,7 +466,7 @@ export type UpgradeInstanceRequest = {
|
|
|
453
466
|
/** UUID of the Database Instance you want to upgrade. */
|
|
454
467
|
instanceId: string;
|
|
455
468
|
/**
|
|
456
|
-
* Increase your
|
|
469
|
+
* Increase your Block Storage volume size.
|
|
457
470
|
*
|
|
458
471
|
* One-of ('upgradeTarget'): at most one of 'volumeSize' could be set.
|
|
459
472
|
*/
|
|
@@ -35,6 +35,17 @@ const CreateSnapshotRequest = {
|
|
|
35
35
|
pattern: /^[A-Za-z0-9\-_]+$/
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
const CreateUserRequest = {
|
|
39
|
+
name: {
|
|
40
|
+
maxLength: 63,
|
|
41
|
+
minLength: 1,
|
|
42
|
+
pattern: /^[a-zA-Z0-9_\-]*$/
|
|
43
|
+
},
|
|
44
|
+
password: {
|
|
45
|
+
maxLength: 128,
|
|
46
|
+
minLength: 8
|
|
47
|
+
}
|
|
48
|
+
};
|
|
38
49
|
const ListInstancesRequest = {
|
|
39
50
|
name: {
|
|
40
51
|
maxLength: 255,
|
|
@@ -136,6 +147,7 @@ const UpdateUserRequest = {
|
|
|
136
147
|
};
|
|
137
148
|
exports.CreateInstanceRequest = CreateInstanceRequest;
|
|
138
149
|
exports.CreateSnapshotRequest = CreateSnapshotRequest;
|
|
150
|
+
exports.CreateUserRequest = CreateUserRequest;
|
|
139
151
|
exports.ListInstancesRequest = ListInstancesRequest;
|
|
140
152
|
exports.ListNodeTypesRequest = ListNodeTypesRequest;
|
|
141
153
|
exports.ListSnapshotsRequest = ListSnapshotsRequest;
|
|
@@ -33,6 +33,17 @@ export declare const CreateSnapshotRequest: {
|
|
|
33
33
|
pattern: RegExp;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
+
export declare const CreateUserRequest: {
|
|
37
|
+
name: {
|
|
38
|
+
maxLength: number;
|
|
39
|
+
minLength: number;
|
|
40
|
+
pattern: RegExp;
|
|
41
|
+
};
|
|
42
|
+
password: {
|
|
43
|
+
maxLength: number;
|
|
44
|
+
minLength: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
36
47
|
export declare const ListInstancesRequest: {
|
|
37
48
|
name: {
|
|
38
49
|
maxLength: number;
|
|
@@ -33,6 +33,17 @@ const CreateSnapshotRequest = {
|
|
|
33
33
|
pattern: /^[A-Za-z0-9\-_]+$/
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
+
const CreateUserRequest = {
|
|
37
|
+
name: {
|
|
38
|
+
maxLength: 63,
|
|
39
|
+
minLength: 1,
|
|
40
|
+
pattern: /^[a-zA-Z0-9_\-]*$/
|
|
41
|
+
},
|
|
42
|
+
password: {
|
|
43
|
+
maxLength: 128,
|
|
44
|
+
minLength: 8
|
|
45
|
+
}
|
|
46
|
+
};
|
|
36
47
|
const ListInstancesRequest = {
|
|
37
48
|
name: {
|
|
38
49
|
maxLength: 255,
|
|
@@ -135,6 +146,7 @@ const UpdateUserRequest = {
|
|
|
135
146
|
export {
|
|
136
147
|
CreateInstanceRequest,
|
|
137
148
|
CreateSnapshotRequest,
|
|
149
|
+
CreateUserRequest,
|
|
138
150
|
ListInstancesRequest,
|
|
139
151
|
ListNodeTypesRequest,
|
|
140
152
|
ListSnapshotsRequest,
|
|
@@ -861,7 +861,8 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
|
861
861
|
value: request.majorUpgradeWorkflow !== void 0 ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(
|
|
862
862
|
request.majorUpgradeWorkflow
|
|
863
863
|
) : void 0
|
|
864
|
-
}
|
|
864
|
+
},
|
|
865
|
+
{ param: "enable_encryption", value: request.enableEncryption }
|
|
865
866
|
])
|
|
866
867
|
});
|
|
867
868
|
exports.marshalAddInstanceACLRulesRequest = marshalAddInstanceACLRulesRequest;
|
|
@@ -859,7 +859,8 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
|
859
859
|
value: request.majorUpgradeWorkflow !== void 0 ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(
|
|
860
860
|
request.majorUpgradeWorkflow
|
|
861
861
|
) : void 0
|
|
862
|
-
}
|
|
862
|
+
},
|
|
863
|
+
{ param: "enable_encryption", value: request.enableEncryption }
|
|
863
864
|
])
|
|
864
865
|
});
|
|
865
866
|
export {
|
|
@@ -364,7 +364,7 @@ export interface ListInstanceLogsDetailsResponseInstanceLogDetail {
|
|
|
364
364
|
size: number;
|
|
365
365
|
}
|
|
366
366
|
export interface InstanceLog {
|
|
367
|
-
/** Presigned
|
|
367
|
+
/** Presigned Object Storage URL to download your log file. */
|
|
368
368
|
downloadUrl?: string;
|
|
369
369
|
/** UUID of the Database Instance log. */
|
|
370
370
|
id: string;
|
|
@@ -1361,8 +1361,8 @@ export type UpgradeInstanceRequest = {
|
|
|
1361
1361
|
* Node type of the Database Instance you want to upgrade to.
|
|
1362
1362
|
*
|
|
1363
1363
|
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1364
|
-
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
|
|
1365
|
-
* could be set.
|
|
1364
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1365
|
+
* 'enableEncryption' could be set.
|
|
1366
1366
|
*/
|
|
1367
1367
|
nodeType?: string;
|
|
1368
1368
|
/**
|
|
@@ -1370,24 +1370,24 @@ export type UpgradeInstanceRequest = {
|
|
|
1370
1370
|
* Instance.
|
|
1371
1371
|
*
|
|
1372
1372
|
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1373
|
-
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
|
|
1374
|
-
* could be set.
|
|
1373
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1374
|
+
* 'enableEncryption' could be set.
|
|
1375
1375
|
*/
|
|
1376
1376
|
enableHa?: boolean;
|
|
1377
1377
|
/**
|
|
1378
1378
|
* Increase your block storage volume size.
|
|
1379
1379
|
*
|
|
1380
1380
|
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1381
|
-
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
|
|
1382
|
-
* could be set.
|
|
1381
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1382
|
+
* 'enableEncryption' could be set.
|
|
1383
1383
|
*/
|
|
1384
1384
|
volumeSize?: number;
|
|
1385
1385
|
/**
|
|
1386
1386
|
* Change your Database Instance storage type.
|
|
1387
1387
|
*
|
|
1388
1388
|
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1389
|
-
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
|
|
1390
|
-
* could be set.
|
|
1389
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1390
|
+
* 'enableEncryption' could be set.
|
|
1391
1391
|
*/
|
|
1392
1392
|
volumeType?: VolumeType;
|
|
1393
1393
|
/**
|
|
@@ -1395,8 +1395,8 @@ export type UpgradeInstanceRequest = {
|
|
|
1395
1395
|
* current one and perform a Database Engine upgrade.
|
|
1396
1396
|
*
|
|
1397
1397
|
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1398
|
-
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
|
|
1399
|
-
* could be set.
|
|
1398
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1399
|
+
* 'enableEncryption' could be set.
|
|
1400
1400
|
*/
|
|
1401
1401
|
upgradableVersionId?: string;
|
|
1402
1402
|
/**
|
|
@@ -1404,8 +1404,17 @@ export type UpgradeInstanceRequest = {
|
|
|
1404
1404
|
* endpoints.
|
|
1405
1405
|
*
|
|
1406
1406
|
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1407
|
-
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow'
|
|
1408
|
-
* could be set.
|
|
1407
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1408
|
+
* 'enableEncryption' could be set.
|
|
1409
1409
|
*/
|
|
1410
1410
|
majorUpgradeWorkflow?: UpgradeInstanceRequestMajorUpgradeWorkflow;
|
|
1411
|
+
/**
|
|
1412
|
+
* Defines whether or not encryption should be enabled on the Database
|
|
1413
|
+
* Instance.
|
|
1414
|
+
*
|
|
1415
|
+
* One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
|
|
1416
|
+
* 'volumeSize', 'volumeType', 'upgradableVersionId', 'majorUpgradeWorkflow',
|
|
1417
|
+
* 'enableEncryption' could be set.
|
|
1418
|
+
*/
|
|
1419
|
+
enableEncryption?: boolean;
|
|
1411
1420
|
};
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.52.1";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.52.1";
|
package/dist/scw/constants.js
CHANGED