@scaleway/sdk-baremetal 1.0.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.
@@ -0,0 +1,279 @@
1
+ import { API as ParentAPI } from '@scaleway/sdk-client';
2
+ import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client';
3
+ import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, InstallServerRequest, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
4
+ /**
5
+ * Elastic Metal API.
6
+
7
+ This API allows you to manage your Elastic Metal servers.
8
+ */
9
+ export declare class API extends ParentAPI {
10
+ /** Lists the available zones of the API. */
11
+ static readonly LOCALITIES: ScwZone[];
12
+ protected pageOfListServers: (request?: Readonly<ListServersRequest>) => Promise<ListServersResponse>;
13
+ /**
14
+ * List Elastic Metal servers for an Organization. List Elastic Metal servers for a specific Organization.
15
+ *
16
+ * @param request - The request {@link ListServersRequest}
17
+ * @returns A Promise of ListServersResponse
18
+ */
19
+ listServers: (request?: Readonly<ListServersRequest>) => Promise<ListServersResponse> & {
20
+ all: () => Promise<Server[]>;
21
+ [Symbol.asyncIterator]: () => AsyncGenerator<Server[], void, void>;
22
+ };
23
+ /**
24
+ * Get a specific Elastic Metal server. Get full details of an existing Elastic Metal server associated with the ID.
25
+ *
26
+ * @param request - The request {@link GetServerRequest}
27
+ * @returns A Promise of Server
28
+ */
29
+ getServer: (request: Readonly<GetServerRequest>) => Promise<Server>;
30
+ /**
31
+ * Waits for {@link Server} to be in a final state.
32
+ *
33
+ * @param request - The request {@link GetServerRequest}
34
+ * @param options - The waiting options
35
+ * @returns A Promise of Server
36
+ */
37
+ waitForServer: (request: Readonly<GetServerRequest>, options?: Readonly<WaitForOptions<Server>>) => Promise<Server>;
38
+ /**
39
+ * Create an Elastic Metal server. Create a new Elastic Metal server. Once the server is created, proceed with the [installation of an OS](#post-3e949e).
40
+ *
41
+ * @param request - The request {@link CreateServerRequest}
42
+ * @returns A Promise of Server
43
+ */
44
+ createServer: (request: Readonly<CreateServerRequest>) => Promise<Server>;
45
+ /**
46
+ * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.
47
+ *
48
+ * @param request - The request {@link UpdateServerRequest}
49
+ * @returns A Promise of Server
50
+ */
51
+ updateServer: (request: Readonly<UpdateServerRequest>) => Promise<Server>;
52
+ /**
53
+ * Install an Elastic Metal server. Install an Operating System (OS) on the Elastic Metal server with a specific ID.
54
+ *
55
+ * @param request - The request {@link InstallServerRequest}
56
+ * @returns A Promise of Server
57
+ */
58
+ installServer: (request: Readonly<InstallServerRequest>) => Promise<Server>;
59
+ /**
60
+ * Return server metrics. Get the ping status of the server associated with the ID.
61
+ *
62
+ * @param request - The request {@link GetServerMetricsRequest}
63
+ * @returns A Promise of GetServerMetricsResponse
64
+ */
65
+ getServerMetrics: (request: Readonly<GetServerMetricsRequest>) => Promise<GetServerMetricsResponse>;
66
+ /**
67
+ * Delete an Elastic Metal server. Delete the server associated with the ID.
68
+ *
69
+ * @param request - The request {@link DeleteServerRequest}
70
+ * @returns A Promise of Server
71
+ */
72
+ deleteServer: (request: Readonly<DeleteServerRequest>) => Promise<Server>;
73
+ /**
74
+ * Reboot an Elastic Metal server. Reboot the Elastic Metal server associated with the ID, use the `boot_type` `rescue` to reboot the server in rescue mode.
75
+ *
76
+ * @param request - The request {@link RebootServerRequest}
77
+ * @returns A Promise of Server
78
+ */
79
+ rebootServer: (request: Readonly<RebootServerRequest>) => Promise<Server>;
80
+ /**
81
+ * Start an Elastic Metal server. Start the server associated with the ID.
82
+ *
83
+ * @param request - The request {@link StartServerRequest}
84
+ * @returns A Promise of Server
85
+ */
86
+ startServer: (request: Readonly<StartServerRequest>) => Promise<Server>;
87
+ /**
88
+ * Stop an Elastic Metal server. Stop the server associated with the ID. The server remains allocated to your account and all data remains on the local storage of the server.
89
+ *
90
+ * @param request - The request {@link StopServerRequest}
91
+ * @returns A Promise of Server
92
+ */
93
+ stopServer: (request: Readonly<StopServerRequest>) => Promise<Server>;
94
+ protected pageOfListServerEvents: (request: Readonly<ListServerEventsRequest>) => Promise<ListServerEventsResponse>;
95
+ /**
96
+ * List server events. List event (i.e. start/stop/reboot) associated to the server ID.
97
+ *
98
+ * @param request - The request {@link ListServerEventsRequest}
99
+ * @returns A Promise of ListServerEventsResponse
100
+ */
101
+ listServerEvents: (request: Readonly<ListServerEventsRequest>) => Promise<ListServerEventsResponse> & {
102
+ all: () => Promise<import("./types.gen").ServerEvent[]>;
103
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ServerEvent[], void, void>;
104
+ };
105
+ /**
106
+ * Get default partitioning schema. Get the default partitioning schema for the given offer ID and OS ID.
107
+ *
108
+ * @param request - The request {@link GetDefaultPartitioningSchemaRequest}
109
+ * @returns A Promise of Schema
110
+ */
111
+ getDefaultPartitioningSchema: (request: Readonly<GetDefaultPartitioningSchemaRequest>) => Promise<Schema>;
112
+ /**
113
+ * Validate client partitioning schema. Validate the incoming partitioning schema from a user before installing the server. Return default ErrorCode if invalid.
114
+ *
115
+ * @param request - The request {@link ValidatePartitioningSchemaRequest}
116
+ */
117
+ validatePartitioningSchema: (request: Readonly<ValidatePartitioningSchemaRequest>) => Promise<void>;
118
+ /**
119
+ * Start BMC access. Start BMC (Baseboard Management Controller) access associated with the ID.
120
+ The BMC (Baseboard Management Controller) access is available one hour after the installation of the server.
121
+ You need first to create an option Remote Access. You will find the ID and the price with a call to listOffers (https://developers.scaleway.com/en/products/baremetal/api/#get-78db92). Then add the option https://developers.scaleway.com/en/products/baremetal/api/#post-b14abd.
122
+ After adding the BMC option, you need to Get Remote Access to get the login/password https://developers.scaleway.com/en/products/baremetal/api/#get-cefc0f. Do not forget to delete the Option after use.
123
+ *
124
+ * @param request - The request {@link StartBMCAccessRequest}
125
+ * @returns A Promise of BMCAccess
126
+ */
127
+ startBMCAccess: (request: Readonly<StartBMCAccessRequest>) => Promise<BMCAccess>;
128
+ /**
129
+ * Get BMC access. Get the BMC (Baseboard Management Controller) access associated with the ID, including the URL and login information needed to connect.
130
+ *
131
+ * @param request - The request {@link GetBMCAccessRequest}
132
+ * @returns A Promise of BMCAccess
133
+ */
134
+ getBMCAccess: (request: Readonly<GetBMCAccessRequest>) => Promise<BMCAccess>;
135
+ /**
136
+ * Stop BMC access. Stop BMC (Baseboard Management Controller) access associated with the ID.
137
+ *
138
+ * @param request - The request {@link StopBMCAccessRequest}
139
+ */
140
+ stopBMCAccess: (request: Readonly<StopBMCAccessRequest>) => Promise<void>;
141
+ /**
142
+ * Update IP. Configure the IP address associated with the server ID and IP ID. You can use this method to set a reverse DNS for an IP address.
143
+ *
144
+ * @param request - The request {@link UpdateIPRequest}
145
+ * @returns A Promise of IP
146
+ */
147
+ updateIP: (request: Readonly<UpdateIPRequest>) => Promise<IP>;
148
+ /**
149
+ * Add server option. Add an option, such as Private Networks, to a specific server.
150
+ *
151
+ * @param request - The request {@link AddOptionServerRequest}
152
+ * @returns A Promise of Server
153
+ */
154
+ addOptionServer: (request: Readonly<AddOptionServerRequest>) => Promise<Server>;
155
+ /**
156
+ * Delete server option. Delete an option from a specific server.
157
+ *
158
+ * @param request - The request {@link DeleteOptionServerRequest}
159
+ * @returns A Promise of Server
160
+ */
161
+ deleteOptionServer: (request: Readonly<DeleteOptionServerRequest>) => Promise<Server>;
162
+ /**
163
+ * Migrate server offer. Migrate server with hourly offer to monthly offer.
164
+ *
165
+ * @param request - The request {@link MigrateServerToMonthlyOfferRequest}
166
+ * @returns A Promise of Server
167
+ */
168
+ migrateServerToMonthlyOffer: (request: Readonly<MigrateServerToMonthlyOfferRequest>) => Promise<Server>;
169
+ protected pageOfListOffers: (request?: Readonly<ListOffersRequest>) => Promise<ListOffersResponse>;
170
+ /**
171
+ * List offers. List all available Elastic Metal server configurations.
172
+ *
173
+ * @param request - The request {@link ListOffersRequest}
174
+ * @returns A Promise of ListOffersResponse
175
+ */
176
+ listOffers: (request?: Readonly<ListOffersRequest>) => Promise<ListOffersResponse> & {
177
+ all: () => Promise<Offer[]>;
178
+ [Symbol.asyncIterator]: () => AsyncGenerator<Offer[], void, void>;
179
+ };
180
+ /**
181
+ * Get offer. Get details of an offer identified by its offer ID.
182
+ *
183
+ * @param request - The request {@link GetOfferRequest}
184
+ * @returns A Promise of Offer
185
+ */
186
+ getOffer: (request: Readonly<GetOfferRequest>) => Promise<Offer>;
187
+ /**
188
+ * Get option. Return specific option for the ID.
189
+ *
190
+ * @param request - The request {@link GetOptionRequest}
191
+ * @returns A Promise of Option
192
+ */
193
+ getOption: (request: Readonly<GetOptionRequest>) => Promise<Option>;
194
+ protected pageOfListOptions: (request?: Readonly<ListOptionsRequest>) => Promise<ListOptionsResponse>;
195
+ /**
196
+ * List options. List all options matching with filters.
197
+ *
198
+ * @param request - The request {@link ListOptionsRequest}
199
+ * @returns A Promise of ListOptionsResponse
200
+ */
201
+ listOptions: (request?: Readonly<ListOptionsRequest>) => Promise<ListOptionsResponse> & {
202
+ all: () => Promise<Option[]>;
203
+ [Symbol.asyncIterator]: () => AsyncGenerator<Option[], void, void>;
204
+ };
205
+ protected pageOfListSettings: (request?: Readonly<ListSettingsRequest>) => Promise<ListSettingsResponse>;
206
+ /**
207
+ * List all settings. Return all settings for a Project ID.
208
+ *
209
+ * @param request - The request {@link ListSettingsRequest}
210
+ * @returns A Promise of ListSettingsResponse
211
+ */
212
+ listSettings: (request?: Readonly<ListSettingsRequest>) => Promise<ListSettingsResponse> & {
213
+ all: () => Promise<Setting[]>;
214
+ [Symbol.asyncIterator]: () => AsyncGenerator<Setting[], void, void>;
215
+ };
216
+ /**
217
+ * Update setting. Update a setting for a Project ID (enable or disable).
218
+ *
219
+ * @param request - The request {@link UpdateSettingRequest}
220
+ * @returns A Promise of Setting
221
+ */
222
+ updateSetting: (request: Readonly<UpdateSettingRequest>) => Promise<Setting>;
223
+ protected pageOfListOS: (request?: Readonly<ListOSRequest>) => Promise<ListOSResponse>;
224
+ /**
225
+ * List available OSes. List all OSes that are available for installation on Elastic Metal servers.
226
+ *
227
+ * @param request - The request {@link ListOSRequest}
228
+ * @returns A Promise of ListOSResponse
229
+ */
230
+ listOS: (request?: Readonly<ListOSRequest>) => Promise<ListOSResponse> & {
231
+ all: () => Promise<OS[]>;
232
+ [Symbol.asyncIterator]: () => AsyncGenerator<OS[], void, void>;
233
+ };
234
+ /**
235
+ * Get OS with an ID. Return the specific OS for the ID.
236
+ *
237
+ * @param request - The request {@link GetOSRequest}
238
+ * @returns A Promise of OS
239
+ */
240
+ getOS: (request: Readonly<GetOSRequest>) => Promise<OS>;
241
+ }
242
+ /**
243
+ * Elastic Metal - Private Network API.
244
+ */
245
+ export declare class PrivateNetworkAPI extends ParentAPI {
246
+ /** Lists the available zones of the API. */
247
+ static readonly LOCALITIES: ScwZone[];
248
+ /**
249
+ * Add a server to a Private Network.
250
+ *
251
+ * @param request - The request {@link PrivateNetworkApiAddServerPrivateNetworkRequest}
252
+ * @returns A Promise of ServerPrivateNetwork
253
+ */
254
+ addServerPrivateNetwork: (request: Readonly<PrivateNetworkApiAddServerPrivateNetworkRequest>) => Promise<ServerPrivateNetwork>;
255
+ /**
256
+ * Set multiple Private Networks on a server.
257
+ *
258
+ * @param request - The request {@link PrivateNetworkApiSetServerPrivateNetworksRequest}
259
+ * @returns A Promise of SetServerPrivateNetworksResponse
260
+ */
261
+ setServerPrivateNetworks: (request: Readonly<PrivateNetworkApiSetServerPrivateNetworksRequest>) => Promise<SetServerPrivateNetworksResponse>;
262
+ protected pageOfListServerPrivateNetworks: (request?: Readonly<PrivateNetworkApiListServerPrivateNetworksRequest>) => Promise<ListServerPrivateNetworksResponse>;
263
+ /**
264
+ * List the Private Networks of a server.
265
+ *
266
+ * @param request - The request {@link PrivateNetworkApiListServerPrivateNetworksRequest}
267
+ * @returns A Promise of ListServerPrivateNetworksResponse
268
+ */
269
+ listServerPrivateNetworks: (request?: Readonly<PrivateNetworkApiListServerPrivateNetworksRequest>) => Promise<ListServerPrivateNetworksResponse> & {
270
+ all: () => Promise<ServerPrivateNetwork[]>;
271
+ [Symbol.asyncIterator]: () => AsyncGenerator<ServerPrivateNetwork[], void, void>;
272
+ };
273
+ /**
274
+ * Delete a Private Network.
275
+ *
276
+ * @param request - The request {@link PrivateNetworkApiDeleteServerPrivateNetworkRequest}
277
+ */
278
+ deleteServerPrivateNetwork: (request: Readonly<PrivateNetworkApiDeleteServerPrivateNetworkRequest>) => Promise<void>;
279
+ }