@hostafrica/ha-sdk-typescript 1.0.12 → 1.0.14
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/.github/workflows/codeql.yml +3 -3
- package/.github/workflows/release.yml +3 -3
- package/.github/workflows/semgrep.yml +1 -1
- package/dist/apis/SnapshotsApi.d.ts +63 -3
- package/dist/apis/SnapshotsApi.js +190 -2
- package/dist/apis/VPSManagementApi.d.ts +2 -2
- package/dist/apis/VPSManagementApi.js +2 -2
- package/dist/esm/apis/SnapshotsApi.d.ts +63 -3
- package/dist/esm/apis/SnapshotsApi.js +191 -3
- package/dist/esm/apis/VPSManagementApi.d.ts +2 -2
- package/dist/esm/apis/VPSManagementApi.js +2 -2
- package/dist/esm/models/CreateSnapshotJobRequestContent.d.ts +76 -0
- package/dist/esm/models/CreateSnapshotJobRequestContent.js +63 -0
- package/dist/esm/models/CreateSnapshotJobResponseContent.d.ts +40 -0
- package/dist/esm/models/CreateSnapshotJobResponseContent.js +49 -0
- package/dist/esm/models/CreateSnapshotRequestContent.d.ts +7 -1
- package/dist/esm/models/CreateSnapshotRequestContent.js +6 -2
- package/dist/esm/models/DeleteSnapshotJobRequestContent.d.ts +38 -0
- package/dist/esm/models/DeleteSnapshotJobRequestContent.js +47 -0
- package/dist/esm/models/DeleteSnapshotJobResponseContent.d.ts +40 -0
- package/dist/esm/models/DeleteSnapshotJobResponseContent.js +49 -0
- package/dist/esm/models/ListSnapshotJobsRequestContent.d.ts +32 -0
- package/dist/esm/models/ListSnapshotJobsRequestContent.js +43 -0
- package/dist/esm/models/ListSnapshotJobsResponseContent.d.ts +40 -0
- package/dist/esm/models/ListSnapshotJobsResponseContent.js +49 -0
- package/dist/esm/models/SnapshotJob.d.ts +88 -0
- package/dist/esm/models/SnapshotJob.js +67 -0
- package/dist/esm/models/SnapshotJobDeleteResponseData.d.ts +39 -0
- package/dist/esm/models/SnapshotJobDeleteResponseData.js +48 -0
- package/dist/esm/models/SnapshotJobLimits.d.ts +44 -0
- package/dist/esm/models/SnapshotJobLimits.js +51 -0
- package/dist/esm/models/SnapshotJobListResponseData.d.ts +52 -0
- package/dist/esm/models/SnapshotJobListResponseData.js +55 -0
- package/dist/esm/models/SnapshotJobMutationResponseData.d.ts +46 -0
- package/dist/esm/models/SnapshotJobMutationResponseData.js +53 -0
- package/dist/esm/models/SnapshotJobPeriod.d.ts +25 -0
- package/dist/esm/models/SnapshotJobPeriod.js +43 -0
- package/dist/esm/models/SnapshotJobUpdateResponseData.d.ts +39 -0
- package/dist/esm/models/SnapshotJobUpdateResponseData.js +48 -0
- package/dist/esm/models/UpdateSnapshotJobRequestContent.d.ts +82 -0
- package/dist/esm/models/UpdateSnapshotJobRequestContent.js +63 -0
- package/dist/esm/models/UpdateSnapshotJobResponseContent.d.ts +40 -0
- package/dist/esm/models/UpdateSnapshotJobResponseContent.js +49 -0
- package/dist/esm/models/index.d.ts +15 -0
- package/dist/esm/models/index.js +15 -0
- package/dist/esm/retryablePaths.js +2 -1
- package/dist/esm/runtime.js +1 -3
- package/dist/models/CreateSnapshotJobRequestContent.d.ts +76 -0
- package/dist/models/CreateSnapshotJobRequestContent.js +70 -0
- package/dist/models/CreateSnapshotJobResponseContent.d.ts +40 -0
- package/dist/models/CreateSnapshotJobResponseContent.js +56 -0
- package/dist/models/CreateSnapshotRequestContent.d.ts +7 -1
- package/dist/models/CreateSnapshotRequestContent.js +6 -2
- package/dist/models/DeleteSnapshotJobRequestContent.d.ts +38 -0
- package/dist/models/DeleteSnapshotJobRequestContent.js +54 -0
- package/dist/models/DeleteSnapshotJobResponseContent.d.ts +40 -0
- package/dist/models/DeleteSnapshotJobResponseContent.js +56 -0
- package/dist/models/ListSnapshotJobsRequestContent.d.ts +32 -0
- package/dist/models/ListSnapshotJobsRequestContent.js +50 -0
- package/dist/models/ListSnapshotJobsResponseContent.d.ts +40 -0
- package/dist/models/ListSnapshotJobsResponseContent.js +56 -0
- package/dist/models/SnapshotJob.d.ts +88 -0
- package/dist/models/SnapshotJob.js +74 -0
- package/dist/models/SnapshotJobDeleteResponseData.d.ts +39 -0
- package/dist/models/SnapshotJobDeleteResponseData.js +55 -0
- package/dist/models/SnapshotJobLimits.d.ts +44 -0
- package/dist/models/SnapshotJobLimits.js +58 -0
- package/dist/models/SnapshotJobListResponseData.d.ts +52 -0
- package/dist/models/SnapshotJobListResponseData.js +62 -0
- package/dist/models/SnapshotJobMutationResponseData.d.ts +46 -0
- package/dist/models/SnapshotJobMutationResponseData.js +60 -0
- package/dist/models/SnapshotJobPeriod.d.ts +25 -0
- package/dist/models/SnapshotJobPeriod.js +51 -0
- package/dist/models/SnapshotJobUpdateResponseData.d.ts +39 -0
- package/dist/models/SnapshotJobUpdateResponseData.js +55 -0
- package/dist/models/UpdateSnapshotJobRequestContent.d.ts +82 -0
- package/dist/models/UpdateSnapshotJobRequestContent.js +70 -0
- package/dist/models/UpdateSnapshotJobResponseContent.d.ts +40 -0
- package/dist/models/UpdateSnapshotJobResponseContent.js +56 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/dist/retryablePaths.js +2 -1
- package/dist/runtime.js +1 -3
- package/dist.zip +0 -0
- package/docs/CreateSnapshotJobRequestContent.md +48 -0
- package/docs/CreateSnapshotJobResponseContent.md +36 -0
- package/docs/CreateSnapshotRequestContent.md +4 -2
- package/docs/DeleteSnapshotJobRequestContent.md +36 -0
- package/docs/DeleteSnapshotJobResponseContent.md +36 -0
- package/docs/ListSnapshotJobsRequestContent.md +34 -0
- package/docs/ListSnapshotJobsResponseContent.md +36 -0
- package/docs/SnapshotJob.md +53 -0
- package/docs/SnapshotJobDeleteResponseData.md +37 -0
- package/docs/SnapshotJobLimits.md +39 -0
- package/docs/SnapshotJobListResponseData.md +41 -0
- package/docs/SnapshotJobMutationResponseData.md +39 -0
- package/docs/SnapshotJobPeriod.md +33 -0
- package/docs/SnapshotJobUpdateResponseData.md +37 -0
- package/docs/SnapshotsApi.md +321 -1
- package/docs/UpdateSnapshotJobRequestContent.md +50 -0
- package/docs/UpdateSnapshotJobResponseContent.md +36 -0
- package/docs/VPSManagementApi.md +1 -1
- package/package.json +1 -1
- package/src/apis/SnapshotsApi.ts +262 -2
- package/src/apis/VPSManagementApi.ts +2 -2
- package/src/models/CreateSnapshotJobRequestContent.ts +141 -0
- package/src/models/CreateSnapshotJobResponseContent.ts +92 -0
- package/src/models/CreateSnapshotRequestContent.ts +12 -3
- package/src/models/DeleteSnapshotJobRequestContent.ts +75 -0
- package/src/models/DeleteSnapshotJobResponseContent.ts +92 -0
- package/src/models/ListSnapshotJobsRequestContent.ts +66 -0
- package/src/models/ListSnapshotJobsResponseContent.ts +92 -0
- package/src/models/SnapshotJob.ts +157 -0
- package/src/models/SnapshotJobDeleteResponseData.ts +83 -0
- package/src/models/SnapshotJobLimits.ts +84 -0
- package/src/models/SnapshotJobListResponseData.ts +107 -0
- package/src/models/SnapshotJobMutationResponseData.ts +99 -0
- package/src/models/SnapshotJobPeriod.ts +53 -0
- package/src/models/SnapshotJobUpdateResponseData.ts +83 -0
- package/src/models/UpdateSnapshotJobRequestContent.ts +148 -0
- package/src/models/UpdateSnapshotJobResponseContent.ts +92 -0
- package/src/models/index.ts +15 -0
- package/src/retryablePaths.ts +2 -1
- package/src/runtime.ts +5 -3
package/docs/SnapshotsApi.md
CHANGED
|
@@ -5,10 +5,14 @@ All URIs are relative to *https://api.hostafrica.com*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**createSnapshot**](SnapshotsApi.md#createsnapshot) | **POST** /vps/create-snapshot | |
|
|
8
|
+
| [**createSnapshotJob**](SnapshotsApi.md#createsnapshotjob) | **POST** /vps/create-snapshot-job | |
|
|
8
9
|
| [**deleteSnapshot**](SnapshotsApi.md#deletesnapshot) | **POST** /vps/delete-snapshot | |
|
|
10
|
+
| [**deleteSnapshotJob**](SnapshotsApi.md#deletesnapshotjob) | **POST** /vps/delete-snapshot-job | |
|
|
11
|
+
| [**listSnapshotJobs**](SnapshotsApi.md#listsnapshotjobs) | **POST** /vps/list-snapshot-jobs | |
|
|
9
12
|
| [**listSnapshots**](SnapshotsApi.md#listsnapshots) | **POST** /vps/list-snapshots | |
|
|
10
13
|
| [**rollbackSnapshot**](SnapshotsApi.md#rollbacksnapshot) | **POST** /vps/rollback-snapshot | |
|
|
11
14
|
| [**updateSnapshot**](SnapshotsApi.md#updatesnapshot) | **POST** /vps/update-snapshot | |
|
|
15
|
+
| [**updateSnapshotJob**](SnapshotsApi.md#updatesnapshotjob) | **POST** /vps/update-snapshot-job | |
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
|
|
@@ -91,6 +95,85 @@ example().catch(console.error);
|
|
|
91
95
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
92
96
|
|
|
93
97
|
|
|
98
|
+
## createSnapshotJob
|
|
99
|
+
|
|
100
|
+
> CreateSnapshotJobResponseContent createSnapshotJob(createSnapshotJobRequestContent)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
[Under development] Creates a new snapshot job for a VPS service. Use period=\'hourly\' with run_every, or period=\'daily\' with days and start_time.
|
|
105
|
+
|
|
106
|
+
### Example
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import {
|
|
110
|
+
Configuration,
|
|
111
|
+
SnapshotsApi,
|
|
112
|
+
} from '@hostafrica/ha-sdk-typescript';
|
|
113
|
+
import type { CreateSnapshotJobRequest } from '@hostafrica/ha-sdk-typescript';
|
|
114
|
+
|
|
115
|
+
async function example() {
|
|
116
|
+
console.log("🚀 Testing @hostafrica/ha-sdk-typescript SDK...");
|
|
117
|
+
const config = new Configuration({
|
|
118
|
+
// Configure HTTP bearer authorization: BearerAuth
|
|
119
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
120
|
+
});
|
|
121
|
+
const api = new SnapshotsApi(config);
|
|
122
|
+
|
|
123
|
+
const body = {
|
|
124
|
+
// CreateSnapshotJobRequestContent
|
|
125
|
+
createSnapshotJobRequestContent: ...,
|
|
126
|
+
} satisfies CreateSnapshotJobRequest;
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
const data = await api.createSnapshotJob(body);
|
|
130
|
+
console.log(data);
|
|
131
|
+
} catch (error) {
|
|
132
|
+
console.error(error);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Run the test
|
|
137
|
+
example().catch(console.error);
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Parameters
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
| Name | Type | Description | Notes |
|
|
144
|
+
|------------- | ------------- | ------------- | -------------|
|
|
145
|
+
| **createSnapshotJobRequestContent** | [CreateSnapshotJobRequestContent](CreateSnapshotJobRequestContent.md) | | |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**CreateSnapshotJobResponseContent**](CreateSnapshotJobResponseContent.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: `application/json`
|
|
158
|
+
- **Accept**: `application/json`
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### HTTP response details
|
|
162
|
+
| Status code | Description | Response headers |
|
|
163
|
+
|-------------|-------------|------------------|
|
|
164
|
+
| **200** | CreateSnapshotJob 200 response | - |
|
|
165
|
+
| **400** | BadRequestError 400 response | - |
|
|
166
|
+
| **401** | UnauthorizedError 401 response | - |
|
|
167
|
+
| **403** | ForbiddenError 403 response | - |
|
|
168
|
+
| **404** | ResourceNotFoundError 404 response | - |
|
|
169
|
+
| **422** | ValidationError 422 response | - |
|
|
170
|
+
| **429** | TooManyRequestsError 429 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
171
|
+
| **500** | InternalServiceError 500 response | - |
|
|
172
|
+
| **503** | ServiceUnavailableError 503 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
173
|
+
|
|
174
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
175
|
+
|
|
176
|
+
|
|
94
177
|
## deleteSnapshot
|
|
95
178
|
|
|
96
179
|
> DeleteSnapshotResponseContent deleteSnapshot(deleteSnapshotRequestContent)
|
|
@@ -170,6 +253,164 @@ example().catch(console.error);
|
|
|
170
253
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
171
254
|
|
|
172
255
|
|
|
256
|
+
## deleteSnapshotJob
|
|
257
|
+
|
|
258
|
+
> DeleteSnapshotJobResponseContent deleteSnapshotJob(deleteSnapshotJobRequestContent)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
[Under development]Deletes a snapshot job from a VPS service
|
|
263
|
+
|
|
264
|
+
### Example
|
|
265
|
+
|
|
266
|
+
```ts
|
|
267
|
+
import {
|
|
268
|
+
Configuration,
|
|
269
|
+
SnapshotsApi,
|
|
270
|
+
} from '@hostafrica/ha-sdk-typescript';
|
|
271
|
+
import type { DeleteSnapshotJobRequest } from '@hostafrica/ha-sdk-typescript';
|
|
272
|
+
|
|
273
|
+
async function example() {
|
|
274
|
+
console.log("🚀 Testing @hostafrica/ha-sdk-typescript SDK...");
|
|
275
|
+
const config = new Configuration({
|
|
276
|
+
// Configure HTTP bearer authorization: BearerAuth
|
|
277
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
278
|
+
});
|
|
279
|
+
const api = new SnapshotsApi(config);
|
|
280
|
+
|
|
281
|
+
const body = {
|
|
282
|
+
// DeleteSnapshotJobRequestContent
|
|
283
|
+
deleteSnapshotJobRequestContent: ...,
|
|
284
|
+
} satisfies DeleteSnapshotJobRequest;
|
|
285
|
+
|
|
286
|
+
try {
|
|
287
|
+
const data = await api.deleteSnapshotJob(body);
|
|
288
|
+
console.log(data);
|
|
289
|
+
} catch (error) {
|
|
290
|
+
console.error(error);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Run the test
|
|
295
|
+
example().catch(console.error);
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Parameters
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
| Name | Type | Description | Notes |
|
|
302
|
+
|------------- | ------------- | ------------- | -------------|
|
|
303
|
+
| **deleteSnapshotJobRequestContent** | [DeleteSnapshotJobRequestContent](DeleteSnapshotJobRequestContent.md) | | |
|
|
304
|
+
|
|
305
|
+
### Return type
|
|
306
|
+
|
|
307
|
+
[**DeleteSnapshotJobResponseContent**](DeleteSnapshotJobResponseContent.md)
|
|
308
|
+
|
|
309
|
+
### Authorization
|
|
310
|
+
|
|
311
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
312
|
+
|
|
313
|
+
### HTTP request headers
|
|
314
|
+
|
|
315
|
+
- **Content-Type**: `application/json`
|
|
316
|
+
- **Accept**: `application/json`
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
### HTTP response details
|
|
320
|
+
| Status code | Description | Response headers |
|
|
321
|
+
|-------------|-------------|------------------|
|
|
322
|
+
| **200** | DeleteSnapshotJob 200 response | - |
|
|
323
|
+
| **400** | BadRequestError 400 response | - |
|
|
324
|
+
| **401** | UnauthorizedError 401 response | - |
|
|
325
|
+
| **403** | ForbiddenError 403 response | - |
|
|
326
|
+
| **404** | ResourceNotFoundError 404 response | - |
|
|
327
|
+
| **422** | ValidationError 422 response | - |
|
|
328
|
+
| **429** | TooManyRequestsError 429 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
329
|
+
| **500** | InternalServiceError 500 response | - |
|
|
330
|
+
| **503** | ServiceUnavailableError 503 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
331
|
+
|
|
332
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
## listSnapshotJobs
|
|
336
|
+
|
|
337
|
+
> ListSnapshotJobsResponseContent listSnapshotJobs(listSnapshotJobsRequestContent)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
[Under development]Retrieves the list of snapshot jobs for a VPS service
|
|
342
|
+
|
|
343
|
+
### Example
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
import {
|
|
347
|
+
Configuration,
|
|
348
|
+
SnapshotsApi,
|
|
349
|
+
} from '@hostafrica/ha-sdk-typescript';
|
|
350
|
+
import type { ListSnapshotJobsRequest } from '@hostafrica/ha-sdk-typescript';
|
|
351
|
+
|
|
352
|
+
async function example() {
|
|
353
|
+
console.log("🚀 Testing @hostafrica/ha-sdk-typescript SDK...");
|
|
354
|
+
const config = new Configuration({
|
|
355
|
+
// Configure HTTP bearer authorization: BearerAuth
|
|
356
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
357
|
+
});
|
|
358
|
+
const api = new SnapshotsApi(config);
|
|
359
|
+
|
|
360
|
+
const body = {
|
|
361
|
+
// ListSnapshotJobsRequestContent
|
|
362
|
+
listSnapshotJobsRequestContent: ...,
|
|
363
|
+
} satisfies ListSnapshotJobsRequest;
|
|
364
|
+
|
|
365
|
+
try {
|
|
366
|
+
const data = await api.listSnapshotJobs(body);
|
|
367
|
+
console.log(data);
|
|
368
|
+
} catch (error) {
|
|
369
|
+
console.error(error);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// Run the test
|
|
374
|
+
example().catch(console.error);
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Parameters
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
| Name | Type | Description | Notes |
|
|
381
|
+
|------------- | ------------- | ------------- | -------------|
|
|
382
|
+
| **listSnapshotJobsRequestContent** | [ListSnapshotJobsRequestContent](ListSnapshotJobsRequestContent.md) | | |
|
|
383
|
+
|
|
384
|
+
### Return type
|
|
385
|
+
|
|
386
|
+
[**ListSnapshotJobsResponseContent**](ListSnapshotJobsResponseContent.md)
|
|
387
|
+
|
|
388
|
+
### Authorization
|
|
389
|
+
|
|
390
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
391
|
+
|
|
392
|
+
### HTTP request headers
|
|
393
|
+
|
|
394
|
+
- **Content-Type**: `application/json`
|
|
395
|
+
- **Accept**: `application/json`
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
### HTTP response details
|
|
399
|
+
| Status code | Description | Response headers |
|
|
400
|
+
|-------------|-------------|------------------|
|
|
401
|
+
| **200** | ListSnapshotJobs 200 response | - |
|
|
402
|
+
| **400** | BadRequestError 400 response | - |
|
|
403
|
+
| **401** | UnauthorizedError 401 response | - |
|
|
404
|
+
| **403** | ForbiddenError 403 response | - |
|
|
405
|
+
| **404** | ResourceNotFoundError 404 response | - |
|
|
406
|
+
| **422** | ValidationError 422 response | - |
|
|
407
|
+
| **429** | TooManyRequestsError 429 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
408
|
+
| **500** | InternalServiceError 500 response | - |
|
|
409
|
+
| **503** | ServiceUnavailableError 503 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
410
|
+
|
|
411
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
412
|
+
|
|
413
|
+
|
|
173
414
|
## listSnapshots
|
|
174
415
|
|
|
175
416
|
> ListSnapshotsResponseContent listSnapshots(listSnapshotsRequestContent)
|
|
@@ -255,7 +496,7 @@ example().catch(console.error);
|
|
|
255
496
|
|
|
256
497
|
|
|
257
498
|
|
|
258
|
-
|
|
499
|
+
Rolls back a VPS to a previous snapshot state
|
|
259
500
|
|
|
260
501
|
### Example
|
|
261
502
|
|
|
@@ -406,3 +647,82 @@ example().catch(console.error);
|
|
|
406
647
|
|
|
407
648
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
408
649
|
|
|
650
|
+
|
|
651
|
+
## updateSnapshotJob
|
|
652
|
+
|
|
653
|
+
> UpdateSnapshotJobResponseContent updateSnapshotJob(updateSnapshotJobRequestContent)
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
[Under development] Updates an existing snapshot job. Only provide fields you want to change.
|
|
658
|
+
|
|
659
|
+
### Example
|
|
660
|
+
|
|
661
|
+
```ts
|
|
662
|
+
import {
|
|
663
|
+
Configuration,
|
|
664
|
+
SnapshotsApi,
|
|
665
|
+
} from '@hostafrica/ha-sdk-typescript';
|
|
666
|
+
import type { UpdateSnapshotJobRequest } from '@hostafrica/ha-sdk-typescript';
|
|
667
|
+
|
|
668
|
+
async function example() {
|
|
669
|
+
console.log("🚀 Testing @hostafrica/ha-sdk-typescript SDK...");
|
|
670
|
+
const config = new Configuration({
|
|
671
|
+
// Configure HTTP bearer authorization: BearerAuth
|
|
672
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
673
|
+
});
|
|
674
|
+
const api = new SnapshotsApi(config);
|
|
675
|
+
|
|
676
|
+
const body = {
|
|
677
|
+
// UpdateSnapshotJobRequestContent
|
|
678
|
+
updateSnapshotJobRequestContent: ...,
|
|
679
|
+
} satisfies UpdateSnapshotJobRequest;
|
|
680
|
+
|
|
681
|
+
try {
|
|
682
|
+
const data = await api.updateSnapshotJob(body);
|
|
683
|
+
console.log(data);
|
|
684
|
+
} catch (error) {
|
|
685
|
+
console.error(error);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// Run the test
|
|
690
|
+
example().catch(console.error);
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### Parameters
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
| Name | Type | Description | Notes |
|
|
697
|
+
|------------- | ------------- | ------------- | -------------|
|
|
698
|
+
| **updateSnapshotJobRequestContent** | [UpdateSnapshotJobRequestContent](UpdateSnapshotJobRequestContent.md) | | |
|
|
699
|
+
|
|
700
|
+
### Return type
|
|
701
|
+
|
|
702
|
+
[**UpdateSnapshotJobResponseContent**](UpdateSnapshotJobResponseContent.md)
|
|
703
|
+
|
|
704
|
+
### Authorization
|
|
705
|
+
|
|
706
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
707
|
+
|
|
708
|
+
### HTTP request headers
|
|
709
|
+
|
|
710
|
+
- **Content-Type**: `application/json`
|
|
711
|
+
- **Accept**: `application/json`
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
### HTTP response details
|
|
715
|
+
| Status code | Description | Response headers |
|
|
716
|
+
|-------------|-------------|------------------|
|
|
717
|
+
| **200** | UpdateSnapshotJob 200 response | - |
|
|
718
|
+
| **400** | BadRequestError 400 response | - |
|
|
719
|
+
| **401** | UnauthorizedError 401 response | - |
|
|
720
|
+
| **403** | ForbiddenError 403 response | - |
|
|
721
|
+
| **404** | ResourceNotFoundError 404 response | - |
|
|
722
|
+
| **422** | ValidationError 422 response | - |
|
|
723
|
+
| **429** | TooManyRequestsError 429 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
724
|
+
| **500** | InternalServiceError 500 response | - |
|
|
725
|
+
| **503** | ServiceUnavailableError 503 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
726
|
+
|
|
727
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
728
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateSnapshotJobRequestContent
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`serviceId` | string
|
|
10
|
+
`jobId` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`description` | string
|
|
13
|
+
`vmstate` | boolean
|
|
14
|
+
`period` | [SnapshotJobPeriod](SnapshotJobPeriod.md)
|
|
15
|
+
`runEvery` | number
|
|
16
|
+
`days` | [Array<DayOfWeek>](DayOfWeek.md)
|
|
17
|
+
`startTime` | string
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { UpdateSnapshotJobRequestContent } from '@hostafrica/ha-sdk-typescript'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"serviceId": null,
|
|
27
|
+
"jobId": null,
|
|
28
|
+
"name": null,
|
|
29
|
+
"description": null,
|
|
30
|
+
"vmstate": null,
|
|
31
|
+
"period": null,
|
|
32
|
+
"runEvery": null,
|
|
33
|
+
"days": null,
|
|
34
|
+
"startTime": null,
|
|
35
|
+
} satisfies UpdateSnapshotJobRequestContent
|
|
36
|
+
|
|
37
|
+
console.log(example)
|
|
38
|
+
|
|
39
|
+
// Convert the instance to a JSON string
|
|
40
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
+
console.log(exampleJSON)
|
|
42
|
+
|
|
43
|
+
// Parse the JSON string back to an object
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateSnapshotJobRequestContent
|
|
45
|
+
console.log(exampleParsed)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateSnapshotJobResponseContent
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`status` | [OperationStatus](OperationStatus.md)
|
|
10
|
+
`data` | [SnapshotJobUpdateResponseData](SnapshotJobUpdateResponseData.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UpdateSnapshotJobResponseContent } from '@hostafrica/ha-sdk-typescript'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"status": null,
|
|
20
|
+
"data": null,
|
|
21
|
+
} satisfies UpdateSnapshotJobResponseContent
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateSnapshotJobResponseContent
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
package/docs/VPSManagementApi.md
CHANGED