@distilled.cloud/stackit 0.0.0-stage → 1.0.0-rc.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/LICENSE +201 -0
- package/README.md +33 -2
- package/lib/credentials.d.ts +29 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +49 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +36 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +26 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +30 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +9 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +45 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +32 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +147 -0
- package/lib/protocol.js.map +1 -0
- package/lib/protocol.test.d.ts +2 -0
- package/lib/protocol.test.d.ts.map +1 -0
- package/lib/protocol.test.js +181 -0
- package/lib/protocol.test.js.map +1 -0
- package/lib/retry.d.ts +31 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +31 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/alb.d.ts +603 -0
- package/lib/services/alb.d.ts.map +1 -0
- package/lib/services/alb.js +513 -0
- package/lib/services/alb.js.map +1 -0
- package/lib/services/alb_waf.d.ts +526 -0
- package/lib/services/alb_waf.d.ts.map +1 -0
- package/lib/services/alb_waf.js +521 -0
- package/lib/services/alb_waf.js.map +1 -0
- package/lib/services/authorization.d.ts +251 -0
- package/lib/services/authorization.d.ts.map +1 -0
- package/lib/services/authorization.js +323 -0
- package/lib/services/authorization.js.map +1 -0
- package/lib/services/automation.d.ts +321 -0
- package/lib/services/automation.d.ts.map +1 -0
- package/lib/services/automation.js +363 -0
- package/lib/services/automation.js.map +1 -0
- package/lib/services/cdn.d.ts +1239 -0
- package/lib/services/cdn.d.ts.map +1 -0
- package/lib/services/cdn.js +906 -0
- package/lib/services/cdn.js.map +1 -0
- package/lib/services/certificates.d.ts +201 -0
- package/lib/services/certificates.d.ts.map +1 -0
- package/lib/services/certificates.js +179 -0
- package/lib/services/certificates.js.map +1 -0
- package/lib/services/cost.d.ts +222 -0
- package/lib/services/cost.d.ts.map +1 -0
- package/lib/services/cost.js +177 -0
- package/lib/services/cost.js.map +1 -0
- package/lib/services/dns.d.ts +842 -0
- package/lib/services/dns.d.ts.map +1 -0
- package/lib/services/dns.js +726 -0
- package/lib/services/dns.js.map +1 -0
- package/lib/services/dremio.d.ts +358 -0
- package/lib/services/dremio.d.ts.map +1 -0
- package/lib/services/dremio.js +317 -0
- package/lib/services/dremio.js.map +1 -0
- package/lib/services/edge.d.ts +312 -0
- package/lib/services/edge.d.ts.map +1 -0
- package/lib/services/edge.js +357 -0
- package/lib/services/edge.js.map +1 -0
- package/lib/services/functions.d.ts +409 -0
- package/lib/services/functions.d.ts.map +1 -0
- package/lib/services/functions.js +399 -0
- package/lib/services/functions.js.map +1 -0
- package/lib/services/git.d.ts +497 -0
- package/lib/services/git.d.ts.map +1 -0
- package/lib/services/git.js +520 -0
- package/lib/services/git.js.map +1 -0
- package/lib/services/iaas.d.ts +2986 -0
- package/lib/services/iaas.d.ts.map +1 -0
- package/lib/services/iaas.js +3543 -0
- package/lib/services/iaas.js.map +1 -0
- package/lib/services/index.d.ts +51 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +52 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/intake.d.ts +555 -0
- package/lib/services/intake.d.ts.map +1 -0
- package/lib/services/intake.js +475 -0
- package/lib/services/intake.js.map +1 -0
- package/lib/services/kms.d.ts +654 -0
- package/lib/services/kms.d.ts.map +1 -0
- package/lib/services/kms.js +663 -0
- package/lib/services/kms.js.map +1 -0
- package/lib/services/lb_ip_lists.d.ts +160 -0
- package/lib/services/lb_ip_lists.d.ts.map +1 -0
- package/lib/services/lb_ip_lists.js +154 -0
- package/lib/services/lb_ip_lists.js.map +1 -0
- package/lib/services/load_balancer.d.ts +563 -0
- package/lib/services/load_balancer.d.ts.map +1 -0
- package/lib/services/load_balancer.js +497 -0
- package/lib/services/load_balancer.js.map +1 -0
- package/lib/services/logme.d.ts +516 -0
- package/lib/services/logme.d.ts.map +1 -0
- package/lib/services/logme.js +574 -0
- package/lib/services/logme.js.map +1 -0
- package/lib/services/logs.d.ts +436 -0
- package/lib/services/logs.d.ts.map +1 -0
- package/lib/services/logs.js +475 -0
- package/lib/services/logs.js.map +1 -0
- package/lib/services/mariadb.d.ts +479 -0
- package/lib/services/mariadb.d.ts.map +1 -0
- package/lib/services/mariadb.js +551 -0
- package/lib/services/mariadb.js.map +1 -0
- package/lib/services/model_experiments.d.ts +306 -0
- package/lib/services/model_experiments.d.ts.map +1 -0
- package/lib/services/model_experiments.js +336 -0
- package/lib/services/model_experiments.js.map +1 -0
- package/lib/services/model_serving.d.ts +289 -0
- package/lib/services/model_serving.d.ts.map +1 -0
- package/lib/services/model_serving.js +287 -0
- package/lib/services/model_serving.js.map +1 -0
- package/lib/services/mongodb_flex.d.ts +826 -0
- package/lib/services/mongodb_flex.d.ts.map +1 -0
- package/lib/services/mongodb_flex.js +803 -0
- package/lib/services/mongodb_flex.js.map +1 -0
- package/lib/services/object_storage.d.ts +470 -0
- package/lib/services/object_storage.d.ts.map +1 -0
- package/lib/services/object_storage.js +540 -0
- package/lib/services/object_storage.js.map +1 -0
- package/lib/services/observability.d.ts +2750 -0
- package/lib/services/observability.d.ts.map +1 -0
- package/lib/services/observability.js +3158 -0
- package/lib/services/observability.js.map +1 -0
- package/lib/services/opensearch.d.ts +505 -0
- package/lib/services/opensearch.d.ts.map +1 -0
- package/lib/services/opensearch.js +563 -0
- package/lib/services/opensearch.js.map +1 -0
- package/lib/services/pim.d.ts +997 -0
- package/lib/services/pim.d.ts.map +1 -0
- package/lib/services/pim.js +736 -0
- package/lib/services/pim.js.map +1 -0
- package/lib/services/postgres_flex.d.ts +854 -0
- package/lib/services/postgres_flex.d.ts.map +1 -0
- package/lib/services/postgres_flex.js +853 -0
- package/lib/services/postgres_flex.js.map +1 -0
- package/lib/services/pubsub.d.ts +489 -0
- package/lib/services/pubsub.d.ts.map +1 -0
- package/lib/services/pubsub.js +519 -0
- package/lib/services/pubsub.js.map +1 -0
- package/lib/services/rabbitmq.d.ts +523 -0
- package/lib/services/rabbitmq.d.ts.map +1 -0
- package/lib/services/rabbitmq.js +574 -0
- package/lib/services/rabbitmq.js.map +1 -0
- package/lib/services/registry.d.ts +212 -0
- package/lib/services/registry.d.ts.map +1 -0
- package/lib/services/registry.js +198 -0
- package/lib/services/registry.js.map +1 -0
- package/lib/services/resource_manager.d.ts +458 -0
- package/lib/services/resource_manager.d.ts.map +1 -0
- package/lib/services/resource_manager.js +473 -0
- package/lib/services/resource_manager.js.map +1 -0
- package/lib/services/run_command.d.ts +175 -0
- package/lib/services/run_command.d.ts.map +1 -0
- package/lib/services/run_command.js +185 -0
- package/lib/services/run_command.js.map +1 -0
- package/lib/services/sca.d.ts +553 -0
- package/lib/services/sca.d.ts.map +1 -0
- package/lib/services/sca.js +445 -0
- package/lib/services/sca.js.map +1 -0
- package/lib/services/scf.d.ts +498 -0
- package/lib/services/scf.d.ts.map +1 -0
- package/lib/services/scf.js +670 -0
- package/lib/services/scf.js.map +1 -0
- package/lib/services/secrets_manager.d.ts +505 -0
- package/lib/services/secrets_manager.d.ts.map +1 -0
- package/lib/services/secrets_manager.js +613 -0
- package/lib/services/secrets_manager.js.map +1 -0
- package/lib/services/server_backup.d.ts +380 -0
- package/lib/services/server_backup.d.ts.map +1 -0
- package/lib/services/server_backup.js +454 -0
- package/lib/services/server_backup.js.map +1 -0
- package/lib/services/server_update.d.ts +292 -0
- package/lib/services/server_update.d.ts.map +1 -0
- package/lib/services/server_update.js +352 -0
- package/lib/services/server_update.js.map +1 -0
- package/lib/services/service_account.d.ts +465 -0
- package/lib/services/service_account.d.ts.map +1 -0
- package/lib/services/service_account.js +506 -0
- package/lib/services/service_account.js.map +1 -0
- package/lib/services/service_enablement.d.ts +149 -0
- package/lib/services/service_enablement.d.ts.map +1 -0
- package/lib/services/service_enablement.js +157 -0
- package/lib/services/service_enablement.js.map +1 -0
- package/lib/services/sfs.d.ts +721 -0
- package/lib/services/sfs.d.ts.map +1 -0
- package/lib/services/sfs.js +790 -0
- package/lib/services/sfs.js.map +1 -0
- package/lib/services/ske.d.ts +562 -0
- package/lib/services/ske.d.ts.map +1 -0
- package/lib/services/ske.js +558 -0
- package/lib/services/ske.js.map +1 -0
- package/lib/services/sqlserverflex.d.ts +956 -0
- package/lib/services/sqlserverflex.d.ts.map +1 -0
- package/lib/services/sqlserverflex.js +936 -0
- package/lib/services/sqlserverflex.js.map +1 -0
- package/lib/services/stackit_marketplace.d.ts +288 -0
- package/lib/services/stackit_marketplace.d.ts.map +1 -0
- package/lib/services/stackit_marketplace.js +379 -0
- package/lib/services/stackit_marketplace.js.map +1 -0
- package/lib/services/telemetry_link.d.ts +443 -0
- package/lib/services/telemetry_link.d.ts.map +1 -0
- package/lib/services/telemetry_link.js +532 -0
- package/lib/services/telemetry_link.js.map +1 -0
- package/lib/services/telemetry_router.d.ts +493 -0
- package/lib/services/telemetry_router.d.ts.map +1 -0
- package/lib/services/telemetry_router.js +484 -0
- package/lib/services/telemetry_router.js.map +1 -0
- package/lib/services/ufw.d.ts +295 -0
- package/lib/services/ufw.d.ts.map +1 -0
- package/lib/services/ufw.js +279 -0
- package/lib/services/ufw.js.map +1 -0
- package/lib/services/valkey.d.ts +505 -0
- package/lib/services/valkey.d.ts.map +1 -0
- package/lib/services/valkey.js +567 -0
- package/lib/services/valkey.js.map +1 -0
- package/lib/services/vpn.d.ts +1024 -0
- package/lib/services/vpn.d.ts.map +1 -0
- package/lib/services/vpn.js +931 -0
- package/lib/services/vpn.js.map +1 -0
- package/lib/services/workflows.d.ts +600 -0
- package/lib/services/workflows.d.ts.map +1 -0
- package/lib/services/workflows.js +508 -0
- package/lib/services/workflows.js.map +1 -0
- package/lib/traits.d.ts +24 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +15 -0
- package/lib/traits.js.map +1 -0
- package/package.json +85 -3
- package/src/credentials.ts +84 -0
- package/src/errors.ts +50 -0
- package/src/index.ts +34 -0
- package/src/pagination.ts +57 -0
- package/src/protocol.test.ts +304 -0
- package/src/protocol.ts +225 -0
- package/src/retry.ts +47 -0
- package/src/services/alb.ts +1326 -0
- package/src/services/alb_waf.ts +1288 -0
- package/src/services/authorization.ts +704 -0
- package/src/services/automation.ts +796 -0
- package/src/services/cdn.ts +2576 -0
- package/src/services/certificates.ts +418 -0
- package/src/services/cost.ts +449 -0
- package/src/services/dns.ts +1936 -0
- package/src/services/dremio.ts +753 -0
- package/src/services/edge.ts +780 -0
- package/src/services/functions.ts +957 -0
- package/src/services/git.ts +1194 -0
- package/src/services/iaas.ts +7878 -0
- package/src/services/index.ts +51 -0
- package/src/services/intake.ts +1166 -0
- package/src/services/kms.ts +1537 -0
- package/src/services/lb_ip_lists.ts +342 -0
- package/src/services/load_balancer.ts +1266 -0
- package/src/services/logme.ts +1284 -0
- package/src/services/logs.ts +1049 -0
- package/src/services/mariadb.ts +1212 -0
- package/src/services/model_experiments.ts +741 -0
- package/src/services/model_serving.ts +654 -0
- package/src/services/mongodb_flex.ts +1932 -0
- package/src/services/object_storage.ts +1195 -0
- package/src/services/observability.ts +7364 -0
- package/src/services/opensearch.ts +1265 -0
- package/src/services/pim.ts +1985 -0
- package/src/services/postgres_flex.ts +2080 -0
- package/src/services/pubsub.ts +1193 -0
- package/src/services/rabbitmq.ts +1310 -0
- package/src/services/registry.ts +446 -0
- package/src/services/resource_manager.ts +1072 -0
- package/src/services/run_command.ts +413 -0
- package/src/services/sca.ts +1187 -0
- package/src/services/scf.ts +1396 -0
- package/src/services/secrets_manager.ts +1317 -0
- package/src/services/server_backup.ts +983 -0
- package/src/services/server_update.ts +738 -0
- package/src/services/service_account.ts +1121 -0
- package/src/services/service_enablement.ts +330 -0
- package/src/services/sfs.ts +1831 -0
- package/src/services/ske.ts +1386 -0
- package/src/services/sqlserverflex.ts +2307 -0
- package/src/services/stackit_marketplace.ts +787 -0
- package/src/services/telemetry_link.ts +1166 -0
- package/src/services/telemetry_router.ts +1110 -0
- package/src/services/ufw.ts +654 -0
- package/src/services/valkey.ts +1266 -0
- package/src/services/vpn.ts +2365 -0
- package/src/services/workflows.ts +1249 -0
- package/src/traits.ts +60 -0
|
@@ -0,0 +1,983 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
5
|
+
import { UnknownStackitError } from "../errors.ts";
|
|
6
|
+
import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts";
|
|
7
|
+
import * as Retry from "../retry.ts";
|
|
8
|
+
import * as T from "../traits.ts";
|
|
9
|
+
|
|
10
|
+
export type { StackitOpError, StackitOpContext };
|
|
11
|
+
|
|
12
|
+
export class BadRequest
|
|
13
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
14
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
15
|
+
code: S.Number,
|
|
16
|
+
message: S.String,
|
|
17
|
+
}).pipe(C.withBadRequestError),
|
|
18
|
+
[{ status: 400 }],
|
|
19
|
+
) {}
|
|
20
|
+
|
|
21
|
+
export class Conflict
|
|
22
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
23
|
+
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
24
|
+
code: S.Number,
|
|
25
|
+
message: S.String,
|
|
26
|
+
}).pipe(C.withConflictError),
|
|
27
|
+
[{ status: 409 }],
|
|
28
|
+
) {}
|
|
29
|
+
|
|
30
|
+
export class NotFound
|
|
31
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
32
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
33
|
+
code: S.Number,
|
|
34
|
+
message: S.String,
|
|
35
|
+
}).pipe(C.withBadRequestError),
|
|
36
|
+
[{ status: 404 }],
|
|
37
|
+
) {}
|
|
38
|
+
|
|
39
|
+
export type CreateBackupRequestVolumeIdsList = Array<string>;
|
|
40
|
+
export const CreateBackupRequestVolumeIdsList = /*@__PURE__*/ S.Array(
|
|
41
|
+
S.String,
|
|
42
|
+
) as any as S.Schema<CreateBackupRequestVolumeIdsList>;
|
|
43
|
+
|
|
44
|
+
export interface CreateBackupRequest {
|
|
45
|
+
/** project id */
|
|
46
|
+
projectId: string;
|
|
47
|
+
/** region */
|
|
48
|
+
region: string;
|
|
49
|
+
/** server id */
|
|
50
|
+
serverId: string;
|
|
51
|
+
/** Max 255 characters */
|
|
52
|
+
name: string;
|
|
53
|
+
/** Values are set in days (1-36500) */
|
|
54
|
+
retentionPeriod: number;
|
|
55
|
+
volumeIds?: CreateBackupRequestVolumeIdsList;
|
|
56
|
+
}
|
|
57
|
+
export const CreateBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
58
|
+
S.Struct({
|
|
59
|
+
projectId: S.String.pipe(T.Label()),
|
|
60
|
+
region: S.String.pipe(T.Label()),
|
|
61
|
+
serverId: S.String.pipe(T.Label()),
|
|
62
|
+
name: S.String,
|
|
63
|
+
retentionPeriod: S.Number,
|
|
64
|
+
volumeIds: S.optional(CreateBackupRequestVolumeIdsList),
|
|
65
|
+
}).pipe(
|
|
66
|
+
T.Http({
|
|
67
|
+
method: "POST",
|
|
68
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups",
|
|
69
|
+
code: 200,
|
|
70
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
71
|
+
}),
|
|
72
|
+
),
|
|
73
|
+
).annotate({ identifier: "CreateBackupRequest" }) as any as S.Schema<CreateBackupRequest>;
|
|
74
|
+
|
|
75
|
+
export interface BackupJob {
|
|
76
|
+
id: string;
|
|
77
|
+
}
|
|
78
|
+
export const BackupJob = /*@__PURE__*/ S.suspend(() =>
|
|
79
|
+
S.Struct({
|
|
80
|
+
id: S.String,
|
|
81
|
+
}),
|
|
82
|
+
).annotate({ identifier: "BackupJob" }) as any as S.Schema<BackupJob>;
|
|
83
|
+
|
|
84
|
+
export type BackupPropertiesVolumeIdsList = Array<string>;
|
|
85
|
+
export const BackupPropertiesVolumeIdsList = /*@__PURE__*/ S.Array(
|
|
86
|
+
S.String,
|
|
87
|
+
) as any as S.Schema<BackupPropertiesVolumeIdsList>;
|
|
88
|
+
|
|
89
|
+
export interface BackupProperties {
|
|
90
|
+
/** Max 255 characters */
|
|
91
|
+
name: string;
|
|
92
|
+
/** Values are set in days (1-36500) */
|
|
93
|
+
retentionPeriod: number;
|
|
94
|
+
volumeIds?: BackupPropertiesVolumeIdsList;
|
|
95
|
+
}
|
|
96
|
+
export const BackupProperties = /*@__PURE__*/ S.suspend(() =>
|
|
97
|
+
S.Struct({
|
|
98
|
+
name: S.String,
|
|
99
|
+
retentionPeriod: S.Number,
|
|
100
|
+
volumeIds: S.optional(BackupPropertiesVolumeIdsList),
|
|
101
|
+
}),
|
|
102
|
+
).annotate({ identifier: "BackupProperties" }) as any as S.Schema<BackupProperties>;
|
|
103
|
+
|
|
104
|
+
export interface CreateBackupScheduleRequest {
|
|
105
|
+
/** project id */
|
|
106
|
+
projectId: string;
|
|
107
|
+
/** region */
|
|
108
|
+
region: string;
|
|
109
|
+
/** server id */
|
|
110
|
+
serverId: string;
|
|
111
|
+
backupProperties?: BackupProperties;
|
|
112
|
+
enabled: boolean;
|
|
113
|
+
/** Max 255 characters */
|
|
114
|
+
name: string;
|
|
115
|
+
/** An rrule (Recurrence Rule) is a standardized string format used in iCalendar (RFC 5545) to define repeating events, and you can generate one by using a dedicated library or by using online generator tools to specify parameters like frequency, interval, and end dates */
|
|
116
|
+
rrule: string;
|
|
117
|
+
}
|
|
118
|
+
export const CreateBackupScheduleRequest = /*@__PURE__*/ S.suspend(() =>
|
|
119
|
+
S.Struct({
|
|
120
|
+
projectId: S.String.pipe(T.Label()),
|
|
121
|
+
region: S.String.pipe(T.Label()),
|
|
122
|
+
serverId: S.String.pipe(T.Label()),
|
|
123
|
+
backupProperties: S.optional(BackupProperties),
|
|
124
|
+
enabled: S.Boolean,
|
|
125
|
+
name: S.String,
|
|
126
|
+
rrule: S.String,
|
|
127
|
+
}).pipe(
|
|
128
|
+
T.Http({
|
|
129
|
+
method: "POST",
|
|
130
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backup-schedules",
|
|
131
|
+
code: 200,
|
|
132
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
133
|
+
}),
|
|
134
|
+
),
|
|
135
|
+
).annotate({
|
|
136
|
+
identifier: "CreateBackupScheduleRequest",
|
|
137
|
+
}) as any as S.Schema<CreateBackupScheduleRequest>;
|
|
138
|
+
|
|
139
|
+
export interface BackupSchedule {
|
|
140
|
+
backupProperties?: BackupProperties;
|
|
141
|
+
enabled: boolean;
|
|
142
|
+
id: number;
|
|
143
|
+
name: string;
|
|
144
|
+
/** An rrule (Recurrence Rule) is a standardized string format used in iCalendar (RFC 5545) to define repeating events, and you can generate one by using a dedicated library or by using online generator tools to specify parameters like frequency, interval, and end dates */
|
|
145
|
+
rrule: string;
|
|
146
|
+
}
|
|
147
|
+
export const BackupSchedule = /*@__PURE__*/ S.suspend(() =>
|
|
148
|
+
S.Struct({
|
|
149
|
+
backupProperties: S.optional(BackupProperties),
|
|
150
|
+
enabled: S.Boolean,
|
|
151
|
+
id: S.Number,
|
|
152
|
+
name: S.String,
|
|
153
|
+
rrule: S.String,
|
|
154
|
+
}),
|
|
155
|
+
).annotate({ identifier: "BackupSchedule" }) as any as S.Schema<BackupSchedule>;
|
|
156
|
+
|
|
157
|
+
export interface DeleteBackupRequest {
|
|
158
|
+
/** project id */
|
|
159
|
+
projectId: string;
|
|
160
|
+
/** region */
|
|
161
|
+
region: string;
|
|
162
|
+
/** server id */
|
|
163
|
+
serverId: string;
|
|
164
|
+
/** id of the backup */
|
|
165
|
+
backupId: string;
|
|
166
|
+
/** force delete the backup */
|
|
167
|
+
force?: boolean;
|
|
168
|
+
}
|
|
169
|
+
export const DeleteBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
170
|
+
S.Struct({
|
|
171
|
+
projectId: S.String.pipe(T.Label()),
|
|
172
|
+
region: S.String.pipe(T.Label()),
|
|
173
|
+
serverId: S.String.pipe(T.Label()),
|
|
174
|
+
backupId: S.String.pipe(T.Label()),
|
|
175
|
+
force: S.optional(S.Boolean.pipe(T.Query())),
|
|
176
|
+
}).pipe(
|
|
177
|
+
T.Http({
|
|
178
|
+
method: "DELETE",
|
|
179
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups/{backupId}",
|
|
180
|
+
code: 200,
|
|
181
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
182
|
+
}),
|
|
183
|
+
),
|
|
184
|
+
).annotate({ identifier: "DeleteBackupRequest" }) as any as S.Schema<DeleteBackupRequest>;
|
|
185
|
+
|
|
186
|
+
export interface DeleteBackupResponse {}
|
|
187
|
+
export const DeleteBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
188
|
+
identifier: "DeleteBackupResponse",
|
|
189
|
+
}) as any as S.Schema<DeleteBackupResponse>;
|
|
190
|
+
|
|
191
|
+
export interface DeleteBackupScheduleRequest {
|
|
192
|
+
/** project id */
|
|
193
|
+
projectId: string;
|
|
194
|
+
/** region */
|
|
195
|
+
region: string;
|
|
196
|
+
/** server id */
|
|
197
|
+
serverId: string;
|
|
198
|
+
/** backup schedule id */
|
|
199
|
+
backupScheduleId: string;
|
|
200
|
+
}
|
|
201
|
+
export const DeleteBackupScheduleRequest = /*@__PURE__*/ S.suspend(() =>
|
|
202
|
+
S.Struct({
|
|
203
|
+
projectId: S.String.pipe(T.Label()),
|
|
204
|
+
region: S.String.pipe(T.Label()),
|
|
205
|
+
serverId: S.String.pipe(T.Label()),
|
|
206
|
+
backupScheduleId: S.String.pipe(T.Label()),
|
|
207
|
+
}).pipe(
|
|
208
|
+
T.Http({
|
|
209
|
+
method: "DELETE",
|
|
210
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backup-schedules/{backupScheduleId}",
|
|
211
|
+
code: 200,
|
|
212
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
213
|
+
}),
|
|
214
|
+
),
|
|
215
|
+
).annotate({
|
|
216
|
+
identifier: "DeleteBackupScheduleRequest",
|
|
217
|
+
}) as any as S.Schema<DeleteBackupScheduleRequest>;
|
|
218
|
+
|
|
219
|
+
export interface DeleteBackupScheduleResponse {}
|
|
220
|
+
export const DeleteBackupScheduleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
221
|
+
identifier: "DeleteBackupScheduleResponse",
|
|
222
|
+
}) as any as S.Schema<DeleteBackupScheduleResponse>;
|
|
223
|
+
|
|
224
|
+
export interface DeleteVolumeBackupRequest {
|
|
225
|
+
/** project id */
|
|
226
|
+
projectId: string;
|
|
227
|
+
/** region */
|
|
228
|
+
region: string;
|
|
229
|
+
/** server id */
|
|
230
|
+
serverId: string;
|
|
231
|
+
/** id of the backup */
|
|
232
|
+
backupId: string;
|
|
233
|
+
/** id of the volume backup */
|
|
234
|
+
volumeBackupId: string;
|
|
235
|
+
/** Force delete the volume backup */
|
|
236
|
+
force?: boolean;
|
|
237
|
+
}
|
|
238
|
+
export const DeleteVolumeBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
239
|
+
S.Struct({
|
|
240
|
+
projectId: S.String.pipe(T.Label()),
|
|
241
|
+
region: S.String.pipe(T.Label()),
|
|
242
|
+
serverId: S.String.pipe(T.Label()),
|
|
243
|
+
backupId: S.String.pipe(T.Label()),
|
|
244
|
+
volumeBackupId: S.String.pipe(T.Label()),
|
|
245
|
+
force: S.optional(S.Boolean.pipe(T.Query())),
|
|
246
|
+
}).pipe(
|
|
247
|
+
T.Http({
|
|
248
|
+
method: "DELETE",
|
|
249
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups/{backupId}/volume-backups/{volumeBackupId}",
|
|
250
|
+
code: 200,
|
|
251
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
252
|
+
}),
|
|
253
|
+
),
|
|
254
|
+
).annotate({
|
|
255
|
+
identifier: "DeleteVolumeBackupRequest",
|
|
256
|
+
}) as any as S.Schema<DeleteVolumeBackupRequest>;
|
|
257
|
+
|
|
258
|
+
export interface DeleteVolumeBackupResponse {}
|
|
259
|
+
export const DeleteVolumeBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
260
|
+
identifier: "DeleteVolumeBackupResponse",
|
|
261
|
+
}) as any as S.Schema<DeleteVolumeBackupResponse>;
|
|
262
|
+
|
|
263
|
+
export interface DisableServiceResourceRequest {
|
|
264
|
+
/** project id */
|
|
265
|
+
projectId: string;
|
|
266
|
+
/** region */
|
|
267
|
+
region: string;
|
|
268
|
+
/** server id */
|
|
269
|
+
serverId: string;
|
|
270
|
+
}
|
|
271
|
+
export const DisableServiceResourceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
272
|
+
S.Struct({
|
|
273
|
+
projectId: S.String.pipe(T.Label()),
|
|
274
|
+
region: S.String.pipe(T.Label()),
|
|
275
|
+
serverId: S.String.pipe(T.Label()),
|
|
276
|
+
}).pipe(
|
|
277
|
+
T.Http({
|
|
278
|
+
method: "DELETE",
|
|
279
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service",
|
|
280
|
+
code: 200,
|
|
281
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
282
|
+
}),
|
|
283
|
+
),
|
|
284
|
+
).annotate({
|
|
285
|
+
identifier: "DisableServiceResourceRequest",
|
|
286
|
+
}) as any as S.Schema<DisableServiceResourceRequest>;
|
|
287
|
+
|
|
288
|
+
export interface DisableServiceResourceResponse {}
|
|
289
|
+
export const DisableServiceResourceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
290
|
+
identifier: "DisableServiceResourceResponse",
|
|
291
|
+
}) as any as S.Schema<DisableServiceResourceResponse>;
|
|
292
|
+
|
|
293
|
+
export interface EnableServiceResourceRequest {
|
|
294
|
+
/** project id */
|
|
295
|
+
projectId: string;
|
|
296
|
+
/** region */
|
|
297
|
+
region: string;
|
|
298
|
+
/** server id */
|
|
299
|
+
serverId: string;
|
|
300
|
+
backupPolicyId?: string;
|
|
301
|
+
}
|
|
302
|
+
export const EnableServiceResourceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
303
|
+
S.Struct({
|
|
304
|
+
projectId: S.String.pipe(T.Label()),
|
|
305
|
+
region: S.String.pipe(T.Label()),
|
|
306
|
+
serverId: S.String.pipe(T.Label()),
|
|
307
|
+
backupPolicyId: S.optional(S.String),
|
|
308
|
+
}).pipe(
|
|
309
|
+
T.Http({
|
|
310
|
+
method: "POST",
|
|
311
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service",
|
|
312
|
+
code: 200,
|
|
313
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
314
|
+
}),
|
|
315
|
+
),
|
|
316
|
+
).annotate({
|
|
317
|
+
identifier: "EnableServiceResourceRequest",
|
|
318
|
+
}) as any as S.Schema<EnableServiceResourceRequest>;
|
|
319
|
+
|
|
320
|
+
export interface EnableServiceResourceResponse {}
|
|
321
|
+
export const EnableServiceResourceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
322
|
+
identifier: "EnableServiceResourceResponse",
|
|
323
|
+
}) as any as S.Schema<EnableServiceResourceResponse>;
|
|
324
|
+
|
|
325
|
+
export interface GetBackupRequest {
|
|
326
|
+
/** project id */
|
|
327
|
+
projectId: string;
|
|
328
|
+
/** region */
|
|
329
|
+
region: string;
|
|
330
|
+
/** server id */
|
|
331
|
+
serverId: string;
|
|
332
|
+
/** id of the backup */
|
|
333
|
+
backupId: string;
|
|
334
|
+
}
|
|
335
|
+
export const GetBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
336
|
+
S.Struct({
|
|
337
|
+
projectId: S.String.pipe(T.Label()),
|
|
338
|
+
region: S.String.pipe(T.Label()),
|
|
339
|
+
serverId: S.String.pipe(T.Label()),
|
|
340
|
+
backupId: S.String.pipe(T.Label()),
|
|
341
|
+
}).pipe(
|
|
342
|
+
T.Http({
|
|
343
|
+
method: "GET",
|
|
344
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups/{backupId}",
|
|
345
|
+
code: 200,
|
|
346
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
347
|
+
}),
|
|
348
|
+
),
|
|
349
|
+
).annotate({ identifier: "GetBackupRequest" }) as any as S.Schema<GetBackupRequest>;
|
|
350
|
+
|
|
351
|
+
export type BackupStatus =
|
|
352
|
+
| "in-progress"
|
|
353
|
+
| "inconsistent"
|
|
354
|
+
| "available"
|
|
355
|
+
| "error"
|
|
356
|
+
| "error-restoring"
|
|
357
|
+
| "error-creating"
|
|
358
|
+
| "error-deleting"
|
|
359
|
+
| "unrecognized";
|
|
360
|
+
export const BackupStatus = S.String;
|
|
361
|
+
|
|
362
|
+
export type BackupVolumeBackupsItemStatus =
|
|
363
|
+
| "available"
|
|
364
|
+
| "creating"
|
|
365
|
+
| "deleting"
|
|
366
|
+
| "error-deleting"
|
|
367
|
+
| "error"
|
|
368
|
+
| "error-restoring"
|
|
369
|
+
| "restoring"
|
|
370
|
+
| "error-creating"
|
|
371
|
+
| "unrecognized";
|
|
372
|
+
export const BackupVolumeBackupsItemStatus = S.String;
|
|
373
|
+
|
|
374
|
+
export interface BackupVolumeBackupsItem {
|
|
375
|
+
id?: string;
|
|
376
|
+
lastRestoredAt?: string;
|
|
377
|
+
lastRestoredVolumeId?: string;
|
|
378
|
+
size?: number;
|
|
379
|
+
status?: BackupVolumeBackupsItemStatus;
|
|
380
|
+
volumeId?: string;
|
|
381
|
+
}
|
|
382
|
+
export const BackupVolumeBackupsItem = /*@__PURE__*/ S.suspend(() =>
|
|
383
|
+
S.Struct({
|
|
384
|
+
id: S.optional(S.String),
|
|
385
|
+
lastRestoredAt: S.optional(S.String),
|
|
386
|
+
lastRestoredVolumeId: S.optional(S.String),
|
|
387
|
+
size: S.optional(S.Number),
|
|
388
|
+
status: S.optional(BackupVolumeBackupsItemStatus),
|
|
389
|
+
volumeId: S.optional(S.String),
|
|
390
|
+
}),
|
|
391
|
+
).annotate({ identifier: "BackupVolumeBackupsItem" }) as any as S.Schema<BackupVolumeBackupsItem>;
|
|
392
|
+
|
|
393
|
+
export type BackupVolumeBackupsList = Array<BackupVolumeBackupsItem>;
|
|
394
|
+
export const BackupVolumeBackupsList = /*@__PURE__*/ S.Array(
|
|
395
|
+
BackupVolumeBackupsItem,
|
|
396
|
+
) as any as S.Schema<BackupVolumeBackupsList>;
|
|
397
|
+
|
|
398
|
+
export interface Backup {
|
|
399
|
+
createdAt: string;
|
|
400
|
+
expireAt: string;
|
|
401
|
+
id: string;
|
|
402
|
+
lastRestoredAt?: string;
|
|
403
|
+
name: string;
|
|
404
|
+
size?: number;
|
|
405
|
+
status: BackupStatus;
|
|
406
|
+
volumeBackups?: BackupVolumeBackupsList;
|
|
407
|
+
}
|
|
408
|
+
export const Backup = /*@__PURE__*/ S.suspend(() =>
|
|
409
|
+
S.Struct({
|
|
410
|
+
createdAt: S.String,
|
|
411
|
+
expireAt: S.String,
|
|
412
|
+
id: S.String,
|
|
413
|
+
lastRestoredAt: S.optional(S.String),
|
|
414
|
+
name: S.String,
|
|
415
|
+
size: S.optional(S.Number),
|
|
416
|
+
status: BackupStatus,
|
|
417
|
+
volumeBackups: S.optional(BackupVolumeBackupsList),
|
|
418
|
+
}),
|
|
419
|
+
).annotate({ identifier: "Backup" }) as any as S.Schema<Backup>;
|
|
420
|
+
|
|
421
|
+
export interface GetBackupScheduleRequest {
|
|
422
|
+
/** project id */
|
|
423
|
+
projectId: string;
|
|
424
|
+
/** region */
|
|
425
|
+
region: string;
|
|
426
|
+
/** server id */
|
|
427
|
+
serverId: string;
|
|
428
|
+
/** backup schedule id */
|
|
429
|
+
backupScheduleId: string;
|
|
430
|
+
}
|
|
431
|
+
export const GetBackupScheduleRequest = /*@__PURE__*/ S.suspend(() =>
|
|
432
|
+
S.Struct({
|
|
433
|
+
projectId: S.String.pipe(T.Label()),
|
|
434
|
+
region: S.String.pipe(T.Label()),
|
|
435
|
+
serverId: S.String.pipe(T.Label()),
|
|
436
|
+
backupScheduleId: S.String.pipe(T.Label()),
|
|
437
|
+
}).pipe(
|
|
438
|
+
T.Http({
|
|
439
|
+
method: "GET",
|
|
440
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backup-schedules/{backupScheduleId}",
|
|
441
|
+
code: 200,
|
|
442
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
443
|
+
}),
|
|
444
|
+
),
|
|
445
|
+
).annotate({ identifier: "GetBackupScheduleRequest" }) as any as S.Schema<GetBackupScheduleRequest>;
|
|
446
|
+
|
|
447
|
+
export interface GetServiceResourceRequest {
|
|
448
|
+
/** project id */
|
|
449
|
+
projectId: string;
|
|
450
|
+
/** region */
|
|
451
|
+
region: string;
|
|
452
|
+
/** server id */
|
|
453
|
+
serverId: string;
|
|
454
|
+
}
|
|
455
|
+
export const GetServiceResourceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
456
|
+
S.Struct({
|
|
457
|
+
projectId: S.String.pipe(T.Label()),
|
|
458
|
+
region: S.String.pipe(T.Label()),
|
|
459
|
+
serverId: S.String.pipe(T.Label()),
|
|
460
|
+
}).pipe(
|
|
461
|
+
T.Http({
|
|
462
|
+
method: "GET",
|
|
463
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service",
|
|
464
|
+
code: 200,
|
|
465
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
466
|
+
}),
|
|
467
|
+
),
|
|
468
|
+
).annotate({
|
|
469
|
+
identifier: "GetServiceResourceRequest",
|
|
470
|
+
}) as any as S.Schema<GetServiceResourceRequest>;
|
|
471
|
+
|
|
472
|
+
export interface GetBackupServiceResponse {
|
|
473
|
+
enabled?: boolean;
|
|
474
|
+
}
|
|
475
|
+
export const GetBackupServiceResponse = /*@__PURE__*/ S.suspend(() =>
|
|
476
|
+
S.Struct({
|
|
477
|
+
enabled: S.optional(S.Boolean),
|
|
478
|
+
}),
|
|
479
|
+
).annotate({ identifier: "GetBackupServiceResponse" }) as any as S.Schema<GetBackupServiceResponse>;
|
|
480
|
+
|
|
481
|
+
export interface ListBackupPoliciesRequest {
|
|
482
|
+
/** project id */
|
|
483
|
+
projectId: string;
|
|
484
|
+
}
|
|
485
|
+
export const ListBackupPoliciesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
486
|
+
S.Struct({
|
|
487
|
+
projectId: S.String.pipe(T.Label()),
|
|
488
|
+
}).pipe(
|
|
489
|
+
T.Http({
|
|
490
|
+
method: "GET",
|
|
491
|
+
uri: "/v2/projects/{projectId}/backup-policies",
|
|
492
|
+
code: 200,
|
|
493
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
494
|
+
}),
|
|
495
|
+
),
|
|
496
|
+
).annotate({
|
|
497
|
+
identifier: "ListBackupPoliciesRequest",
|
|
498
|
+
}) as any as S.Schema<ListBackupPoliciesRequest>;
|
|
499
|
+
|
|
500
|
+
export interface BackupPolicyBackupProperties {
|
|
501
|
+
name?: string;
|
|
502
|
+
retentionPeriod?: number;
|
|
503
|
+
}
|
|
504
|
+
export const BackupPolicyBackupProperties = /*@__PURE__*/ S.suspend(() =>
|
|
505
|
+
S.Struct({
|
|
506
|
+
name: S.optional(S.String),
|
|
507
|
+
retentionPeriod: S.optional(S.Number),
|
|
508
|
+
}),
|
|
509
|
+
).annotate({
|
|
510
|
+
identifier: "BackupPolicyBackupProperties",
|
|
511
|
+
}) as any as S.Schema<BackupPolicyBackupProperties>;
|
|
512
|
+
|
|
513
|
+
export interface BackupPolicy {
|
|
514
|
+
backupProperties?: BackupPolicyBackupProperties;
|
|
515
|
+
default?: boolean;
|
|
516
|
+
description?: string;
|
|
517
|
+
enabled?: boolean;
|
|
518
|
+
id?: string;
|
|
519
|
+
name?: string;
|
|
520
|
+
/** An rrule (Recurrence Rule) is a standardized string format used in iCalendar (RFC 5545) to define repeating events, and you can generate one by using a dedicated library or by using online generator tools to specify parameters like frequency, interval, and end dates */
|
|
521
|
+
rrule?: string;
|
|
522
|
+
}
|
|
523
|
+
export const BackupPolicy = /*@__PURE__*/ S.suspend(() =>
|
|
524
|
+
S.Struct({
|
|
525
|
+
backupProperties: S.optional(BackupPolicyBackupProperties),
|
|
526
|
+
default: S.optional(S.Boolean),
|
|
527
|
+
description: S.optional(S.String),
|
|
528
|
+
enabled: S.optional(S.Boolean),
|
|
529
|
+
id: S.optional(S.String),
|
|
530
|
+
name: S.optional(S.String),
|
|
531
|
+
rrule: S.optional(S.String),
|
|
532
|
+
}),
|
|
533
|
+
).annotate({ identifier: "BackupPolicy" }) as any as S.Schema<BackupPolicy>;
|
|
534
|
+
|
|
535
|
+
export type GetBackupPoliciesResponseItemsList = Array<BackupPolicy>;
|
|
536
|
+
export const GetBackupPoliciesResponseItemsList = /*@__PURE__*/ S.Array(
|
|
537
|
+
BackupPolicy,
|
|
538
|
+
) as any as S.Schema<GetBackupPoliciesResponseItemsList>;
|
|
539
|
+
|
|
540
|
+
export interface GetBackupPoliciesResponse {
|
|
541
|
+
items?: GetBackupPoliciesResponseItemsList;
|
|
542
|
+
}
|
|
543
|
+
export const GetBackupPoliciesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
544
|
+
S.Struct({
|
|
545
|
+
items: S.optional(GetBackupPoliciesResponseItemsList),
|
|
546
|
+
}),
|
|
547
|
+
).annotate({
|
|
548
|
+
identifier: "GetBackupPoliciesResponse",
|
|
549
|
+
}) as any as S.Schema<GetBackupPoliciesResponse>;
|
|
550
|
+
|
|
551
|
+
export interface ListBackupsRequest {
|
|
552
|
+
/** project id */
|
|
553
|
+
projectId: string;
|
|
554
|
+
/** region */
|
|
555
|
+
region: string;
|
|
556
|
+
/** server id */
|
|
557
|
+
serverId: string;
|
|
558
|
+
}
|
|
559
|
+
export const ListBackupsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
560
|
+
S.Struct({
|
|
561
|
+
projectId: S.String.pipe(T.Label()),
|
|
562
|
+
region: S.String.pipe(T.Label()),
|
|
563
|
+
serverId: S.String.pipe(T.Label()),
|
|
564
|
+
}).pipe(
|
|
565
|
+
T.Http({
|
|
566
|
+
method: "GET",
|
|
567
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups",
|
|
568
|
+
code: 200,
|
|
569
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
570
|
+
}),
|
|
571
|
+
),
|
|
572
|
+
).annotate({ identifier: "ListBackupsRequest" }) as any as S.Schema<ListBackupsRequest>;
|
|
573
|
+
|
|
574
|
+
export type GetBackupsListResponseItemsList = Array<Backup>;
|
|
575
|
+
export const GetBackupsListResponseItemsList = /*@__PURE__*/ S.Array(
|
|
576
|
+
Backup,
|
|
577
|
+
) as any as S.Schema<GetBackupsListResponseItemsList>;
|
|
578
|
+
|
|
579
|
+
export interface GetBackupsListResponse {
|
|
580
|
+
items?: GetBackupsListResponseItemsList;
|
|
581
|
+
}
|
|
582
|
+
export const GetBackupsListResponse = /*@__PURE__*/ S.suspend(() =>
|
|
583
|
+
S.Struct({
|
|
584
|
+
items: S.optional(GetBackupsListResponseItemsList),
|
|
585
|
+
}),
|
|
586
|
+
).annotate({ identifier: "GetBackupsListResponse" }) as any as S.Schema<GetBackupsListResponse>;
|
|
587
|
+
|
|
588
|
+
export interface ListBackupSchedulesRequest {
|
|
589
|
+
/** project id */
|
|
590
|
+
projectId: string;
|
|
591
|
+
/** region */
|
|
592
|
+
region: string;
|
|
593
|
+
/** server id */
|
|
594
|
+
serverId: string;
|
|
595
|
+
}
|
|
596
|
+
export const ListBackupSchedulesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
597
|
+
S.Struct({
|
|
598
|
+
projectId: S.String.pipe(T.Label()),
|
|
599
|
+
region: S.String.pipe(T.Label()),
|
|
600
|
+
serverId: S.String.pipe(T.Label()),
|
|
601
|
+
}).pipe(
|
|
602
|
+
T.Http({
|
|
603
|
+
method: "GET",
|
|
604
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backup-schedules",
|
|
605
|
+
code: 200,
|
|
606
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
607
|
+
}),
|
|
608
|
+
),
|
|
609
|
+
).annotate({
|
|
610
|
+
identifier: "ListBackupSchedulesRequest",
|
|
611
|
+
}) as any as S.Schema<ListBackupSchedulesRequest>;
|
|
612
|
+
|
|
613
|
+
export type GetBackupSchedulesResponseItemsList = Array<BackupSchedule>;
|
|
614
|
+
export const GetBackupSchedulesResponseItemsList = /*@__PURE__*/ S.Array(
|
|
615
|
+
BackupSchedule,
|
|
616
|
+
) as any as S.Schema<GetBackupSchedulesResponseItemsList>;
|
|
617
|
+
|
|
618
|
+
export interface GetBackupSchedulesResponse {
|
|
619
|
+
items?: GetBackupSchedulesResponseItemsList;
|
|
620
|
+
}
|
|
621
|
+
export const GetBackupSchedulesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
622
|
+
S.Struct({
|
|
623
|
+
items: S.optional(GetBackupSchedulesResponseItemsList),
|
|
624
|
+
}),
|
|
625
|
+
).annotate({
|
|
626
|
+
identifier: "GetBackupSchedulesResponse",
|
|
627
|
+
}) as any as S.Schema<GetBackupSchedulesResponse>;
|
|
628
|
+
|
|
629
|
+
export type RestoreBackupRequestVolumeIdsList = Array<string>;
|
|
630
|
+
export const RestoreBackupRequestVolumeIdsList = /*@__PURE__*/ S.Array(
|
|
631
|
+
S.String,
|
|
632
|
+
) as any as S.Schema<RestoreBackupRequestVolumeIdsList>;
|
|
633
|
+
|
|
634
|
+
export interface RestoreBackupRequest {
|
|
635
|
+
/** project id */
|
|
636
|
+
projectId: string;
|
|
637
|
+
/** region */
|
|
638
|
+
region: string;
|
|
639
|
+
/** server id */
|
|
640
|
+
serverId: string;
|
|
641
|
+
/** id of the backup */
|
|
642
|
+
backupId: string;
|
|
643
|
+
startServerAfterRestore: boolean;
|
|
644
|
+
volumeIds?: RestoreBackupRequestVolumeIdsList;
|
|
645
|
+
}
|
|
646
|
+
export const RestoreBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
647
|
+
S.Struct({
|
|
648
|
+
projectId: S.String.pipe(T.Label()),
|
|
649
|
+
region: S.String.pipe(T.Label()),
|
|
650
|
+
serverId: S.String.pipe(T.Label()),
|
|
651
|
+
backupId: S.String.pipe(T.Label()),
|
|
652
|
+
startServerAfterRestore: S.Boolean,
|
|
653
|
+
volumeIds: S.optional(RestoreBackupRequestVolumeIdsList),
|
|
654
|
+
}).pipe(
|
|
655
|
+
T.Http({
|
|
656
|
+
method: "POST",
|
|
657
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups/{backupId}/restore",
|
|
658
|
+
code: 200,
|
|
659
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
660
|
+
}),
|
|
661
|
+
),
|
|
662
|
+
).annotate({ identifier: "RestoreBackupRequest" }) as any as S.Schema<RestoreBackupRequest>;
|
|
663
|
+
|
|
664
|
+
export interface RestoreBackupResponse {}
|
|
665
|
+
export const RestoreBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
666
|
+
identifier: "RestoreBackupResponse",
|
|
667
|
+
}) as any as S.Schema<RestoreBackupResponse>;
|
|
668
|
+
|
|
669
|
+
export interface RestoreVolumeBackupRequest {
|
|
670
|
+
/** project id */
|
|
671
|
+
projectId: string;
|
|
672
|
+
/** region */
|
|
673
|
+
region: string;
|
|
674
|
+
/** server id */
|
|
675
|
+
serverId: string;
|
|
676
|
+
/** id of the backup */
|
|
677
|
+
backupId: string;
|
|
678
|
+
/** id of the volume backup */
|
|
679
|
+
volumeBackupId: string;
|
|
680
|
+
restoreVolumeId: string;
|
|
681
|
+
}
|
|
682
|
+
export const RestoreVolumeBackupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
683
|
+
S.Struct({
|
|
684
|
+
projectId: S.String.pipe(T.Label()),
|
|
685
|
+
region: S.String.pipe(T.Label()),
|
|
686
|
+
serverId: S.String.pipe(T.Label()),
|
|
687
|
+
backupId: S.String.pipe(T.Label()),
|
|
688
|
+
volumeBackupId: S.String.pipe(T.Label()),
|
|
689
|
+
restoreVolumeId: S.String,
|
|
690
|
+
}).pipe(
|
|
691
|
+
T.Http({
|
|
692
|
+
method: "POST",
|
|
693
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backups/{backupId}/volume-backups/{volumeBackupId}/restore",
|
|
694
|
+
code: 200,
|
|
695
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
696
|
+
}),
|
|
697
|
+
),
|
|
698
|
+
).annotate({
|
|
699
|
+
identifier: "RestoreVolumeBackupRequest",
|
|
700
|
+
}) as any as S.Schema<RestoreVolumeBackupRequest>;
|
|
701
|
+
|
|
702
|
+
export interface RestoreVolumeBackupResponse {}
|
|
703
|
+
export const RestoreVolumeBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
704
|
+
identifier: "RestoreVolumeBackupResponse",
|
|
705
|
+
}) as any as S.Schema<RestoreVolumeBackupResponse>;
|
|
706
|
+
|
|
707
|
+
export interface UpdateBackupScheduleRequest {
|
|
708
|
+
/** project id */
|
|
709
|
+
projectId: string;
|
|
710
|
+
/** region */
|
|
711
|
+
region: string;
|
|
712
|
+
/** server id */
|
|
713
|
+
serverId: string;
|
|
714
|
+
/** backup schedule id */
|
|
715
|
+
backupScheduleId: string;
|
|
716
|
+
backupProperties?: BackupProperties;
|
|
717
|
+
enabled: boolean;
|
|
718
|
+
/** Max 255 characters */
|
|
719
|
+
name: string;
|
|
720
|
+
/** An rrule (Recurrence Rule) is a standardized string format used in iCalendar (RFC 5545) to define repeating events, and you can generate one by using a dedicated library or by using online generator tools to specify parameters like frequency, interval, and end dates */
|
|
721
|
+
rrule: string;
|
|
722
|
+
}
|
|
723
|
+
export const UpdateBackupScheduleRequest = /*@__PURE__*/ S.suspend(() =>
|
|
724
|
+
S.Struct({
|
|
725
|
+
projectId: S.String.pipe(T.Label()),
|
|
726
|
+
region: S.String.pipe(T.Label()),
|
|
727
|
+
serverId: S.String.pipe(T.Label()),
|
|
728
|
+
backupScheduleId: S.String.pipe(T.Label()),
|
|
729
|
+
backupProperties: S.optional(BackupProperties),
|
|
730
|
+
enabled: S.Boolean,
|
|
731
|
+
name: S.String,
|
|
732
|
+
rrule: S.String,
|
|
733
|
+
}).pipe(
|
|
734
|
+
T.Http({
|
|
735
|
+
method: "PUT",
|
|
736
|
+
uri: "/v2/projects/{projectId}/regions/{region}/servers/{serverId}/backup-schedules/{backupScheduleId}",
|
|
737
|
+
code: 200,
|
|
738
|
+
baseUrl: "https://server-backup.api.stackit.cloud",
|
|
739
|
+
}),
|
|
740
|
+
),
|
|
741
|
+
).annotate({
|
|
742
|
+
identifier: "UpdateBackupScheduleRequest",
|
|
743
|
+
}) as any as S.Schema<UpdateBackupScheduleRequest>;
|
|
744
|
+
|
|
745
|
+
export type CreateBackupError = BadRequest | NotFound | Conflict | StackitOpError;
|
|
746
|
+
/** create backup */
|
|
747
|
+
export const createBackup: API.OperationMethod<
|
|
748
|
+
CreateBackupRequest,
|
|
749
|
+
BackupJob,
|
|
750
|
+
CreateBackupError,
|
|
751
|
+
StackitOpContext
|
|
752
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
753
|
+
input: CreateBackupRequest,
|
|
754
|
+
output: BackupJob,
|
|
755
|
+
errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
|
|
756
|
+
protocol: StackitProtocol,
|
|
757
|
+
retry: Retry.Retry,
|
|
758
|
+
}));
|
|
759
|
+
|
|
760
|
+
export type CreateBackupScheduleError = BadRequest | NotFound | StackitOpError;
|
|
761
|
+
/** create backup schedule */
|
|
762
|
+
export const createBackupSchedule: API.OperationMethod<
|
|
763
|
+
CreateBackupScheduleRequest,
|
|
764
|
+
BackupSchedule,
|
|
765
|
+
CreateBackupScheduleError,
|
|
766
|
+
StackitOpContext
|
|
767
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
768
|
+
input: CreateBackupScheduleRequest,
|
|
769
|
+
output: BackupSchedule,
|
|
770
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
771
|
+
protocol: StackitProtocol,
|
|
772
|
+
retry: Retry.Retry,
|
|
773
|
+
}));
|
|
774
|
+
|
|
775
|
+
export type DeleteBackupError = BadRequest | NotFound | StackitOpError;
|
|
776
|
+
/** delete backup */
|
|
777
|
+
export const deleteBackup: API.OperationMethod<
|
|
778
|
+
DeleteBackupRequest,
|
|
779
|
+
DeleteBackupResponse,
|
|
780
|
+
DeleteBackupError,
|
|
781
|
+
StackitOpContext
|
|
782
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
783
|
+
input: DeleteBackupRequest,
|
|
784
|
+
output: DeleteBackupResponse,
|
|
785
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
786
|
+
protocol: StackitProtocol,
|
|
787
|
+
retry: Retry.Retry,
|
|
788
|
+
}));
|
|
789
|
+
|
|
790
|
+
export type DeleteBackupScheduleError = BadRequest | NotFound | StackitOpError;
|
|
791
|
+
/** delete backup schedule */
|
|
792
|
+
export const deleteBackupSchedule: API.OperationMethod<
|
|
793
|
+
DeleteBackupScheduleRequest,
|
|
794
|
+
DeleteBackupScheduleResponse,
|
|
795
|
+
DeleteBackupScheduleError,
|
|
796
|
+
StackitOpContext
|
|
797
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
798
|
+
input: DeleteBackupScheduleRequest,
|
|
799
|
+
output: DeleteBackupScheduleResponse,
|
|
800
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
801
|
+
protocol: StackitProtocol,
|
|
802
|
+
retry: Retry.Retry,
|
|
803
|
+
}));
|
|
804
|
+
|
|
805
|
+
export type DeleteVolumeBackupError = BadRequest | NotFound | StackitOpError;
|
|
806
|
+
/** delete volume backup */
|
|
807
|
+
export const deleteVolumeBackup: API.OperationMethod<
|
|
808
|
+
DeleteVolumeBackupRequest,
|
|
809
|
+
DeleteVolumeBackupResponse,
|
|
810
|
+
DeleteVolumeBackupError,
|
|
811
|
+
StackitOpContext
|
|
812
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
813
|
+
input: DeleteVolumeBackupRequest,
|
|
814
|
+
output: DeleteVolumeBackupResponse,
|
|
815
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
816
|
+
protocol: StackitProtocol,
|
|
817
|
+
retry: Retry.Retry,
|
|
818
|
+
}));
|
|
819
|
+
|
|
820
|
+
export type DisableServiceResourceError = BadRequest | NotFound | StackitOpError;
|
|
821
|
+
/** disable backup service */
|
|
822
|
+
export const disableServiceResource: API.OperationMethod<
|
|
823
|
+
DisableServiceResourceRequest,
|
|
824
|
+
DisableServiceResourceResponse,
|
|
825
|
+
DisableServiceResourceError,
|
|
826
|
+
StackitOpContext
|
|
827
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
828
|
+
input: DisableServiceResourceRequest,
|
|
829
|
+
output: DisableServiceResourceResponse,
|
|
830
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
831
|
+
protocol: StackitProtocol,
|
|
832
|
+
retry: Retry.Retry,
|
|
833
|
+
}));
|
|
834
|
+
|
|
835
|
+
export type EnableServiceResourceError = BadRequest | NotFound | StackitOpError;
|
|
836
|
+
/** enable backup service */
|
|
837
|
+
export const enableServiceResource: API.OperationMethod<
|
|
838
|
+
EnableServiceResourceRequest,
|
|
839
|
+
EnableServiceResourceResponse,
|
|
840
|
+
EnableServiceResourceError,
|
|
841
|
+
StackitOpContext
|
|
842
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
843
|
+
input: EnableServiceResourceRequest,
|
|
844
|
+
output: EnableServiceResourceResponse,
|
|
845
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
846
|
+
protocol: StackitProtocol,
|
|
847
|
+
retry: Retry.Retry,
|
|
848
|
+
}));
|
|
849
|
+
|
|
850
|
+
export type GetBackupError = BadRequest | NotFound | StackitOpError;
|
|
851
|
+
/** get backup */
|
|
852
|
+
export const getBackup: API.OperationMethod<
|
|
853
|
+
GetBackupRequest,
|
|
854
|
+
Backup,
|
|
855
|
+
GetBackupError,
|
|
856
|
+
StackitOpContext
|
|
857
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
858
|
+
input: GetBackupRequest,
|
|
859
|
+
output: Backup,
|
|
860
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
861
|
+
protocol: StackitProtocol,
|
|
862
|
+
retry: Retry.Retry,
|
|
863
|
+
}));
|
|
864
|
+
|
|
865
|
+
export type GetBackupScheduleError = BadRequest | NotFound | StackitOpError;
|
|
866
|
+
/** get single backup schedule details */
|
|
867
|
+
export const getBackupSchedule: API.OperationMethod<
|
|
868
|
+
GetBackupScheduleRequest,
|
|
869
|
+
BackupSchedule,
|
|
870
|
+
GetBackupScheduleError,
|
|
871
|
+
StackitOpContext
|
|
872
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
873
|
+
input: GetBackupScheduleRequest,
|
|
874
|
+
output: BackupSchedule,
|
|
875
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
876
|
+
protocol: StackitProtocol,
|
|
877
|
+
retry: Retry.Retry,
|
|
878
|
+
}));
|
|
879
|
+
|
|
880
|
+
export type GetServiceResourceError = BadRequest | NotFound | StackitOpError;
|
|
881
|
+
/** get backup service details */
|
|
882
|
+
export const getServiceResource: API.OperationMethod<
|
|
883
|
+
GetServiceResourceRequest,
|
|
884
|
+
GetBackupServiceResponse,
|
|
885
|
+
GetServiceResourceError,
|
|
886
|
+
StackitOpContext
|
|
887
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
888
|
+
input: GetServiceResourceRequest,
|
|
889
|
+
output: GetBackupServiceResponse,
|
|
890
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
891
|
+
protocol: StackitProtocol,
|
|
892
|
+
retry: Retry.Retry,
|
|
893
|
+
}));
|
|
894
|
+
|
|
895
|
+
export type ListBackupPoliciesError = BadRequest | NotFound | StackitOpError;
|
|
896
|
+
/** get list of backup policies */
|
|
897
|
+
export const listBackupPolicies: API.OperationMethod<
|
|
898
|
+
ListBackupPoliciesRequest,
|
|
899
|
+
GetBackupPoliciesResponse,
|
|
900
|
+
ListBackupPoliciesError,
|
|
901
|
+
StackitOpContext
|
|
902
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
903
|
+
input: ListBackupPoliciesRequest,
|
|
904
|
+
output: GetBackupPoliciesResponse,
|
|
905
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
906
|
+
protocol: StackitProtocol,
|
|
907
|
+
retry: Retry.Retry,
|
|
908
|
+
}));
|
|
909
|
+
|
|
910
|
+
export type ListBackupsError = BadRequest | NotFound | StackitOpError;
|
|
911
|
+
/** get list of backups */
|
|
912
|
+
export const listBackups: API.OperationMethod<
|
|
913
|
+
ListBackupsRequest,
|
|
914
|
+
GetBackupsListResponse,
|
|
915
|
+
ListBackupsError,
|
|
916
|
+
StackitOpContext
|
|
917
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
918
|
+
input: ListBackupsRequest,
|
|
919
|
+
output: GetBackupsListResponse,
|
|
920
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
921
|
+
protocol: StackitProtocol,
|
|
922
|
+
retry: Retry.Retry,
|
|
923
|
+
}));
|
|
924
|
+
|
|
925
|
+
export type ListBackupSchedulesError = BadRequest | NotFound | StackitOpError;
|
|
926
|
+
/** get list of backup schedules */
|
|
927
|
+
export const listBackupSchedules: API.OperationMethod<
|
|
928
|
+
ListBackupSchedulesRequest,
|
|
929
|
+
GetBackupSchedulesResponse,
|
|
930
|
+
ListBackupSchedulesError,
|
|
931
|
+
StackitOpContext
|
|
932
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
933
|
+
input: ListBackupSchedulesRequest,
|
|
934
|
+
output: GetBackupSchedulesResponse,
|
|
935
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
936
|
+
protocol: StackitProtocol,
|
|
937
|
+
retry: Retry.Retry,
|
|
938
|
+
}));
|
|
939
|
+
|
|
940
|
+
export type RestoreBackupError = BadRequest | NotFound | Conflict | StackitOpError;
|
|
941
|
+
/** trigger restore of the requested backup */
|
|
942
|
+
export const restoreBackup: API.OperationMethod<
|
|
943
|
+
RestoreBackupRequest,
|
|
944
|
+
RestoreBackupResponse,
|
|
945
|
+
RestoreBackupError,
|
|
946
|
+
StackitOpContext
|
|
947
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
948
|
+
input: RestoreBackupRequest,
|
|
949
|
+
output: RestoreBackupResponse,
|
|
950
|
+
errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
|
|
951
|
+
protocol: StackitProtocol,
|
|
952
|
+
retry: Retry.Retry,
|
|
953
|
+
}));
|
|
954
|
+
|
|
955
|
+
export type RestoreVolumeBackupError = BadRequest | NotFound | StackitOpError;
|
|
956
|
+
/** trigger restore of the requested volume backup */
|
|
957
|
+
export const restoreVolumeBackup: API.OperationMethod<
|
|
958
|
+
RestoreVolumeBackupRequest,
|
|
959
|
+
RestoreVolumeBackupResponse,
|
|
960
|
+
RestoreVolumeBackupError,
|
|
961
|
+
StackitOpContext
|
|
962
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
963
|
+
input: RestoreVolumeBackupRequest,
|
|
964
|
+
output: RestoreVolumeBackupResponse,
|
|
965
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
966
|
+
protocol: StackitProtocol,
|
|
967
|
+
retry: Retry.Retry,
|
|
968
|
+
}));
|
|
969
|
+
|
|
970
|
+
export type UpdateBackupScheduleError = BadRequest | NotFound | StackitOpError;
|
|
971
|
+
/** update backup schedule */
|
|
972
|
+
export const updateBackupSchedule: API.OperationMethod<
|
|
973
|
+
UpdateBackupScheduleRequest,
|
|
974
|
+
BackupSchedule,
|
|
975
|
+
UpdateBackupScheduleError,
|
|
976
|
+
StackitOpContext
|
|
977
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
978
|
+
input: UpdateBackupScheduleRequest,
|
|
979
|
+
output: BackupSchedule,
|
|
980
|
+
errors: [BadRequest, NotFound, UnknownStackitError],
|
|
981
|
+
protocol: StackitProtocol,
|
|
982
|
+
retry: Retry.Retry,
|
|
983
|
+
}));
|