@distilled.cloud/stackit 0.0.0-placeholder → 1.0.0-rc.13
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 +34 -0
- 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 +48 -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 +148 -0
- package/lib/protocol.js.map +1 -0
- package/lib/response-validation.test.d.ts +4 -0
- package/lib/response-validation.test.d.ts.map +1 -0
- package/lib/response-validation.test.js +31 -0
- package/lib/response-validation.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 +562 -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 +545 -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 +353 -0
- package/lib/services/authorization.js.map +1 -0
- package/lib/services/automation.d.ts +358 -0
- package/lib/services/automation.d.ts.map +1 -0
- package/lib/services/automation.js +426 -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 +992 -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 +197 -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 +188 -0
- package/lib/services/cost.js.map +1 -0
- package/lib/services/dns.d.ts +875 -0
- package/lib/services/dns.d.ts.map +1 -0
- package/lib/services/dns.js +854 -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 +339 -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 +375 -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 +423 -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 +552 -0
- package/lib/services/git.js.map +1 -0
- package/lib/services/iaas.d.ts +2965 -0
- package/lib/services/iaas.d.ts.map +1 -0
- package/lib/services/iaas.js +3768 -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 +513 -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 +703 -0
- package/lib/services/kms.js.map +1 -0
- package/lib/services/lb_ip_lists.d.ts +162 -0
- package/lib/services/lb_ip_lists.d.ts.map +1 -0
- package/lib/services/lb_ip_lists.js +173 -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 +542 -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 +636 -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 +498 -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 +611 -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 +356 -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 +319 -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 +889 -0
- package/lib/services/mongodb_flex.js.map +1 -0
- package/lib/services/object_storage.d.ts +446 -0
- package/lib/services/object_storage.d.ts.map +1 -0
- package/lib/services/object_storage.js +577 -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 +3407 -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 +623 -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 +789 -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 +1018 -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 +614 -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 +636 -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 +221 -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 +503 -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 +203 -0
- package/lib/services/run_command.js.map +1 -0
- package/lib/services/sca.d.ts +541 -0
- package/lib/services/sca.d.ts.map +1 -0
- package/lib/services/sca.js +478 -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 +718 -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 +659 -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 +474 -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 +364 -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 +523 -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 +159 -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 +845 -0
- package/lib/services/sfs.js.map +1 -0
- package/lib/services/ske.d.ts +536 -0
- package/lib/services/ske.d.ts.map +1 -0
- package/lib/services/ske.js +598 -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 +1087 -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 +393 -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 +550 -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 +523 -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 +301 -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 +627 -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 +1013 -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 +556 -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 +78 -7
- package/src/credentials.ts +90 -0
- package/src/errors.ts +50 -0
- package/src/index.ts +34 -0
- package/src/pagination.ts +73 -0
- package/src/protocol.ts +243 -0
- package/src/response-validation.test.ts +45 -0
- package/src/retry.ts +53 -0
- package/src/services/alb.ts +1409 -0
- package/src/services/alb_waf.ts +1347 -0
- package/src/services/authorization.ts +740 -0
- package/src/services/automation.ts +966 -0
- package/src/services/cdn.ts +2736 -0
- package/src/services/certificates.ts +450 -0
- package/src/services/cost.ts +484 -0
- package/src/services/dns.ts +2271 -0
- package/src/services/dremio.ts +803 -0
- package/src/services/edge.ts +839 -0
- package/src/services/functions.ts +1010 -0
- package/src/services/git.ts +1275 -0
- package/src/services/iaas.ts +8670 -0
- package/src/services/index.ts +51 -0
- package/src/services/intake.ts +1233 -0
- package/src/services/kms.ts +1638 -0
- package/src/services/lb_ip_lists.ts +377 -0
- package/src/services/load_balancer.ts +1342 -0
- package/src/services/logme.ts +1379 -0
- package/src/services/logs.ts +1150 -0
- package/src/services/mariadb.ts +1293 -0
- package/src/services/model_experiments.ts +797 -0
- package/src/services/model_serving.ts +697 -0
- package/src/services/mongodb_flex.ts +2078 -0
- package/src/services/object_storage.ts +1248 -0
- package/src/services/observability.ts +7856 -0
- package/src/services/opensearch.ts +1354 -0
- package/src/services/pim.ts +2090 -0
- package/src/services/postgres_flex.ts +2326 -0
- package/src/services/pubsub.ts +1336 -0
- package/src/services/rabbitmq.ts +1402 -0
- package/src/services/registry.ts +494 -0
- package/src/services/resource_manager.ts +1155 -0
- package/src/services/run_command.ts +441 -0
- package/src/services/sca.ts +1222 -0
- package/src/services/scf.ts +1537 -0
- package/src/services/secrets_manager.ts +1399 -0
- package/src/services/server_backup.ts +1032 -0
- package/src/services/server_update.ts +767 -0
- package/src/services/service_account.ts +1208 -0
- package/src/services/service_enablement.ts +359 -0
- package/src/services/sfs.ts +1913 -0
- package/src/services/ske.ts +1408 -0
- package/src/services/sqlserverflex.ts +2543 -0
- package/src/services/stackit_marketplace.ts +853 -0
- package/src/services/telemetry_link.ts +1245 -0
- package/src/services/telemetry_router.ts +1205 -0
- package/src/services/ufw.ts +704 -0
- package/src/services/valkey.ts +1357 -0
- package/src/services/vpn.ts +2554 -0
- package/src/services/workflows.ts +1361 -0
- package/src/traits.ts +65 -0
|
@@ -0,0 +1,2736 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as Redacted from "effect/Redacted";
|
|
4
|
+
import * as API from "@distilled.cloud/core/api";
|
|
5
|
+
import * as C from "@distilled.cloud/core/category";
|
|
6
|
+
import * as T from "../traits.ts";
|
|
7
|
+
import {
|
|
8
|
+
StackitProtocol,
|
|
9
|
+
type StackitOpError,
|
|
10
|
+
type StackitOpContext,
|
|
11
|
+
} from "../protocol.ts";
|
|
12
|
+
import { UnknownStackitError } from "../errors.ts";
|
|
13
|
+
import * as Retry from "../retry.ts";
|
|
14
|
+
|
|
15
|
+
export type { StackitOpError, StackitOpContext };
|
|
16
|
+
|
|
17
|
+
export class BadRequest
|
|
18
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
19
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
20
|
+
code: S.Number,
|
|
21
|
+
message: S.String,
|
|
22
|
+
}).pipe(C.withBadRequestError),
|
|
23
|
+
[{ status: 400 }],
|
|
24
|
+
) {}
|
|
25
|
+
|
|
26
|
+
export class NotFound
|
|
27
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
28
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
29
|
+
code: S.Number,
|
|
30
|
+
message: S.String,
|
|
31
|
+
}).pipe(C.withBadRequestError),
|
|
32
|
+
[{ status: 404 }],
|
|
33
|
+
) {}
|
|
34
|
+
|
|
35
|
+
export class UnprocessableEntity
|
|
36
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
37
|
+
/*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
|
|
38
|
+
code: S.Number,
|
|
39
|
+
message: S.String,
|
|
40
|
+
}).pipe(C.withBadRequestError),
|
|
41
|
+
[{ status: 422 }],
|
|
42
|
+
) {}
|
|
43
|
+
|
|
44
|
+
export type HttpBackendCreateGeofencingValueList = Array<string>;
|
|
45
|
+
export const HttpBackendCreateGeofencingValueList = /*@__PURE__*/ S.Array(
|
|
46
|
+
S.String,
|
|
47
|
+
) as any as S.Schema<HttpBackendCreateGeofencingValueList>;
|
|
48
|
+
|
|
49
|
+
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
50
|
+
export type HttpBackendCreateGeofencingMap = {
|
|
51
|
+
[key: string]: HttpBackendCreateGeofencingValueList | undefined;
|
|
52
|
+
};
|
|
53
|
+
export const HttpBackendCreateGeofencingMap = /*@__PURE__*/ S.Record(
|
|
54
|
+
S.String,
|
|
55
|
+
HttpBackendCreateGeofencingValueList,
|
|
56
|
+
) as any as S.Schema<HttpBackendCreateGeofencingMap>;
|
|
57
|
+
|
|
58
|
+
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
59
|
+
export type HttpBackendCreateOriginRequestHeadersMap = {
|
|
60
|
+
[key: string]: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
export const HttpBackendCreateOriginRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
63
|
+
S.String,
|
|
64
|
+
S.String,
|
|
65
|
+
) as any as S.Schema<HttpBackendCreateOriginRequestHeadersMap>;
|
|
66
|
+
|
|
67
|
+
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
68
|
+
export type HttpBackendCreateType = "http";
|
|
69
|
+
export const HttpBackendCreateType = /*@__PURE__*/ S.String;
|
|
70
|
+
|
|
71
|
+
export interface HttpBackendCreate {
|
|
72
|
+
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
73
|
+
geofencing?: HttpBackendCreateGeofencingMap;
|
|
74
|
+
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
75
|
+
originRequestHeaders?: HttpBackendCreateOriginRequestHeadersMap;
|
|
76
|
+
/** The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` */
|
|
77
|
+
originUrl: string;
|
|
78
|
+
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
79
|
+
type: HttpBackendCreateType;
|
|
80
|
+
}
|
|
81
|
+
export const HttpBackendCreate = /*@__PURE__*/ S.suspend(() =>
|
|
82
|
+
S.Struct({
|
|
83
|
+
geofencing: S.optional(HttpBackendCreateGeofencingMap),
|
|
84
|
+
originRequestHeaders: S.optional(HttpBackendCreateOriginRequestHeadersMap),
|
|
85
|
+
originUrl: S.String,
|
|
86
|
+
type: HttpBackendCreateType,
|
|
87
|
+
}),
|
|
88
|
+
).annotate({
|
|
89
|
+
identifier: "HttpBackendCreate",
|
|
90
|
+
}) as any as S.Schema<HttpBackendCreate>;
|
|
91
|
+
|
|
92
|
+
export interface BucketCredentials {
|
|
93
|
+
accessKeyId: string | Redacted.Redacted<string>;
|
|
94
|
+
secretAccessKey: string | Redacted.Redacted<string>;
|
|
95
|
+
}
|
|
96
|
+
export const BucketCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
97
|
+
S.Struct({
|
|
98
|
+
accessKeyId: S.String.pipe(T.SensitiveValue({})),
|
|
99
|
+
secretAccessKey: S.String.pipe(T.SensitiveValue({})),
|
|
100
|
+
}),
|
|
101
|
+
).annotate({
|
|
102
|
+
identifier: "BucketCredentials",
|
|
103
|
+
}) as any as S.Schema<BucketCredentials>;
|
|
104
|
+
|
|
105
|
+
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
106
|
+
export type BucketBackendCreateType = "bucket";
|
|
107
|
+
export const BucketBackendCreateType = /*@__PURE__*/ S.String;
|
|
108
|
+
|
|
109
|
+
export interface BucketBackendCreate {
|
|
110
|
+
/** The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). */
|
|
111
|
+
bucketUrl: string;
|
|
112
|
+
credentials: BucketCredentials;
|
|
113
|
+
/** The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT). */
|
|
114
|
+
region: string;
|
|
115
|
+
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
116
|
+
type: BucketBackendCreateType;
|
|
117
|
+
}
|
|
118
|
+
export const BucketBackendCreate = /*@__PURE__*/ S.suspend(() =>
|
|
119
|
+
S.Struct({
|
|
120
|
+
bucketUrl: S.String,
|
|
121
|
+
credentials: BucketCredentials,
|
|
122
|
+
region: S.String,
|
|
123
|
+
type: BucketBackendCreateType,
|
|
124
|
+
}),
|
|
125
|
+
).annotate({
|
|
126
|
+
identifier: "BucketBackendCreate",
|
|
127
|
+
}) as any as S.Schema<BucketBackendCreate>;
|
|
128
|
+
|
|
129
|
+
/** Configuration for the content origin backend. */
|
|
130
|
+
export type CreateDistributionRequestBackend =
|
|
131
|
+
| HttpBackendCreate
|
|
132
|
+
| BucketBackendCreate;
|
|
133
|
+
export const CreateDistributionRequestBackend =
|
|
134
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<CreateDistributionRequestBackend>;
|
|
135
|
+
|
|
136
|
+
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
137
|
+
export type CreateDistributionRequestBlockedCountriesList = Array<string>;
|
|
138
|
+
export const CreateDistributionRequestBlockedCountriesList =
|
|
139
|
+
/*@__PURE__*/ S.Array(
|
|
140
|
+
S.String,
|
|
141
|
+
) as any as S.Schema<CreateDistributionRequestBlockedCountriesList>;
|
|
142
|
+
|
|
143
|
+
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
144
|
+
export type CreateDistributionRequestBlockedIpsList = Array<string>;
|
|
145
|
+
export const CreateDistributionRequestBlockedIpsList = /*@__PURE__*/ S.Array(
|
|
146
|
+
S.String,
|
|
147
|
+
) as any as S.Schema<CreateDistributionRequestBlockedIpsList>;
|
|
148
|
+
|
|
149
|
+
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
150
|
+
export type CacheConfigCreateCacheKeyHeadersList = Array<string>;
|
|
151
|
+
export const CacheConfigCreateCacheKeyHeadersList = /*@__PURE__*/ S.Array(
|
|
152
|
+
S.String,
|
|
153
|
+
) as any as S.Schema<CacheConfigCreateCacheKeyHeadersList>;
|
|
154
|
+
|
|
155
|
+
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
156
|
+
export type CacheConfigCreateQueryStringVaryParametersList = Array<string>;
|
|
157
|
+
export const CacheConfigCreateQueryStringVaryParametersList =
|
|
158
|
+
/*@__PURE__*/ S.Array(
|
|
159
|
+
S.String,
|
|
160
|
+
) as any as S.Schema<CacheConfigCreateQueryStringVaryParametersList>;
|
|
161
|
+
|
|
162
|
+
/** Groups the cache options that influence how the CDN builds its cache key on distribution creation. **Cache cardinality warning:** enabling query-string vary produces one cache entry per unique query-string combination (**unbounded** when `queryStringVaryParameters` is empty). Each entry in `cacheKeyHeaders` multiplies the number of cache variants by the number of distinct values observed for that header. Use these settings sparingly. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled` so that this feature can be toggled on and off without losing the configured allowlist. Only `queryStringVaryEnabled` gates whether the parameter allowlist actually varies the cache. **Optimizer interaction:** when the Optimizer is enabled, the CDN automatically enables query-string vary for image responses regardless of this setting. */
|
|
163
|
+
export interface CacheConfigCreate {
|
|
164
|
+
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
165
|
+
cacheKeyHeaders?: CacheConfigCreateCacheKeyHeadersList;
|
|
166
|
+
/** When true, the CDN varies its cache by the request query string. If `queryStringVaryParameters` is empty, every unique query-string combination produces its own cache entry; if non-empty, only the listed parameters influence the cache key. */
|
|
167
|
+
queryStringVaryEnabled?: boolean;
|
|
168
|
+
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
169
|
+
queryStringVaryParameters?: CacheConfigCreateQueryStringVaryParametersList;
|
|
170
|
+
}
|
|
171
|
+
export const CacheConfigCreate = /*@__PURE__*/ S.suspend(() =>
|
|
172
|
+
S.Struct({
|
|
173
|
+
cacheKeyHeaders: S.optional(CacheConfigCreateCacheKeyHeadersList),
|
|
174
|
+
queryStringVaryEnabled: S.optional(S.Boolean),
|
|
175
|
+
queryStringVaryParameters: S.optional(
|
|
176
|
+
CacheConfigCreateQueryStringVaryParametersList,
|
|
177
|
+
),
|
|
178
|
+
}),
|
|
179
|
+
).annotate({
|
|
180
|
+
identifier: "CacheConfigCreate",
|
|
181
|
+
}) as any as S.Schema<CacheConfigCreate>;
|
|
182
|
+
|
|
183
|
+
/** Labels are key-value string pairs that can be attached to a distribution. */
|
|
184
|
+
export type CreateDistributionRequestLabelsMap = {
|
|
185
|
+
[key: string]: string | undefined;
|
|
186
|
+
};
|
|
187
|
+
export const CreateDistributionRequestLabelsMap = /*@__PURE__*/ S.Record(
|
|
188
|
+
S.String,
|
|
189
|
+
S.String,
|
|
190
|
+
) as any as S.Schema<CreateDistributionRequestLabelsMap>;
|
|
191
|
+
|
|
192
|
+
/** The authentication credentials required for the CDN to push logs to your Loki instance. */
|
|
193
|
+
export interface LokiLogSinkCredentials {
|
|
194
|
+
/** The password corresponding to your username. */
|
|
195
|
+
password: string | Redacted.Redacted<string>;
|
|
196
|
+
/** The username used to authenticate against your Loki instance. */
|
|
197
|
+
username: string;
|
|
198
|
+
}
|
|
199
|
+
export const LokiLogSinkCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
200
|
+
S.Struct({
|
|
201
|
+
password: S.String.pipe(T.SensitiveValue({})),
|
|
202
|
+
username: S.String,
|
|
203
|
+
}),
|
|
204
|
+
).annotate({
|
|
205
|
+
identifier: "LokiLogSinkCredentials",
|
|
206
|
+
}) as any as S.Schema<LokiLogSinkCredentials>;
|
|
207
|
+
|
|
208
|
+
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
209
|
+
export type LokiLogSinkCreateType = "loki";
|
|
210
|
+
export const LokiLogSinkCreateType = /*@__PURE__*/ S.String;
|
|
211
|
+
|
|
212
|
+
export interface LokiLogSinkCreate {
|
|
213
|
+
credentials: LokiLogSinkCredentials;
|
|
214
|
+
/** The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). */
|
|
215
|
+
pushUrl: string;
|
|
216
|
+
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
217
|
+
type: LokiLogSinkCreateType;
|
|
218
|
+
}
|
|
219
|
+
export const LokiLogSinkCreate = /*@__PURE__*/ S.suspend(() =>
|
|
220
|
+
S.Struct({
|
|
221
|
+
credentials: LokiLogSinkCredentials,
|
|
222
|
+
pushUrl: S.String,
|
|
223
|
+
type: LokiLogSinkCreateType,
|
|
224
|
+
}),
|
|
225
|
+
).annotate({
|
|
226
|
+
identifier: "LokiLogSinkCreate",
|
|
227
|
+
}) as any as S.Schema<LokiLogSinkCreate>;
|
|
228
|
+
|
|
229
|
+
/** Defines bearer token authentication. */
|
|
230
|
+
export type OtlpLogSinkBearerCredentialsType = "bearer";
|
|
231
|
+
export const OtlpLogSinkBearerCredentialsType = /*@__PURE__*/ S.String;
|
|
232
|
+
|
|
233
|
+
/** Bearer token authentication credentials for OTLP. */
|
|
234
|
+
export interface OtlpLogSinkBearerCredentials {
|
|
235
|
+
/** The bearer token used to authenticate against your OTLP endpoint. */
|
|
236
|
+
token: string;
|
|
237
|
+
/** Defines bearer token authentication. */
|
|
238
|
+
type: OtlpLogSinkBearerCredentialsType;
|
|
239
|
+
}
|
|
240
|
+
export const OtlpLogSinkBearerCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
241
|
+
S.Struct({
|
|
242
|
+
token: S.String,
|
|
243
|
+
type: OtlpLogSinkBearerCredentialsType,
|
|
244
|
+
}),
|
|
245
|
+
).annotate({
|
|
246
|
+
identifier: "OtlpLogSinkBearerCredentials",
|
|
247
|
+
}) as any as S.Schema<OtlpLogSinkBearerCredentials>;
|
|
248
|
+
|
|
249
|
+
/** Defines basic authentication. */
|
|
250
|
+
export type OtlpLogSinkBasicCredentialsType = "basic";
|
|
251
|
+
export const OtlpLogSinkBasicCredentialsType = /*@__PURE__*/ S.String;
|
|
252
|
+
|
|
253
|
+
/** Basic authentication credentials for OTLP. */
|
|
254
|
+
export interface OtlpLogSinkBasicCredentials {
|
|
255
|
+
/** The password corresponding to your username. */
|
|
256
|
+
password: string | Redacted.Redacted<string>;
|
|
257
|
+
/** Defines basic authentication. */
|
|
258
|
+
type: OtlpLogSinkBasicCredentialsType;
|
|
259
|
+
/** The username used to authenticate against your OTLP endpoint. */
|
|
260
|
+
username: string;
|
|
261
|
+
}
|
|
262
|
+
export const OtlpLogSinkBasicCredentials = /*@__PURE__*/ S.suspend(() =>
|
|
263
|
+
S.Struct({
|
|
264
|
+
password: S.String.pipe(T.SensitiveValue({})),
|
|
265
|
+
type: OtlpLogSinkBasicCredentialsType,
|
|
266
|
+
username: S.String,
|
|
267
|
+
}),
|
|
268
|
+
).annotate({
|
|
269
|
+
identifier: "OtlpLogSinkBasicCredentials",
|
|
270
|
+
}) as any as S.Schema<OtlpLogSinkBasicCredentials>;
|
|
271
|
+
|
|
272
|
+
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
273
|
+
export type OtlpLogSinkCreateCredentials =
|
|
274
|
+
| OtlpLogSinkBearerCredentials
|
|
275
|
+
| OtlpLogSinkBasicCredentials;
|
|
276
|
+
export const OtlpLogSinkCreateCredentials =
|
|
277
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<OtlpLogSinkCreateCredentials>;
|
|
278
|
+
|
|
279
|
+
/** Defines the type of the log sink. */
|
|
280
|
+
export type OtlpLogSinkCreateType = "otlp";
|
|
281
|
+
export const OtlpLogSinkCreateType = /*@__PURE__*/ S.String;
|
|
282
|
+
|
|
283
|
+
export interface OtlpLogSinkCreate {
|
|
284
|
+
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
285
|
+
credentials: OtlpLogSinkCreateCredentials;
|
|
286
|
+
/** The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). */
|
|
287
|
+
pushUrl: string;
|
|
288
|
+
/** Defines the type of the log sink. */
|
|
289
|
+
type: OtlpLogSinkCreateType;
|
|
290
|
+
}
|
|
291
|
+
export const OtlpLogSinkCreate = /*@__PURE__*/ S.suspend(() =>
|
|
292
|
+
S.Struct({
|
|
293
|
+
credentials: OtlpLogSinkCreateCredentials,
|
|
294
|
+
pushUrl: S.String,
|
|
295
|
+
type: OtlpLogSinkCreateType,
|
|
296
|
+
}),
|
|
297
|
+
).annotate({
|
|
298
|
+
identifier: "OtlpLogSinkCreate",
|
|
299
|
+
}) as any as S.Schema<OtlpLogSinkCreate>;
|
|
300
|
+
|
|
301
|
+
export type CreateDistributionRequestLogSink =
|
|
302
|
+
| LokiLogSinkCreate
|
|
303
|
+
| OtlpLogSinkCreate;
|
|
304
|
+
export const CreateDistributionRequestLogSink =
|
|
305
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<CreateDistributionRequestLogSink>;
|
|
306
|
+
|
|
307
|
+
/** Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. */
|
|
308
|
+
export interface Optimizer {
|
|
309
|
+
/** Determines if the optimizer should be enabled for this distribution and incurs a monthly fee */
|
|
310
|
+
enabled: boolean;
|
|
311
|
+
}
|
|
312
|
+
export const Optimizer = /*@__PURE__*/ S.suspend(() =>
|
|
313
|
+
S.Struct({
|
|
314
|
+
enabled: S.Boolean,
|
|
315
|
+
}),
|
|
316
|
+
).annotate({ identifier: "Optimizer" }) as any as S.Schema<Optimizer>;
|
|
317
|
+
|
|
318
|
+
/** Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY. */
|
|
319
|
+
export type MatchCondition = "ANY" | "ALL" | "NONE";
|
|
320
|
+
export const MatchCondition = /*@__PURE__*/ S.String;
|
|
321
|
+
|
|
322
|
+
/** A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/*" or "*\/img/*" */
|
|
323
|
+
export type MatcherValuesList = Array<string>;
|
|
324
|
+
export const MatcherValuesList = /*@__PURE__*/ S.Array(
|
|
325
|
+
S.String,
|
|
326
|
+
) as any as S.Schema<MatcherValuesList>;
|
|
327
|
+
|
|
328
|
+
/** A matcher containing a list of string values to compare against the request path. */
|
|
329
|
+
export interface Matcher {
|
|
330
|
+
valueMatchCondition?: MatchCondition | (string & {});
|
|
331
|
+
/** A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/*" or "*\/img/*" */
|
|
332
|
+
values: MatcherValuesList;
|
|
333
|
+
}
|
|
334
|
+
export const Matcher = /*@__PURE__*/ S.suspend(() =>
|
|
335
|
+
S.Struct({
|
|
336
|
+
valueMatchCondition: S.optional(MatchCondition),
|
|
337
|
+
values: MatcherValuesList,
|
|
338
|
+
}),
|
|
339
|
+
).annotate({ identifier: "Matcher" }) as any as S.Schema<Matcher>;
|
|
340
|
+
|
|
341
|
+
/** A list of matchers that define when this rule should apply. At least one matcher is required. */
|
|
342
|
+
export type RedirectRuleMatchersList = Array<Matcher>;
|
|
343
|
+
export const RedirectRuleMatchersList = /*@__PURE__*/ S.Array(
|
|
344
|
+
Matcher,
|
|
345
|
+
) as any as S.Schema<RedirectRuleMatchersList>;
|
|
346
|
+
|
|
347
|
+
/** The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308. */
|
|
348
|
+
export type RedirectRuleStatusCode = 301 | 302 | 303 | 307 | 308;
|
|
349
|
+
export const RedirectRuleStatusCode = /*@__PURE__*/ S.Number;
|
|
350
|
+
|
|
351
|
+
/** A single redirect rule defining a source pattern and a target URL. */
|
|
352
|
+
export interface RedirectRule {
|
|
353
|
+
/** An optional description for the redirect rule. */
|
|
354
|
+
description?: string;
|
|
355
|
+
/** A toggle to enable or disable the redirect rule. */
|
|
356
|
+
enabled?: boolean;
|
|
357
|
+
/** A list of matchers that define when this rule should apply. At least one matcher is required. */
|
|
358
|
+
matchers: RedirectRuleMatchersList;
|
|
359
|
+
ruleMatchCondition?: MatchCondition | (string & {});
|
|
360
|
+
/** The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308. */
|
|
361
|
+
statusCode: RedirectRuleStatusCode | (number & {});
|
|
362
|
+
/** The target URL to redirect to. Must be a valid URI. */
|
|
363
|
+
targetUrl: string;
|
|
364
|
+
}
|
|
365
|
+
export const RedirectRule = /*@__PURE__*/ S.suspend(() =>
|
|
366
|
+
S.Struct({
|
|
367
|
+
description: S.optional(S.String),
|
|
368
|
+
enabled: S.optional(S.Boolean),
|
|
369
|
+
matchers: RedirectRuleMatchersList,
|
|
370
|
+
ruleMatchCondition: S.optional(MatchCondition),
|
|
371
|
+
statusCode: RedirectRuleStatusCode,
|
|
372
|
+
targetUrl: S.String,
|
|
373
|
+
}),
|
|
374
|
+
).annotate({ identifier: "RedirectRule" }) as any as S.Schema<RedirectRule>;
|
|
375
|
+
|
|
376
|
+
/** A list of redirect rules. The order of rules matters for evaluation. */
|
|
377
|
+
export type RedirectConfigRulesList = Array<RedirectRule>;
|
|
378
|
+
export const RedirectConfigRulesList = /*@__PURE__*/ S.Array(
|
|
379
|
+
RedirectRule,
|
|
380
|
+
) as any as S.Schema<RedirectConfigRulesList>;
|
|
381
|
+
|
|
382
|
+
/** A wrapper for a list of redirect rules that allows for redirect settings on a distribution. */
|
|
383
|
+
export interface RedirectConfig {
|
|
384
|
+
/** A list of redirect rules. The order of rules matters for evaluation. */
|
|
385
|
+
rules?: RedirectConfigRulesList;
|
|
386
|
+
}
|
|
387
|
+
export const RedirectConfig = /*@__PURE__*/ S.suspend(() =>
|
|
388
|
+
S.Struct({
|
|
389
|
+
rules: S.optional(RedirectConfigRulesList),
|
|
390
|
+
}),
|
|
391
|
+
).annotate({ identifier: "RedirectConfig" }) as any as S.Schema<RedirectConfig>;
|
|
392
|
+
|
|
393
|
+
/** The following regions exist: - `EU` - Europe - `US` - United States / North America - `AF` - Africa - `SA` - South America - `ASIA` - Asia and Oceania */
|
|
394
|
+
export type Region = "EU" | "US" | "AF" | "SA" | "ASIA";
|
|
395
|
+
export const Region = /*@__PURE__*/ S.String;
|
|
396
|
+
|
|
397
|
+
/** Define in which regions you would like your content to be cached. */
|
|
398
|
+
export type CreateDistributionRequestRegionsList = Array<
|
|
399
|
+
Region | (string & {})
|
|
400
|
+
>;
|
|
401
|
+
export const CreateDistributionRequestRegionsList = /*@__PURE__*/ S.Array(
|
|
402
|
+
Region,
|
|
403
|
+
) as any as S.Schema<CreateDistributionRequestRegionsList>;
|
|
404
|
+
|
|
405
|
+
/** Configuration for TLS protocol versions. Note: Enabling older TLS versions (1.0, 1.1) is generally discouraged for security reasons. */
|
|
406
|
+
export interface TlsConfig {
|
|
407
|
+
/** If set to true, the distribution will accept connections using TLS 1.0. */
|
|
408
|
+
enableTls10: boolean;
|
|
409
|
+
/** If set to true, the distribution will accept connections using TLS 1.1. */
|
|
410
|
+
enableTls11: boolean;
|
|
411
|
+
}
|
|
412
|
+
export const TlsConfig = /*@__PURE__*/ S.suspend(() =>
|
|
413
|
+
S.Struct({
|
|
414
|
+
enableTls10: S.Boolean,
|
|
415
|
+
enableTls11: S.Boolean,
|
|
416
|
+
}),
|
|
417
|
+
).annotate({ identifier: "TlsConfig" }) as any as S.Schema<TlsConfig>;
|
|
418
|
+
|
|
419
|
+
/** This whitelist restricts which HTTP methods the distribution accepts. Requests using non-whitelisted methods are blocked by the WAF before reaching the origin. Common methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`, `TRACE` Validation ensures: 1. At least one method is allowed 2. No duplicate methods (e.g., `GET` appearing twice) 3. Each method is valid per HTTP standards */
|
|
420
|
+
export type WafConfigAllowedHttpMethodsList = Array<string>;
|
|
421
|
+
export const WafConfigAllowedHttpMethodsList = /*@__PURE__*/ S.Array(
|
|
422
|
+
S.String,
|
|
423
|
+
) as any as S.Schema<WafConfigAllowedHttpMethodsList>;
|
|
424
|
+
|
|
425
|
+
export type WafConfigAllowedHttpVersionsList = Array<string>;
|
|
426
|
+
export const WafConfigAllowedHttpVersionsList = /*@__PURE__*/ S.Array(
|
|
427
|
+
S.String,
|
|
428
|
+
) as any as S.Schema<WafConfigAllowedHttpVersionsList>;
|
|
429
|
+
|
|
430
|
+
/** This allow list restricts which Content-Type headers are accepted in request bodies. Format: Must be `type/subtype` with no spaces. Common content types: - `application/json` - `application/x-www-form-urlencoded` - `multipart/form-data` - `text/html` - `text/plain` - `application/xml` */
|
|
431
|
+
export type WafConfigAllowedRequestContentTypesList = Array<string>;
|
|
432
|
+
export const WafConfigAllowedRequestContentTypesList = /*@__PURE__*/ S.Array(
|
|
433
|
+
S.String,
|
|
434
|
+
) as any as S.Schema<WafConfigAllowedRequestContentTypesList>;
|
|
435
|
+
|
|
436
|
+
/** Ids of WAF Collections to mark as disabled */
|
|
437
|
+
export type WafConfigDisabledRuleCollectionIdsList = Array<string>;
|
|
438
|
+
export const WafConfigDisabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
439
|
+
S.String,
|
|
440
|
+
) as any as S.Schema<WafConfigDisabledRuleCollectionIdsList>;
|
|
441
|
+
|
|
442
|
+
/** Ids of WAF Rule Groups to mark as disabled */
|
|
443
|
+
export type WafConfigDisabledRuleGroupIdsList = Array<string>;
|
|
444
|
+
export const WafConfigDisabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
445
|
+
S.String,
|
|
446
|
+
) as any as S.Schema<WafConfigDisabledRuleGroupIdsList>;
|
|
447
|
+
|
|
448
|
+
/** Ids of WAF Rules that are **explicitly** disabled for this distribution. */
|
|
449
|
+
export type WafConfigDisabledRuleIdsList = Array<string>;
|
|
450
|
+
export const WafConfigDisabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
451
|
+
S.String,
|
|
452
|
+
) as any as S.Schema<WafConfigDisabledRuleIdsList>;
|
|
453
|
+
|
|
454
|
+
/** Ids of WAF Collections to mark as enabled */
|
|
455
|
+
export type WafConfigEnabledRuleCollectionIdsList = Array<string>;
|
|
456
|
+
export const WafConfigEnabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
457
|
+
S.String,
|
|
458
|
+
) as any as S.Schema<WafConfigEnabledRuleCollectionIdsList>;
|
|
459
|
+
|
|
460
|
+
/** Ids of WAF Rule Groups to mark as enabled */
|
|
461
|
+
export type WafConfigEnabledRuleGroupIdsList = Array<string>;
|
|
462
|
+
export const WafConfigEnabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
463
|
+
S.String,
|
|
464
|
+
) as any as S.Schema<WafConfigEnabledRuleGroupIdsList>;
|
|
465
|
+
|
|
466
|
+
/** Ids of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. */
|
|
467
|
+
export type WafConfigEnabledRuleIdsList = Array<string>;
|
|
468
|
+
export const WafConfigEnabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
469
|
+
S.String,
|
|
470
|
+
) as any as S.Schema<WafConfigEnabledRuleIdsList>;
|
|
471
|
+
|
|
472
|
+
/** Ids of WAF Collections to mark as log Only. */
|
|
473
|
+
export type WafConfigLogOnlyRuleCollectionIdsList = Array<string>;
|
|
474
|
+
export const WafConfigLogOnlyRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
475
|
+
S.String,
|
|
476
|
+
) as any as S.Schema<WafConfigLogOnlyRuleCollectionIdsList>;
|
|
477
|
+
|
|
478
|
+
/** Ids of WAF Rule Groups to mark as log Only. */
|
|
479
|
+
export type WafConfigLogOnlyRuleGroupIdsList = Array<string>;
|
|
480
|
+
export const WafConfigLogOnlyRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
481
|
+
S.String,
|
|
482
|
+
) as any as S.Schema<WafConfigLogOnlyRuleGroupIdsList>;
|
|
483
|
+
|
|
484
|
+
/** Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. */
|
|
485
|
+
export type WafConfigLogOnlyRuleIdsList = Array<string>;
|
|
486
|
+
export const WafConfigLogOnlyRuleIdsList = /*@__PURE__*/ S.Array(
|
|
487
|
+
S.String,
|
|
488
|
+
) as any as S.Schema<WafConfigLogOnlyRuleIdsList>;
|
|
489
|
+
|
|
490
|
+
/** - `ENABLED`: The WAF actively inspects and blocks malicious requests. - `DISABLED`: The WAF is completely off. No inspection occurs. - `LOG_ONLY`: The WAF inspects requests and logs matches but never blocks. */
|
|
491
|
+
export type WafMode = "DISABLED" | "ENABLED" | "LOG_ONLY";
|
|
492
|
+
export const WafMode = /*@__PURE__*/ S.String;
|
|
493
|
+
|
|
494
|
+
/** The paranoia level defines how aggressively the WAF should action on requests. It ranges from `L1` (least strict, lowest chance of false positives) to `L4` (most strict, highest chance of false positives). A higher paranoia level is more effective at catching attacks but can also block legitimate traffic. */
|
|
495
|
+
export type WafParanoiaLevel = "L1" | "L2" | "L3" | "L4";
|
|
496
|
+
export const WafParanoiaLevel = /*@__PURE__*/ S.String;
|
|
497
|
+
|
|
498
|
+
/** Enable or disable the Premium WAF. Do note that enabling the Premium WAF will cause additional fees. Some features are gated behind the Premium WAF, like additional, **premium-only rules** and the ability to create **custom rules** (not yet implemented) */
|
|
499
|
+
export type WafType = "FREE" | "PREMIUM";
|
|
500
|
+
export const WafType = /*@__PURE__*/ S.String;
|
|
501
|
+
|
|
502
|
+
/** Configuration of the WAF of a distribution A WAF Config always contains a WAF Mode and Type. If a WAF was never enabled, most of the properties are not present. To **enable** the WAF for your Distribution, you must set the `mode` to `ENABLED` or `LOG_ONLY`. This causes the other properties to be populated. ## Rules There are 9 properties used to control which Rules are enabled, disabled or set to Log-Only. These properties can be grouped in 3 groups of 3. Each of these groups varies in specificity: Rules are more specific than Rule Groups, which in turn are more specific than Collections. More specific definitions override more generic definitions. ### Collections - `enabledRuleCollectionIds` - `disabledRuleCollectionIds` - `logOnlyRuleCollectionIds` These are the least specific selectors. As of 2025, only two collections exist: - `@builtin/crs/response`, containing all Rules regarding Responses - `@builtin/crs/request`, containing all Rules regarding Requests More collections may be added in the future ### Rule Groups - `enabledRuleGroupIds` - `disabledRuleGroupIds` - `logOnlyRuleGroupIds` These are more specific than Collections and will override their selector. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### Rules - `enabledRuleIds` - `disabledRuleIds` - `logOnlyRuleGds` Being the most specific selectors, these will override both Collection and Rule Group selectors. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### TIP: Review resolved config If you call `GetDistribution` with `?withWafStatus=true`, you get back a resolved WAF Rules Config which contains a `waf` property which you can inspect to see why a Rule is either enabled, disabled or logOnly. */
|
|
503
|
+
export interface WafConfig {
|
|
504
|
+
/** This whitelist restricts which HTTP methods the distribution accepts. Requests using non-whitelisted methods are blocked by the WAF before reaching the origin. Common methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`, `TRACE` Validation ensures: 1. At least one method is allowed 2. No duplicate methods (e.g., `GET` appearing twice) 3. Each method is valid per HTTP standards */
|
|
505
|
+
allowedHttpMethods?: WafConfigAllowedHttpMethodsList;
|
|
506
|
+
allowedHttpVersions?: WafConfigAllowedHttpVersionsList;
|
|
507
|
+
/** This allow list restricts which Content-Type headers are accepted in request bodies. Format: Must be `type/subtype` with no spaces. Common content types: - `application/json` - `application/x-www-form-urlencoded` - `multipart/form-data` - `text/html` - `text/plain` - `application/xml` */
|
|
508
|
+
allowedRequestContentTypes?: WafConfigAllowedRequestContentTypesList;
|
|
509
|
+
/** Ids of WAF Collections to mark as disabled */
|
|
510
|
+
disabledRuleCollectionIds?: WafConfigDisabledRuleCollectionIdsList;
|
|
511
|
+
/** Ids of WAF Rule Groups to mark as disabled */
|
|
512
|
+
disabledRuleGroupIds?: WafConfigDisabledRuleGroupIdsList;
|
|
513
|
+
/** Ids of WAF Rules that are **explicitly** disabled for this distribution. */
|
|
514
|
+
disabledRuleIds?: WafConfigDisabledRuleIdsList;
|
|
515
|
+
/** Ids of WAF Collections to mark as enabled */
|
|
516
|
+
enabledRuleCollectionIds?: WafConfigEnabledRuleCollectionIdsList;
|
|
517
|
+
/** Ids of WAF Rule Groups to mark as enabled */
|
|
518
|
+
enabledRuleGroupIds?: WafConfigEnabledRuleGroupIdsList;
|
|
519
|
+
/** Ids of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. */
|
|
520
|
+
enabledRuleIds: WafConfigEnabledRuleIdsList;
|
|
521
|
+
/** Ids of WAF Collections to mark as log Only. */
|
|
522
|
+
logOnlyRuleCollectionIds?: WafConfigLogOnlyRuleCollectionIdsList;
|
|
523
|
+
/** Ids of WAF Rule Groups to mark as log Only. */
|
|
524
|
+
logOnlyRuleGroupIds?: WafConfigLogOnlyRuleGroupIdsList;
|
|
525
|
+
/** Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. */
|
|
526
|
+
logOnlyRuleIds?: WafConfigLogOnlyRuleIdsList;
|
|
527
|
+
mode: WafMode | (string & {});
|
|
528
|
+
paranoiaLevel?: WafParanoiaLevel | (string & {});
|
|
529
|
+
type: WafType | (string & {});
|
|
530
|
+
}
|
|
531
|
+
export const WafConfig = /*@__PURE__*/ S.suspend(() =>
|
|
532
|
+
S.Struct({
|
|
533
|
+
allowedHttpMethods: S.optional(WafConfigAllowedHttpMethodsList),
|
|
534
|
+
allowedHttpVersions: S.optional(WafConfigAllowedHttpVersionsList),
|
|
535
|
+
allowedRequestContentTypes: S.optional(
|
|
536
|
+
WafConfigAllowedRequestContentTypesList,
|
|
537
|
+
),
|
|
538
|
+
disabledRuleCollectionIds: S.optional(
|
|
539
|
+
WafConfigDisabledRuleCollectionIdsList,
|
|
540
|
+
),
|
|
541
|
+
disabledRuleGroupIds: S.optional(WafConfigDisabledRuleGroupIdsList),
|
|
542
|
+
disabledRuleIds: S.optional(WafConfigDisabledRuleIdsList),
|
|
543
|
+
enabledRuleCollectionIds: S.optional(WafConfigEnabledRuleCollectionIdsList),
|
|
544
|
+
enabledRuleGroupIds: S.optional(WafConfigEnabledRuleGroupIdsList),
|
|
545
|
+
enabledRuleIds: WafConfigEnabledRuleIdsList,
|
|
546
|
+
logOnlyRuleCollectionIds: S.optional(WafConfigLogOnlyRuleCollectionIdsList),
|
|
547
|
+
logOnlyRuleGroupIds: S.optional(WafConfigLogOnlyRuleGroupIdsList),
|
|
548
|
+
logOnlyRuleIds: S.optional(WafConfigLogOnlyRuleIdsList),
|
|
549
|
+
mode: WafMode,
|
|
550
|
+
paranoiaLevel: S.optional(WafParanoiaLevel),
|
|
551
|
+
type: WafType,
|
|
552
|
+
}),
|
|
553
|
+
).annotate({ identifier: "WafConfig" }) as any as S.Schema<WafConfig>;
|
|
554
|
+
|
|
555
|
+
export interface CreateDistributionRequest {
|
|
556
|
+
/** Your STACKIT Project Id */
|
|
557
|
+
projectId: string;
|
|
558
|
+
/** Configuration for the content origin backend. */
|
|
559
|
+
backend: CreateDistributionRequestBackend;
|
|
560
|
+
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
561
|
+
blockedCountries?: CreateDistributionRequestBlockedCountriesList;
|
|
562
|
+
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
563
|
+
blockedIps?: CreateDistributionRequestBlockedIpsList;
|
|
564
|
+
cacheConfig?: CacheConfigCreate;
|
|
565
|
+
/** Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) */
|
|
566
|
+
defaultCacheDuration?: string;
|
|
567
|
+
/** Enabling this allows the 'Host' header to be passed through to the origin. */
|
|
568
|
+
forwardHostHeader?: boolean;
|
|
569
|
+
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple POST-Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. */
|
|
570
|
+
intentId?: string;
|
|
571
|
+
/** Labels are key-value string pairs that can be attached to a distribution. */
|
|
572
|
+
labels?: CreateDistributionRequestLabelsMap;
|
|
573
|
+
logSink?: CreateDistributionRequestLogSink;
|
|
574
|
+
/** Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. */
|
|
575
|
+
monthlyLimitBytes?: number;
|
|
576
|
+
optimizer?: Optimizer;
|
|
577
|
+
redirects?: RedirectConfig;
|
|
578
|
+
/** Define in which regions you would like your content to be cached. */
|
|
579
|
+
regions: CreateDistributionRequestRegionsList;
|
|
580
|
+
/** Enable this to prevent origin-level cookies from being forwarded to the end user. */
|
|
581
|
+
stripResponseCookies?: boolean;
|
|
582
|
+
tls?: TlsConfig;
|
|
583
|
+
waf?: WafConfig;
|
|
584
|
+
}
|
|
585
|
+
export const CreateDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
586
|
+
S.Struct({
|
|
587
|
+
projectId: S.String.pipe(T.Label()),
|
|
588
|
+
backend: CreateDistributionRequestBackend,
|
|
589
|
+
blockedCountries: S.optional(CreateDistributionRequestBlockedCountriesList),
|
|
590
|
+
blockedIps: S.optional(CreateDistributionRequestBlockedIpsList),
|
|
591
|
+
cacheConfig: S.optional(CacheConfigCreate),
|
|
592
|
+
defaultCacheDuration: S.optional(S.String),
|
|
593
|
+
forwardHostHeader: S.optional(S.Boolean),
|
|
594
|
+
intentId: S.optional(S.String),
|
|
595
|
+
labels: S.optional(CreateDistributionRequestLabelsMap),
|
|
596
|
+
logSink: S.optional(CreateDistributionRequestLogSink),
|
|
597
|
+
monthlyLimitBytes: S.optional(S.Number),
|
|
598
|
+
optimizer: S.optional(Optimizer),
|
|
599
|
+
redirects: S.optional(RedirectConfig),
|
|
600
|
+
regions: CreateDistributionRequestRegionsList,
|
|
601
|
+
stripResponseCookies: S.optional(S.Boolean),
|
|
602
|
+
tls: S.optional(TlsConfig),
|
|
603
|
+
waf: S.optional(WafConfig),
|
|
604
|
+
}).pipe(
|
|
605
|
+
T.Http({
|
|
606
|
+
method: "POST",
|
|
607
|
+
uri: "/v1/projects/{projectId}/distributions",
|
|
608
|
+
code: 200,
|
|
609
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
610
|
+
}),
|
|
611
|
+
),
|
|
612
|
+
).annotate({
|
|
613
|
+
identifier: "CreateDistributionRequest",
|
|
614
|
+
}) as any as S.Schema<CreateDistributionRequest>;
|
|
615
|
+
|
|
616
|
+
export type HttpBackendGeofencingValueList = Array<string>;
|
|
617
|
+
export const HttpBackendGeofencingValueList = /*@__PURE__*/ S.Array(
|
|
618
|
+
S.String,
|
|
619
|
+
) as any as S.Schema<HttpBackendGeofencingValueList>;
|
|
620
|
+
|
|
621
|
+
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
622
|
+
export type HttpBackendGeofencingMap = {
|
|
623
|
+
[key: string]: HttpBackendGeofencingValueList | undefined;
|
|
624
|
+
};
|
|
625
|
+
export const HttpBackendGeofencingMap = /*@__PURE__*/ S.Record(
|
|
626
|
+
S.String,
|
|
627
|
+
HttpBackendGeofencingValueList,
|
|
628
|
+
) as any as S.Schema<HttpBackendGeofencingMap>;
|
|
629
|
+
|
|
630
|
+
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
631
|
+
export type HttpBackendOriginRequestHeadersMap = {
|
|
632
|
+
[key: string]: string | undefined;
|
|
633
|
+
};
|
|
634
|
+
export const HttpBackendOriginRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
635
|
+
S.String,
|
|
636
|
+
S.String,
|
|
637
|
+
) as any as S.Schema<HttpBackendOriginRequestHeadersMap>;
|
|
638
|
+
|
|
639
|
+
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
640
|
+
export type HttpBackendType = "http";
|
|
641
|
+
export const HttpBackendType = /*@__PURE__*/ S.String;
|
|
642
|
+
|
|
643
|
+
export interface HttpBackend {
|
|
644
|
+
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
645
|
+
geofencing: HttpBackendGeofencingMap;
|
|
646
|
+
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
647
|
+
originRequestHeaders: HttpBackendOriginRequestHeadersMap;
|
|
648
|
+
/** The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` */
|
|
649
|
+
originUrl: string;
|
|
650
|
+
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
651
|
+
type: HttpBackendType;
|
|
652
|
+
}
|
|
653
|
+
export const HttpBackend = /*@__PURE__*/ S.suspend(() =>
|
|
654
|
+
S.Struct({
|
|
655
|
+
geofencing: HttpBackendGeofencingMap,
|
|
656
|
+
originRequestHeaders: HttpBackendOriginRequestHeadersMap,
|
|
657
|
+
originUrl: S.String,
|
|
658
|
+
type: HttpBackendType,
|
|
659
|
+
}),
|
|
660
|
+
).annotate({ identifier: "HttpBackend" }) as any as S.Schema<HttpBackend>;
|
|
661
|
+
|
|
662
|
+
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
663
|
+
export type BucketBackendType = "bucket";
|
|
664
|
+
export const BucketBackendType = /*@__PURE__*/ S.String;
|
|
665
|
+
|
|
666
|
+
export interface BucketBackend {
|
|
667
|
+
/** The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). */
|
|
668
|
+
bucketUrl: string;
|
|
669
|
+
/** The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT). */
|
|
670
|
+
region: string;
|
|
671
|
+
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
672
|
+
type: BucketBackendType;
|
|
673
|
+
}
|
|
674
|
+
export const BucketBackend = /*@__PURE__*/ S.suspend(() =>
|
|
675
|
+
S.Struct({
|
|
676
|
+
bucketUrl: S.String,
|
|
677
|
+
region: S.String,
|
|
678
|
+
type: BucketBackendType,
|
|
679
|
+
}),
|
|
680
|
+
).annotate({ identifier: "BucketBackend" }) as any as S.Schema<BucketBackend>;
|
|
681
|
+
|
|
682
|
+
export type ConfigBackend = HttpBackend | BucketBackend;
|
|
683
|
+
export const ConfigBackend =
|
|
684
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<ConfigBackend>;
|
|
685
|
+
|
|
686
|
+
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g. DE, ES, GB). This setting blocks users from the specified countries. */
|
|
687
|
+
export type ConfigBlockedCountriesList = Array<string>;
|
|
688
|
+
export const ConfigBlockedCountriesList = /*@__PURE__*/ S.Array(
|
|
689
|
+
S.String,
|
|
690
|
+
) as any as S.Schema<ConfigBlockedCountriesList>;
|
|
691
|
+
|
|
692
|
+
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
693
|
+
export type ConfigBlockedIpsList = Array<string>;
|
|
694
|
+
export const ConfigBlockedIpsList = /*@__PURE__*/ S.Array(
|
|
695
|
+
S.String,
|
|
696
|
+
) as any as S.Schema<ConfigBlockedIpsList>;
|
|
697
|
+
|
|
698
|
+
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
699
|
+
export type CacheConfigCacheKeyHeadersList = Array<string>;
|
|
700
|
+
export const CacheConfigCacheKeyHeadersList = /*@__PURE__*/ S.Array(
|
|
701
|
+
S.String,
|
|
702
|
+
) as any as S.Schema<CacheConfigCacheKeyHeadersList>;
|
|
703
|
+
|
|
704
|
+
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
705
|
+
export type CacheConfigQueryStringVaryParametersList = Array<string>;
|
|
706
|
+
export const CacheConfigQueryStringVaryParametersList = /*@__PURE__*/ S.Array(
|
|
707
|
+
S.String,
|
|
708
|
+
) as any as S.Schema<CacheConfigQueryStringVaryParametersList>;
|
|
709
|
+
|
|
710
|
+
/** Groups the cache options that influence how the CDN builds its cache key. **Cache cardinality warning:** enabling query-string vary produces one cache entry per unique query-string combination (**unbounded** when `queryStringVaryParameters` is empty). Each entry in `cacheKeyHeaders` multiplies the number of cache variants by the number of distinct values observed for that header. Use these settings sparingly. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled` so that this feature can be toggled on and off without losing the configured allowlist. Only `queryStringVaryEnabled` gates whether the parameter allowlist actually varies the cache. **Optimizer interaction:** when the Optimizer is enabled, the CDN automatically enables query-string vary for image responses regardless of this setting. */
|
|
711
|
+
export interface CacheConfig {
|
|
712
|
+
/** HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. */
|
|
713
|
+
cacheKeyHeaders: CacheConfigCacheKeyHeadersList;
|
|
714
|
+
/** When true, the CDN varies its cache by the request query string. If `queryStringVaryParameters` is empty, every unique query-string combination produces its own cache entry; if non-empty, only the listed parameters influence the cache key. */
|
|
715
|
+
queryStringVaryEnabled: boolean;
|
|
716
|
+
/** Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. */
|
|
717
|
+
queryStringVaryParameters: CacheConfigQueryStringVaryParametersList;
|
|
718
|
+
}
|
|
719
|
+
export const CacheConfig = /*@__PURE__*/ S.suspend(() =>
|
|
720
|
+
S.Struct({
|
|
721
|
+
cacheKeyHeaders: CacheConfigCacheKeyHeadersList,
|
|
722
|
+
queryStringVaryEnabled: S.Boolean,
|
|
723
|
+
queryStringVaryParameters: CacheConfigQueryStringVaryParametersList,
|
|
724
|
+
}),
|
|
725
|
+
).annotate({ identifier: "CacheConfig" }) as any as S.Schema<CacheConfig>;
|
|
726
|
+
|
|
727
|
+
/** Labels are key-value string pairs that can be attached to a distribution. */
|
|
728
|
+
export type ConfigLabelsMap = { [key: string]: string | undefined };
|
|
729
|
+
export const ConfigLabelsMap = /*@__PURE__*/ S.Record(
|
|
730
|
+
S.String,
|
|
731
|
+
S.String,
|
|
732
|
+
) as any as S.Schema<ConfigLabelsMap>;
|
|
733
|
+
|
|
734
|
+
/** Defines the type of the log sink. */
|
|
735
|
+
export type LokiLogSinkType = "loki";
|
|
736
|
+
export const LokiLogSinkType = /*@__PURE__*/ S.String;
|
|
737
|
+
|
|
738
|
+
export interface LokiLogSink {
|
|
739
|
+
/** The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). */
|
|
740
|
+
pushUrl: string;
|
|
741
|
+
/** Defines the type of the log sink. */
|
|
742
|
+
type: LokiLogSinkType;
|
|
743
|
+
}
|
|
744
|
+
export const LokiLogSink = /*@__PURE__*/ S.suspend(() =>
|
|
745
|
+
S.Struct({
|
|
746
|
+
pushUrl: S.String,
|
|
747
|
+
type: LokiLogSinkType,
|
|
748
|
+
}),
|
|
749
|
+
).annotate({ identifier: "LokiLogSink" }) as any as S.Schema<LokiLogSink>;
|
|
750
|
+
|
|
751
|
+
/** Defines the type of the log sink. */
|
|
752
|
+
export type OtlpLogSinkType = "otlp";
|
|
753
|
+
export const OtlpLogSinkType = /*@__PURE__*/ S.String;
|
|
754
|
+
|
|
755
|
+
export interface OtlpLogSink {
|
|
756
|
+
/** The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). */
|
|
757
|
+
pushUrl: string;
|
|
758
|
+
/** Defines the type of the log sink. */
|
|
759
|
+
type: OtlpLogSinkType;
|
|
760
|
+
}
|
|
761
|
+
export const OtlpLogSink = /*@__PURE__*/ S.suspend(() =>
|
|
762
|
+
S.Struct({
|
|
763
|
+
pushUrl: S.String,
|
|
764
|
+
type: OtlpLogSinkType,
|
|
765
|
+
}),
|
|
766
|
+
).annotate({ identifier: "OtlpLogSink" }) as any as S.Schema<OtlpLogSink>;
|
|
767
|
+
|
|
768
|
+
export type ConfigLogSink = LokiLogSink | OtlpLogSink;
|
|
769
|
+
export const ConfigLogSink =
|
|
770
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<ConfigLogSink>;
|
|
771
|
+
|
|
772
|
+
export type ConfigRegionsList = Array<Region>;
|
|
773
|
+
export const ConfigRegionsList = /*@__PURE__*/ S.Array(
|
|
774
|
+
Region,
|
|
775
|
+
) as any as S.Schema<ConfigRegionsList>;
|
|
776
|
+
|
|
777
|
+
export interface Config {
|
|
778
|
+
backend: ConfigBackend;
|
|
779
|
+
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g. DE, ES, GB). This setting blocks users from the specified countries. */
|
|
780
|
+
blockedCountries: ConfigBlockedCountriesList;
|
|
781
|
+
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
782
|
+
blockedIps: ConfigBlockedIpsList;
|
|
783
|
+
cacheConfig: CacheConfig;
|
|
784
|
+
/** Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) */
|
|
785
|
+
defaultCacheDuration?: string | null;
|
|
786
|
+
/** Enabling this allows the 'Host' header to be passed through to the origin. */
|
|
787
|
+
forwardHostHeader: boolean;
|
|
788
|
+
/** Labels are key-value string pairs that can be attached to a distribution. */
|
|
789
|
+
labels?: ConfigLabelsMap;
|
|
790
|
+
logSink?: ConfigLogSink;
|
|
791
|
+
/** Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. */
|
|
792
|
+
monthlyLimitBytes?: number | null;
|
|
793
|
+
optimizer?: Optimizer;
|
|
794
|
+
redirects?: RedirectConfig;
|
|
795
|
+
regions: ConfigRegionsList;
|
|
796
|
+
/** Enable this to prevent origin-level cookies from being forwarded to the end user. */
|
|
797
|
+
stripResponseCookies: boolean;
|
|
798
|
+
tls: TlsConfig;
|
|
799
|
+
waf: WafConfig;
|
|
800
|
+
}
|
|
801
|
+
export const Config = /*@__PURE__*/ S.suspend(() =>
|
|
802
|
+
S.Struct({
|
|
803
|
+
backend: ConfigBackend,
|
|
804
|
+
blockedCountries: ConfigBlockedCountriesList,
|
|
805
|
+
blockedIps: ConfigBlockedIpsList,
|
|
806
|
+
cacheConfig: CacheConfig,
|
|
807
|
+
defaultCacheDuration: S.optional(S.NullOr(S.String)),
|
|
808
|
+
forwardHostHeader: S.Boolean,
|
|
809
|
+
labels: S.optional(ConfigLabelsMap),
|
|
810
|
+
logSink: S.optional(ConfigLogSink),
|
|
811
|
+
monthlyLimitBytes: S.optional(S.NullOr(S.Number)),
|
|
812
|
+
optimizer: S.optional(Optimizer),
|
|
813
|
+
redirects: S.optional(RedirectConfig),
|
|
814
|
+
regions: ConfigRegionsList,
|
|
815
|
+
stripResponseCookies: S.Boolean,
|
|
816
|
+
tls: TlsConfig,
|
|
817
|
+
waf: WafConfig,
|
|
818
|
+
}),
|
|
819
|
+
).annotate({ identifier: "Config" }) as any as S.Schema<Config>;
|
|
820
|
+
|
|
821
|
+
export type DomainCertificateType = "managed" | "custom";
|
|
822
|
+
export const DomainCertificateType = /*@__PURE__*/ S.String;
|
|
823
|
+
|
|
824
|
+
/** An enum value that describes a Status Error. */
|
|
825
|
+
export type StatusErrorKey =
|
|
826
|
+
| "UNKNOWN"
|
|
827
|
+
| "CUSTOM_DOMAIN_CNAME_MISSING"
|
|
828
|
+
| "CUSTOM_DOMAIN_ALREADY_IN_USE"
|
|
829
|
+
| "PUBLIC_BETA_QUOTA_REACHED"
|
|
830
|
+
| "LOG_SINK_INSTANCE_UNAVAILABLE"
|
|
831
|
+
| "EXTERNAL_QUOTA_REACHED";
|
|
832
|
+
export const StatusErrorKey = /*@__PURE__*/ S.String;
|
|
833
|
+
|
|
834
|
+
export interface StatusError {
|
|
835
|
+
/** A german translation string corresponding to the error key. Note that we do not guarantee german translations are present. */
|
|
836
|
+
de?: string;
|
|
837
|
+
/** An english translation string corresponding to the error key. An english translation key is always present. */
|
|
838
|
+
en: string;
|
|
839
|
+
/** An enum value that describes a Status Error. */
|
|
840
|
+
key: StatusErrorKey;
|
|
841
|
+
}
|
|
842
|
+
export const StatusError = /*@__PURE__*/ S.suspend(() =>
|
|
843
|
+
S.Struct({
|
|
844
|
+
de: S.optional(S.String),
|
|
845
|
+
en: S.String,
|
|
846
|
+
key: StatusErrorKey,
|
|
847
|
+
}),
|
|
848
|
+
).annotate({ identifier: "StatusError" }) as any as S.Schema<StatusError>;
|
|
849
|
+
|
|
850
|
+
/** This object is present if the custom domain has errors. */
|
|
851
|
+
export type DomainErrorsList = Array<StatusError>;
|
|
852
|
+
export const DomainErrorsList = /*@__PURE__*/ S.Array(
|
|
853
|
+
StatusError,
|
|
854
|
+
) as any as S.Schema<DomainErrorsList>;
|
|
855
|
+
|
|
856
|
+
/** The status of the domain: CREATING indicates that the custom domain is being set up. UPDATING means that requested changes are being applied to the custom domain. ACTIVE means the custom domain is currently configured and active. DELETING means that the domain is in the process of being removed from the distribution. In case the domain has the ERROR state, more information will be available in the errors list. */
|
|
857
|
+
export type DomainStatus =
|
|
858
|
+
| "CREATING"
|
|
859
|
+
| "ACTIVE"
|
|
860
|
+
| "UPDATING"
|
|
861
|
+
| "DELETING"
|
|
862
|
+
| "ERROR";
|
|
863
|
+
export const DomainStatus = /*@__PURE__*/ S.String;
|
|
864
|
+
|
|
865
|
+
/** Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint */
|
|
866
|
+
export type DomainType = "managed" | "custom";
|
|
867
|
+
export const DomainType = /*@__PURE__*/ S.String;
|
|
868
|
+
|
|
869
|
+
/** Definition of a custom or managed domain without any certificates or keys */
|
|
870
|
+
export interface Domain {
|
|
871
|
+
certificateType: DomainCertificateType;
|
|
872
|
+
/** This object is present if the custom domain has errors. */
|
|
873
|
+
errors?: DomainErrorsList;
|
|
874
|
+
/** The domain. If this is a custom domain, you can call the GetCustomDomain Endpoint */
|
|
875
|
+
name: string;
|
|
876
|
+
status: DomainStatus;
|
|
877
|
+
/** Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint */
|
|
878
|
+
type: DomainType;
|
|
879
|
+
}
|
|
880
|
+
export const Domain = /*@__PURE__*/ S.suspend(() =>
|
|
881
|
+
S.Struct({
|
|
882
|
+
certificateType: DomainCertificateType,
|
|
883
|
+
errors: S.optional(DomainErrorsList),
|
|
884
|
+
name: S.String,
|
|
885
|
+
status: DomainStatus,
|
|
886
|
+
type: DomainType,
|
|
887
|
+
}),
|
|
888
|
+
).annotate({ identifier: "Domain" }) as any as S.Schema<Domain>;
|
|
889
|
+
|
|
890
|
+
export type DistributionDomainsList = Array<Domain>;
|
|
891
|
+
export const DistributionDomainsList = /*@__PURE__*/ S.Array(
|
|
892
|
+
Domain,
|
|
893
|
+
) as any as S.Schema<DistributionDomainsList>;
|
|
894
|
+
|
|
895
|
+
/** This object may be present if, and only if the distribution has encountered an error state. */
|
|
896
|
+
export type DistributionErrorsList = Array<StatusError>;
|
|
897
|
+
export const DistributionErrorsList = /*@__PURE__*/ S.Array(
|
|
898
|
+
StatusError,
|
|
899
|
+
) as any as S.Schema<DistributionErrorsList>;
|
|
900
|
+
|
|
901
|
+
/** - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. */
|
|
902
|
+
export type DistributionStatus =
|
|
903
|
+
| "CREATING"
|
|
904
|
+
| "ACTIVE"
|
|
905
|
+
| "UPDATING"
|
|
906
|
+
| "DELETING"
|
|
907
|
+
| "ERROR";
|
|
908
|
+
export const DistributionStatus = /*@__PURE__*/ S.String;
|
|
909
|
+
|
|
910
|
+
/** This object only ever shows up in the disabled rules section. If rules are never defined (e.g. no collection, rule group, or the rule itself is ever mentioned), they are implicitly disabled */
|
|
911
|
+
export interface WafStatusRuleBlockReasonNeverDefined {
|
|
912
|
+
/** This is always `neverDefined` */
|
|
913
|
+
type: string;
|
|
914
|
+
}
|
|
915
|
+
export const WafStatusRuleBlockReasonNeverDefined = /*@__PURE__*/ S.suspend(
|
|
916
|
+
() =>
|
|
917
|
+
S.Struct({
|
|
918
|
+
type: S.String,
|
|
919
|
+
}),
|
|
920
|
+
).annotate({
|
|
921
|
+
identifier: "WafStatusRuleBlockReasonNeverDefined",
|
|
922
|
+
}) as any as S.Schema<WafStatusRuleBlockReasonNeverDefined>;
|
|
923
|
+
|
|
924
|
+
export interface WafStatusRuleBlockReasonDirectlyDefined {
|
|
925
|
+
/** This is always `directlyDefined` */
|
|
926
|
+
type: string;
|
|
927
|
+
}
|
|
928
|
+
export const WafStatusRuleBlockReasonDirectlyDefined = /*@__PURE__*/ S.suspend(
|
|
929
|
+
() =>
|
|
930
|
+
S.Struct({
|
|
931
|
+
type: S.String,
|
|
932
|
+
}),
|
|
933
|
+
).annotate({
|
|
934
|
+
identifier: "WafStatusRuleBlockReasonDirectlyDefined",
|
|
935
|
+
}) as any as S.Schema<WafStatusRuleBlockReasonDirectlyDefined>;
|
|
936
|
+
|
|
937
|
+
/** A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. */
|
|
938
|
+
export type WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList =
|
|
939
|
+
Array<WafType>;
|
|
940
|
+
export const WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList =
|
|
941
|
+
/*@__PURE__*/ S.Array(
|
|
942
|
+
WafType,
|
|
943
|
+
) as any as S.Schema<WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList>;
|
|
944
|
+
|
|
945
|
+
export interface WafStatusRuleBlockReasonInvalidWafType {
|
|
946
|
+
/** A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. */
|
|
947
|
+
allowedWafTypes: WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList;
|
|
948
|
+
/** This is always `invalidWafType` */
|
|
949
|
+
type: string;
|
|
950
|
+
}
|
|
951
|
+
export const WafStatusRuleBlockReasonInvalidWafType = /*@__PURE__*/ S.suspend(
|
|
952
|
+
() =>
|
|
953
|
+
S.Struct({
|
|
954
|
+
allowedWafTypes:
|
|
955
|
+
WafStatusRuleBlockReasonInvalidWafTypeAllowedWafTypesList,
|
|
956
|
+
type: S.String,
|
|
957
|
+
}),
|
|
958
|
+
).annotate({
|
|
959
|
+
identifier: "WafStatusRuleBlockReasonInvalidWafType",
|
|
960
|
+
}) as any as S.Schema<WafStatusRuleBlockReasonInvalidWafType>;
|
|
961
|
+
|
|
962
|
+
export interface WafStatusRuleBlockReasonInheritedFromCollection {
|
|
963
|
+
/** The Collection that caused this rule to be in its current state. */
|
|
964
|
+
collectionId: string;
|
|
965
|
+
/** This is always `inheritedFromCollection` */
|
|
966
|
+
type: string;
|
|
967
|
+
}
|
|
968
|
+
export const WafStatusRuleBlockReasonInheritedFromCollection =
|
|
969
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
970
|
+
S.Struct({
|
|
971
|
+
collectionId: S.String,
|
|
972
|
+
type: S.String,
|
|
973
|
+
}),
|
|
974
|
+
).annotate({
|
|
975
|
+
identifier: "WafStatusRuleBlockReasonInheritedFromCollection",
|
|
976
|
+
}) as any as S.Schema<WafStatusRuleBlockReasonInheritedFromCollection>;
|
|
977
|
+
|
|
978
|
+
export interface WafStatusRuleBlockReasonInheritedFromGroup {
|
|
979
|
+
/** The Group that caused this rule to be in its current state. */
|
|
980
|
+
groupId: string;
|
|
981
|
+
/** This is always `inheritedFromGroup` */
|
|
982
|
+
type: string;
|
|
983
|
+
}
|
|
984
|
+
export const WafStatusRuleBlockReasonInheritedFromGroup =
|
|
985
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
986
|
+
S.Struct({
|
|
987
|
+
groupId: S.String,
|
|
988
|
+
type: S.String,
|
|
989
|
+
}),
|
|
990
|
+
).annotate({
|
|
991
|
+
identifier: "WafStatusRuleBlockReasonInheritedFromGroup",
|
|
992
|
+
}) as any as S.Schema<WafStatusRuleBlockReasonInheritedFromGroup>;
|
|
993
|
+
|
|
994
|
+
/** Defines the Reason why a Rule is in the specified state (set to be enabled, disabled or logOnly). */
|
|
995
|
+
export type WafStatusRuleBlockReason =
|
|
996
|
+
| WafStatusRuleBlockReasonNeverDefined
|
|
997
|
+
| WafStatusRuleBlockReasonDirectlyDefined
|
|
998
|
+
| WafStatusRuleBlockReasonInvalidWafType
|
|
999
|
+
| WafStatusRuleBlockReasonInheritedFromCollection
|
|
1000
|
+
| WafStatusRuleBlockReasonInheritedFromGroup;
|
|
1001
|
+
export const WafStatusRuleBlockReason =
|
|
1002
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<WafStatusRuleBlockReason>;
|
|
1003
|
+
|
|
1004
|
+
export interface WafStatusRuleBlock {
|
|
1005
|
+
/** Specifies the Id of the Rule. */
|
|
1006
|
+
id: string;
|
|
1007
|
+
reason: WafStatusRuleBlockReason;
|
|
1008
|
+
}
|
|
1009
|
+
export const WafStatusRuleBlock = /*@__PURE__*/ S.suspend(() =>
|
|
1010
|
+
S.Struct({
|
|
1011
|
+
id: S.String,
|
|
1012
|
+
reason: WafStatusRuleBlockReason,
|
|
1013
|
+
}),
|
|
1014
|
+
).annotate({
|
|
1015
|
+
identifier: "WafStatusRuleBlock",
|
|
1016
|
+
}) as any as S.Schema<WafStatusRuleBlock>;
|
|
1017
|
+
|
|
1018
|
+
export type DistributionWafDisabledRulesList = Array<WafStatusRuleBlock>;
|
|
1019
|
+
export const DistributionWafDisabledRulesList = /*@__PURE__*/ S.Array(
|
|
1020
|
+
WafStatusRuleBlock,
|
|
1021
|
+
) as any as S.Schema<DistributionWafDisabledRulesList>;
|
|
1022
|
+
|
|
1023
|
+
export type DistributionWafEnabledRulesList = Array<WafStatusRuleBlock>;
|
|
1024
|
+
export const DistributionWafEnabledRulesList = /*@__PURE__*/ S.Array(
|
|
1025
|
+
WafStatusRuleBlock,
|
|
1026
|
+
) as any as S.Schema<DistributionWafEnabledRulesList>;
|
|
1027
|
+
|
|
1028
|
+
export type DistributionWafLogOnlyRulesList = Array<WafStatusRuleBlock>;
|
|
1029
|
+
export const DistributionWafLogOnlyRulesList = /*@__PURE__*/ S.Array(
|
|
1030
|
+
WafStatusRuleBlock,
|
|
1031
|
+
) as any as S.Schema<DistributionWafLogOnlyRulesList>;
|
|
1032
|
+
|
|
1033
|
+
/** For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** */
|
|
1034
|
+
export interface DistributionWaf {
|
|
1035
|
+
disabledRules: DistributionWafDisabledRulesList;
|
|
1036
|
+
enabledRules: DistributionWafEnabledRulesList;
|
|
1037
|
+
logOnlyRules: DistributionWafLogOnlyRulesList;
|
|
1038
|
+
}
|
|
1039
|
+
export const DistributionWaf = /*@__PURE__*/ S.suspend(() =>
|
|
1040
|
+
S.Struct({
|
|
1041
|
+
disabledRules: DistributionWafDisabledRulesList,
|
|
1042
|
+
enabledRules: DistributionWafEnabledRulesList,
|
|
1043
|
+
logOnlyRules: DistributionWafLogOnlyRulesList,
|
|
1044
|
+
}),
|
|
1045
|
+
).annotate({
|
|
1046
|
+
identifier: "DistributionWaf",
|
|
1047
|
+
}) as any as S.Schema<DistributionWaf>;
|
|
1048
|
+
|
|
1049
|
+
export interface Distribution {
|
|
1050
|
+
config: Config;
|
|
1051
|
+
/** RFC3339 string defining when the distribution was created */
|
|
1052
|
+
createdAt: string;
|
|
1053
|
+
domains: DistributionDomainsList;
|
|
1054
|
+
/** This object may be present if, and only if the distribution has encountered an error state. */
|
|
1055
|
+
errors?: DistributionErrorsList;
|
|
1056
|
+
id: string;
|
|
1057
|
+
projectId: string;
|
|
1058
|
+
/** - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. */
|
|
1059
|
+
status: DistributionStatus;
|
|
1060
|
+
/** RFC3339 string which returns the last time the distribution configuration was modified. */
|
|
1061
|
+
updatedAt: string;
|
|
1062
|
+
/** For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** */
|
|
1063
|
+
waf?: DistributionWaf;
|
|
1064
|
+
}
|
|
1065
|
+
export const Distribution = /*@__PURE__*/ S.suspend(() =>
|
|
1066
|
+
S.Struct({
|
|
1067
|
+
config: Config,
|
|
1068
|
+
createdAt: S.String,
|
|
1069
|
+
domains: DistributionDomainsList,
|
|
1070
|
+
errors: S.optional(DistributionErrorsList),
|
|
1071
|
+
id: S.String,
|
|
1072
|
+
projectId: S.String,
|
|
1073
|
+
status: DistributionStatus,
|
|
1074
|
+
updatedAt: S.String,
|
|
1075
|
+
waf: S.optional(DistributionWaf),
|
|
1076
|
+
}),
|
|
1077
|
+
).annotate({ identifier: "Distribution" }) as any as S.Schema<Distribution>;
|
|
1078
|
+
|
|
1079
|
+
export interface CreateDistributionResponse {
|
|
1080
|
+
distribution: Distribution;
|
|
1081
|
+
}
|
|
1082
|
+
export const CreateDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1083
|
+
S.Struct({
|
|
1084
|
+
distribution: Distribution,
|
|
1085
|
+
}),
|
|
1086
|
+
).annotate({
|
|
1087
|
+
identifier: "CreateDistributionResponse",
|
|
1088
|
+
}) as any as S.Schema<CreateDistributionResponse>;
|
|
1089
|
+
|
|
1090
|
+
export interface DeleteCustomDomainRequest {
|
|
1091
|
+
/** Your STACKIT Project Id */
|
|
1092
|
+
projectId: string;
|
|
1093
|
+
distributionId: string;
|
|
1094
|
+
domain: string;
|
|
1095
|
+
intentId?: string;
|
|
1096
|
+
}
|
|
1097
|
+
export const DeleteCustomDomainRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1098
|
+
S.Struct({
|
|
1099
|
+
projectId: S.String.pipe(T.Label()),
|
|
1100
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1101
|
+
domain: S.String.pipe(T.Label()),
|
|
1102
|
+
intentId: S.optional(S.String.pipe(T.Query())),
|
|
1103
|
+
}).pipe(
|
|
1104
|
+
T.Http({
|
|
1105
|
+
method: "DELETE",
|
|
1106
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1107
|
+
code: 200,
|
|
1108
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1109
|
+
}),
|
|
1110
|
+
),
|
|
1111
|
+
).annotate({
|
|
1112
|
+
identifier: "DeleteCustomDomainRequest",
|
|
1113
|
+
}) as any as S.Schema<DeleteCustomDomainRequest>;
|
|
1114
|
+
|
|
1115
|
+
/** This object is present if the custom domain has errors. */
|
|
1116
|
+
export type CustomDomainErrorsList = Array<StatusError>;
|
|
1117
|
+
export const CustomDomainErrorsList = /*@__PURE__*/ S.Array(
|
|
1118
|
+
StatusError,
|
|
1119
|
+
) as any as S.Schema<CustomDomainErrorsList>;
|
|
1120
|
+
|
|
1121
|
+
/** Definition of a custom domain */
|
|
1122
|
+
export interface CustomDomain {
|
|
1123
|
+
/** This object is present if the custom domain has errors. */
|
|
1124
|
+
errors?: CustomDomainErrorsList;
|
|
1125
|
+
/** The domain. Can be used as input for the GetCustomDomain endpoint */
|
|
1126
|
+
name: string;
|
|
1127
|
+
status: DomainStatus;
|
|
1128
|
+
}
|
|
1129
|
+
export const CustomDomain = /*@__PURE__*/ S.suspend(() =>
|
|
1130
|
+
S.Struct({
|
|
1131
|
+
errors: S.optional(CustomDomainErrorsList),
|
|
1132
|
+
name: S.String,
|
|
1133
|
+
status: DomainStatus,
|
|
1134
|
+
}),
|
|
1135
|
+
).annotate({ identifier: "CustomDomain" }) as any as S.Schema<CustomDomain>;
|
|
1136
|
+
|
|
1137
|
+
/** Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. */
|
|
1138
|
+
export interface DeleteCustomDomainResponse {
|
|
1139
|
+
customDomain?: CustomDomain;
|
|
1140
|
+
}
|
|
1141
|
+
export const DeleteCustomDomainResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1142
|
+
S.Struct({
|
|
1143
|
+
customDomain: S.optional(CustomDomain),
|
|
1144
|
+
}),
|
|
1145
|
+
).annotate({
|
|
1146
|
+
identifier: "DeleteCustomDomainResponse",
|
|
1147
|
+
}) as any as S.Schema<DeleteCustomDomainResponse>;
|
|
1148
|
+
|
|
1149
|
+
export interface DeleteDistributionRequest {
|
|
1150
|
+
/** Your STACKIT Project Id */
|
|
1151
|
+
projectId: string;
|
|
1152
|
+
distributionId: string;
|
|
1153
|
+
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple DELETE-Requests with the same `intentId` are received, all but the first request are dropped. */
|
|
1154
|
+
intentId?: string;
|
|
1155
|
+
}
|
|
1156
|
+
export const DeleteDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1157
|
+
S.Struct({
|
|
1158
|
+
projectId: S.String.pipe(T.Label()),
|
|
1159
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1160
|
+
intentId: S.optional(S.String.pipe(T.Query())),
|
|
1161
|
+
}).pipe(
|
|
1162
|
+
T.Http({
|
|
1163
|
+
method: "DELETE",
|
|
1164
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
1165
|
+
code: 200,
|
|
1166
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1167
|
+
}),
|
|
1168
|
+
),
|
|
1169
|
+
).annotate({
|
|
1170
|
+
identifier: "DeleteDistributionRequest",
|
|
1171
|
+
}) as any as S.Schema<DeleteDistributionRequest>;
|
|
1172
|
+
|
|
1173
|
+
export interface DeleteDistributionResponse {
|
|
1174
|
+
distribution?: Distribution;
|
|
1175
|
+
}
|
|
1176
|
+
export const DeleteDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1177
|
+
S.Struct({
|
|
1178
|
+
distribution: S.optional(Distribution),
|
|
1179
|
+
}),
|
|
1180
|
+
).annotate({
|
|
1181
|
+
identifier: "DeleteDistributionResponse",
|
|
1182
|
+
}) as any as S.Schema<DeleteDistributionResponse>;
|
|
1183
|
+
|
|
1184
|
+
export interface FindCachePathsRequest {
|
|
1185
|
+
/** Your STACKIT Project Id */
|
|
1186
|
+
projectId: string;
|
|
1187
|
+
distributionId: string;
|
|
1188
|
+
/** A substring of the search query. */
|
|
1189
|
+
path: string;
|
|
1190
|
+
}
|
|
1191
|
+
export const FindCachePathsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1192
|
+
S.Struct({
|
|
1193
|
+
projectId: S.String.pipe(T.Label()),
|
|
1194
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1195
|
+
path: S.String.pipe(T.Query()),
|
|
1196
|
+
}).pipe(
|
|
1197
|
+
T.Http({
|
|
1198
|
+
method: "GET",
|
|
1199
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache/paths",
|
|
1200
|
+
code: 200,
|
|
1201
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1202
|
+
}),
|
|
1203
|
+
),
|
|
1204
|
+
).annotate({
|
|
1205
|
+
identifier: "FindCachePathsRequest",
|
|
1206
|
+
}) as any as S.Schema<FindCachePathsRequest>;
|
|
1207
|
+
|
|
1208
|
+
export interface FindCachePathsResponseEntry {
|
|
1209
|
+
/** Defines one path that was previously used as part of a granular purge */
|
|
1210
|
+
path: string;
|
|
1211
|
+
}
|
|
1212
|
+
export const FindCachePathsResponseEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1213
|
+
S.Struct({
|
|
1214
|
+
path: S.String,
|
|
1215
|
+
}),
|
|
1216
|
+
).annotate({
|
|
1217
|
+
identifier: "FindCachePathsResponseEntry",
|
|
1218
|
+
}) as any as S.Schema<FindCachePathsResponseEntry>;
|
|
1219
|
+
|
|
1220
|
+
export type FindCachePathsResponseResponseList =
|
|
1221
|
+
Array<FindCachePathsResponseEntry>;
|
|
1222
|
+
export const FindCachePathsResponseResponseList = /*@__PURE__*/ S.Array(
|
|
1223
|
+
FindCachePathsResponseEntry,
|
|
1224
|
+
) as any as S.Schema<FindCachePathsResponseResponseList>;
|
|
1225
|
+
|
|
1226
|
+
export interface FindCachePathsResponse {
|
|
1227
|
+
response: FindCachePathsResponseResponseList;
|
|
1228
|
+
}
|
|
1229
|
+
export const FindCachePathsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1230
|
+
S.Struct({
|
|
1231
|
+
response: FindCachePathsResponseResponseList,
|
|
1232
|
+
}),
|
|
1233
|
+
).annotate({
|
|
1234
|
+
identifier: "FindCachePathsResponse",
|
|
1235
|
+
}) as any as S.Schema<FindCachePathsResponse>;
|
|
1236
|
+
|
|
1237
|
+
export interface GetCacheInfoRequest {
|
|
1238
|
+
/** Your STACKIT Project Id */
|
|
1239
|
+
projectId: string;
|
|
1240
|
+
distributionId: string;
|
|
1241
|
+
purgePath?: string;
|
|
1242
|
+
}
|
|
1243
|
+
export const GetCacheInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1244
|
+
S.Struct({
|
|
1245
|
+
projectId: S.String.pipe(T.Label()),
|
|
1246
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1247
|
+
purgePath: S.optional(S.String.pipe(T.Query())),
|
|
1248
|
+
}).pipe(
|
|
1249
|
+
T.Http({
|
|
1250
|
+
method: "GET",
|
|
1251
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache",
|
|
1252
|
+
code: 200,
|
|
1253
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1254
|
+
}),
|
|
1255
|
+
),
|
|
1256
|
+
).annotate({
|
|
1257
|
+
identifier: "GetCacheInfoRequest",
|
|
1258
|
+
}) as any as S.Schema<GetCacheInfoRequest>;
|
|
1259
|
+
|
|
1260
|
+
export type GetCacheInfoResponseHistoryEntryType = "full" | "granular";
|
|
1261
|
+
export const GetCacheInfoResponseHistoryEntryType = /*@__PURE__*/ S.String;
|
|
1262
|
+
|
|
1263
|
+
export interface GetCacheInfoResponseHistoryEntry {
|
|
1264
|
+
occurredAt: string;
|
|
1265
|
+
type: GetCacheInfoResponseHistoryEntryType;
|
|
1266
|
+
}
|
|
1267
|
+
export const GetCacheInfoResponseHistoryEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1268
|
+
S.Struct({
|
|
1269
|
+
occurredAt: S.String,
|
|
1270
|
+
type: GetCacheInfoResponseHistoryEntryType,
|
|
1271
|
+
}),
|
|
1272
|
+
).annotate({
|
|
1273
|
+
identifier: "GetCacheInfoResponseHistoryEntry",
|
|
1274
|
+
}) as any as S.Schema<GetCacheInfoResponseHistoryEntry>;
|
|
1275
|
+
|
|
1276
|
+
export type GetCacheInfoResponseHistoryList =
|
|
1277
|
+
Array<GetCacheInfoResponseHistoryEntry>;
|
|
1278
|
+
export const GetCacheInfoResponseHistoryList = /*@__PURE__*/ S.Array(
|
|
1279
|
+
GetCacheInfoResponseHistoryEntry,
|
|
1280
|
+
) as any as S.Schema<GetCacheInfoResponseHistoryList>;
|
|
1281
|
+
|
|
1282
|
+
export interface GetCacheInfoResponse {
|
|
1283
|
+
history: GetCacheInfoResponseHistoryList;
|
|
1284
|
+
/** Returns the last time the cache was purged by calling the PurgeCache endpoint. Time represented as RFC3339 compliant string. If the cache was never purged, this returns `null` */
|
|
1285
|
+
lastPurgeTime: string | null;
|
|
1286
|
+
}
|
|
1287
|
+
export const GetCacheInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1288
|
+
S.Struct({
|
|
1289
|
+
history: GetCacheInfoResponseHistoryList,
|
|
1290
|
+
lastPurgeTime: S.NullOr(S.String),
|
|
1291
|
+
}),
|
|
1292
|
+
).annotate({
|
|
1293
|
+
identifier: "GetCacheInfoResponse",
|
|
1294
|
+
}) as any as S.Schema<GetCacheInfoResponse>;
|
|
1295
|
+
|
|
1296
|
+
export interface GetCustomDomainRequest {
|
|
1297
|
+
/** Your STACKIT Project Id */
|
|
1298
|
+
projectId: string;
|
|
1299
|
+
distributionId: string;
|
|
1300
|
+
domain: string;
|
|
1301
|
+
}
|
|
1302
|
+
export const GetCustomDomainRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1303
|
+
S.Struct({
|
|
1304
|
+
projectId: S.String.pipe(T.Label()),
|
|
1305
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1306
|
+
domain: S.String.pipe(T.Label()),
|
|
1307
|
+
}).pipe(
|
|
1308
|
+
T.Http({
|
|
1309
|
+
method: "GET",
|
|
1310
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
1311
|
+
code: 200,
|
|
1312
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1313
|
+
}),
|
|
1314
|
+
),
|
|
1315
|
+
).annotate({
|
|
1316
|
+
identifier: "GetCustomDomainRequest",
|
|
1317
|
+
}) as any as S.Schema<GetCustomDomainRequest>;
|
|
1318
|
+
|
|
1319
|
+
/** This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you */
|
|
1320
|
+
export interface GetCustomDomainManagedCertificate {
|
|
1321
|
+
type: string;
|
|
1322
|
+
}
|
|
1323
|
+
export const GetCustomDomainManagedCertificate = /*@__PURE__*/ S.suspend(() =>
|
|
1324
|
+
S.Struct({
|
|
1325
|
+
type: S.String,
|
|
1326
|
+
}),
|
|
1327
|
+
).annotate({
|
|
1328
|
+
identifier: "GetCustomDomainManagedCertificate",
|
|
1329
|
+
}) as any as S.Schema<GetCustomDomainManagedCertificate>;
|
|
1330
|
+
|
|
1331
|
+
/** Returned if a custom certificate is used. Response does not contain the certificate or key. */
|
|
1332
|
+
export interface GetCustomDomainCustomCertificate {
|
|
1333
|
+
/** Returns if the CNAME Check has been disabled for this Custom Domain. This is usually set for migrations to allow for no downtime. */
|
|
1334
|
+
skipDnsCheck: boolean;
|
|
1335
|
+
type: string;
|
|
1336
|
+
/** Whenever a new custom certificate is added the version is increased by 1. */
|
|
1337
|
+
version: number;
|
|
1338
|
+
}
|
|
1339
|
+
export const GetCustomDomainCustomCertificate = /*@__PURE__*/ S.suspend(() =>
|
|
1340
|
+
S.Struct({
|
|
1341
|
+
skipDnsCheck: S.Boolean,
|
|
1342
|
+
type: S.String,
|
|
1343
|
+
version: S.Number,
|
|
1344
|
+
}),
|
|
1345
|
+
).annotate({
|
|
1346
|
+
identifier: "GetCustomDomainCustomCertificate",
|
|
1347
|
+
}) as any as S.Schema<GetCustomDomainCustomCertificate>;
|
|
1348
|
+
|
|
1349
|
+
export type GetCustomDomainResponseCertificate =
|
|
1350
|
+
| GetCustomDomainManagedCertificate
|
|
1351
|
+
| GetCustomDomainCustomCertificate;
|
|
1352
|
+
export const GetCustomDomainResponseCertificate =
|
|
1353
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<GetCustomDomainResponseCertificate>;
|
|
1354
|
+
|
|
1355
|
+
export interface GetCustomDomainResponse {
|
|
1356
|
+
certificate: GetCustomDomainResponseCertificate;
|
|
1357
|
+
customDomain: CustomDomain;
|
|
1358
|
+
}
|
|
1359
|
+
export const GetCustomDomainResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1360
|
+
S.Struct({
|
|
1361
|
+
certificate: GetCustomDomainResponseCertificate,
|
|
1362
|
+
customDomain: CustomDomain,
|
|
1363
|
+
}),
|
|
1364
|
+
).annotate({
|
|
1365
|
+
identifier: "GetCustomDomainResponse",
|
|
1366
|
+
}) as any as S.Schema<GetCustomDomainResponse>;
|
|
1367
|
+
|
|
1368
|
+
export interface GetDistributionRequest {
|
|
1369
|
+
/** Your STACKIT Project Id */
|
|
1370
|
+
projectId: string;
|
|
1371
|
+
distributionId: string;
|
|
1372
|
+
/** If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. */
|
|
1373
|
+
withWafStatus?: boolean;
|
|
1374
|
+
}
|
|
1375
|
+
export const GetDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1376
|
+
S.Struct({
|
|
1377
|
+
projectId: S.String.pipe(T.Label()),
|
|
1378
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1379
|
+
withWafStatus: S.optional(S.Boolean.pipe(T.Query())),
|
|
1380
|
+
}).pipe(
|
|
1381
|
+
T.Http({
|
|
1382
|
+
method: "GET",
|
|
1383
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
1384
|
+
code: 200,
|
|
1385
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1386
|
+
}),
|
|
1387
|
+
),
|
|
1388
|
+
).annotate({
|
|
1389
|
+
identifier: "GetDistributionRequest",
|
|
1390
|
+
}) as any as S.Schema<GetDistributionRequest>;
|
|
1391
|
+
|
|
1392
|
+
export interface GetDistributionResponse {
|
|
1393
|
+
distribution: Distribution;
|
|
1394
|
+
}
|
|
1395
|
+
export const GetDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1396
|
+
S.Struct({
|
|
1397
|
+
distribution: Distribution,
|
|
1398
|
+
}),
|
|
1399
|
+
).annotate({
|
|
1400
|
+
identifier: "GetDistributionResponse",
|
|
1401
|
+
}) as any as S.Schema<GetDistributionResponse>;
|
|
1402
|
+
|
|
1403
|
+
export type GetLogsRequestSortBy =
|
|
1404
|
+
| "timestamp"
|
|
1405
|
+
| "dataCenterRegion"
|
|
1406
|
+
| "requestCountryCode"
|
|
1407
|
+
| "statusCode"
|
|
1408
|
+
| "cacheHit"
|
|
1409
|
+
| "size"
|
|
1410
|
+
| "path"
|
|
1411
|
+
| "host";
|
|
1412
|
+
export const GetLogsRequestSortBy = /*@__PURE__*/ S.String;
|
|
1413
|
+
|
|
1414
|
+
export type GetLogsRequestSortOrder = "ascending" | "descending";
|
|
1415
|
+
export const GetLogsRequestSortOrder = /*@__PURE__*/ S.String;
|
|
1416
|
+
|
|
1417
|
+
/** The action a WAF rule can take based on a request */
|
|
1418
|
+
export type WAFRuleAction = "BLOCKED" | "LOGGED" | "ALLOWED";
|
|
1419
|
+
export const WAFRuleAction = /*@__PURE__*/ S.String;
|
|
1420
|
+
|
|
1421
|
+
export interface GetLogsRequest {
|
|
1422
|
+
/** Your STACKIT Project Id */
|
|
1423
|
+
projectId: string;
|
|
1424
|
+
/** Your CDN distribution Id */
|
|
1425
|
+
distributionId: string;
|
|
1426
|
+
/** the start of the time range for which logs should be returned */
|
|
1427
|
+
from?: string;
|
|
1428
|
+
/** the end of the time range for which logs should be returned. If not specified, "now" is used. */
|
|
1429
|
+
to?: string;
|
|
1430
|
+
/** Quantifies how many log entries should be returned on this page. Must be a natural number between 1 and 1000 (inclusive) */
|
|
1431
|
+
pageSize?: number;
|
|
1432
|
+
/** Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get "pushed" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. */
|
|
1433
|
+
pageIdentifier?: string;
|
|
1434
|
+
/** Sorts the log messages by a specific field. Defaults to `timestamp`. Supported sort options: - `timestamp` - `dataCenterRegion` - `requestCountryCode` - `statusCode` - `cacheHit` - `size` - `path` - `host` */
|
|
1435
|
+
sortBy?: GetLogsRequestSortBy | (string & {});
|
|
1436
|
+
sortOrder?: GetLogsRequestSortOrder | (string & {});
|
|
1437
|
+
/** If this is set then only log entries with the chosen WAF rule action/outcome are returned. Specifically, if `ALLOWED` then all requests with no violation are returned. If `BLOCKED` then those where a WAF rule blocked a request and if `LOGGED` then only those requests where the WAF violation was only logged but the request not blocked */
|
|
1438
|
+
wafAction?: WAFRuleAction | (string & {});
|
|
1439
|
+
/** Filters by the CDN data center region that served the request. Can be combined with other filters */
|
|
1440
|
+
dataCenterRegion?: string;
|
|
1441
|
+
/** Filters by the originating country of the user request. Can be combined with other filters */
|
|
1442
|
+
requestCountryCode?: string;
|
|
1443
|
+
/** Filters by the HTTP status code returned to the client. Can be combined with other filters */
|
|
1444
|
+
statusCode?: number;
|
|
1445
|
+
/** Filters based on whether the request was served from the CDN cache. Can be combined with other filters */
|
|
1446
|
+
cacheHit?: boolean;
|
|
1447
|
+
}
|
|
1448
|
+
export const GetLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1449
|
+
S.Struct({
|
|
1450
|
+
projectId: S.String.pipe(T.Label()),
|
|
1451
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1452
|
+
from: S.optional(S.String.pipe(T.Query())),
|
|
1453
|
+
to: S.optional(S.String.pipe(T.Query())),
|
|
1454
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
1455
|
+
pageIdentifier: S.optional(S.String.pipe(T.Query())),
|
|
1456
|
+
sortBy: S.optional(GetLogsRequestSortBy.pipe(T.Query())),
|
|
1457
|
+
sortOrder: S.optional(GetLogsRequestSortOrder.pipe(T.Query())),
|
|
1458
|
+
wafAction: S.optional(WAFRuleAction.pipe(T.Query())),
|
|
1459
|
+
dataCenterRegion: S.optional(S.String.pipe(T.Query())),
|
|
1460
|
+
requestCountryCode: S.optional(S.String.pipe(T.Query())),
|
|
1461
|
+
statusCode: S.optional(S.Number.pipe(T.Query())),
|
|
1462
|
+
cacheHit: S.optional(S.Boolean.pipe(T.Query())),
|
|
1463
|
+
}).pipe(
|
|
1464
|
+
T.Http({
|
|
1465
|
+
method: "GET",
|
|
1466
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/logs",
|
|
1467
|
+
code: 200,
|
|
1468
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1469
|
+
}),
|
|
1470
|
+
),
|
|
1471
|
+
).annotate({ identifier: "GetLogsRequest" }) as any as S.Schema<GetLogsRequest>;
|
|
1472
|
+
|
|
1473
|
+
export type WAFViolationRequestHeadersMap = {
|
|
1474
|
+
[key: string]: string | undefined;
|
|
1475
|
+
};
|
|
1476
|
+
export const WAFViolationRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
1477
|
+
S.String,
|
|
1478
|
+
S.String,
|
|
1479
|
+
) as any as S.Schema<WAFViolationRequestHeadersMap>;
|
|
1480
|
+
|
|
1481
|
+
/** Information about a violated WAF rule in case the WAF is enabled and a rule was triggered (either in BLOCK or LOG_ONLY mode) */
|
|
1482
|
+
export interface WAFViolation {
|
|
1483
|
+
action: WAFRuleAction;
|
|
1484
|
+
/** ASN for the request */
|
|
1485
|
+
asn: string;
|
|
1486
|
+
/** Rule specific message explaining the violation */
|
|
1487
|
+
message: string;
|
|
1488
|
+
/** HTTP Method of the request that triggered the violation */
|
|
1489
|
+
method: string;
|
|
1490
|
+
requestHeaders: WAFViolationRequestHeadersMap;
|
|
1491
|
+
/** ID of the WAF rule that was triggered */
|
|
1492
|
+
ruleId: string;
|
|
1493
|
+
}
|
|
1494
|
+
export const WAFViolation = /*@__PURE__*/ S.suspend(() =>
|
|
1495
|
+
S.Struct({
|
|
1496
|
+
action: WAFRuleAction,
|
|
1497
|
+
asn: S.String,
|
|
1498
|
+
message: S.String,
|
|
1499
|
+
method: S.String,
|
|
1500
|
+
requestHeaders: WAFViolationRequestHeadersMap,
|
|
1501
|
+
ruleId: S.String,
|
|
1502
|
+
}),
|
|
1503
|
+
).annotate({ identifier: "WAFViolation" }) as any as S.Schema<WAFViolation>;
|
|
1504
|
+
|
|
1505
|
+
export interface DistributionLogsRecord {
|
|
1506
|
+
cacheHit: boolean;
|
|
1507
|
+
dataCenterRegion: string;
|
|
1508
|
+
distributionId: string;
|
|
1509
|
+
host: string;
|
|
1510
|
+
path: string;
|
|
1511
|
+
/** ISO 3166-1 A2 compliant country code */
|
|
1512
|
+
requestCountryCode: string;
|
|
1513
|
+
size: number;
|
|
1514
|
+
statusCode: number;
|
|
1515
|
+
timestamp: string;
|
|
1516
|
+
wafViolation?: WAFViolation;
|
|
1517
|
+
}
|
|
1518
|
+
export const DistributionLogsRecord = /*@__PURE__*/ S.suspend(() =>
|
|
1519
|
+
S.Struct({
|
|
1520
|
+
cacheHit: S.Boolean,
|
|
1521
|
+
dataCenterRegion: S.String,
|
|
1522
|
+
distributionId: S.String,
|
|
1523
|
+
host: S.String,
|
|
1524
|
+
path: S.String,
|
|
1525
|
+
requestCountryCode: S.String,
|
|
1526
|
+
size: S.Number,
|
|
1527
|
+
statusCode: S.Number,
|
|
1528
|
+
timestamp: S.String,
|
|
1529
|
+
wafViolation: S.optional(WAFViolation),
|
|
1530
|
+
}),
|
|
1531
|
+
).annotate({
|
|
1532
|
+
identifier: "DistributionLogsRecord",
|
|
1533
|
+
}) as any as S.Schema<DistributionLogsRecord>;
|
|
1534
|
+
|
|
1535
|
+
export type GetLogsResponseLogsList = Array<DistributionLogsRecord>;
|
|
1536
|
+
export const GetLogsResponseLogsList = /*@__PURE__*/ S.Array(
|
|
1537
|
+
DistributionLogsRecord,
|
|
1538
|
+
) as any as S.Schema<GetLogsResponseLogsList>;
|
|
1539
|
+
|
|
1540
|
+
export interface GetLogsResponse {
|
|
1541
|
+
logs: GetLogsResponseLogsList;
|
|
1542
|
+
nextPageIdentifier?: string;
|
|
1543
|
+
}
|
|
1544
|
+
export const GetLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1545
|
+
S.Struct({
|
|
1546
|
+
logs: GetLogsResponseLogsList,
|
|
1547
|
+
nextPageIdentifier: S.optional(S.String),
|
|
1548
|
+
}),
|
|
1549
|
+
).annotate({
|
|
1550
|
+
identifier: "GetLogsResponse",
|
|
1551
|
+
}) as any as S.Schema<GetLogsResponse>;
|
|
1552
|
+
|
|
1553
|
+
export interface GetLogsSearchFiltersRequest {
|
|
1554
|
+
/** Your STACKIT Project ID. */
|
|
1555
|
+
projectId: string;
|
|
1556
|
+
/** Your CDN distribution ID. */
|
|
1557
|
+
distributionId: string;
|
|
1558
|
+
/** Optional search string. Will search the **values** for the text input. */
|
|
1559
|
+
filter?: string;
|
|
1560
|
+
}
|
|
1561
|
+
export const GetLogsSearchFiltersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1562
|
+
S.Struct({
|
|
1563
|
+
projectId: S.String.pipe(T.Label()),
|
|
1564
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1565
|
+
filter: S.optional(S.String.pipe(T.Query())),
|
|
1566
|
+
}).pipe(
|
|
1567
|
+
T.Http({
|
|
1568
|
+
method: "GET",
|
|
1569
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/logs/searchFilters",
|
|
1570
|
+
code: 200,
|
|
1571
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1572
|
+
}),
|
|
1573
|
+
),
|
|
1574
|
+
).annotate({
|
|
1575
|
+
identifier: "GetLogsSearchFiltersRequest",
|
|
1576
|
+
}) as any as S.Schema<GetLogsSearchFiltersRequest>;
|
|
1577
|
+
|
|
1578
|
+
export type GetLogsSearchFiltersResponseCacheItem = "HIT" | "MISS";
|
|
1579
|
+
export const GetLogsSearchFiltersResponseCacheItem = /*@__PURE__*/ S.String;
|
|
1580
|
+
|
|
1581
|
+
export type GetLogsSearchFiltersResponseCacheList =
|
|
1582
|
+
Array<GetLogsSearchFiltersResponseCacheItem>;
|
|
1583
|
+
export const GetLogsSearchFiltersResponseCacheList = /*@__PURE__*/ S.Array(
|
|
1584
|
+
GetLogsSearchFiltersResponseCacheItem,
|
|
1585
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseCacheList>;
|
|
1586
|
+
|
|
1587
|
+
/** A datacenter. The `id` defines the key needed to filter against the logs endpoint, while the `displayName` defines a human-readable Name. */
|
|
1588
|
+
export interface GetLogsSearchFiltersResponseDatacenterBlockItem {
|
|
1589
|
+
displayName: string;
|
|
1590
|
+
id: string;
|
|
1591
|
+
}
|
|
1592
|
+
export const GetLogsSearchFiltersResponseDatacenterBlockItem =
|
|
1593
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1594
|
+
S.Struct({
|
|
1595
|
+
displayName: S.String,
|
|
1596
|
+
id: S.String,
|
|
1597
|
+
}),
|
|
1598
|
+
).annotate({
|
|
1599
|
+
identifier: "GetLogsSearchFiltersResponseDatacenterBlockItem",
|
|
1600
|
+
}) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1601
|
+
|
|
1602
|
+
export type GetLogsSearchFiltersResponseDatacenterBlockAFList =
|
|
1603
|
+
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1604
|
+
export const GetLogsSearchFiltersResponseDatacenterBlockAFList =
|
|
1605
|
+
/*@__PURE__*/ S.Array(
|
|
1606
|
+
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1607
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockAFList>;
|
|
1608
|
+
|
|
1609
|
+
export type GetLogsSearchFiltersResponseDatacenterBlockASIAList =
|
|
1610
|
+
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1611
|
+
export const GetLogsSearchFiltersResponseDatacenterBlockASIAList =
|
|
1612
|
+
/*@__PURE__*/ S.Array(
|
|
1613
|
+
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1614
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockASIAList>;
|
|
1615
|
+
|
|
1616
|
+
export type GetLogsSearchFiltersResponseDatacenterBlockEUList =
|
|
1617
|
+
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1618
|
+
export const GetLogsSearchFiltersResponseDatacenterBlockEUList =
|
|
1619
|
+
/*@__PURE__*/ S.Array(
|
|
1620
|
+
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1621
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockEUList>;
|
|
1622
|
+
|
|
1623
|
+
export type GetLogsSearchFiltersResponseDatacenterBlockNAList =
|
|
1624
|
+
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1625
|
+
export const GetLogsSearchFiltersResponseDatacenterBlockNAList =
|
|
1626
|
+
/*@__PURE__*/ S.Array(
|
|
1627
|
+
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1628
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockNAList>;
|
|
1629
|
+
|
|
1630
|
+
export type GetLogsSearchFiltersResponseDatacenterBlockSAList =
|
|
1631
|
+
Array<GetLogsSearchFiltersResponseDatacenterBlockItem>;
|
|
1632
|
+
export const GetLogsSearchFiltersResponseDatacenterBlockSAList =
|
|
1633
|
+
/*@__PURE__*/ S.Array(
|
|
1634
|
+
GetLogsSearchFiltersResponseDatacenterBlockItem,
|
|
1635
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlockSAList>;
|
|
1636
|
+
|
|
1637
|
+
/** Object containing Datacenters to filter for. Each datacenter is grouped to the respective region. */
|
|
1638
|
+
export interface GetLogsSearchFiltersResponseDatacenterBlock {
|
|
1639
|
+
AF: GetLogsSearchFiltersResponseDatacenterBlockAFList;
|
|
1640
|
+
ASIA: GetLogsSearchFiltersResponseDatacenterBlockASIAList;
|
|
1641
|
+
EU: GetLogsSearchFiltersResponseDatacenterBlockEUList;
|
|
1642
|
+
NA: GetLogsSearchFiltersResponseDatacenterBlockNAList;
|
|
1643
|
+
SA: GetLogsSearchFiltersResponseDatacenterBlockSAList;
|
|
1644
|
+
}
|
|
1645
|
+
export const GetLogsSearchFiltersResponseDatacenterBlock =
|
|
1646
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
1647
|
+
S.Struct({
|
|
1648
|
+
AF: GetLogsSearchFiltersResponseDatacenterBlockAFList,
|
|
1649
|
+
ASIA: GetLogsSearchFiltersResponseDatacenterBlockASIAList,
|
|
1650
|
+
EU: GetLogsSearchFiltersResponseDatacenterBlockEUList,
|
|
1651
|
+
NA: GetLogsSearchFiltersResponseDatacenterBlockNAList,
|
|
1652
|
+
SA: GetLogsSearchFiltersResponseDatacenterBlockSAList,
|
|
1653
|
+
}),
|
|
1654
|
+
).annotate({
|
|
1655
|
+
identifier: "GetLogsSearchFiltersResponseDatacenterBlock",
|
|
1656
|
+
}) as any as S.Schema<GetLogsSearchFiltersResponseDatacenterBlock>;
|
|
1657
|
+
|
|
1658
|
+
/** List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */
|
|
1659
|
+
export type GetLogsSearchFiltersResponseRemoteCountryList = Array<string>;
|
|
1660
|
+
export const GetLogsSearchFiltersResponseRemoteCountryList =
|
|
1661
|
+
/*@__PURE__*/ S.Array(
|
|
1662
|
+
S.String,
|
|
1663
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseRemoteCountryList>;
|
|
1664
|
+
|
|
1665
|
+
/** List of Status Codes matching the input filter. Response is ordered in ascending order. */
|
|
1666
|
+
export type GetLogsSearchFiltersResponseStatusList = Array<number>;
|
|
1667
|
+
export const GetLogsSearchFiltersResponseStatusList = /*@__PURE__*/ S.Array(
|
|
1668
|
+
S.Number,
|
|
1669
|
+
) as any as S.Schema<GetLogsSearchFiltersResponseStatusList>;
|
|
1670
|
+
|
|
1671
|
+
export interface GetLogsSearchFiltersResponse {
|
|
1672
|
+
cache: GetLogsSearchFiltersResponseCacheList;
|
|
1673
|
+
dataCenter: GetLogsSearchFiltersResponseDatacenterBlock;
|
|
1674
|
+
/** List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */
|
|
1675
|
+
remoteCountry: GetLogsSearchFiltersResponseRemoteCountryList;
|
|
1676
|
+
/** List of Status Codes matching the input filter. Response is ordered in ascending order. */
|
|
1677
|
+
status: GetLogsSearchFiltersResponseStatusList;
|
|
1678
|
+
}
|
|
1679
|
+
export const GetLogsSearchFiltersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1680
|
+
S.Struct({
|
|
1681
|
+
cache: GetLogsSearchFiltersResponseCacheList,
|
|
1682
|
+
dataCenter: GetLogsSearchFiltersResponseDatacenterBlock,
|
|
1683
|
+
remoteCountry: GetLogsSearchFiltersResponseRemoteCountryList,
|
|
1684
|
+
status: GetLogsSearchFiltersResponseStatusList,
|
|
1685
|
+
}),
|
|
1686
|
+
).annotate({
|
|
1687
|
+
identifier: "GetLogsSearchFiltersResponse",
|
|
1688
|
+
}) as any as S.Schema<GetLogsSearchFiltersResponse>;
|
|
1689
|
+
|
|
1690
|
+
export type GetStatisticsRequestInterval =
|
|
1691
|
+
| "hourly"
|
|
1692
|
+
| "daily"
|
|
1693
|
+
| "monthly"
|
|
1694
|
+
| "yearly";
|
|
1695
|
+
export const GetStatisticsRequestInterval = /*@__PURE__*/ S.String;
|
|
1696
|
+
|
|
1697
|
+
export interface GetStatisticsRequest {
|
|
1698
|
+
/** Your STACKIT Project Id */
|
|
1699
|
+
projectId: string;
|
|
1700
|
+
distributionId: string;
|
|
1701
|
+
/** the start of the time range for which statistics should be returned */
|
|
1702
|
+
from: string;
|
|
1703
|
+
/** the end of the time range for which statistics should be returned. If not specified, the end of the current time interval is used, e.g. next day for daily, next month for monthly, and so on. */
|
|
1704
|
+
to?: string;
|
|
1705
|
+
/** Over which interval should statistics be aggregated? defaults to hourly resolution **NOTE**: Intervals are grouped in buckets that start and end based on a day in UTC+0 time. So for the `daily` interval, the group starts (inclusive) and ends (exclusive) at `00:00Z` */
|
|
1706
|
+
interval?: GetStatisticsRequestInterval | (string & {});
|
|
1707
|
+
}
|
|
1708
|
+
export const GetStatisticsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1709
|
+
S.Struct({
|
|
1710
|
+
projectId: S.String.pipe(T.Label()),
|
|
1711
|
+
distributionId: S.String.pipe(T.Label()),
|
|
1712
|
+
from: S.String.pipe(T.Query()),
|
|
1713
|
+
to: S.optional(S.String.pipe(T.Query())),
|
|
1714
|
+
interval: S.optional(GetStatisticsRequestInterval.pipe(T.Query())),
|
|
1715
|
+
}).pipe(
|
|
1716
|
+
T.Http({
|
|
1717
|
+
method: "GET",
|
|
1718
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/statistics",
|
|
1719
|
+
code: 200,
|
|
1720
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1721
|
+
}),
|
|
1722
|
+
),
|
|
1723
|
+
).annotate({
|
|
1724
|
+
identifier: "GetStatisticsRequest",
|
|
1725
|
+
}) as any as S.Schema<GetStatisticsRequest>;
|
|
1726
|
+
|
|
1727
|
+
export interface DistributionStatisticsRecordEntry {
|
|
1728
|
+
/** Number of cached requests that were served */
|
|
1729
|
+
cachedRequests: number;
|
|
1730
|
+
/** Total number of requests that were served */
|
|
1731
|
+
totalRequests: number;
|
|
1732
|
+
/** Total traffic in bytes that occurred during the time interval */
|
|
1733
|
+
totalTrafficBytes: number;
|
|
1734
|
+
}
|
|
1735
|
+
export const DistributionStatisticsRecordEntry = /*@__PURE__*/ S.suspend(() =>
|
|
1736
|
+
S.Struct({
|
|
1737
|
+
cachedRequests: S.Number,
|
|
1738
|
+
totalRequests: S.Number,
|
|
1739
|
+
totalTrafficBytes: S.Number,
|
|
1740
|
+
}),
|
|
1741
|
+
).annotate({
|
|
1742
|
+
identifier: "DistributionStatisticsRecordEntry",
|
|
1743
|
+
}) as any as S.Schema<DistributionStatisticsRecordEntry>;
|
|
1744
|
+
|
|
1745
|
+
/** Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties */
|
|
1746
|
+
export interface DistributionStatisticsRecordRegions {
|
|
1747
|
+
AF: DistributionStatisticsRecordEntry;
|
|
1748
|
+
ASIA: DistributionStatisticsRecordEntry;
|
|
1749
|
+
EU: DistributionStatisticsRecordEntry;
|
|
1750
|
+
SA: DistributionStatisticsRecordEntry;
|
|
1751
|
+
US: DistributionStatisticsRecordEntry;
|
|
1752
|
+
}
|
|
1753
|
+
export const DistributionStatisticsRecordRegions = /*@__PURE__*/ S.suspend(() =>
|
|
1754
|
+
S.Struct({
|
|
1755
|
+
AF: DistributionStatisticsRecordEntry,
|
|
1756
|
+
ASIA: DistributionStatisticsRecordEntry,
|
|
1757
|
+
EU: DistributionStatisticsRecordEntry,
|
|
1758
|
+
SA: DistributionStatisticsRecordEntry,
|
|
1759
|
+
US: DistributionStatisticsRecordEntry,
|
|
1760
|
+
}),
|
|
1761
|
+
).annotate({
|
|
1762
|
+
identifier: "DistributionStatisticsRecordRegions",
|
|
1763
|
+
}) as any as S.Schema<DistributionStatisticsRecordRegions>;
|
|
1764
|
+
|
|
1765
|
+
/** Aggregated statistics of a distribution during a time interval */
|
|
1766
|
+
export interface DistributionStatisticsRecord {
|
|
1767
|
+
/** Number of cached requests that were served */
|
|
1768
|
+
cachedRequests: number;
|
|
1769
|
+
/** Total number of requests that were served */
|
|
1770
|
+
totalRequests: number;
|
|
1771
|
+
/** Total traffic in bytes that occurred during the time interval */
|
|
1772
|
+
totalTrafficBytes: number;
|
|
1773
|
+
/** Exclusive end of the time interval the statistics refer to */
|
|
1774
|
+
end: string;
|
|
1775
|
+
regions: DistributionStatisticsRecordRegions;
|
|
1776
|
+
/** Start of the time interval the statistics refer to */
|
|
1777
|
+
start: string;
|
|
1778
|
+
}
|
|
1779
|
+
export const DistributionStatisticsRecord = /*@__PURE__*/ S.suspend(() =>
|
|
1780
|
+
S.Struct({
|
|
1781
|
+
cachedRequests: S.Number,
|
|
1782
|
+
totalRequests: S.Number,
|
|
1783
|
+
totalTrafficBytes: S.Number,
|
|
1784
|
+
end: S.String,
|
|
1785
|
+
regions: DistributionStatisticsRecordRegions,
|
|
1786
|
+
start: S.String,
|
|
1787
|
+
}),
|
|
1788
|
+
).annotate({
|
|
1789
|
+
identifier: "DistributionStatisticsRecord",
|
|
1790
|
+
}) as any as S.Schema<DistributionStatisticsRecord>;
|
|
1791
|
+
|
|
1792
|
+
export type GetStatisticsResponseRecordsList =
|
|
1793
|
+
Array<DistributionStatisticsRecord>;
|
|
1794
|
+
export const GetStatisticsResponseRecordsList = /*@__PURE__*/ S.Array(
|
|
1795
|
+
DistributionStatisticsRecord,
|
|
1796
|
+
) as any as S.Schema<GetStatisticsResponseRecordsList>;
|
|
1797
|
+
|
|
1798
|
+
export interface GetStatisticsResponse {
|
|
1799
|
+
records: GetStatisticsResponseRecordsList;
|
|
1800
|
+
}
|
|
1801
|
+
export const GetStatisticsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1802
|
+
S.Struct({
|
|
1803
|
+
records: GetStatisticsResponseRecordsList,
|
|
1804
|
+
}),
|
|
1805
|
+
).annotate({
|
|
1806
|
+
identifier: "GetStatisticsResponse",
|
|
1807
|
+
}) as any as S.Schema<GetStatisticsResponse>;
|
|
1808
|
+
|
|
1809
|
+
export type ListDistributionsRequestSortBy =
|
|
1810
|
+
| "id"
|
|
1811
|
+
| "updatedAt"
|
|
1812
|
+
| "createdAt"
|
|
1813
|
+
| "originUrl"
|
|
1814
|
+
| "status"
|
|
1815
|
+
| "originUrlRelated";
|
|
1816
|
+
export const ListDistributionsRequestSortBy = /*@__PURE__*/ S.String;
|
|
1817
|
+
|
|
1818
|
+
export type ListDistributionsRequestSortOrder = "ascending" | "descending";
|
|
1819
|
+
export const ListDistributionsRequestSortOrder = /*@__PURE__*/ S.String;
|
|
1820
|
+
|
|
1821
|
+
export interface ListDistributionsRequest {
|
|
1822
|
+
/** Your STACKIT Project Id */
|
|
1823
|
+
projectId: string;
|
|
1824
|
+
/** Quantifies how many distributions should be returned on this page. Must be a natural number between 1 and 100 (inclusive) */
|
|
1825
|
+
pageSize?: number;
|
|
1826
|
+
/** If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. */
|
|
1827
|
+
withWafStatus?: boolean;
|
|
1828
|
+
/** Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get "pushed" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. */
|
|
1829
|
+
pageIdentifier?: string;
|
|
1830
|
+
/** The following sort options exist. We default to `createdAt` - `id` - Sort by distribution Id using String comparison - `updatedAt` - Sort by when the distribution configuration was last modified, for example by changing the regions or response headers - `createdAt` - Sort by when the distribution was initially created. - `originUrl` - Sort by originUrl using String comparison - `status` - Sort by distribution status, using String comparison - `originUrlRelated` - The originUrl is segmented and reversed before sorting. E.g. `www.example.com` is converted to `com.example.www` for sorting. This way, distributions pointing to the same domain trees are grouped next to each other. */
|
|
1831
|
+
sortBy?: ListDistributionsRequestSortBy | (string & {});
|
|
1832
|
+
sortOrder?: ListDistributionsRequestSortOrder | (string & {});
|
|
1833
|
+
}
|
|
1834
|
+
export const ListDistributionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1835
|
+
S.Struct({
|
|
1836
|
+
projectId: S.String.pipe(T.Label()),
|
|
1837
|
+
pageSize: S.optional(S.Number.pipe(T.Query())),
|
|
1838
|
+
withWafStatus: S.optional(S.Boolean.pipe(T.Query())),
|
|
1839
|
+
pageIdentifier: S.optional(S.String.pipe(T.Query())),
|
|
1840
|
+
sortBy: S.optional(ListDistributionsRequestSortBy.pipe(T.Query())),
|
|
1841
|
+
sortOrder: S.optional(ListDistributionsRequestSortOrder.pipe(T.Query())),
|
|
1842
|
+
}).pipe(
|
|
1843
|
+
T.Http({
|
|
1844
|
+
method: "GET",
|
|
1845
|
+
uri: "/v1/projects/{projectId}/distributions",
|
|
1846
|
+
code: 200,
|
|
1847
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1848
|
+
}),
|
|
1849
|
+
),
|
|
1850
|
+
).annotate({
|
|
1851
|
+
identifier: "ListDistributionsRequest",
|
|
1852
|
+
}) as any as S.Schema<ListDistributionsRequest>;
|
|
1853
|
+
|
|
1854
|
+
export type ListDistributionsResponseDistributionsList = Array<Distribution>;
|
|
1855
|
+
export const ListDistributionsResponseDistributionsList = /*@__PURE__*/ S.Array(
|
|
1856
|
+
Distribution,
|
|
1857
|
+
) as any as S.Schema<ListDistributionsResponseDistributionsList>;
|
|
1858
|
+
|
|
1859
|
+
export interface ListDistributionsResponse {
|
|
1860
|
+
distributions: ListDistributionsResponseDistributionsList;
|
|
1861
|
+
nextPageIdentifier?: string;
|
|
1862
|
+
}
|
|
1863
|
+
export const ListDistributionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1864
|
+
S.Struct({
|
|
1865
|
+
distributions: ListDistributionsResponseDistributionsList,
|
|
1866
|
+
nextPageIdentifier: S.optional(S.String),
|
|
1867
|
+
}),
|
|
1868
|
+
).annotate({
|
|
1869
|
+
identifier: "ListDistributionsResponse",
|
|
1870
|
+
}) as any as S.Schema<ListDistributionsResponse>;
|
|
1871
|
+
|
|
1872
|
+
export interface ListWafCollectionsRequest {
|
|
1873
|
+
/** Your STACKIT Project Id */
|
|
1874
|
+
projectId: string;
|
|
1875
|
+
}
|
|
1876
|
+
export const ListWafCollectionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1877
|
+
S.Struct({
|
|
1878
|
+
projectId: S.String.pipe(T.Label()),
|
|
1879
|
+
}).pipe(
|
|
1880
|
+
T.Http({
|
|
1881
|
+
method: "GET",
|
|
1882
|
+
uri: "/v1/projects/{projectId}/waf/collections",
|
|
1883
|
+
code: 200,
|
|
1884
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
1885
|
+
}),
|
|
1886
|
+
),
|
|
1887
|
+
).annotate({
|
|
1888
|
+
identifier: "ListWafCollectionsRequest",
|
|
1889
|
+
}) as any as S.Schema<ListWafCollectionsRequest>;
|
|
1890
|
+
|
|
1891
|
+
/** LocalizedString is a map from language to string value */
|
|
1892
|
+
export type LocalizedString = { [key: string]: string | undefined };
|
|
1893
|
+
export const LocalizedString = /*@__PURE__*/ S.Record(
|
|
1894
|
+
S.String,
|
|
1895
|
+
S.String,
|
|
1896
|
+
) as any as S.Schema<LocalizedString>;
|
|
1897
|
+
|
|
1898
|
+
export interface WafRule {
|
|
1899
|
+
/** Optional CoreRuleSet rule Id in case this is a CRS rule */
|
|
1900
|
+
code?: string;
|
|
1901
|
+
description: LocalizedString;
|
|
1902
|
+
id: string;
|
|
1903
|
+
}
|
|
1904
|
+
export const WafRule = /*@__PURE__*/ S.suspend(() =>
|
|
1905
|
+
S.Struct({
|
|
1906
|
+
code: S.optional(S.String),
|
|
1907
|
+
description: LocalizedString,
|
|
1908
|
+
id: S.String,
|
|
1909
|
+
}),
|
|
1910
|
+
).annotate({ identifier: "WafRule" }) as any as S.Schema<WafRule>;
|
|
1911
|
+
|
|
1912
|
+
export type WafRuleGroupRulesList = Array<WafRule>;
|
|
1913
|
+
export const WafRuleGroupRulesList = /*@__PURE__*/ S.Array(
|
|
1914
|
+
WafRule,
|
|
1915
|
+
) as any as S.Schema<WafRuleGroupRulesList>;
|
|
1916
|
+
|
|
1917
|
+
export interface WafRuleGroup {
|
|
1918
|
+
description: LocalizedString;
|
|
1919
|
+
name: LocalizedString;
|
|
1920
|
+
rules: WafRuleGroupRulesList;
|
|
1921
|
+
}
|
|
1922
|
+
export const WafRuleGroup = /*@__PURE__*/ S.suspend(() =>
|
|
1923
|
+
S.Struct({
|
|
1924
|
+
description: LocalizedString,
|
|
1925
|
+
name: LocalizedString,
|
|
1926
|
+
rules: WafRuleGroupRulesList,
|
|
1927
|
+
}),
|
|
1928
|
+
).annotate({ identifier: "WafRuleGroup" }) as any as S.Schema<WafRuleGroup>;
|
|
1929
|
+
|
|
1930
|
+
export type WafRuleCollectionGroupsList = Array<WafRuleGroup>;
|
|
1931
|
+
export const WafRuleCollectionGroupsList = /*@__PURE__*/ S.Array(
|
|
1932
|
+
WafRuleGroup,
|
|
1933
|
+
) as any as S.Schema<WafRuleCollectionGroupsList>;
|
|
1934
|
+
|
|
1935
|
+
export interface WafRuleCollection {
|
|
1936
|
+
groups: WafRuleCollectionGroupsList;
|
|
1937
|
+
id: string;
|
|
1938
|
+
name: LocalizedString;
|
|
1939
|
+
}
|
|
1940
|
+
export const WafRuleCollection = /*@__PURE__*/ S.suspend(() =>
|
|
1941
|
+
S.Struct({
|
|
1942
|
+
groups: WafRuleCollectionGroupsList,
|
|
1943
|
+
id: S.String,
|
|
1944
|
+
name: LocalizedString,
|
|
1945
|
+
}),
|
|
1946
|
+
).annotate({
|
|
1947
|
+
identifier: "WafRuleCollection",
|
|
1948
|
+
}) as any as S.Schema<WafRuleCollection>;
|
|
1949
|
+
|
|
1950
|
+
export type ListWafCollectionsResponseCollectionsList =
|
|
1951
|
+
Array<WafRuleCollection>;
|
|
1952
|
+
export const ListWafCollectionsResponseCollectionsList = /*@__PURE__*/ S.Array(
|
|
1953
|
+
WafRuleCollection,
|
|
1954
|
+
) as any as S.Schema<ListWafCollectionsResponseCollectionsList>;
|
|
1955
|
+
|
|
1956
|
+
export interface ListWafCollectionsResponse {
|
|
1957
|
+
collections: ListWafCollectionsResponseCollectionsList;
|
|
1958
|
+
}
|
|
1959
|
+
export const ListWafCollectionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1960
|
+
S.Struct({
|
|
1961
|
+
collections: ListWafCollectionsResponseCollectionsList,
|
|
1962
|
+
}),
|
|
1963
|
+
).annotate({
|
|
1964
|
+
identifier: "ListWafCollectionsResponse",
|
|
1965
|
+
}) as any as S.Schema<ListWafCollectionsResponse>;
|
|
1966
|
+
|
|
1967
|
+
export type HttpBackendPatchGeofencingValueList = Array<string>;
|
|
1968
|
+
export const HttpBackendPatchGeofencingValueList = /*@__PURE__*/ S.Array(
|
|
1969
|
+
S.String,
|
|
1970
|
+
) as any as S.Schema<HttpBackendPatchGeofencingValueList>;
|
|
1971
|
+
|
|
1972
|
+
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
1973
|
+
export type HttpBackendPatchGeofencingMap = {
|
|
1974
|
+
[key: string]: HttpBackendPatchGeofencingValueList | undefined;
|
|
1975
|
+
};
|
|
1976
|
+
export const HttpBackendPatchGeofencingMap = /*@__PURE__*/ S.Record(
|
|
1977
|
+
S.String,
|
|
1978
|
+
HttpBackendPatchGeofencingValueList,
|
|
1979
|
+
) as any as S.Schema<HttpBackendPatchGeofencingMap>;
|
|
1980
|
+
|
|
1981
|
+
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
1982
|
+
export type HttpBackendPatchOriginRequestHeadersMap = {
|
|
1983
|
+
[key: string]: string | undefined;
|
|
1984
|
+
};
|
|
1985
|
+
export const HttpBackendPatchOriginRequestHeadersMap = /*@__PURE__*/ S.Record(
|
|
1986
|
+
S.String,
|
|
1987
|
+
S.String,
|
|
1988
|
+
) as any as S.Schema<HttpBackendPatchOriginRequestHeadersMap>;
|
|
1989
|
+
|
|
1990
|
+
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
1991
|
+
export type HttpBackendPatchType = "http";
|
|
1992
|
+
export const HttpBackendPatchType = /*@__PURE__*/ S.String;
|
|
1993
|
+
|
|
1994
|
+
/** A partial HTTP Backend */
|
|
1995
|
+
export interface HttpBackendPatch {
|
|
1996
|
+
/** An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. */
|
|
1997
|
+
geofencing?: HttpBackendPatchGeofencingMap;
|
|
1998
|
+
/** Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. */
|
|
1999
|
+
originRequestHeaders?: HttpBackendPatchOriginRequestHeadersMap;
|
|
2000
|
+
/** The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` */
|
|
2001
|
+
originUrl?: string;
|
|
2002
|
+
/** Defines the type of content origin. For this schema, it must be set to `http`. */
|
|
2003
|
+
type: HttpBackendPatchType;
|
|
2004
|
+
}
|
|
2005
|
+
export const HttpBackendPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2006
|
+
S.Struct({
|
|
2007
|
+
geofencing: S.optional(HttpBackendPatchGeofencingMap),
|
|
2008
|
+
originRequestHeaders: S.optional(HttpBackendPatchOriginRequestHeadersMap),
|
|
2009
|
+
originUrl: S.optional(S.String),
|
|
2010
|
+
type: HttpBackendPatchType,
|
|
2011
|
+
}),
|
|
2012
|
+
).annotate({
|
|
2013
|
+
identifier: "HttpBackendPatch",
|
|
2014
|
+
}) as any as S.Schema<HttpBackendPatch>;
|
|
2015
|
+
|
|
2016
|
+
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
2017
|
+
export type BucketBackendPatchType = "bucket";
|
|
2018
|
+
export const BucketBackendPatchType = /*@__PURE__*/ S.String;
|
|
2019
|
+
|
|
2020
|
+
export interface BucketBackendPatch {
|
|
2021
|
+
/** The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). */
|
|
2022
|
+
bucketUrl?: string;
|
|
2023
|
+
credentials?: BucketCredentials;
|
|
2024
|
+
/** The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT). */
|
|
2025
|
+
region?: string;
|
|
2026
|
+
/** Defines the type of content origin. For this schema, it must be set to `bucket`. */
|
|
2027
|
+
type: BucketBackendPatchType;
|
|
2028
|
+
}
|
|
2029
|
+
export const BucketBackendPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2030
|
+
S.Struct({
|
|
2031
|
+
bucketUrl: S.optional(S.String),
|
|
2032
|
+
credentials: S.optional(BucketCredentials),
|
|
2033
|
+
region: S.optional(S.String),
|
|
2034
|
+
type: BucketBackendPatchType,
|
|
2035
|
+
}),
|
|
2036
|
+
).annotate({
|
|
2037
|
+
identifier: "BucketBackendPatch",
|
|
2038
|
+
}) as any as S.Schema<BucketBackendPatch>;
|
|
2039
|
+
|
|
2040
|
+
export type ConfigPatchBackend = HttpBackendPatch | BucketBackendPatch;
|
|
2041
|
+
export const ConfigPatchBackend =
|
|
2042
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<ConfigPatchBackend>;
|
|
2043
|
+
|
|
2044
|
+
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
2045
|
+
export type ConfigPatchBlockedCountriesList = Array<string>;
|
|
2046
|
+
export const ConfigPatchBlockedCountriesList = /*@__PURE__*/ S.Array(
|
|
2047
|
+
S.String,
|
|
2048
|
+
) as any as S.Schema<ConfigPatchBlockedCountriesList>;
|
|
2049
|
+
|
|
2050
|
+
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
2051
|
+
export type ConfigPatchBlockedIpsList = Array<string>;
|
|
2052
|
+
export const ConfigPatchBlockedIpsList = /*@__PURE__*/ S.Array(
|
|
2053
|
+
S.String,
|
|
2054
|
+
) as any as S.Schema<ConfigPatchBlockedIpsList>;
|
|
2055
|
+
|
|
2056
|
+
/** HTTP request header names that participate in the cache key. Omit to leave unchanged; send `[]` to clear. */
|
|
2057
|
+
export type CacheConfigPatchCacheKeyHeadersList = Array<string>;
|
|
2058
|
+
export const CacheConfigPatchCacheKeyHeadersList = /*@__PURE__*/ S.Array(
|
|
2059
|
+
S.String,
|
|
2060
|
+
) as any as S.Schema<CacheConfigPatchCacheKeyHeadersList>;
|
|
2061
|
+
|
|
2062
|
+
/** Allowlist of query-string parameter names. Omit to leave unchanged; send `[]` to clear. */
|
|
2063
|
+
export type CacheConfigPatchQueryStringVaryParametersList = Array<string>;
|
|
2064
|
+
export const CacheConfigPatchQueryStringVaryParametersList =
|
|
2065
|
+
/*@__PURE__*/ S.Array(
|
|
2066
|
+
S.String,
|
|
2067
|
+
) as any as S.Schema<CacheConfigPatchQueryStringVaryParametersList>;
|
|
2068
|
+
|
|
2069
|
+
/** PATCH variant of `CacheConfig`. Follows the standard PATCH conventions for this API: - Field omitted from the request: current value is left unchanged. - Array field sent as `[]`: current list is cleared. - `queryStringVaryEnabled` is a plain boolean (non-nullable); omit it to leave unchanged. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled`. Sending a non-empty `queryStringVaryParameters` together with `queryStringVaryEnabled=false` is accepted: the list is persisted for later re-activation but does not affect the cache while the flag is false. */
|
|
2070
|
+
export interface CacheConfigPatch {
|
|
2071
|
+
/** HTTP request header names that participate in the cache key. Omit to leave unchanged; send `[]` to clear. */
|
|
2072
|
+
cacheKeyHeaders?: CacheConfigPatchCacheKeyHeadersList;
|
|
2073
|
+
/** When true, the CDN varies its cache by the request query string. Omit to leave unchanged. */
|
|
2074
|
+
queryStringVaryEnabled?: boolean;
|
|
2075
|
+
/** Allowlist of query-string parameter names. Omit to leave unchanged; send `[]` to clear. */
|
|
2076
|
+
queryStringVaryParameters?: CacheConfigPatchQueryStringVaryParametersList;
|
|
2077
|
+
}
|
|
2078
|
+
export const CacheConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2079
|
+
S.Struct({
|
|
2080
|
+
cacheKeyHeaders: S.optional(CacheConfigPatchCacheKeyHeadersList),
|
|
2081
|
+
queryStringVaryEnabled: S.optional(S.Boolean),
|
|
2082
|
+
queryStringVaryParameters: S.optional(
|
|
2083
|
+
CacheConfigPatchQueryStringVaryParametersList,
|
|
2084
|
+
),
|
|
2085
|
+
}),
|
|
2086
|
+
).annotate({
|
|
2087
|
+
identifier: "CacheConfigPatch",
|
|
2088
|
+
}) as any as S.Schema<CacheConfigPatch>;
|
|
2089
|
+
|
|
2090
|
+
/** Labels are key-value string pairs that can be attached to a distribution. JSON Merge Patch is supported, meaning setting a key to null will remove it. */
|
|
2091
|
+
export type ConfigPatchLabelsMap = { [key: string]: string | undefined };
|
|
2092
|
+
export const ConfigPatchLabelsMap = /*@__PURE__*/ S.Record(
|
|
2093
|
+
S.String,
|
|
2094
|
+
S.String,
|
|
2095
|
+
) as any as S.Schema<ConfigPatchLabelsMap>;
|
|
2096
|
+
|
|
2097
|
+
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
2098
|
+
export type LokiLogSinkPatchType = "loki";
|
|
2099
|
+
export const LokiLogSinkPatchType = /*@__PURE__*/ S.String;
|
|
2100
|
+
|
|
2101
|
+
export interface LokiLogSinkPatch {
|
|
2102
|
+
credentials?: LokiLogSinkCredentials;
|
|
2103
|
+
/** The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). */
|
|
2104
|
+
pushUrl?: string;
|
|
2105
|
+
/** Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. */
|
|
2106
|
+
type: LokiLogSinkPatchType;
|
|
2107
|
+
}
|
|
2108
|
+
export const LokiLogSinkPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2109
|
+
S.Struct({
|
|
2110
|
+
credentials: S.optional(LokiLogSinkCredentials),
|
|
2111
|
+
pushUrl: S.optional(S.String),
|
|
2112
|
+
type: LokiLogSinkPatchType,
|
|
2113
|
+
}),
|
|
2114
|
+
).annotate({
|
|
2115
|
+
identifier: "LokiLogSinkPatch",
|
|
2116
|
+
}) as any as S.Schema<LokiLogSinkPatch>;
|
|
2117
|
+
|
|
2118
|
+
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
2119
|
+
export type OtlpLogSinkPatchCredentials =
|
|
2120
|
+
| OtlpLogSinkBearerCredentials
|
|
2121
|
+
| OtlpLogSinkBasicCredentials;
|
|
2122
|
+
export const OtlpLogSinkPatchCredentials =
|
|
2123
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<OtlpLogSinkPatchCredentials>;
|
|
2124
|
+
|
|
2125
|
+
/** Defines the type of the log sink. */
|
|
2126
|
+
export type OtlpLogSinkPatchType = "otlp";
|
|
2127
|
+
export const OtlpLogSinkPatchType = /*@__PURE__*/ S.String;
|
|
2128
|
+
|
|
2129
|
+
export interface OtlpLogSinkPatch {
|
|
2130
|
+
/** The authentication credentials required for the CDN to push logs to your OTLP endpoint. */
|
|
2131
|
+
credentials?: OtlpLogSinkPatchCredentials;
|
|
2132
|
+
/** The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). */
|
|
2133
|
+
pushUrl?: string;
|
|
2134
|
+
/** Defines the type of the log sink. */
|
|
2135
|
+
type: OtlpLogSinkPatchType;
|
|
2136
|
+
}
|
|
2137
|
+
export const OtlpLogSinkPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2138
|
+
S.Struct({
|
|
2139
|
+
credentials: S.optional(OtlpLogSinkPatchCredentials),
|
|
2140
|
+
pushUrl: S.optional(S.String),
|
|
2141
|
+
type: OtlpLogSinkPatchType,
|
|
2142
|
+
}),
|
|
2143
|
+
).annotate({
|
|
2144
|
+
identifier: "OtlpLogSinkPatch",
|
|
2145
|
+
}) as any as S.Schema<OtlpLogSinkPatch>;
|
|
2146
|
+
|
|
2147
|
+
export type ConfigPatchLogSink = LokiLogSinkPatch | OtlpLogSinkPatch;
|
|
2148
|
+
export const ConfigPatchLogSink =
|
|
2149
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<ConfigPatchLogSink>;
|
|
2150
|
+
|
|
2151
|
+
export interface OptimizerPatch {
|
|
2152
|
+
enabled?: boolean;
|
|
2153
|
+
}
|
|
2154
|
+
export const OptimizerPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2155
|
+
S.Struct({
|
|
2156
|
+
enabled: S.optional(S.Boolean),
|
|
2157
|
+
}),
|
|
2158
|
+
).annotate({ identifier: "OptimizerPatch" }) as any as S.Schema<OptimizerPatch>;
|
|
2159
|
+
|
|
2160
|
+
export type ConfigPatchRegionsList = Array<Region | (string & {})>;
|
|
2161
|
+
export const ConfigPatchRegionsList = /*@__PURE__*/ S.Array(
|
|
2162
|
+
Region,
|
|
2163
|
+
) as any as S.Schema<ConfigPatchRegionsList>;
|
|
2164
|
+
|
|
2165
|
+
/** Configuration for TLS protocol versions. Note: Enabling older TLS versions (1.0, 1.1) is generally discouraged for security reasons. */
|
|
2166
|
+
export interface TlsConfigPatch {
|
|
2167
|
+
/** If set to true, the distribution will accept connections using TLS 1.0. */
|
|
2168
|
+
enableTls10?: boolean;
|
|
2169
|
+
/** If set to true, the distribution will accept connections using TLS 1.1. */
|
|
2170
|
+
enableTls11?: boolean;
|
|
2171
|
+
}
|
|
2172
|
+
export const TlsConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2173
|
+
S.Struct({
|
|
2174
|
+
enableTls10: S.optional(S.Boolean),
|
|
2175
|
+
enableTls11: S.optional(S.Boolean),
|
|
2176
|
+
}),
|
|
2177
|
+
).annotate({ identifier: "TlsConfigPatch" }) as any as S.Schema<TlsConfigPatch>;
|
|
2178
|
+
|
|
2179
|
+
export type WafConfigPatchAllowedHttpMethodsList = Array<string>;
|
|
2180
|
+
export const WafConfigPatchAllowedHttpMethodsList = /*@__PURE__*/ S.Array(
|
|
2181
|
+
S.String,
|
|
2182
|
+
) as any as S.Schema<WafConfigPatchAllowedHttpMethodsList>;
|
|
2183
|
+
|
|
2184
|
+
export type WafConfigPatchAllowedHttpVersionsList = Array<string>;
|
|
2185
|
+
export const WafConfigPatchAllowedHttpVersionsList = /*@__PURE__*/ S.Array(
|
|
2186
|
+
S.String,
|
|
2187
|
+
) as any as S.Schema<WafConfigPatchAllowedHttpVersionsList>;
|
|
2188
|
+
|
|
2189
|
+
export type WafConfigPatchAllowedRequestContentTypesList = Array<string>;
|
|
2190
|
+
export const WafConfigPatchAllowedRequestContentTypesList =
|
|
2191
|
+
/*@__PURE__*/ S.Array(
|
|
2192
|
+
S.String,
|
|
2193
|
+
) as any as S.Schema<WafConfigPatchAllowedRequestContentTypesList>;
|
|
2194
|
+
|
|
2195
|
+
/** Ids of WAF Collections to mark as disabled */
|
|
2196
|
+
export type WafConfigPatchDisabledRuleCollectionIdsList = Array<string>;
|
|
2197
|
+
export const WafConfigPatchDisabledRuleCollectionIdsList =
|
|
2198
|
+
/*@__PURE__*/ S.Array(
|
|
2199
|
+
S.String,
|
|
2200
|
+
) as any as S.Schema<WafConfigPatchDisabledRuleCollectionIdsList>;
|
|
2201
|
+
|
|
2202
|
+
/** Ids of WAF Rule Groups to mark as disabled */
|
|
2203
|
+
export type WafConfigPatchDisabledRuleGroupIdsList = Array<string>;
|
|
2204
|
+
export const WafConfigPatchDisabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
2205
|
+
S.String,
|
|
2206
|
+
) as any as S.Schema<WafConfigPatchDisabledRuleGroupIdsList>;
|
|
2207
|
+
|
|
2208
|
+
/** Ids of WAF Rules that are **explicitly** disabled for this distribution. */
|
|
2209
|
+
export type WafConfigPatchDisabledRuleIdsList = Array<string>;
|
|
2210
|
+
export const WafConfigPatchDisabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
2211
|
+
S.String,
|
|
2212
|
+
) as any as S.Schema<WafConfigPatchDisabledRuleIdsList>;
|
|
2213
|
+
|
|
2214
|
+
/** Ids of WAF Collections to mark as enabled */
|
|
2215
|
+
export type WafConfigPatchEnabledRuleCollectionIdsList = Array<string>;
|
|
2216
|
+
export const WafConfigPatchEnabledRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
2217
|
+
S.String,
|
|
2218
|
+
) as any as S.Schema<WafConfigPatchEnabledRuleCollectionIdsList>;
|
|
2219
|
+
|
|
2220
|
+
/** Ids of WAF Rule Groups to mark as enabled */
|
|
2221
|
+
export type WafConfigPatchEnabledRuleGroupIdsList = Array<string>;
|
|
2222
|
+
export const WafConfigPatchEnabledRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
2223
|
+
S.String,
|
|
2224
|
+
) as any as S.Schema<WafConfigPatchEnabledRuleGroupIdsList>;
|
|
2225
|
+
|
|
2226
|
+
/** Ids of WAF Rules that are **explicitly** enabled for this distribution. */
|
|
2227
|
+
export type WafConfigPatchEnabledRuleIdsList = Array<string>;
|
|
2228
|
+
export const WafConfigPatchEnabledRuleIdsList = /*@__PURE__*/ S.Array(
|
|
2229
|
+
S.String,
|
|
2230
|
+
) as any as S.Schema<WafConfigPatchEnabledRuleIdsList>;
|
|
2231
|
+
|
|
2232
|
+
/** Ids of WAF Collections to mark as log Only. */
|
|
2233
|
+
export type WafConfigPatchLogOnlyRuleCollectionIdsList = Array<string>;
|
|
2234
|
+
export const WafConfigPatchLogOnlyRuleCollectionIdsList = /*@__PURE__*/ S.Array(
|
|
2235
|
+
S.String,
|
|
2236
|
+
) as any as S.Schema<WafConfigPatchLogOnlyRuleCollectionIdsList>;
|
|
2237
|
+
|
|
2238
|
+
/** Ids of WAF Rule Groups to mark as log Only. */
|
|
2239
|
+
export type WafConfigPatchLogOnlyRuleGroupIdsList = Array<string>;
|
|
2240
|
+
export const WafConfigPatchLogOnlyRuleGroupIdsList = /*@__PURE__*/ S.Array(
|
|
2241
|
+
S.String,
|
|
2242
|
+
) as any as S.Schema<WafConfigPatchLogOnlyRuleGroupIdsList>;
|
|
2243
|
+
|
|
2244
|
+
/** Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. */
|
|
2245
|
+
export type WafConfigPatchLogOnlyRuleIdsList = Array<string>;
|
|
2246
|
+
export const WafConfigPatchLogOnlyRuleIdsList = /*@__PURE__*/ S.Array(
|
|
2247
|
+
S.String,
|
|
2248
|
+
) as any as S.Schema<WafConfigPatchLogOnlyRuleIdsList>;
|
|
2249
|
+
|
|
2250
|
+
/** Modify the WAF Configuration ## WAF Rules You can modify the set of enabled, disabled and log-only Rules by modifying these 9 properties: - enabledRuleIds - disabledRuleIds - logOnlyRuleIds - enabledRuleGroupIds - disabledRuleGroupIds - logOnlyRuleGroupIds - enabledRuleCollectionIds - disabledRuleCollectionIds - logOnlyRuleCollectionIds Please inquire the `WafConfig` Description on how the effective configuration is determined. For patching, if an ID is already used in one of the properties, it will be removed (and effectively moved) to the new property. If patching multiple properties with the same ID (e.g. writing `@builtin/crs/response` to `logOnlyRuleCollectionIds` and `enabledRuleCollectionIds`), the request will be rejected with a 400. */
|
|
2251
|
+
export interface WafConfigPatch {
|
|
2252
|
+
allowedHttpMethods?: WafConfigPatchAllowedHttpMethodsList;
|
|
2253
|
+
allowedHttpVersions?: WafConfigPatchAllowedHttpVersionsList;
|
|
2254
|
+
allowedRequestContentTypes?: WafConfigPatchAllowedRequestContentTypesList;
|
|
2255
|
+
/** Ids of WAF Collections to mark as disabled */
|
|
2256
|
+
disabledRuleCollectionIds?: WafConfigPatchDisabledRuleCollectionIdsList;
|
|
2257
|
+
/** Ids of WAF Rule Groups to mark as disabled */
|
|
2258
|
+
disabledRuleGroupIds?: WafConfigPatchDisabledRuleGroupIdsList;
|
|
2259
|
+
/** Ids of WAF Rules that are **explicitly** disabled for this distribution. */
|
|
2260
|
+
disabledRuleIds?: WafConfigPatchDisabledRuleIdsList;
|
|
2261
|
+
/** Ids of WAF Collections to mark as enabled */
|
|
2262
|
+
enabledRuleCollectionIds?: WafConfigPatchEnabledRuleCollectionIdsList;
|
|
2263
|
+
/** Ids of WAF Rule Groups to mark as enabled */
|
|
2264
|
+
enabledRuleGroupIds?: WafConfigPatchEnabledRuleGroupIdsList;
|
|
2265
|
+
/** Ids of WAF Rules that are **explicitly** enabled for this distribution. */
|
|
2266
|
+
enabledRuleIds?: WafConfigPatchEnabledRuleIdsList;
|
|
2267
|
+
/** Ids of WAF Collections to mark as log Only. */
|
|
2268
|
+
logOnlyRuleCollectionIds?: WafConfigPatchLogOnlyRuleCollectionIdsList;
|
|
2269
|
+
/** Ids of WAF Rule Groups to mark as log Only. */
|
|
2270
|
+
logOnlyRuleGroupIds?: WafConfigPatchLogOnlyRuleGroupIdsList;
|
|
2271
|
+
/** Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. */
|
|
2272
|
+
logOnlyRuleIds?: WafConfigPatchLogOnlyRuleIdsList;
|
|
2273
|
+
mode?: WafMode | (string & {});
|
|
2274
|
+
paranoiaLevel?: WafParanoiaLevel | (string & {});
|
|
2275
|
+
type?: WafType | (string & {});
|
|
2276
|
+
}
|
|
2277
|
+
export const WafConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2278
|
+
S.Struct({
|
|
2279
|
+
allowedHttpMethods: S.optional(WafConfigPatchAllowedHttpMethodsList),
|
|
2280
|
+
allowedHttpVersions: S.optional(WafConfigPatchAllowedHttpVersionsList),
|
|
2281
|
+
allowedRequestContentTypes: S.optional(
|
|
2282
|
+
WafConfigPatchAllowedRequestContentTypesList,
|
|
2283
|
+
),
|
|
2284
|
+
disabledRuleCollectionIds: S.optional(
|
|
2285
|
+
WafConfigPatchDisabledRuleCollectionIdsList,
|
|
2286
|
+
),
|
|
2287
|
+
disabledRuleGroupIds: S.optional(WafConfigPatchDisabledRuleGroupIdsList),
|
|
2288
|
+
disabledRuleIds: S.optional(WafConfigPatchDisabledRuleIdsList),
|
|
2289
|
+
enabledRuleCollectionIds: S.optional(
|
|
2290
|
+
WafConfigPatchEnabledRuleCollectionIdsList,
|
|
2291
|
+
),
|
|
2292
|
+
enabledRuleGroupIds: S.optional(WafConfigPatchEnabledRuleGroupIdsList),
|
|
2293
|
+
enabledRuleIds: S.optional(WafConfigPatchEnabledRuleIdsList),
|
|
2294
|
+
logOnlyRuleCollectionIds: S.optional(
|
|
2295
|
+
WafConfigPatchLogOnlyRuleCollectionIdsList,
|
|
2296
|
+
),
|
|
2297
|
+
logOnlyRuleGroupIds: S.optional(WafConfigPatchLogOnlyRuleGroupIdsList),
|
|
2298
|
+
logOnlyRuleIds: S.optional(WafConfigPatchLogOnlyRuleIdsList),
|
|
2299
|
+
mode: S.optional(WafMode),
|
|
2300
|
+
paranoiaLevel: S.optional(WafParanoiaLevel),
|
|
2301
|
+
type: S.optional(WafType),
|
|
2302
|
+
}),
|
|
2303
|
+
).annotate({ identifier: "WafConfigPatch" }) as any as S.Schema<WafConfigPatch>;
|
|
2304
|
+
|
|
2305
|
+
export interface ConfigPatch {
|
|
2306
|
+
backend?: ConfigPatchBackend;
|
|
2307
|
+
/** Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. */
|
|
2308
|
+
blockedCountries?: ConfigPatchBlockedCountriesList;
|
|
2309
|
+
/** Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. */
|
|
2310
|
+
blockedIps?: ConfigPatchBlockedIpsList;
|
|
2311
|
+
cacheConfig?: CacheConfigPatch;
|
|
2312
|
+
/** Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) */
|
|
2313
|
+
defaultCacheDuration?: string | null;
|
|
2314
|
+
/** Enabling this allows the 'Host' header to be passed through to the origin. */
|
|
2315
|
+
forwardHostHeader?: boolean;
|
|
2316
|
+
/** Labels are key-value string pairs that can be attached to a distribution. JSON Merge Patch is supported, meaning setting a key to null will remove it. */
|
|
2317
|
+
labels?: ConfigPatchLabelsMap;
|
|
2318
|
+
logSink?: ConfigPatchLogSink | null;
|
|
2319
|
+
/** Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. */
|
|
2320
|
+
monthlyLimitBytes?: number | null;
|
|
2321
|
+
optimizer?: OptimizerPatch;
|
|
2322
|
+
redirects?: RedirectConfig;
|
|
2323
|
+
regions?: ConfigPatchRegionsList;
|
|
2324
|
+
/** Enable this to prevent origin-level cookies from being forwarded to the end user. */
|
|
2325
|
+
stripResponseCookies?: boolean;
|
|
2326
|
+
tls?: TlsConfigPatch;
|
|
2327
|
+
waf?: WafConfigPatch;
|
|
2328
|
+
}
|
|
2329
|
+
export const ConfigPatch = /*@__PURE__*/ S.suspend(() =>
|
|
2330
|
+
S.Struct({
|
|
2331
|
+
backend: S.optional(ConfigPatchBackend),
|
|
2332
|
+
blockedCountries: S.optional(ConfigPatchBlockedCountriesList),
|
|
2333
|
+
blockedIps: S.optional(ConfigPatchBlockedIpsList),
|
|
2334
|
+
cacheConfig: S.optional(CacheConfigPatch),
|
|
2335
|
+
defaultCacheDuration: S.optional(S.NullOr(S.String)),
|
|
2336
|
+
forwardHostHeader: S.optional(S.Boolean),
|
|
2337
|
+
labels: S.optional(ConfigPatchLabelsMap),
|
|
2338
|
+
logSink: S.optional(S.NullOr(ConfigPatchLogSink)),
|
|
2339
|
+
monthlyLimitBytes: S.optional(S.NullOr(S.Number)),
|
|
2340
|
+
optimizer: S.optional(OptimizerPatch),
|
|
2341
|
+
redirects: S.optional(RedirectConfig),
|
|
2342
|
+
regions: S.optional(ConfigPatchRegionsList),
|
|
2343
|
+
stripResponseCookies: S.optional(S.Boolean),
|
|
2344
|
+
tls: S.optional(TlsConfigPatch),
|
|
2345
|
+
waf: S.optional(WafConfigPatch),
|
|
2346
|
+
}),
|
|
2347
|
+
).annotate({ identifier: "ConfigPatch" }) as any as S.Schema<ConfigPatch>;
|
|
2348
|
+
|
|
2349
|
+
export interface PatchDistributionRequest {
|
|
2350
|
+
/** Your STACKIT Project Id */
|
|
2351
|
+
projectId: string;
|
|
2352
|
+
distributionId: string;
|
|
2353
|
+
config?: ConfigPatch;
|
|
2354
|
+
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. */
|
|
2355
|
+
intentId?: string;
|
|
2356
|
+
}
|
|
2357
|
+
export const PatchDistributionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2358
|
+
S.Struct({
|
|
2359
|
+
projectId: S.String.pipe(T.Label()),
|
|
2360
|
+
distributionId: S.String.pipe(T.Label()),
|
|
2361
|
+
config: S.optional(ConfigPatch),
|
|
2362
|
+
intentId: S.optional(S.String),
|
|
2363
|
+
}).pipe(
|
|
2364
|
+
T.Http({
|
|
2365
|
+
method: "PATCH",
|
|
2366
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}",
|
|
2367
|
+
code: 200,
|
|
2368
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2369
|
+
}),
|
|
2370
|
+
),
|
|
2371
|
+
).annotate({
|
|
2372
|
+
identifier: "PatchDistributionRequest",
|
|
2373
|
+
}) as any as S.Schema<PatchDistributionRequest>;
|
|
2374
|
+
|
|
2375
|
+
export interface PatchDistributionResponse {
|
|
2376
|
+
distribution: Distribution;
|
|
2377
|
+
}
|
|
2378
|
+
export const PatchDistributionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2379
|
+
S.Struct({
|
|
2380
|
+
distribution: Distribution,
|
|
2381
|
+
}),
|
|
2382
|
+
).annotate({
|
|
2383
|
+
identifier: "PatchDistributionResponse",
|
|
2384
|
+
}) as any as S.Schema<PatchDistributionResponse>;
|
|
2385
|
+
|
|
2386
|
+
export interface PurgeCacheRequest {
|
|
2387
|
+
/** Your STACKIT Project Id */
|
|
2388
|
+
projectId: string;
|
|
2389
|
+
distributionId: string;
|
|
2390
|
+
/** Defines an optional path. If this is set, a granular purge is done. If missing, the entire cache is invalidated. During a granular cache purge, only the provided path is purged. Please do not that for example `/some/path` and `/some/path.txt` are considered different paths. */
|
|
2391
|
+
path?: string;
|
|
2392
|
+
}
|
|
2393
|
+
export const PurgeCacheRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2394
|
+
S.Struct({
|
|
2395
|
+
projectId: S.String.pipe(T.Label()),
|
|
2396
|
+
distributionId: S.String.pipe(T.Label()),
|
|
2397
|
+
path: S.optional(S.String),
|
|
2398
|
+
}).pipe(
|
|
2399
|
+
T.Http({
|
|
2400
|
+
method: "POST",
|
|
2401
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/cache/purge",
|
|
2402
|
+
code: 200,
|
|
2403
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2404
|
+
}),
|
|
2405
|
+
),
|
|
2406
|
+
).annotate({
|
|
2407
|
+
identifier: "PurgeCacheRequest",
|
|
2408
|
+
}) as any as S.Schema<PurgeCacheRequest>;
|
|
2409
|
+
|
|
2410
|
+
export type PurgeCacheResponse2 = unknown;
|
|
2411
|
+
export const PurgeCacheResponse2 = /*@__PURE__*/ S.suspend(() =>
|
|
2412
|
+
S.Unknown.pipe(T.RawResponseRoot()),
|
|
2413
|
+
).annotate({
|
|
2414
|
+
identifier: "PurgeCacheResponse2",
|
|
2415
|
+
}) as any as S.Schema<PurgeCacheResponse2>;
|
|
2416
|
+
|
|
2417
|
+
/** This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you */
|
|
2418
|
+
export type PutCustomDomainManagedCertificate =
|
|
2419
|
+
GetCustomDomainManagedCertificate;
|
|
2420
|
+
export const PutCustomDomainManagedCertificate =
|
|
2421
|
+
GetCustomDomainManagedCertificate;
|
|
2422
|
+
|
|
2423
|
+
/** Returned if a custom certificate is used. Response does not contain the certificate or key. */
|
|
2424
|
+
export interface PutCustomDomainCustomCertificate {
|
|
2425
|
+
/** base64-encoded PEM-encoded certificate */
|
|
2426
|
+
certificate: string;
|
|
2427
|
+
/** base64-encoded PEM encoded key */
|
|
2428
|
+
key: string;
|
|
2429
|
+
/** When adding a new custom domain, we do a check to verify that your Domain points to the managed domain via a CNAME or ALIAS. If this is not the case, the call would usually reject. This additional property is an escape hatch to this functionality. It's useful for when you are migrating onto STACKIT CDN. It allows you to migrate without downtime. By providing a custom certificate with `skipDnsCheck` set to `true`, we will not check the Record for correctness. Then, once the CDN is set up, you can change the CNAME Record on your DNS and update the Custom Domain entry to disable this check, or switch to a managed certificate. This field is optional. If not set, the check is **not** skipped. */
|
|
2430
|
+
skipDnsCheck?: boolean;
|
|
2431
|
+
type: string;
|
|
2432
|
+
}
|
|
2433
|
+
export const PutCustomDomainCustomCertificate = /*@__PURE__*/ S.suspend(() =>
|
|
2434
|
+
S.Struct({
|
|
2435
|
+
certificate: S.String,
|
|
2436
|
+
key: S.String,
|
|
2437
|
+
skipDnsCheck: S.optional(S.Boolean),
|
|
2438
|
+
type: S.String,
|
|
2439
|
+
}),
|
|
2440
|
+
).annotate({
|
|
2441
|
+
identifier: "PutCustomDomainCustomCertificate",
|
|
2442
|
+
}) as any as S.Schema<PutCustomDomainCustomCertificate>;
|
|
2443
|
+
|
|
2444
|
+
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2445
|
+
export type PutCustomDomainRequestCertificate =
|
|
2446
|
+
| GetCustomDomainManagedCertificate
|
|
2447
|
+
| PutCustomDomainCustomCertificate;
|
|
2448
|
+
export const PutCustomDomainRequestCertificate =
|
|
2449
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<PutCustomDomainRequestCertificate>;
|
|
2450
|
+
|
|
2451
|
+
export interface PutCustomDomainRequest {
|
|
2452
|
+
/** Your STACKIT Project Id */
|
|
2453
|
+
projectId: string;
|
|
2454
|
+
distributionId: string;
|
|
2455
|
+
domain: string;
|
|
2456
|
+
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2457
|
+
certificate?: PutCustomDomainRequestCertificate;
|
|
2458
|
+
/** While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. */
|
|
2459
|
+
intentId?: string;
|
|
2460
|
+
}
|
|
2461
|
+
export const PutCustomDomainRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2462
|
+
S.Struct({
|
|
2463
|
+
projectId: S.String.pipe(T.Label()),
|
|
2464
|
+
distributionId: S.String.pipe(T.Label()),
|
|
2465
|
+
domain: S.String.pipe(T.Label()),
|
|
2466
|
+
certificate: S.optional(PutCustomDomainRequestCertificate),
|
|
2467
|
+
intentId: S.optional(S.String),
|
|
2468
|
+
}).pipe(
|
|
2469
|
+
T.Http({
|
|
2470
|
+
method: "PUT",
|
|
2471
|
+
uri: "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}",
|
|
2472
|
+
code: 200,
|
|
2473
|
+
baseUrl: "https://cdn.api.stackit.cloud",
|
|
2474
|
+
}),
|
|
2475
|
+
),
|
|
2476
|
+
).annotate({
|
|
2477
|
+
identifier: "PutCustomDomainRequest",
|
|
2478
|
+
}) as any as S.Schema<PutCustomDomainRequest>;
|
|
2479
|
+
|
|
2480
|
+
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2481
|
+
export type PutCustomDomainResponseCertificate =
|
|
2482
|
+
| GetCustomDomainManagedCertificate
|
|
2483
|
+
| GetCustomDomainCustomCertificate;
|
|
2484
|
+
export const PutCustomDomainResponseCertificate =
|
|
2485
|
+
/*@__PURE__*/ S.Unknown as any as S.Schema<PutCustomDomainResponseCertificate>;
|
|
2486
|
+
|
|
2487
|
+
export interface PutCustomDomainResponse {
|
|
2488
|
+
/** Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted */
|
|
2489
|
+
certificate?: PutCustomDomainResponseCertificate;
|
|
2490
|
+
customDomain: CustomDomain;
|
|
2491
|
+
}
|
|
2492
|
+
export const PutCustomDomainResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2493
|
+
S.Struct({
|
|
2494
|
+
certificate: S.optional(PutCustomDomainResponseCertificate),
|
|
2495
|
+
customDomain: CustomDomain,
|
|
2496
|
+
}),
|
|
2497
|
+
).annotate({
|
|
2498
|
+
identifier: "PutCustomDomainResponse",
|
|
2499
|
+
}) as any as S.Schema<PutCustomDomainResponse>;
|
|
2500
|
+
|
|
2501
|
+
export type CreateDistributionError =
|
|
2502
|
+
| BadRequest
|
|
2503
|
+
| UnprocessableEntity
|
|
2504
|
+
| StackitOpError;
|
|
2505
|
+
/** Create new distribution CreateDistribution will create a new CDN distribution */
|
|
2506
|
+
export const createDistribution: API.OperationMethod<
|
|
2507
|
+
CreateDistributionRequest,
|
|
2508
|
+
CreateDistributionResponse,
|
|
2509
|
+
CreateDistributionError,
|
|
2510
|
+
StackitOpContext
|
|
2511
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2512
|
+
input: CreateDistributionRequest,
|
|
2513
|
+
output: CreateDistributionResponse,
|
|
2514
|
+
errors: [BadRequest, UnprocessableEntity, UnknownStackitError],
|
|
2515
|
+
protocol: StackitProtocol,
|
|
2516
|
+
retry: Retry.Retry,
|
|
2517
|
+
}));
|
|
2518
|
+
|
|
2519
|
+
export type DeleteCustomDomainError = UnprocessableEntity | StackitOpError;
|
|
2520
|
+
/** Delete a custom domain Removes a custom domain */
|
|
2521
|
+
export const deleteCustomDomain: API.OperationMethod<
|
|
2522
|
+
DeleteCustomDomainRequest,
|
|
2523
|
+
DeleteCustomDomainResponse,
|
|
2524
|
+
DeleteCustomDomainError,
|
|
2525
|
+
StackitOpContext
|
|
2526
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2527
|
+
input: DeleteCustomDomainRequest,
|
|
2528
|
+
output: DeleteCustomDomainResponse,
|
|
2529
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2530
|
+
protocol: StackitProtocol,
|
|
2531
|
+
retry: Retry.Retry,
|
|
2532
|
+
}));
|
|
2533
|
+
|
|
2534
|
+
export type DeleteDistributionError = UnprocessableEntity | StackitOpError;
|
|
2535
|
+
/** Delete distribution DeleteDistribution accepts a project- and distribution-Id and will delete a distribution. */
|
|
2536
|
+
export const deleteDistribution: API.OperationMethod<
|
|
2537
|
+
DeleteDistributionRequest,
|
|
2538
|
+
DeleteDistributionResponse,
|
|
2539
|
+
DeleteDistributionError,
|
|
2540
|
+
StackitOpContext
|
|
2541
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2542
|
+
input: DeleteDistributionRequest,
|
|
2543
|
+
output: DeleteDistributionResponse,
|
|
2544
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2545
|
+
protocol: StackitProtocol,
|
|
2546
|
+
retry: Retry.Retry,
|
|
2547
|
+
}));
|
|
2548
|
+
|
|
2549
|
+
export type FindCachePathsError = UnprocessableEntity | StackitOpError;
|
|
2550
|
+
/** Return Paths that were purged This returns paths that are present in the cache purging history. Only substrings of the provided input are returned. The response is sorted in descending order by the most recent purge. So, assuming you have have the following purged for a distribution - `/test/1` at `2025-01-01` - `/test/2` at `2025-01-02` - `/someOtherPath/1` at `2025-01-03` - `/test/1` at `2025-01-04` - `/test/3` at `2025-01-05`, this would return the following paths, in the following order, assuming `/te` was the search parameter: - `/test/3` - `/test/1` - `/test/2` */
|
|
2551
|
+
export const findCachePaths: API.OperationMethod<
|
|
2552
|
+
FindCachePathsRequest,
|
|
2553
|
+
FindCachePathsResponse,
|
|
2554
|
+
FindCachePathsError,
|
|
2555
|
+
StackitOpContext
|
|
2556
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2557
|
+
input: FindCachePathsRequest,
|
|
2558
|
+
output: FindCachePathsResponse,
|
|
2559
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2560
|
+
protocol: StackitProtocol,
|
|
2561
|
+
retry: Retry.Retry,
|
|
2562
|
+
}));
|
|
2563
|
+
|
|
2564
|
+
export type GetCacheInfoError = UnprocessableEntity | StackitOpError;
|
|
2565
|
+
/** Get Infos about the Caching State Return caching info metadata, which contains the last cache purging time and a history of the most recent *full* purges. If (and only if) you provide the path query parameter, the history will also contain granular cache purges. The request will not fail if no data about a path is found. */
|
|
2566
|
+
export const getCacheInfo: API.OperationMethod<
|
|
2567
|
+
GetCacheInfoRequest,
|
|
2568
|
+
GetCacheInfoResponse,
|
|
2569
|
+
GetCacheInfoError,
|
|
2570
|
+
StackitOpContext
|
|
2571
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2572
|
+
input: GetCacheInfoRequest,
|
|
2573
|
+
output: GetCacheInfoResponse,
|
|
2574
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2575
|
+
protocol: StackitProtocol,
|
|
2576
|
+
retry: Retry.Retry,
|
|
2577
|
+
}));
|
|
2578
|
+
|
|
2579
|
+
export type GetCustomDomainError =
|
|
2580
|
+
| NotFound
|
|
2581
|
+
| UnprocessableEntity
|
|
2582
|
+
| StackitOpError;
|
|
2583
|
+
/** Retrieve a specific custom domain Returns a 200 and the custom domain if this custom domain was associated to this distribution, else 404 */
|
|
2584
|
+
export const getCustomDomain: API.OperationMethod<
|
|
2585
|
+
GetCustomDomainRequest,
|
|
2586
|
+
GetCustomDomainResponse,
|
|
2587
|
+
GetCustomDomainError,
|
|
2588
|
+
StackitOpContext
|
|
2589
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2590
|
+
input: GetCustomDomainRequest,
|
|
2591
|
+
output: GetCustomDomainResponse,
|
|
2592
|
+
errors: [NotFound, UnprocessableEntity, UnknownStackitError],
|
|
2593
|
+
protocol: StackitProtocol,
|
|
2594
|
+
retry: Retry.Retry,
|
|
2595
|
+
}));
|
|
2596
|
+
|
|
2597
|
+
export type GetDistributionError =
|
|
2598
|
+
| NotFound
|
|
2599
|
+
| UnprocessableEntity
|
|
2600
|
+
| StackitOpError;
|
|
2601
|
+
/** Get distribution by Id This returns a specific distribution by its Id. If no distribution with the given Id exists the endpoint returns 404. Trying to get a deleted distributions also return 404. */
|
|
2602
|
+
export const getDistribution: API.OperationMethod<
|
|
2603
|
+
GetDistributionRequest,
|
|
2604
|
+
GetDistributionResponse,
|
|
2605
|
+
GetDistributionError,
|
|
2606
|
+
StackitOpContext
|
|
2607
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2608
|
+
input: GetDistributionRequest,
|
|
2609
|
+
output: GetDistributionResponse,
|
|
2610
|
+
errors: [NotFound, UnprocessableEntity, UnknownStackitError],
|
|
2611
|
+
protocol: StackitProtocol,
|
|
2612
|
+
retry: Retry.Retry,
|
|
2613
|
+
}));
|
|
2614
|
+
|
|
2615
|
+
export type GetLogsError = UnprocessableEntity | StackitOpError;
|
|
2616
|
+
/** Retrieve distribution logs */
|
|
2617
|
+
export const getLogs: API.OperationMethod<
|
|
2618
|
+
GetLogsRequest,
|
|
2619
|
+
GetLogsResponse,
|
|
2620
|
+
GetLogsError,
|
|
2621
|
+
StackitOpContext
|
|
2622
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2623
|
+
input: GetLogsRequest,
|
|
2624
|
+
output: GetLogsResponse,
|
|
2625
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2626
|
+
protocol: StackitProtocol,
|
|
2627
|
+
retry: Retry.Retry,
|
|
2628
|
+
}));
|
|
2629
|
+
|
|
2630
|
+
export type GetLogsSearchFiltersError =
|
|
2631
|
+
| BadRequest
|
|
2632
|
+
| UnprocessableEntity
|
|
2633
|
+
| StackitOpError;
|
|
2634
|
+
/** Get relevant search filters for this distribution based on user input. */
|
|
2635
|
+
export const getLogsSearchFilters: API.OperationMethod<
|
|
2636
|
+
GetLogsSearchFiltersRequest,
|
|
2637
|
+
GetLogsSearchFiltersResponse,
|
|
2638
|
+
GetLogsSearchFiltersError,
|
|
2639
|
+
StackitOpContext
|
|
2640
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2641
|
+
input: GetLogsSearchFiltersRequest,
|
|
2642
|
+
output: GetLogsSearchFiltersResponse,
|
|
2643
|
+
errors: [BadRequest, UnprocessableEntity, UnknownStackitError],
|
|
2644
|
+
protocol: StackitProtocol,
|
|
2645
|
+
retry: Retry.Retry,
|
|
2646
|
+
}));
|
|
2647
|
+
|
|
2648
|
+
export type GetStatisticsError = UnprocessableEntity | StackitOpError;
|
|
2649
|
+
/** Retrieve the statistics of a distribution Returns the statistics of the distribution in the given time range. The response is a list of statistics records. Each record aggregates the statistics for its time interval. In case no statistics for a time interval exist, no record is returned. The time range for which statistics should be returned can be configured using query parameters. Timestamps are assumed to be UTC. This is especially important for the "buckets" when you, for example, return daily information. A day always starts and ends at 00:00Z. **Important Note:** Lower bounds are inclusive, upper bounds are exclusive. If you, for example, want a daily grouped which starts on the 1st Jan and also contains the full 10th Jan day, you would define `2025-01-01T00:00:00Z` as the lower and `2025-01-11T00:00:00Z` as the upper bound. The upper bound is optional. If you omit it, the API will use the start of the next interval as the upper bound. Example: if `interval` is `hourly`, `from` would default to the start of the next hour, if it's `daily`, `from` would default to the start of the next day, etc. */
|
|
2650
|
+
export const getStatistics: API.OperationMethod<
|
|
2651
|
+
GetStatisticsRequest,
|
|
2652
|
+
GetStatisticsResponse,
|
|
2653
|
+
GetStatisticsError,
|
|
2654
|
+
StackitOpContext
|
|
2655
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2656
|
+
input: GetStatisticsRequest,
|
|
2657
|
+
output: GetStatisticsResponse,
|
|
2658
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2659
|
+
protocol: StackitProtocol,
|
|
2660
|
+
retry: Retry.Retry,
|
|
2661
|
+
}));
|
|
2662
|
+
|
|
2663
|
+
export type ListDistributionsError = UnprocessableEntity | StackitOpError;
|
|
2664
|
+
/** List all distributions belonging to a specific project ListDistributions returns a list of all CDN distributions associated with a given project, ordered by their distribution Id. */
|
|
2665
|
+
export const listDistributions: API.OperationMethod<
|
|
2666
|
+
ListDistributionsRequest,
|
|
2667
|
+
ListDistributionsResponse,
|
|
2668
|
+
ListDistributionsError,
|
|
2669
|
+
StackitOpContext
|
|
2670
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2671
|
+
input: ListDistributionsRequest,
|
|
2672
|
+
output: ListDistributionsResponse,
|
|
2673
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2674
|
+
protocol: StackitProtocol,
|
|
2675
|
+
retry: Retry.Retry,
|
|
2676
|
+
}));
|
|
2677
|
+
|
|
2678
|
+
export type ListWafCollectionsError = UnprocessableEntity | StackitOpError;
|
|
2679
|
+
/** List all WAF rule collections of the project Returns all WAF rule collections available to the project */
|
|
2680
|
+
export const listWafCollections: API.OperationMethod<
|
|
2681
|
+
ListWafCollectionsRequest,
|
|
2682
|
+
ListWafCollectionsResponse,
|
|
2683
|
+
ListWafCollectionsError,
|
|
2684
|
+
StackitOpContext
|
|
2685
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2686
|
+
input: ListWafCollectionsRequest,
|
|
2687
|
+
output: ListWafCollectionsResponse,
|
|
2688
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2689
|
+
protocol: StackitProtocol,
|
|
2690
|
+
retry: Retry.Retry,
|
|
2691
|
+
}));
|
|
2692
|
+
|
|
2693
|
+
export type PatchDistributionError = UnprocessableEntity | StackitOpError;
|
|
2694
|
+
/** Update existing distribution Modify a CDN distribution with a partial update. Only the fields specified in the request will be modified. */
|
|
2695
|
+
export const patchDistribution: API.OperationMethod<
|
|
2696
|
+
PatchDistributionRequest,
|
|
2697
|
+
PatchDistributionResponse,
|
|
2698
|
+
PatchDistributionError,
|
|
2699
|
+
StackitOpContext
|
|
2700
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2701
|
+
input: PatchDistributionRequest,
|
|
2702
|
+
output: PatchDistributionResponse,
|
|
2703
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2704
|
+
protocol: StackitProtocol,
|
|
2705
|
+
retry: Retry.Retry,
|
|
2706
|
+
}));
|
|
2707
|
+
|
|
2708
|
+
export type PurgeCacheError = UnprocessableEntity | StackitOpError;
|
|
2709
|
+
/** Clear distribution cache Clear the cache for this distribution. All content, regardless of its staleness, will get refetched from the host. */
|
|
2710
|
+
export const purgeCache: API.OperationMethod<
|
|
2711
|
+
PurgeCacheRequest,
|
|
2712
|
+
PurgeCacheResponse2,
|
|
2713
|
+
PurgeCacheError,
|
|
2714
|
+
StackitOpContext
|
|
2715
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2716
|
+
input: PurgeCacheRequest,
|
|
2717
|
+
output: PurgeCacheResponse2,
|
|
2718
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2719
|
+
protocol: StackitProtocol,
|
|
2720
|
+
retry: Retry.Retry,
|
|
2721
|
+
}));
|
|
2722
|
+
|
|
2723
|
+
export type PutCustomDomainError = UnprocessableEntity | StackitOpError;
|
|
2724
|
+
/** Create or update a custom domain Creates a new custom domain. If it already exists, this will overwrite the previous custom domain's properties. */
|
|
2725
|
+
export const putCustomDomain: API.OperationMethod<
|
|
2726
|
+
PutCustomDomainRequest,
|
|
2727
|
+
PutCustomDomainResponse,
|
|
2728
|
+
PutCustomDomainError,
|
|
2729
|
+
StackitOpContext
|
|
2730
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
2731
|
+
input: PutCustomDomainRequest,
|
|
2732
|
+
output: PutCustomDomainResponse,
|
|
2733
|
+
errors: [UnprocessableEntity, UnknownStackitError],
|
|
2734
|
+
protocol: StackitProtocol,
|
|
2735
|
+
retry: Retry.Retry,
|
|
2736
|
+
}));
|