@scaleway/sdk-instance 1.3.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -0
- package/dist/v1/api.gen.d.ts +2 -2
- package/dist/v1/api.gen.js +99 -111
- package/dist/v1/content.gen.js +16 -5
- package/dist/v1/index.gen.d.ts +2 -2
- package/dist/v1/marshalling.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.js +59 -104
- package/dist/v1/types.gen.d.ts +5 -1
- package/package.json +6 -9
- package/dist/index.gen.cjs +0 -4
- package/dist/v1/api.gen.cjs +0 -1198
- package/dist/v1/api.utils.cjs +0 -277
- package/dist/v1/content.gen.cjs +0 -51
- package/dist/v1/index.cjs +0 -16
- package/dist/v1/marshalling.gen.cjs +0 -1872
package/dist/v1/api.gen.cjs
DELETED
|
@@ -1,1198 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
-
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
5
|
-
const jsonContentHeaders = {
|
|
6
|
-
"Content-Type": "application/json; charset=utf-8"
|
|
7
|
-
};
|
|
8
|
-
class API extends sdkClient.API {
|
|
9
|
-
/**
|
|
10
|
-
* Locality of this API.
|
|
11
|
-
* type ∈ {'zone','region','global','unspecified'}
|
|
12
|
-
*/
|
|
13
|
-
static LOCALITY = sdkClient.toApiLocality({
|
|
14
|
-
zones: [
|
|
15
|
-
"fr-par-1",
|
|
16
|
-
"fr-par-2",
|
|
17
|
-
"fr-par-3",
|
|
18
|
-
"nl-ams-1",
|
|
19
|
-
"nl-ams-2",
|
|
20
|
-
"nl-ams-3",
|
|
21
|
-
"pl-waw-1",
|
|
22
|
-
"pl-waw-2",
|
|
23
|
-
"pl-waw-3"
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
/**
|
|
27
|
-
* Get availability. Get availability for all Instance types.
|
|
28
|
-
*
|
|
29
|
-
* @param request - The request {@link GetServerTypesAvailabilityRequest}
|
|
30
|
-
* @returns A Promise of GetServerTypesAvailabilityResponse
|
|
31
|
-
*/
|
|
32
|
-
getServerTypesAvailability = (request = {}) => this.client.fetch(
|
|
33
|
-
{
|
|
34
|
-
method: "GET",
|
|
35
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/products/servers/availability`,
|
|
36
|
-
urlParams: sdkClient.urlParams(
|
|
37
|
-
["page", request.page],
|
|
38
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize]
|
|
39
|
-
)
|
|
40
|
-
},
|
|
41
|
-
marshalling_gen.unmarshalGetServerTypesAvailabilityResponse
|
|
42
|
-
);
|
|
43
|
-
/**
|
|
44
|
-
* List Instance types. List available Instance types and their technical details.
|
|
45
|
-
*
|
|
46
|
-
* @param request - The request {@link ListServersTypesRequest}
|
|
47
|
-
* @returns A Promise of ListServersTypesResponse
|
|
48
|
-
*/
|
|
49
|
-
listServersTypes = (request = {}) => this.client.fetch(
|
|
50
|
-
{
|
|
51
|
-
method: "GET",
|
|
52
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/products/servers`,
|
|
53
|
-
urlParams: sdkClient.urlParams(
|
|
54
|
-
["page", request.page],
|
|
55
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize]
|
|
56
|
-
)
|
|
57
|
-
},
|
|
58
|
-
marshalling_gen.unmarshalListServersTypesResponse
|
|
59
|
-
);
|
|
60
|
-
/**
|
|
61
|
-
* List volume types. List all volume types and their technical details.
|
|
62
|
-
*
|
|
63
|
-
* @param request - The request {@link ListVolumesTypesRequest}
|
|
64
|
-
* @returns A Promise of ListVolumesTypesResponse
|
|
65
|
-
*/
|
|
66
|
-
listVolumesTypes = (request = {}) => this.client.fetch(
|
|
67
|
-
{
|
|
68
|
-
method: "GET",
|
|
69
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/products/volumes`,
|
|
70
|
-
urlParams: sdkClient.urlParams(
|
|
71
|
-
["page", request.page],
|
|
72
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize]
|
|
73
|
-
)
|
|
74
|
-
},
|
|
75
|
-
marshalling_gen.unmarshalListVolumesTypesResponse
|
|
76
|
-
);
|
|
77
|
-
pageOfListServers = (request = {}) => this.client.fetch(
|
|
78
|
-
{
|
|
79
|
-
method: "GET",
|
|
80
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
81
|
-
urlParams: sdkClient.urlParams(
|
|
82
|
-
["commercial_type", request.commercialType],
|
|
83
|
-
["name", request.name],
|
|
84
|
-
["order", request.order],
|
|
85
|
-
["organization", request.organization],
|
|
86
|
-
["page", request.page],
|
|
87
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
88
|
-
["private_ip", request.privateIp],
|
|
89
|
-
["private_network", request.privateNetwork],
|
|
90
|
-
[
|
|
91
|
-
"private_networks",
|
|
92
|
-
request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(",") : void 0
|
|
93
|
-
],
|
|
94
|
-
["private_nic_mac_address", request.privateNicMacAddress],
|
|
95
|
-
["project", request.project],
|
|
96
|
-
[
|
|
97
|
-
"servers",
|
|
98
|
-
request.servers && request.servers.length > 0 ? request.servers.join(",") : void 0
|
|
99
|
-
],
|
|
100
|
-
["state", request.state],
|
|
101
|
-
[
|
|
102
|
-
"tags",
|
|
103
|
-
request.tags && request.tags.length > 0 ? request.tags.join(",") : void 0
|
|
104
|
-
],
|
|
105
|
-
["with_ip", request.withIp],
|
|
106
|
-
["without_ip", request.withoutIp]
|
|
107
|
-
)
|
|
108
|
-
},
|
|
109
|
-
marshalling_gen.unmarshalListServersResponse
|
|
110
|
-
);
|
|
111
|
-
/**
|
|
112
|
-
* List all Instances. List all Instances in a specified Availability Zone, e.g. `fr-par-1`.
|
|
113
|
-
*
|
|
114
|
-
* @param request - The request {@link ListServersRequest}
|
|
115
|
-
* @returns A Promise of ListServersResponse
|
|
116
|
-
*/
|
|
117
|
-
listServers = (request = {}) => sdkClient.enrichForPagination("servers", this.pageOfListServers, request);
|
|
118
|
-
_createServer = (request) => this.client.fetch(
|
|
119
|
-
{
|
|
120
|
-
body: JSON.stringify(
|
|
121
|
-
marshalling_gen.marshalCreateServerRequest(request, this.client.settings)
|
|
122
|
-
),
|
|
123
|
-
headers: jsonContentHeaders,
|
|
124
|
-
method: "POST",
|
|
125
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
126
|
-
},
|
|
127
|
-
marshalling_gen.unmarshalCreateServerResponse
|
|
128
|
-
);
|
|
129
|
-
/**
|
|
130
|
-
* Delete an Instance. Delete the Instance with the specified ID.
|
|
131
|
-
*
|
|
132
|
-
* @param request - The request {@link DeleteServerRequest}
|
|
133
|
-
*/
|
|
134
|
-
deleteServer = (request) => this.client.fetch({
|
|
135
|
-
method: "DELETE",
|
|
136
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}`
|
|
137
|
-
});
|
|
138
|
-
/**
|
|
139
|
-
* Get an Instance. Get the details of a specified Instance.
|
|
140
|
-
*
|
|
141
|
-
* @param request - The request {@link GetServerRequest}
|
|
142
|
-
* @returns A Promise of GetServerResponse
|
|
143
|
-
*/
|
|
144
|
-
getServer = (request) => this.client.fetch(
|
|
145
|
-
{
|
|
146
|
-
method: "GET",
|
|
147
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}`
|
|
148
|
-
},
|
|
149
|
-
marshalling_gen.unmarshalGetServerResponse
|
|
150
|
-
);
|
|
151
|
-
_setServer = (request) => this.client.fetch(
|
|
152
|
-
{
|
|
153
|
-
body: JSON.stringify(
|
|
154
|
-
marshalling_gen.marshalSetServerRequest(request, this.client.settings)
|
|
155
|
-
),
|
|
156
|
-
headers: jsonContentHeaders,
|
|
157
|
-
method: "PUT",
|
|
158
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("id", request.id)}`
|
|
159
|
-
},
|
|
160
|
-
marshalling_gen.unmarshalSetServerResponse
|
|
161
|
-
);
|
|
162
|
-
_updateServer = (request) => this.client.fetch(
|
|
163
|
-
{
|
|
164
|
-
body: JSON.stringify(
|
|
165
|
-
marshalling_gen.marshalUpdateServerRequest(request, this.client.settings)
|
|
166
|
-
),
|
|
167
|
-
headers: jsonContentHeaders,
|
|
168
|
-
method: "PATCH",
|
|
169
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}`
|
|
170
|
-
},
|
|
171
|
-
marshalling_gen.unmarshalUpdateServerResponse
|
|
172
|
-
);
|
|
173
|
-
/**
|
|
174
|
-
* List Instance actions. List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance.
|
|
175
|
-
*
|
|
176
|
-
* @param request - The request {@link ListServerActionsRequest}
|
|
177
|
-
* @returns A Promise of ListServerActionsResponse
|
|
178
|
-
*/
|
|
179
|
-
listServerActions = (request) => this.client.fetch(
|
|
180
|
-
{
|
|
181
|
-
method: "GET",
|
|
182
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/action`
|
|
183
|
-
},
|
|
184
|
-
marshalling_gen.unmarshalListServerActionsResponse
|
|
185
|
-
);
|
|
186
|
-
/**
|
|
187
|
-
* Perform action. Perform an action on an Instance.
|
|
188
|
-
Available actions are:
|
|
189
|
-
* `poweron`: Start a stopped Instance.
|
|
190
|
-
* `poweroff`: Fully stop the Instance and release the hypervisor slot.
|
|
191
|
-
* `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor.
|
|
192
|
-
* `reboot`: Stop the instance and restart it.
|
|
193
|
-
* `backup`: Create an image with all the volumes of an Instance.
|
|
194
|
-
* `terminate`: Delete the Instance along with its attached local volumes.
|
|
195
|
-
* `enable_routed_ip`: Migrate the Instance to the new network stack.
|
|
196
|
-
|
|
197
|
-
The `terminate` action will result in the deletion of `l_ssd` and `scratch` volumes types, `sbs_volume` volumes will only be detached.
|
|
198
|
-
If you want to preserve your `l_ssd` volumes, you should stop your Instance, detach the volumes to be preserved, then delete your Instance.
|
|
199
|
-
|
|
200
|
-
The `backup` action can be done with:
|
|
201
|
-
* No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
|
|
202
|
-
* `volumes` key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in `volumes` key. `scratch` volumes types can't be shapshotted.
|
|
203
|
-
*
|
|
204
|
-
* @param request - The request {@link ServerActionRequest}
|
|
205
|
-
* @returns A Promise of ServerActionResponse
|
|
206
|
-
*/
|
|
207
|
-
serverAction = (request) => this.client.fetch(
|
|
208
|
-
{
|
|
209
|
-
body: JSON.stringify(
|
|
210
|
-
marshalling_gen.marshalServerActionRequest(request, this.client.settings)
|
|
211
|
-
),
|
|
212
|
-
headers: jsonContentHeaders,
|
|
213
|
-
method: "POST",
|
|
214
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/action`
|
|
215
|
-
},
|
|
216
|
-
marshalling_gen.unmarshalServerActionResponse
|
|
217
|
-
);
|
|
218
|
-
/**
|
|
219
|
-
* List user data. List all user data keys registered on a specified Instance.
|
|
220
|
-
*
|
|
221
|
-
* @param request - The request {@link ListServerUserDataRequest}
|
|
222
|
-
* @returns A Promise of ListServerUserDataResponse
|
|
223
|
-
*/
|
|
224
|
-
listServerUserData = (request) => this.client.fetch(
|
|
225
|
-
{
|
|
226
|
-
method: "GET",
|
|
227
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/user_data`
|
|
228
|
-
},
|
|
229
|
-
marshalling_gen.unmarshalListServerUserDataResponse
|
|
230
|
-
);
|
|
231
|
-
/**
|
|
232
|
-
* Delete user data. Delete the specified key from an Instance's user data.
|
|
233
|
-
*
|
|
234
|
-
* @param request - The request {@link DeleteServerUserDataRequest}
|
|
235
|
-
*/
|
|
236
|
-
deleteServerUserData = (request) => this.client.fetch({
|
|
237
|
-
method: "DELETE",
|
|
238
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/user_data/${sdkClient.validatePathParam("key", request.key)}`
|
|
239
|
-
});
|
|
240
|
-
/**
|
|
241
|
-
* Get Instance compatible types. Get compatible commercial types that can be used to update the Instance. The compatibility of an Instance offer is based on:
|
|
242
|
-
* the CPU architecture
|
|
243
|
-
* the OS type
|
|
244
|
-
* the required l_ssd storage size
|
|
245
|
-
* the required scratch storage size
|
|
246
|
-
If the specified Instance offer is flagged as end of service, the best compatible offer is the first returned.
|
|
247
|
-
*
|
|
248
|
-
* @param request - The request {@link GetServerCompatibleTypesRequest}
|
|
249
|
-
* @returns A Promise of ServerCompatibleTypes
|
|
250
|
-
*/
|
|
251
|
-
getServerCompatibleTypes = (request) => this.client.fetch(
|
|
252
|
-
{
|
|
253
|
-
method: "GET",
|
|
254
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/compatible-types`
|
|
255
|
-
},
|
|
256
|
-
marshalling_gen.unmarshalServerCompatibleTypes
|
|
257
|
-
);
|
|
258
|
-
/**
|
|
259
|
-
* Attach a volume to an Instance.
|
|
260
|
-
*
|
|
261
|
-
* @param request - The request {@link AttachServerVolumeRequest}
|
|
262
|
-
* @returns A Promise of AttachServerVolumeResponse
|
|
263
|
-
*/
|
|
264
|
-
attachServerVolume = (request) => this.client.fetch(
|
|
265
|
-
{
|
|
266
|
-
body: JSON.stringify(
|
|
267
|
-
marshalling_gen.marshalAttachServerVolumeRequest(request, this.client.settings)
|
|
268
|
-
),
|
|
269
|
-
headers: jsonContentHeaders,
|
|
270
|
-
method: "POST",
|
|
271
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/attach-volume`
|
|
272
|
-
},
|
|
273
|
-
marshalling_gen.unmarshalAttachServerVolumeResponse
|
|
274
|
-
);
|
|
275
|
-
/**
|
|
276
|
-
* Detach a volume from an Instance.
|
|
277
|
-
*
|
|
278
|
-
* @param request - The request {@link DetachServerVolumeRequest}
|
|
279
|
-
* @returns A Promise of DetachServerVolumeResponse
|
|
280
|
-
*/
|
|
281
|
-
detachServerVolume = (request) => this.client.fetch(
|
|
282
|
-
{
|
|
283
|
-
body: JSON.stringify(
|
|
284
|
-
marshalling_gen.marshalDetachServerVolumeRequest(request, this.client.settings)
|
|
285
|
-
),
|
|
286
|
-
headers: jsonContentHeaders,
|
|
287
|
-
method: "POST",
|
|
288
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/detach-volume`
|
|
289
|
-
},
|
|
290
|
-
marshalling_gen.unmarshalDetachServerVolumeResponse
|
|
291
|
-
);
|
|
292
|
-
/**
|
|
293
|
-
* Attach a filesystem volume to an Instance.
|
|
294
|
-
*
|
|
295
|
-
* @param request - The request {@link AttachServerFileSystemRequest}
|
|
296
|
-
* @returns A Promise of AttachServerFileSystemResponse
|
|
297
|
-
*/
|
|
298
|
-
attachServerFileSystem = (request) => this.client.fetch(
|
|
299
|
-
{
|
|
300
|
-
body: JSON.stringify(
|
|
301
|
-
marshalling_gen.marshalAttachServerFileSystemRequest(request, this.client.settings)
|
|
302
|
-
),
|
|
303
|
-
headers: jsonContentHeaders,
|
|
304
|
-
method: "POST",
|
|
305
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/attach-filesystem`
|
|
306
|
-
},
|
|
307
|
-
marshalling_gen.unmarshalAttachServerFileSystemResponse
|
|
308
|
-
);
|
|
309
|
-
/**
|
|
310
|
-
* Detach a filesystem volume from an Instance.
|
|
311
|
-
*
|
|
312
|
-
* @param request - The request {@link DetachServerFileSystemRequest}
|
|
313
|
-
* @returns A Promise of DetachServerFileSystemResponse
|
|
314
|
-
*/
|
|
315
|
-
detachServerFileSystem = (request) => this.client.fetch(
|
|
316
|
-
{
|
|
317
|
-
body: JSON.stringify(
|
|
318
|
-
marshalling_gen.marshalDetachServerFileSystemRequest(request, this.client.settings)
|
|
319
|
-
),
|
|
320
|
-
headers: jsonContentHeaders,
|
|
321
|
-
method: "POST",
|
|
322
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/detach-filesystem`
|
|
323
|
-
},
|
|
324
|
-
marshalling_gen.unmarshalDetachServerFileSystemResponse
|
|
325
|
-
);
|
|
326
|
-
pageOfListImages = (request = {}) => this.client.fetch(
|
|
327
|
-
{
|
|
328
|
-
method: "GET",
|
|
329
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/images`,
|
|
330
|
-
urlParams: sdkClient.urlParams(
|
|
331
|
-
["arch", request.arch],
|
|
332
|
-
["name", request.name],
|
|
333
|
-
["organization", request.organization],
|
|
334
|
-
["page", request.page],
|
|
335
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
336
|
-
["project", request.project],
|
|
337
|
-
["public", request.public],
|
|
338
|
-
["tags", request.tags]
|
|
339
|
-
)
|
|
340
|
-
},
|
|
341
|
-
marshalling_gen.unmarshalListImagesResponse
|
|
342
|
-
);
|
|
343
|
-
/**
|
|
344
|
-
* List Instance images. List all existing Instance images.
|
|
345
|
-
*
|
|
346
|
-
* @param request - The request {@link ListImagesRequest}
|
|
347
|
-
* @returns A Promise of ListImagesResponse
|
|
348
|
-
*/
|
|
349
|
-
listImages = (request = {}) => sdkClient.enrichForPagination("images", this.pageOfListImages, request);
|
|
350
|
-
/**
|
|
351
|
-
* Get an Instance image. Get details of an image with the specified ID.
|
|
352
|
-
*
|
|
353
|
-
* @param request - The request {@link GetImageRequest}
|
|
354
|
-
* @returns A Promise of GetImageResponse
|
|
355
|
-
*/
|
|
356
|
-
getImage = (request) => this.client.fetch(
|
|
357
|
-
{
|
|
358
|
-
method: "GET",
|
|
359
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}`
|
|
360
|
-
},
|
|
361
|
-
marshalling_gen.unmarshalGetImageResponse
|
|
362
|
-
);
|
|
363
|
-
/**
|
|
364
|
-
* Create an Instance image. Create an Instance image from the specified snapshot ID.
|
|
365
|
-
*
|
|
366
|
-
* @param request - The request {@link CreateImageRequest}
|
|
367
|
-
* @returns A Promise of CreateImageResponse
|
|
368
|
-
*/
|
|
369
|
-
createImage = (request) => this.client.fetch(
|
|
370
|
-
{
|
|
371
|
-
body: JSON.stringify(
|
|
372
|
-
marshalling_gen.marshalCreateImageRequest(request, this.client.settings)
|
|
373
|
-
),
|
|
374
|
-
headers: jsonContentHeaders,
|
|
375
|
-
method: "POST",
|
|
376
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/images`
|
|
377
|
-
},
|
|
378
|
-
marshalling_gen.unmarshalCreateImageResponse
|
|
379
|
-
);
|
|
380
|
-
_setImage = (request) => this.client.fetch(
|
|
381
|
-
{
|
|
382
|
-
body: JSON.stringify(
|
|
383
|
-
marshalling_gen.marshalSetImageRequest(request, this.client.settings)
|
|
384
|
-
),
|
|
385
|
-
headers: jsonContentHeaders,
|
|
386
|
-
method: "PUT",
|
|
387
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/images/${sdkClient.validatePathParam("id", request.id)}`
|
|
388
|
-
},
|
|
389
|
-
marshalling_gen.unmarshalSetImageResponse
|
|
390
|
-
);
|
|
391
|
-
/**
|
|
392
|
-
* Update image. Update the properties of an image.
|
|
393
|
-
*
|
|
394
|
-
* @param request - The request {@link UpdateImageRequest}
|
|
395
|
-
* @returns A Promise of UpdateImageResponse
|
|
396
|
-
*/
|
|
397
|
-
updateImage = (request) => this.client.fetch(
|
|
398
|
-
{
|
|
399
|
-
body: JSON.stringify(
|
|
400
|
-
marshalling_gen.marshalUpdateImageRequest(request, this.client.settings)
|
|
401
|
-
),
|
|
402
|
-
headers: jsonContentHeaders,
|
|
403
|
-
method: "PATCH",
|
|
404
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}`
|
|
405
|
-
},
|
|
406
|
-
marshalling_gen.unmarshalUpdateImageResponse
|
|
407
|
-
);
|
|
408
|
-
/**
|
|
409
|
-
* Delete an Instance image. Delete the image with the specified ID.
|
|
410
|
-
*
|
|
411
|
-
* @param request - The request {@link DeleteImageRequest}
|
|
412
|
-
*/
|
|
413
|
-
deleteImage = (request) => this.client.fetch({
|
|
414
|
-
method: "DELETE",
|
|
415
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}`
|
|
416
|
-
});
|
|
417
|
-
pageOfListSnapshots = (request = {}) => this.client.fetch(
|
|
418
|
-
{
|
|
419
|
-
method: "GET",
|
|
420
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots`,
|
|
421
|
-
urlParams: sdkClient.urlParams(
|
|
422
|
-
["base_volume_id", request.baseVolumeId],
|
|
423
|
-
["name", request.name],
|
|
424
|
-
["organization", request.organization],
|
|
425
|
-
["page", request.page],
|
|
426
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
427
|
-
["project", request.project],
|
|
428
|
-
["tags", request.tags]
|
|
429
|
-
)
|
|
430
|
-
},
|
|
431
|
-
marshalling_gen.unmarshalListSnapshotsResponse
|
|
432
|
-
);
|
|
433
|
-
/**
|
|
434
|
-
* List snapshots. List all snapshots of an Organization in a specified Availability Zone.
|
|
435
|
-
*
|
|
436
|
-
* @param request - The request {@link ListSnapshotsRequest}
|
|
437
|
-
* @returns A Promise of ListSnapshotsResponse
|
|
438
|
-
*/
|
|
439
|
-
listSnapshots = (request = {}) => sdkClient.enrichForPagination("snapshots", this.pageOfListSnapshots, request);
|
|
440
|
-
/**
|
|
441
|
-
* Create a snapshot from a specified volume or from a QCOW2 file. Create a snapshot from a specified volume or from a QCOW2 file in a specified Availability Zone.
|
|
442
|
-
*
|
|
443
|
-
* @param request - The request {@link CreateSnapshotRequest}
|
|
444
|
-
* @returns A Promise of CreateSnapshotResponse
|
|
445
|
-
*/
|
|
446
|
-
createSnapshot = (request = {}) => this.client.fetch(
|
|
447
|
-
{
|
|
448
|
-
body: JSON.stringify(
|
|
449
|
-
marshalling_gen.marshalCreateSnapshotRequest(request, this.client.settings)
|
|
450
|
-
),
|
|
451
|
-
headers: jsonContentHeaders,
|
|
452
|
-
method: "POST",
|
|
453
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots`
|
|
454
|
-
},
|
|
455
|
-
marshalling_gen.unmarshalCreateSnapshotResponse
|
|
456
|
-
);
|
|
457
|
-
/**
|
|
458
|
-
* Get a snapshot. Get details of a snapshot with the specified ID.
|
|
459
|
-
*
|
|
460
|
-
* @param request - The request {@link GetSnapshotRequest}
|
|
461
|
-
* @returns A Promise of GetSnapshotResponse
|
|
462
|
-
*/
|
|
463
|
-
getSnapshot = (request) => this.client.fetch(
|
|
464
|
-
{
|
|
465
|
-
method: "GET",
|
|
466
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${sdkClient.validatePathParam("snapshotId", request.snapshotId)}`
|
|
467
|
-
},
|
|
468
|
-
marshalling_gen.unmarshalGetSnapshotResponse
|
|
469
|
-
);
|
|
470
|
-
_setSnapshot = (request) => this.client.fetch(
|
|
471
|
-
{
|
|
472
|
-
body: JSON.stringify(
|
|
473
|
-
marshalling_gen.marshalSetSnapshotRequest(request, this.client.settings)
|
|
474
|
-
),
|
|
475
|
-
headers: jsonContentHeaders,
|
|
476
|
-
method: "PUT",
|
|
477
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${sdkClient.validatePathParam("snapshotId", request.snapshotId)}`
|
|
478
|
-
},
|
|
479
|
-
marshalling_gen.unmarshalSetSnapshotResponse
|
|
480
|
-
);
|
|
481
|
-
/**
|
|
482
|
-
* Update a snapshot. Update the properties of a snapshot.
|
|
483
|
-
*
|
|
484
|
-
* @param request - The request {@link UpdateSnapshotRequest}
|
|
485
|
-
* @returns A Promise of UpdateSnapshotResponse
|
|
486
|
-
*/
|
|
487
|
-
updateSnapshot = (request) => this.client.fetch(
|
|
488
|
-
{
|
|
489
|
-
body: JSON.stringify(
|
|
490
|
-
marshalling_gen.marshalUpdateSnapshotRequest(request, this.client.settings)
|
|
491
|
-
),
|
|
492
|
-
headers: jsonContentHeaders,
|
|
493
|
-
method: "PATCH",
|
|
494
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${sdkClient.validatePathParam("snapshotId", request.snapshotId)}`
|
|
495
|
-
},
|
|
496
|
-
marshalling_gen.unmarshalUpdateSnapshotResponse
|
|
497
|
-
);
|
|
498
|
-
/**
|
|
499
|
-
* Delete a snapshot. Delete the snapshot with the specified ID.
|
|
500
|
-
*
|
|
501
|
-
* @param request - The request {@link DeleteSnapshotRequest}
|
|
502
|
-
*/
|
|
503
|
-
deleteSnapshot = (request) => this.client.fetch({
|
|
504
|
-
method: "DELETE",
|
|
505
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${sdkClient.validatePathParam("snapshotId", request.snapshotId)}`
|
|
506
|
-
});
|
|
507
|
-
/**
|
|
508
|
-
* Export a snapshot. Export a snapshot to a specified Object Storage bucket in the same region.
|
|
509
|
-
*
|
|
510
|
-
* @param request - The request {@link ExportSnapshotRequest}
|
|
511
|
-
* @returns A Promise of ExportSnapshotResponse
|
|
512
|
-
*/
|
|
513
|
-
exportSnapshot = (request) => this.client.fetch(
|
|
514
|
-
{
|
|
515
|
-
body: JSON.stringify(
|
|
516
|
-
marshalling_gen.marshalExportSnapshotRequest(request, this.client.settings)
|
|
517
|
-
),
|
|
518
|
-
headers: jsonContentHeaders,
|
|
519
|
-
method: "POST",
|
|
520
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/snapshots/${sdkClient.validatePathParam("snapshotId", request.snapshotId)}/export`
|
|
521
|
-
},
|
|
522
|
-
marshalling_gen.unmarshalExportSnapshotResponse
|
|
523
|
-
);
|
|
524
|
-
pageOfListVolumes = (request = {}) => this.client.fetch(
|
|
525
|
-
{
|
|
526
|
-
method: "GET",
|
|
527
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes`,
|
|
528
|
-
urlParams: sdkClient.urlParams(
|
|
529
|
-
["name", request.name],
|
|
530
|
-
["organization", request.organization],
|
|
531
|
-
["page", request.page],
|
|
532
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
533
|
-
["project", request.project],
|
|
534
|
-
[
|
|
535
|
-
"tags",
|
|
536
|
-
request.tags && request.tags.length > 0 ? request.tags.join(",") : void 0
|
|
537
|
-
],
|
|
538
|
-
["volume_type", request.volumeType]
|
|
539
|
-
)
|
|
540
|
-
},
|
|
541
|
-
marshalling_gen.unmarshalListVolumesResponse
|
|
542
|
-
);
|
|
543
|
-
/**
|
|
544
|
-
* List volumes. List volumes in the specified Availability Zone. You can filter the output by volume type.
|
|
545
|
-
*
|
|
546
|
-
* @param request - The request {@link ListVolumesRequest}
|
|
547
|
-
* @returns A Promise of ListVolumesResponse
|
|
548
|
-
*/
|
|
549
|
-
listVolumes = (request = {}) => sdkClient.enrichForPagination("volumes", this.pageOfListVolumes, request);
|
|
550
|
-
/**
|
|
551
|
-
* Create a volume. Create a volume of a specified type in an Availability Zone.
|
|
552
|
-
*
|
|
553
|
-
* @param request - The request {@link CreateVolumeRequest}
|
|
554
|
-
* @returns A Promise of CreateVolumeResponse
|
|
555
|
-
*/
|
|
556
|
-
createVolume = (request = {}) => this.client.fetch(
|
|
557
|
-
{
|
|
558
|
-
body: JSON.stringify(
|
|
559
|
-
marshalling_gen.marshalCreateVolumeRequest(request, this.client.settings)
|
|
560
|
-
),
|
|
561
|
-
headers: jsonContentHeaders,
|
|
562
|
-
method: "POST",
|
|
563
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes`
|
|
564
|
-
},
|
|
565
|
-
marshalling_gen.unmarshalCreateVolumeResponse
|
|
566
|
-
);
|
|
567
|
-
/**
|
|
568
|
-
* Get a volume. Get details of a volume with the specified ID.
|
|
569
|
-
*
|
|
570
|
-
* @param request - The request {@link GetVolumeRequest}
|
|
571
|
-
* @returns A Promise of GetVolumeResponse
|
|
572
|
-
*/
|
|
573
|
-
getVolume = (request) => this.client.fetch(
|
|
574
|
-
{
|
|
575
|
-
method: "GET",
|
|
576
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${sdkClient.validatePathParam("volumeId", request.volumeId)}`
|
|
577
|
-
},
|
|
578
|
-
marshalling_gen.unmarshalGetVolumeResponse
|
|
579
|
-
);
|
|
580
|
-
/**
|
|
581
|
-
* Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
|
|
582
|
-
*
|
|
583
|
-
* @param request - The request {@link UpdateVolumeRequest}
|
|
584
|
-
* @returns A Promise of UpdateVolumeResponse
|
|
585
|
-
*/
|
|
586
|
-
updateVolume = (request) => this.client.fetch(
|
|
587
|
-
{
|
|
588
|
-
body: JSON.stringify(
|
|
589
|
-
marshalling_gen.marshalUpdateVolumeRequest(request, this.client.settings)
|
|
590
|
-
),
|
|
591
|
-
headers: jsonContentHeaders,
|
|
592
|
-
method: "PATCH",
|
|
593
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${sdkClient.validatePathParam("volumeId", request.volumeId)}`
|
|
594
|
-
},
|
|
595
|
-
marshalling_gen.unmarshalUpdateVolumeResponse
|
|
596
|
-
);
|
|
597
|
-
/**
|
|
598
|
-
* Delete a volume. Delete the volume with the specified ID.
|
|
599
|
-
*
|
|
600
|
-
* @param request - The request {@link DeleteVolumeRequest}
|
|
601
|
-
*/
|
|
602
|
-
deleteVolume = (request) => this.client.fetch({
|
|
603
|
-
method: "DELETE",
|
|
604
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/volumes/${sdkClient.validatePathParam("volumeId", request.volumeId)}`
|
|
605
|
-
});
|
|
606
|
-
pageOfListSecurityGroups = (request = {}) => this.client.fetch(
|
|
607
|
-
{
|
|
608
|
-
method: "GET",
|
|
609
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups`,
|
|
610
|
-
urlParams: sdkClient.urlParams(
|
|
611
|
-
["name", request.name],
|
|
612
|
-
["organization", request.organization],
|
|
613
|
-
["page", request.page],
|
|
614
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
615
|
-
["project", request.project],
|
|
616
|
-
["project_default", request.projectDefault],
|
|
617
|
-
[
|
|
618
|
-
"tags",
|
|
619
|
-
request.tags && request.tags.length > 0 ? request.tags.join(",") : void 0
|
|
620
|
-
]
|
|
621
|
-
)
|
|
622
|
-
},
|
|
623
|
-
marshalling_gen.unmarshalListSecurityGroupsResponse
|
|
624
|
-
);
|
|
625
|
-
/**
|
|
626
|
-
* List security groups. List all existing security groups.
|
|
627
|
-
*
|
|
628
|
-
* @param request - The request {@link ListSecurityGroupsRequest}
|
|
629
|
-
* @returns A Promise of ListSecurityGroupsResponse
|
|
630
|
-
*/
|
|
631
|
-
listSecurityGroups = (request = {}) => sdkClient.enrichForPagination(
|
|
632
|
-
"securityGroups",
|
|
633
|
-
this.pageOfListSecurityGroups,
|
|
634
|
-
request
|
|
635
|
-
);
|
|
636
|
-
/**
|
|
637
|
-
* Create a security group. Create a security group with a specified name and description.
|
|
638
|
-
*
|
|
639
|
-
* @param request - The request {@link CreateSecurityGroupRequest}
|
|
640
|
-
* @returns A Promise of CreateSecurityGroupResponse
|
|
641
|
-
*/
|
|
642
|
-
createSecurityGroup = (request) => this.client.fetch(
|
|
643
|
-
{
|
|
644
|
-
body: JSON.stringify(
|
|
645
|
-
marshalling_gen.marshalCreateSecurityGroupRequest(request, this.client.settings)
|
|
646
|
-
),
|
|
647
|
-
headers: jsonContentHeaders,
|
|
648
|
-
method: "POST",
|
|
649
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups`
|
|
650
|
-
},
|
|
651
|
-
marshalling_gen.unmarshalCreateSecurityGroupResponse
|
|
652
|
-
);
|
|
653
|
-
/**
|
|
654
|
-
* Get a security group. Get the details of a security group with the specified ID.
|
|
655
|
-
*
|
|
656
|
-
* @param request - The request {@link GetSecurityGroupRequest}
|
|
657
|
-
* @returns A Promise of GetSecurityGroupResponse
|
|
658
|
-
*/
|
|
659
|
-
getSecurityGroup = (request) => this.client.fetch(
|
|
660
|
-
{
|
|
661
|
-
method: "GET",
|
|
662
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}`
|
|
663
|
-
},
|
|
664
|
-
marshalling_gen.unmarshalGetSecurityGroupResponse
|
|
665
|
-
);
|
|
666
|
-
/**
|
|
667
|
-
* Delete a security group. Delete a security group with the specified ID.
|
|
668
|
-
*
|
|
669
|
-
* @param request - The request {@link DeleteSecurityGroupRequest}
|
|
670
|
-
*/
|
|
671
|
-
deleteSecurityGroup = (request) => this.client.fetch({
|
|
672
|
-
method: "DELETE",
|
|
673
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}`
|
|
674
|
-
});
|
|
675
|
-
_setSecurityGroup = (request) => this.client.fetch(
|
|
676
|
-
{
|
|
677
|
-
body: JSON.stringify(
|
|
678
|
-
marshalling_gen.marshalSetSecurityGroupRequest(request, this.client.settings)
|
|
679
|
-
),
|
|
680
|
-
headers: jsonContentHeaders,
|
|
681
|
-
method: "PUT",
|
|
682
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("id", request.id)}`
|
|
683
|
-
},
|
|
684
|
-
marshalling_gen.unmarshalSetSecurityGroupResponse
|
|
685
|
-
);
|
|
686
|
-
/**
|
|
687
|
-
* Update a security group. Update the properties of security group.
|
|
688
|
-
*
|
|
689
|
-
* @param request - The request {@link UpdateSecurityGroupRequest}
|
|
690
|
-
* @returns A Promise of UpdateSecurityGroupResponse
|
|
691
|
-
*/
|
|
692
|
-
updateSecurityGroup = (request) => this.client.fetch(
|
|
693
|
-
{
|
|
694
|
-
body: JSON.stringify(
|
|
695
|
-
marshalling_gen.marshalUpdateSecurityGroupRequest(request, this.client.settings)
|
|
696
|
-
),
|
|
697
|
-
headers: jsonContentHeaders,
|
|
698
|
-
method: "PATCH",
|
|
699
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}`
|
|
700
|
-
},
|
|
701
|
-
marshalling_gen.unmarshalUpdateSecurityGroupResponse
|
|
702
|
-
);
|
|
703
|
-
/**
|
|
704
|
-
* Get default rules. Lists the default rules applied to all the security groups.
|
|
705
|
-
*
|
|
706
|
-
* @param request - The request {@link ListDefaultSecurityGroupRulesRequest}
|
|
707
|
-
* @returns A Promise of ListSecurityGroupRulesResponse
|
|
708
|
-
*/
|
|
709
|
-
listDefaultSecurityGroupRules = (request = {}) => this.client.fetch(
|
|
710
|
-
{
|
|
711
|
-
method: "GET",
|
|
712
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/default/rules`
|
|
713
|
-
},
|
|
714
|
-
marshalling_gen.unmarshalListSecurityGroupRulesResponse
|
|
715
|
-
);
|
|
716
|
-
pageOfListSecurityGroupRules = (request) => this.client.fetch(
|
|
717
|
-
{
|
|
718
|
-
method: "GET",
|
|
719
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules`,
|
|
720
|
-
urlParams: sdkClient.urlParams(
|
|
721
|
-
["page", request.page],
|
|
722
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize]
|
|
723
|
-
)
|
|
724
|
-
},
|
|
725
|
-
marshalling_gen.unmarshalListSecurityGroupRulesResponse
|
|
726
|
-
);
|
|
727
|
-
/**
|
|
728
|
-
* List rules. List the rules of the a specified security group ID.
|
|
729
|
-
*
|
|
730
|
-
* @param request - The request {@link ListSecurityGroupRulesRequest}
|
|
731
|
-
* @returns A Promise of ListSecurityGroupRulesResponse
|
|
732
|
-
*/
|
|
733
|
-
listSecurityGroupRules = (request) => sdkClient.enrichForPagination("rules", this.pageOfListSecurityGroupRules, request);
|
|
734
|
-
/**
|
|
735
|
-
* Create rule. Create a rule in the specified security group ID.
|
|
736
|
-
*
|
|
737
|
-
* @param request - The request {@link CreateSecurityGroupRuleRequest}
|
|
738
|
-
* @returns A Promise of CreateSecurityGroupRuleResponse
|
|
739
|
-
*/
|
|
740
|
-
createSecurityGroupRule = (request) => this.client.fetch(
|
|
741
|
-
{
|
|
742
|
-
body: JSON.stringify(
|
|
743
|
-
marshalling_gen.marshalCreateSecurityGroupRuleRequest(request, this.client.settings)
|
|
744
|
-
),
|
|
745
|
-
headers: jsonContentHeaders,
|
|
746
|
-
method: "POST",
|
|
747
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules`
|
|
748
|
-
},
|
|
749
|
-
marshalling_gen.unmarshalCreateSecurityGroupRuleResponse
|
|
750
|
-
);
|
|
751
|
-
/**
|
|
752
|
-
* Update all the rules of a security group. Replaces the existing rules of the security group with the rules provided. This endpoint supports the update of existing rules, creation of new rules and deletion of existing rules when they are not passed in the request.
|
|
753
|
-
*
|
|
754
|
-
* @param request - The request {@link SetSecurityGroupRulesRequest}
|
|
755
|
-
* @returns A Promise of SetSecurityGroupRulesResponse
|
|
756
|
-
*/
|
|
757
|
-
setSecurityGroupRules = (request) => this.client.fetch(
|
|
758
|
-
{
|
|
759
|
-
body: JSON.stringify(
|
|
760
|
-
marshalling_gen.marshalSetSecurityGroupRulesRequest(request, this.client.settings)
|
|
761
|
-
),
|
|
762
|
-
headers: jsonContentHeaders,
|
|
763
|
-
method: "PUT",
|
|
764
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules`
|
|
765
|
-
},
|
|
766
|
-
marshalling_gen.unmarshalSetSecurityGroupRulesResponse
|
|
767
|
-
);
|
|
768
|
-
/**
|
|
769
|
-
* Delete rule. Delete a security group rule with the specified ID.
|
|
770
|
-
*
|
|
771
|
-
* @param request - The request {@link DeleteSecurityGroupRuleRequest}
|
|
772
|
-
*/
|
|
773
|
-
deleteSecurityGroupRule = (request) => this.client.fetch({
|
|
774
|
-
method: "DELETE",
|
|
775
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules/${sdkClient.validatePathParam("securityGroupRuleId", request.securityGroupRuleId)}`
|
|
776
|
-
});
|
|
777
|
-
/**
|
|
778
|
-
* Get rule. Get details of a security group rule with the specified ID.
|
|
779
|
-
*
|
|
780
|
-
* @param request - The request {@link GetSecurityGroupRuleRequest}
|
|
781
|
-
* @returns A Promise of GetSecurityGroupRuleResponse
|
|
782
|
-
*/
|
|
783
|
-
getSecurityGroupRule = (request) => this.client.fetch(
|
|
784
|
-
{
|
|
785
|
-
method: "GET",
|
|
786
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules/${sdkClient.validatePathParam("securityGroupRuleId", request.securityGroupRuleId)}`
|
|
787
|
-
},
|
|
788
|
-
marshalling_gen.unmarshalGetSecurityGroupRuleResponse
|
|
789
|
-
);
|
|
790
|
-
_setSecurityGroupRule = (request) => this.client.fetch(
|
|
791
|
-
{
|
|
792
|
-
body: JSON.stringify(
|
|
793
|
-
marshalling_gen.marshalSetSecurityGroupRuleRequest(request, this.client.settings)
|
|
794
|
-
),
|
|
795
|
-
headers: jsonContentHeaders,
|
|
796
|
-
method: "PUT",
|
|
797
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules/${sdkClient.validatePathParam("securityGroupRuleId", request.securityGroupRuleId)}`
|
|
798
|
-
},
|
|
799
|
-
marshalling_gen.unmarshalSetSecurityGroupRuleResponse
|
|
800
|
-
);
|
|
801
|
-
/**
|
|
802
|
-
* Update security group rule. Update the properties of a rule from a specified security group.
|
|
803
|
-
*
|
|
804
|
-
* @param request - The request {@link UpdateSecurityGroupRuleRequest}
|
|
805
|
-
* @returns A Promise of UpdateSecurityGroupRuleResponse
|
|
806
|
-
*/
|
|
807
|
-
updateSecurityGroupRule = (request) => this.client.fetch(
|
|
808
|
-
{
|
|
809
|
-
body: JSON.stringify(
|
|
810
|
-
marshalling_gen.marshalUpdateSecurityGroupRuleRequest(request, this.client.settings)
|
|
811
|
-
),
|
|
812
|
-
headers: jsonContentHeaders,
|
|
813
|
-
method: "PATCH",
|
|
814
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/security_groups/${sdkClient.validatePathParam("securityGroupId", request.securityGroupId)}/rules/${sdkClient.validatePathParam("securityGroupRuleId", request.securityGroupRuleId)}`
|
|
815
|
-
},
|
|
816
|
-
marshalling_gen.unmarshalUpdateSecurityGroupRuleResponse
|
|
817
|
-
);
|
|
818
|
-
pageOfListPlacementGroups = (request = {}) => this.client.fetch(
|
|
819
|
-
{
|
|
820
|
-
method: "GET",
|
|
821
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups`,
|
|
822
|
-
urlParams: sdkClient.urlParams(
|
|
823
|
-
["name", request.name],
|
|
824
|
-
["organization", request.organization],
|
|
825
|
-
["page", request.page],
|
|
826
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
827
|
-
["project", request.project],
|
|
828
|
-
[
|
|
829
|
-
"tags",
|
|
830
|
-
request.tags && request.tags.length > 0 ? request.tags.join(",") : void 0
|
|
831
|
-
]
|
|
832
|
-
)
|
|
833
|
-
},
|
|
834
|
-
marshalling_gen.unmarshalListPlacementGroupsResponse
|
|
835
|
-
);
|
|
836
|
-
/**
|
|
837
|
-
* List placement groups. List all placement groups in a specified Availability Zone.
|
|
838
|
-
*
|
|
839
|
-
* @param request - The request {@link ListPlacementGroupsRequest}
|
|
840
|
-
* @returns A Promise of ListPlacementGroupsResponse
|
|
841
|
-
*/
|
|
842
|
-
listPlacementGroups = (request = {}) => sdkClient.enrichForPagination(
|
|
843
|
-
"placementGroups",
|
|
844
|
-
this.pageOfListPlacementGroups,
|
|
845
|
-
request
|
|
846
|
-
);
|
|
847
|
-
/**
|
|
848
|
-
* Create a placement group. Create a new placement group in a specified Availability Zone.
|
|
849
|
-
*
|
|
850
|
-
* @param request - The request {@link CreatePlacementGroupRequest}
|
|
851
|
-
* @returns A Promise of CreatePlacementGroupResponse
|
|
852
|
-
*/
|
|
853
|
-
createPlacementGroup = (request = {}) => this.client.fetch(
|
|
854
|
-
{
|
|
855
|
-
body: JSON.stringify(
|
|
856
|
-
marshalling_gen.marshalCreatePlacementGroupRequest(request, this.client.settings)
|
|
857
|
-
),
|
|
858
|
-
headers: jsonContentHeaders,
|
|
859
|
-
method: "POST",
|
|
860
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups`
|
|
861
|
-
},
|
|
862
|
-
marshalling_gen.unmarshalCreatePlacementGroupResponse
|
|
863
|
-
);
|
|
864
|
-
/**
|
|
865
|
-
* Get a placement group. Get the specified placement group.
|
|
866
|
-
*
|
|
867
|
-
* @param request - The request {@link GetPlacementGroupRequest}
|
|
868
|
-
* @returns A Promise of GetPlacementGroupResponse
|
|
869
|
-
*/
|
|
870
|
-
getPlacementGroup = (request) => this.client.fetch(
|
|
871
|
-
{
|
|
872
|
-
method: "GET",
|
|
873
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}`
|
|
874
|
-
},
|
|
875
|
-
marshalling_gen.unmarshalGetPlacementGroupResponse
|
|
876
|
-
);
|
|
877
|
-
/**
|
|
878
|
-
* Set placement group. Set all parameters of the specified placement group.
|
|
879
|
-
*
|
|
880
|
-
* @param request - The request {@link SetPlacementGroupRequest}
|
|
881
|
-
* @returns A Promise of SetPlacementGroupResponse
|
|
882
|
-
*/
|
|
883
|
-
setPlacementGroup = (request) => this.client.fetch(
|
|
884
|
-
{
|
|
885
|
-
body: JSON.stringify(
|
|
886
|
-
marshalling_gen.marshalSetPlacementGroupRequest(request, this.client.settings)
|
|
887
|
-
),
|
|
888
|
-
headers: jsonContentHeaders,
|
|
889
|
-
method: "PUT",
|
|
890
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}`
|
|
891
|
-
},
|
|
892
|
-
marshalling_gen.unmarshalSetPlacementGroupResponse
|
|
893
|
-
);
|
|
894
|
-
/**
|
|
895
|
-
* Update a placement group. Update one or more parameter of the specified placement group.
|
|
896
|
-
*
|
|
897
|
-
* @param request - The request {@link UpdatePlacementGroupRequest}
|
|
898
|
-
* @returns A Promise of UpdatePlacementGroupResponse
|
|
899
|
-
*/
|
|
900
|
-
updatePlacementGroup = (request) => this.client.fetch(
|
|
901
|
-
{
|
|
902
|
-
body: JSON.stringify(
|
|
903
|
-
marshalling_gen.marshalUpdatePlacementGroupRequest(request, this.client.settings)
|
|
904
|
-
),
|
|
905
|
-
headers: jsonContentHeaders,
|
|
906
|
-
method: "PATCH",
|
|
907
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}`
|
|
908
|
-
},
|
|
909
|
-
marshalling_gen.unmarshalUpdatePlacementGroupResponse
|
|
910
|
-
);
|
|
911
|
-
/**
|
|
912
|
-
* Delete the specified placement group.
|
|
913
|
-
*
|
|
914
|
-
* @param request - The request {@link DeletePlacementGroupRequest}
|
|
915
|
-
*/
|
|
916
|
-
deletePlacementGroup = (request) => this.client.fetch({
|
|
917
|
-
method: "DELETE",
|
|
918
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}`
|
|
919
|
-
});
|
|
920
|
-
/**
|
|
921
|
-
* Get placement group servers. Get all Instances belonging to the specified placement group.
|
|
922
|
-
*
|
|
923
|
-
* @param request - The request {@link GetPlacementGroupServersRequest}
|
|
924
|
-
* @returns A Promise of GetPlacementGroupServersResponse
|
|
925
|
-
*/
|
|
926
|
-
getPlacementGroupServers = (request) => this.client.fetch(
|
|
927
|
-
{
|
|
928
|
-
method: "GET",
|
|
929
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}/servers`
|
|
930
|
-
},
|
|
931
|
-
marshalling_gen.unmarshalGetPlacementGroupServersResponse
|
|
932
|
-
);
|
|
933
|
-
/**
|
|
934
|
-
* Set placement group servers. Set all Instances belonging to the specified placement group.
|
|
935
|
-
*
|
|
936
|
-
* @param request - The request {@link SetPlacementGroupServersRequest}
|
|
937
|
-
* @returns A Promise of SetPlacementGroupServersResponse
|
|
938
|
-
*/
|
|
939
|
-
setPlacementGroupServers = (request) => this.client.fetch(
|
|
940
|
-
{
|
|
941
|
-
body: JSON.stringify(
|
|
942
|
-
marshalling_gen.marshalSetPlacementGroupServersRequest(request, this.client.settings)
|
|
943
|
-
),
|
|
944
|
-
headers: jsonContentHeaders,
|
|
945
|
-
method: "PUT",
|
|
946
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}/servers`
|
|
947
|
-
},
|
|
948
|
-
marshalling_gen.unmarshalSetPlacementGroupServersResponse
|
|
949
|
-
);
|
|
950
|
-
/**
|
|
951
|
-
* Update placement group servers. Update all Instances belonging to the specified placement group.
|
|
952
|
-
*
|
|
953
|
-
* @param request - The request {@link UpdatePlacementGroupServersRequest}
|
|
954
|
-
* @returns A Promise of UpdatePlacementGroupServersResponse
|
|
955
|
-
*/
|
|
956
|
-
updatePlacementGroupServers = (request) => this.client.fetch(
|
|
957
|
-
{
|
|
958
|
-
body: JSON.stringify(
|
|
959
|
-
marshalling_gen.marshalUpdatePlacementGroupServersRequest(
|
|
960
|
-
request,
|
|
961
|
-
this.client.settings
|
|
962
|
-
)
|
|
963
|
-
),
|
|
964
|
-
headers: jsonContentHeaders,
|
|
965
|
-
method: "PATCH",
|
|
966
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/placement_groups/${sdkClient.validatePathParam("placementGroupId", request.placementGroupId)}/servers`
|
|
967
|
-
},
|
|
968
|
-
marshalling_gen.unmarshalUpdatePlacementGroupServersResponse
|
|
969
|
-
);
|
|
970
|
-
pageOfListIps = (request = {}) => this.client.fetch(
|
|
971
|
-
{
|
|
972
|
-
method: "GET",
|
|
973
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`,
|
|
974
|
-
urlParams: sdkClient.urlParams(
|
|
975
|
-
["name", request.name],
|
|
976
|
-
["organization", request.organization],
|
|
977
|
-
["page", request.page],
|
|
978
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
979
|
-
["project", request.project],
|
|
980
|
-
[
|
|
981
|
-
"tags",
|
|
982
|
-
request.tags && request.tags.length > 0 ? request.tags.join(",") : void 0
|
|
983
|
-
],
|
|
984
|
-
["type", request.type]
|
|
985
|
-
)
|
|
986
|
-
},
|
|
987
|
-
marshalling_gen.unmarshalListIpsResponse
|
|
988
|
-
);
|
|
989
|
-
/**
|
|
990
|
-
* List all flexible IPs. List all flexible IPs in a specified zone.
|
|
991
|
-
*
|
|
992
|
-
* @param request - The request {@link ListIpsRequest}
|
|
993
|
-
* @returns A Promise of ListIpsResponse
|
|
994
|
-
*/
|
|
995
|
-
listIps = (request = {}) => sdkClient.enrichForPagination("ips", this.pageOfListIps, request);
|
|
996
|
-
/**
|
|
997
|
-
* Reserve a flexible IP. Reserve a flexible IP and attach it to the specified Instance.
|
|
998
|
-
*
|
|
999
|
-
* @param request - The request {@link CreateIpRequest}
|
|
1000
|
-
* @returns A Promise of CreateIpResponse
|
|
1001
|
-
*/
|
|
1002
|
-
createIp = (request = {}) => this.client.fetch(
|
|
1003
|
-
{
|
|
1004
|
-
body: JSON.stringify(
|
|
1005
|
-
marshalling_gen.marshalCreateIpRequest(request, this.client.settings)
|
|
1006
|
-
),
|
|
1007
|
-
headers: jsonContentHeaders,
|
|
1008
|
-
method: "POST",
|
|
1009
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`
|
|
1010
|
-
},
|
|
1011
|
-
marshalling_gen.unmarshalCreateIpResponse
|
|
1012
|
-
);
|
|
1013
|
-
/**
|
|
1014
|
-
* Get a flexible IP. Get details of an IP with the specified ID or address.
|
|
1015
|
-
*
|
|
1016
|
-
* @param request - The request {@link GetIpRequest}
|
|
1017
|
-
* @returns A Promise of GetIpResponse
|
|
1018
|
-
*/
|
|
1019
|
-
getIp = (request) => this.client.fetch(
|
|
1020
|
-
{
|
|
1021
|
-
method: "GET",
|
|
1022
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ip", request.ip)}`
|
|
1023
|
-
},
|
|
1024
|
-
marshalling_gen.unmarshalGetIpResponse
|
|
1025
|
-
);
|
|
1026
|
-
/**
|
|
1027
|
-
* Update a flexible IP. Update a flexible IP in the specified zone with the specified ID.
|
|
1028
|
-
*
|
|
1029
|
-
* @param request - The request {@link UpdateIpRequest}
|
|
1030
|
-
* @returns A Promise of UpdateIpResponse
|
|
1031
|
-
*/
|
|
1032
|
-
updateIp = (request) => this.client.fetch(
|
|
1033
|
-
{
|
|
1034
|
-
body: JSON.stringify(
|
|
1035
|
-
marshalling_gen.marshalUpdateIpRequest(request, this.client.settings)
|
|
1036
|
-
),
|
|
1037
|
-
headers: jsonContentHeaders,
|
|
1038
|
-
method: "PATCH",
|
|
1039
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ip", request.ip)}`
|
|
1040
|
-
},
|
|
1041
|
-
marshalling_gen.unmarshalUpdateIpResponse
|
|
1042
|
-
);
|
|
1043
|
-
/**
|
|
1044
|
-
* Delete a flexible IP. Delete the IP with the specified ID.
|
|
1045
|
-
*
|
|
1046
|
-
* @param request - The request {@link DeleteIpRequest}
|
|
1047
|
-
*/
|
|
1048
|
-
deleteIp = (request) => this.client.fetch({
|
|
1049
|
-
method: "DELETE",
|
|
1050
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ip", request.ip)}`
|
|
1051
|
-
});
|
|
1052
|
-
pageOfListPrivateNICs = (request) => this.client.fetch(
|
|
1053
|
-
{
|
|
1054
|
-
method: "GET",
|
|
1055
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/private_nics`,
|
|
1056
|
-
urlParams: sdkClient.urlParams(
|
|
1057
|
-
["page", request.page],
|
|
1058
|
-
["per_page", request.perPage ?? this.client.settings.defaultPageSize],
|
|
1059
|
-
[
|
|
1060
|
-
"tags",
|
|
1061
|
-
request.tags && request.tags.length > 0 ? request.tags.join(",") : void 0
|
|
1062
|
-
]
|
|
1063
|
-
)
|
|
1064
|
-
},
|
|
1065
|
-
marshalling_gen.unmarshalListPrivateNICsResponse
|
|
1066
|
-
);
|
|
1067
|
-
/**
|
|
1068
|
-
* List all private NICs. List all private NICs of a specified Instance.
|
|
1069
|
-
*
|
|
1070
|
-
* @param request - The request {@link ListPrivateNICsRequest}
|
|
1071
|
-
* @returns A Promise of ListPrivateNICsResponse
|
|
1072
|
-
*/
|
|
1073
|
-
listPrivateNICs = (request) => sdkClient.enrichForPagination("privateNics", this.pageOfListPrivateNICs, request);
|
|
1074
|
-
/**
|
|
1075
|
-
* Create a private NIC connecting an Instance to a Private Network.
|
|
1076
|
-
*
|
|
1077
|
-
* @param request - The request {@link CreatePrivateNICRequest}
|
|
1078
|
-
* @returns A Promise of CreatePrivateNICResponse
|
|
1079
|
-
*/
|
|
1080
|
-
createPrivateNIC = (request) => this.client.fetch(
|
|
1081
|
-
{
|
|
1082
|
-
body: JSON.stringify(
|
|
1083
|
-
marshalling_gen.marshalCreatePrivateNICRequest(request, this.client.settings)
|
|
1084
|
-
),
|
|
1085
|
-
headers: jsonContentHeaders,
|
|
1086
|
-
method: "POST",
|
|
1087
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/private_nics`
|
|
1088
|
-
},
|
|
1089
|
-
marshalling_gen.unmarshalCreatePrivateNICResponse
|
|
1090
|
-
);
|
|
1091
|
-
/**
|
|
1092
|
-
* Get a private NIC. Get private NIC properties.
|
|
1093
|
-
*
|
|
1094
|
-
* @param request - The request {@link GetPrivateNICRequest}
|
|
1095
|
-
* @returns A Promise of GetPrivateNICResponse
|
|
1096
|
-
*/
|
|
1097
|
-
getPrivateNIC = (request) => this.client.fetch(
|
|
1098
|
-
{
|
|
1099
|
-
method: "GET",
|
|
1100
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/private_nics/${sdkClient.validatePathParam("privateNicId", request.privateNicId)}`
|
|
1101
|
-
},
|
|
1102
|
-
marshalling_gen.unmarshalGetPrivateNICResponse
|
|
1103
|
-
);
|
|
1104
|
-
/**
|
|
1105
|
-
* Update a private NIC. Update one or more parameter(s) of a specified private NIC.
|
|
1106
|
-
*
|
|
1107
|
-
* @param request - The request {@link UpdatePrivateNICRequest}
|
|
1108
|
-
* @returns A Promise of PrivateNIC
|
|
1109
|
-
*/
|
|
1110
|
-
updatePrivateNIC = (request) => this.client.fetch(
|
|
1111
|
-
{
|
|
1112
|
-
body: JSON.stringify(
|
|
1113
|
-
marshalling_gen.marshalUpdatePrivateNICRequest(request, this.client.settings)
|
|
1114
|
-
),
|
|
1115
|
-
headers: jsonContentHeaders,
|
|
1116
|
-
method: "PATCH",
|
|
1117
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/private_nics/${sdkClient.validatePathParam("privateNicId", request.privateNicId)}`
|
|
1118
|
-
},
|
|
1119
|
-
marshalling_gen.unmarshalPrivateNIC
|
|
1120
|
-
);
|
|
1121
|
-
/**
|
|
1122
|
-
* Delete a private NIC.
|
|
1123
|
-
*
|
|
1124
|
-
* @param request - The request {@link DeletePrivateNICRequest}
|
|
1125
|
-
*/
|
|
1126
|
-
deletePrivateNIC = (request) => this.client.fetch({
|
|
1127
|
-
method: "DELETE",
|
|
1128
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${sdkClient.validatePathParam("serverId", request.serverId)}/private_nics/${sdkClient.validatePathParam("privateNicId", request.privateNicId)}`
|
|
1129
|
-
});
|
|
1130
|
-
getDashboard = (request = {}) => this.client.fetch(
|
|
1131
|
-
{
|
|
1132
|
-
method: "GET",
|
|
1133
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dashboard`,
|
|
1134
|
-
urlParams: sdkClient.urlParams(
|
|
1135
|
-
["organization", request.organization],
|
|
1136
|
-
["project", request.project]
|
|
1137
|
-
)
|
|
1138
|
-
},
|
|
1139
|
-
marshalling_gen.unmarshalGetDashboardResponse
|
|
1140
|
-
);
|
|
1141
|
-
/**
|
|
1142
|
-
* Get a volume or snapshot's migration plan. Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward.
|
|
1143
|
-
The endpoint returns the resources that should be migrated together:
|
|
1144
|
-
- the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
|
|
1145
|
-
- the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration.
|
|
1146
|
-
The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated.
|
|
1147
|
-
*
|
|
1148
|
-
* @param request - The request {@link PlanBlockMigrationRequest}
|
|
1149
|
-
* @returns A Promise of MigrationPlan
|
|
1150
|
-
*/
|
|
1151
|
-
planBlockMigration = (request = {}) => this.client.fetch(
|
|
1152
|
-
{
|
|
1153
|
-
body: JSON.stringify(
|
|
1154
|
-
marshalling_gen.marshalPlanBlockMigrationRequest(request, this.client.settings)
|
|
1155
|
-
),
|
|
1156
|
-
headers: jsonContentHeaders,
|
|
1157
|
-
method: "POST",
|
|
1158
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/block-migration/plan`
|
|
1159
|
-
},
|
|
1160
|
-
marshalling_gen.unmarshalMigrationPlan
|
|
1161
|
-
);
|
|
1162
|
-
/**
|
|
1163
|
-
* Migrate a volume and/or snapshots to SBS (Scaleway Block Storage). To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
|
|
1164
|
-
*
|
|
1165
|
-
* @param request - The request {@link ApplyBlockMigrationRequest}
|
|
1166
|
-
*/
|
|
1167
|
-
applyBlockMigration = (request) => this.client.fetch({
|
|
1168
|
-
body: JSON.stringify(
|
|
1169
|
-
marshalling_gen.marshalApplyBlockMigrationRequest(request, this.client.settings)
|
|
1170
|
-
),
|
|
1171
|
-
headers: jsonContentHeaders,
|
|
1172
|
-
method: "POST",
|
|
1173
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/block-migration/apply`
|
|
1174
|
-
});
|
|
1175
|
-
checkBlockMigrationOrganizationQuotas = (request = {}) => this.client.fetch({
|
|
1176
|
-
body: JSON.stringify(
|
|
1177
|
-
marshalling_gen.marshalCheckBlockMigrationOrganizationQuotasRequest(
|
|
1178
|
-
request,
|
|
1179
|
-
this.client.settings
|
|
1180
|
-
)
|
|
1181
|
-
),
|
|
1182
|
-
headers: jsonContentHeaders,
|
|
1183
|
-
method: "POST",
|
|
1184
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/block-migration/check-organization-quotas`
|
|
1185
|
-
});
|
|
1186
|
-
/**
|
|
1187
|
-
* Releases the reserved IP without deleting the reservation.. **The IP remains available in IPAM**, which means that it is still reserved by the Organization, and can be reattached to another resource (Instance or other product).
|
|
1188
|
-
*
|
|
1189
|
-
* @param request - The request {@link ReleaseIpToIpamRequest}
|
|
1190
|
-
*/
|
|
1191
|
-
releaseIpToIpam = (request) => this.client.fetch({
|
|
1192
|
-
body: "{}",
|
|
1193
|
-
headers: jsonContentHeaders,
|
|
1194
|
-
method: "POST",
|
|
1195
|
-
path: `/instance/v1/zones/${sdkClient.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${sdkClient.validatePathParam("ipId", request.ipId)}/release-to-ipam`
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
|
-
exports.API = API;
|