stackit-cdn 2.7.0__tar.gz → 2.9.0__tar.gz
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.
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/PKG-INFO +4 -4
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/pyproject.toml +3 -3
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/__init__.py +10 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/__init__.py +5 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/bucket_backend.py +18 -4
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/bucket_backend_create.py +18 -4
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/bucket_backend_patch.py +20 -4
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/config.py +8 -3
- stackit_cdn-2.9.0/src/stackit/cdn/models/config_log_sink.py +135 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/config_patch.py +9 -3
- stackit_cdn-2.9.0/src/stackit/cdn/models/config_patch_log_sink.py +141 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/create_distribution_payload.py +14 -3
- stackit_cdn-2.9.0/src/stackit/cdn/models/create_distribution_payload_log_sink.py +135 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/http_backend.py +11 -2
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/http_backend_create.py +11 -2
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/http_backend_patch.py +16 -3
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/loki_log_sink.py +13 -3
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/loki_log_sink_create.py +15 -3
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/loki_log_sink_credentials.py +4 -4
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/loki_log_sink_patch.py +16 -3
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/.gitignore +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/LICENSE.md +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/NOTICE.txt +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/README.md +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/api/__init__.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/api/default_api.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/api_client.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/api_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/configuration.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/exceptions.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/bucket_credentials.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/config_backend.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/config_patch_backend.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/create_distribution_payload_backend.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/create_distribution_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/custom_domain.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/delete_custom_domain_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/delete_distribution_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/distribution.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/distribution_logs_record.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/distribution_statistics_record.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/distribution_statistics_record_entry.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/distribution_statistics_record_regions.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/distribution_waf.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/domain.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/domain_status.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/error_details.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/find_cache_paths_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/find_cache_paths_response_entry.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/generic_json_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_cache_info_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_cache_info_response_history_entry.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_custom_domain_custom_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_custom_domain_managed_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_custom_domain_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_custom_domain_response_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_distribution_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_logs_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_logs_search_filters_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_logs_search_filters_response_datacenter_block.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_logs_search_filters_response_datacenter_block_item.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/get_statistics_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/list_distributions_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/list_waf_collections_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/match_condition.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/matcher.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/optimizer.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/optimizer_patch.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/patch_distribution_payload.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/patch_distribution_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/purge_cache_payload.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/put_custom_domain_custom_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/put_custom_domain_managed_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/put_custom_domain_payload.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/put_custom_domain_payload_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/put_custom_domain_response.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/put_custom_domain_response_certificate.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/redirect_config.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/redirect_rule.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/region.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/status_error.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/tls_config.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/tls_config_patch.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_config.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_config_patch.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_mode.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_paranoia_level.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_rule.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_rule_action.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_rule_collection.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_rule_group.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block_reason.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block_reason_directly_defined.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block_reason_inherited_from_collection.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block_reason_inherited_from_group.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block_reason_invalid_waf_type.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_status_rule_block_reason_never_defined.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_type.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/waf_violation.py +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/py.typed +0 -0
- {stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/rest.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: stackit-cdn
|
|
3
|
-
Version:
|
|
3
|
+
Version: v2.9.0
|
|
4
4
|
Summary: CDN API
|
|
5
5
|
Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
|
|
6
6
|
Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
|
|
@@ -10,12 +10,12 @@ License-File: NOTICE.txt
|
|
|
10
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
-
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
|
+
Requires-Python: <4.0,>=3.11
|
|
19
19
|
Requires-Dist: pydantic>=2.9.2
|
|
20
20
|
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
21
21
|
Requires-Dist: requests>=2.33.0
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "stackit-cdn"
|
|
3
|
-
version = "v2.
|
|
3
|
+
version = "v2.9.0"
|
|
4
4
|
description = "CDN API"
|
|
5
5
|
authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.11,<4.0"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
classifiers = [
|
|
9
9
|
"Programming Language :: Python :: 3",
|
|
10
10
|
"License :: OSI Approved :: Apache Software License",
|
|
11
11
|
"Operating System :: OS Independent",
|
|
12
|
-
"Programming Language :: Python :: 3.10",
|
|
13
12
|
"Programming Language :: Python :: 3.11",
|
|
14
13
|
"Programming Language :: Python :: 3.12",
|
|
15
14
|
"Programming Language :: Python :: 3.13",
|
|
16
15
|
"Programming Language :: Python :: 3.14",
|
|
16
|
+
"Programming Language :: Python :: 3.15"
|
|
17
17
|
]
|
|
18
18
|
dependencies = [
|
|
19
19
|
"stackit-core>=0.0.1a",
|
|
@@ -33,10 +33,13 @@ __all__ = [
|
|
|
33
33
|
"BucketCredentials",
|
|
34
34
|
"Config",
|
|
35
35
|
"ConfigBackend",
|
|
36
|
+
"ConfigLogSink",
|
|
36
37
|
"ConfigPatch",
|
|
37
38
|
"ConfigPatchBackend",
|
|
39
|
+
"ConfigPatchLogSink",
|
|
38
40
|
"CreateDistributionPayload",
|
|
39
41
|
"CreateDistributionPayloadBackend",
|
|
42
|
+
"CreateDistributionPayloadLogSink",
|
|
40
43
|
"CreateDistributionResponse",
|
|
41
44
|
"CustomDomain",
|
|
42
45
|
"DeleteCustomDomainResponse",
|
|
@@ -137,16 +140,23 @@ from stackit.cdn.models.bucket_backend_patch import (
|
|
|
137
140
|
from stackit.cdn.models.bucket_credentials import BucketCredentials as BucketCredentials
|
|
138
141
|
from stackit.cdn.models.config import Config as Config
|
|
139
142
|
from stackit.cdn.models.config_backend import ConfigBackend as ConfigBackend
|
|
143
|
+
from stackit.cdn.models.config_log_sink import ConfigLogSink as ConfigLogSink
|
|
140
144
|
from stackit.cdn.models.config_patch import ConfigPatch as ConfigPatch
|
|
141
145
|
from stackit.cdn.models.config_patch_backend import (
|
|
142
146
|
ConfigPatchBackend as ConfigPatchBackend,
|
|
143
147
|
)
|
|
148
|
+
from stackit.cdn.models.config_patch_log_sink import (
|
|
149
|
+
ConfigPatchLogSink as ConfigPatchLogSink,
|
|
150
|
+
)
|
|
144
151
|
from stackit.cdn.models.create_distribution_payload import (
|
|
145
152
|
CreateDistributionPayload as CreateDistributionPayload,
|
|
146
153
|
)
|
|
147
154
|
from stackit.cdn.models.create_distribution_payload_backend import (
|
|
148
155
|
CreateDistributionPayloadBackend as CreateDistributionPayloadBackend,
|
|
149
156
|
)
|
|
157
|
+
from stackit.cdn.models.create_distribution_payload_log_sink import (
|
|
158
|
+
CreateDistributionPayloadLogSink as CreateDistributionPayloadLogSink,
|
|
159
|
+
)
|
|
150
160
|
from stackit.cdn.models.create_distribution_response import (
|
|
151
161
|
CreateDistributionResponse as CreateDistributionResponse,
|
|
152
162
|
)
|
|
@@ -19,12 +19,17 @@ from stackit.cdn.models.bucket_backend_patch import BucketBackendPatch
|
|
|
19
19
|
from stackit.cdn.models.bucket_credentials import BucketCredentials
|
|
20
20
|
from stackit.cdn.models.config import Config
|
|
21
21
|
from stackit.cdn.models.config_backend import ConfigBackend
|
|
22
|
+
from stackit.cdn.models.config_log_sink import ConfigLogSink
|
|
22
23
|
from stackit.cdn.models.config_patch import ConfigPatch
|
|
23
24
|
from stackit.cdn.models.config_patch_backend import ConfigPatchBackend
|
|
25
|
+
from stackit.cdn.models.config_patch_log_sink import ConfigPatchLogSink
|
|
24
26
|
from stackit.cdn.models.create_distribution_payload import CreateDistributionPayload
|
|
25
27
|
from stackit.cdn.models.create_distribution_payload_backend import (
|
|
26
28
|
CreateDistributionPayloadBackend,
|
|
27
29
|
)
|
|
30
|
+
from stackit.cdn.models.create_distribution_payload_log_sink import (
|
|
31
|
+
CreateDistributionPayloadLogSink,
|
|
32
|
+
)
|
|
28
33
|
from stackit.cdn.models.create_distribution_response import CreateDistributionResponse
|
|
29
34
|
from stackit.cdn.models.custom_domain import CustomDomain
|
|
30
35
|
from stackit.cdn.models.delete_custom_domain_response import DeleteCustomDomainResponse
|
|
@@ -17,7 +17,7 @@ import json
|
|
|
17
17
|
import pprint
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from pydantic_core import to_jsonable_python
|
|
22
22
|
from typing_extensions import Self
|
|
23
23
|
|
|
@@ -27,11 +27,25 @@ class BucketBackend(BaseModel):
|
|
|
27
27
|
BucketBackend
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
|
|
30
|
-
bucket_url: StrictStr = Field(
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
bucket_url: StrictStr = Field(
|
|
31
|
+
description="The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`).",
|
|
32
|
+
alias="bucketUrl",
|
|
33
|
+
)
|
|
34
|
+
region: StrictStr = Field(
|
|
35
|
+
description="The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT)."
|
|
36
|
+
)
|
|
37
|
+
type: StrictStr = Field(
|
|
38
|
+
description="Defines the type of content origin. For this schema, it must be set to `bucket`."
|
|
39
|
+
)
|
|
33
40
|
__properties: ClassVar[List[str]] = ["bucketUrl", "region", "type"]
|
|
34
41
|
|
|
42
|
+
@field_validator("type")
|
|
43
|
+
def type_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value not in set(["bucket"]):
|
|
46
|
+
raise ValueError("must be one of enum values ('bucket')")
|
|
47
|
+
return value
|
|
48
|
+
|
|
35
49
|
model_config = ConfigDict(
|
|
36
50
|
validate_by_name=True,
|
|
37
51
|
validate_by_alias=True,
|
|
@@ -17,7 +17,7 @@ import json
|
|
|
17
17
|
import pprint
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from pydantic_core import to_jsonable_python
|
|
22
22
|
from typing_extensions import Self
|
|
23
23
|
|
|
@@ -29,12 +29,26 @@ class BucketBackendCreate(BaseModel):
|
|
|
29
29
|
BucketBackendCreate
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
|
|
32
|
-
bucket_url: StrictStr = Field(
|
|
32
|
+
bucket_url: StrictStr = Field(
|
|
33
|
+
description="The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`).",
|
|
34
|
+
alias="bucketUrl",
|
|
35
|
+
)
|
|
33
36
|
credentials: BucketCredentials
|
|
34
|
-
region: StrictStr
|
|
35
|
-
|
|
37
|
+
region: StrictStr = Field(
|
|
38
|
+
description="The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT)."
|
|
39
|
+
)
|
|
40
|
+
type: StrictStr = Field(
|
|
41
|
+
description="Defines the type of content origin. For this schema, it must be set to `bucket`."
|
|
42
|
+
)
|
|
36
43
|
__properties: ClassVar[List[str]] = ["bucketUrl", "credentials", "region", "type"]
|
|
37
44
|
|
|
45
|
+
@field_validator("type")
|
|
46
|
+
def type_validate_enum(cls, value):
|
|
47
|
+
"""Validates the enum"""
|
|
48
|
+
if value not in set(["bucket"]):
|
|
49
|
+
raise ValueError("must be one of enum values ('bucket')")
|
|
50
|
+
return value
|
|
51
|
+
|
|
38
52
|
model_config = ConfigDict(
|
|
39
53
|
validate_by_name=True,
|
|
40
54
|
validate_by_alias=True,
|
|
@@ -17,7 +17,7 @@ import json
|
|
|
17
17
|
import pprint
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from pydantic_core import to_jsonable_python
|
|
22
22
|
from typing_extensions import Self
|
|
23
23
|
|
|
@@ -29,12 +29,28 @@ class BucketBackendPatch(BaseModel):
|
|
|
29
29
|
BucketBackendPatch
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
|
|
32
|
-
bucket_url: Optional[StrictStr] = Field(
|
|
32
|
+
bucket_url: Optional[StrictStr] = Field(
|
|
33
|
+
default=None,
|
|
34
|
+
description="The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`).",
|
|
35
|
+
alias="bucketUrl",
|
|
36
|
+
)
|
|
33
37
|
credentials: Optional[BucketCredentials] = None
|
|
34
|
-
region: Optional[StrictStr] =
|
|
35
|
-
|
|
38
|
+
region: Optional[StrictStr] = Field(
|
|
39
|
+
default=None,
|
|
40
|
+
description="The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT).",
|
|
41
|
+
)
|
|
42
|
+
type: StrictStr = Field(
|
|
43
|
+
description="Defines the type of content origin. For this schema, it must be set to `bucket`."
|
|
44
|
+
)
|
|
36
45
|
__properties: ClassVar[List[str]] = ["bucketUrl", "credentials", "region", "type"]
|
|
37
46
|
|
|
47
|
+
@field_validator("type")
|
|
48
|
+
def type_validate_enum(cls, value):
|
|
49
|
+
"""Validates the enum"""
|
|
50
|
+
if value not in set(["bucket"]):
|
|
51
|
+
raise ValueError("must be one of enum values ('bucket')")
|
|
52
|
+
return value
|
|
53
|
+
|
|
38
54
|
model_config = ConfigDict(
|
|
39
55
|
validate_by_name=True,
|
|
40
56
|
validate_by_alias=True,
|
|
@@ -28,7 +28,7 @@ from pydantic_core import to_jsonable_python
|
|
|
28
28
|
from typing_extensions import Annotated, Self
|
|
29
29
|
|
|
30
30
|
from stackit.cdn.models.config_backend import ConfigBackend
|
|
31
|
-
from stackit.cdn.models.
|
|
31
|
+
from stackit.cdn.models.config_log_sink import ConfigLogSink
|
|
32
32
|
from stackit.cdn.models.optimizer import Optimizer
|
|
33
33
|
from stackit.cdn.models.redirect_config import RedirectConfig
|
|
34
34
|
from stackit.cdn.models.region import Region
|
|
@@ -59,7 +59,10 @@ class Config(BaseModel):
|
|
|
59
59
|
description="Enabling this allows the 'Host' header to be passed through to the origin. ",
|
|
60
60
|
alias="forwardHostHeader",
|
|
61
61
|
)
|
|
62
|
-
|
|
62
|
+
labels: Optional[Dict[str, StrictStr]] = Field(
|
|
63
|
+
default=None, description="Labels are key-value string pairs that can be attached to a distribution."
|
|
64
|
+
)
|
|
65
|
+
log_sink: Optional[ConfigLogSink] = Field(default=None, alias="logSink")
|
|
63
66
|
monthly_limit_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(
|
|
64
67
|
default=None,
|
|
65
68
|
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
|
|
@@ -80,6 +83,7 @@ class Config(BaseModel):
|
|
|
80
83
|
"blockedIps",
|
|
81
84
|
"defaultCacheDuration",
|
|
82
85
|
"forwardHostHeader",
|
|
86
|
+
"labels",
|
|
83
87
|
"logSink",
|
|
84
88
|
"monthlyLimitBytes",
|
|
85
89
|
"optimizer",
|
|
@@ -173,7 +177,8 @@ class Config(BaseModel):
|
|
|
173
177
|
"blockedIps": obj.get("blockedIps"),
|
|
174
178
|
"defaultCacheDuration": obj.get("defaultCacheDuration"),
|
|
175
179
|
"forwardHostHeader": obj.get("forwardHostHeader"),
|
|
176
|
-
"
|
|
180
|
+
"labels": obj.get("labels"),
|
|
181
|
+
"logSink": ConfigLogSink.from_dict(obj["logSink"]) if obj.get("logSink") is not None else None,
|
|
177
182
|
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
|
|
178
183
|
"optimizer": Optimizer.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
|
|
179
184
|
"redirects": RedirectConfig.from_dict(obj["redirects"]) if obj.get("redirects") is not None else None,
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT CDN API
|
|
5
|
+
|
|
6
|
+
API used to create and manage your CDN distributions.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, Dict, Optional, Set, Union
|
|
19
|
+
|
|
20
|
+
from pydantic import (
|
|
21
|
+
BaseModel,
|
|
22
|
+
ConfigDict,
|
|
23
|
+
ValidationError,
|
|
24
|
+
field_validator,
|
|
25
|
+
)
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
from stackit.cdn.models.loki_log_sink import LokiLogSink
|
|
29
|
+
|
|
30
|
+
CONFIGLOGSINK_ONE_OF_SCHEMAS = ["LokiLogSink"]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ConfigLogSink(BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
ConfigLogSink
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
# data type: LokiLogSink
|
|
39
|
+
oneof_schema_1_validator: Optional[LokiLogSink] = None
|
|
40
|
+
actual_instance: Optional[Union[LokiLogSink]] = None
|
|
41
|
+
one_of_schemas: Set[str] = {"LokiLogSink"}
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
discriminator_value_class_map: Dict[str, str] = {}
|
|
49
|
+
|
|
50
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
51
|
+
if args:
|
|
52
|
+
if len(args) > 1:
|
|
53
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
54
|
+
if kwargs:
|
|
55
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
56
|
+
super().__init__(actual_instance=args[0])
|
|
57
|
+
else:
|
|
58
|
+
super().__init__(**kwargs)
|
|
59
|
+
|
|
60
|
+
@field_validator("actual_instance")
|
|
61
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
62
|
+
instance = ConfigLogSink.model_construct()
|
|
63
|
+
error_messages = []
|
|
64
|
+
match = 0
|
|
65
|
+
# validate data type: LokiLogSink
|
|
66
|
+
if not isinstance(v, LokiLogSink):
|
|
67
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `LokiLogSink`")
|
|
68
|
+
else:
|
|
69
|
+
match += 1
|
|
70
|
+
if match == 0:
|
|
71
|
+
# no match
|
|
72
|
+
raise ValueError(
|
|
73
|
+
"No match found when setting `actual_instance` in ConfigLogSink with oneOf schemas: LokiLogSink. Details: "
|
|
74
|
+
+ ", ".join(error_messages)
|
|
75
|
+
)
|
|
76
|
+
else:
|
|
77
|
+
return v
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
81
|
+
return cls.from_json(json.dumps(obj))
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_json(cls, json_str: str) -> Self:
|
|
85
|
+
"""Returns the object represented by the json string"""
|
|
86
|
+
instance = cls.model_construct()
|
|
87
|
+
error_messages = []
|
|
88
|
+
match = 0
|
|
89
|
+
|
|
90
|
+
# deserialize data into LokiLogSink
|
|
91
|
+
try:
|
|
92
|
+
instance.actual_instance = LokiLogSink.from_json(json_str)
|
|
93
|
+
match += 1
|
|
94
|
+
except (ValidationError, ValueError) as e:
|
|
95
|
+
error_messages.append(str(e))
|
|
96
|
+
|
|
97
|
+
if match > 1:
|
|
98
|
+
# more than 1 match
|
|
99
|
+
raise ValueError(
|
|
100
|
+
"Multiple matches found when deserializing the JSON string into ConfigLogSink with oneOf schemas: LokiLogSink. Details: "
|
|
101
|
+
+ ", ".join(error_messages)
|
|
102
|
+
)
|
|
103
|
+
elif match == 0:
|
|
104
|
+
# no match
|
|
105
|
+
raise ValueError(
|
|
106
|
+
"No match found when deserializing the JSON string into ConfigLogSink with oneOf schemas: LokiLogSink. Details: "
|
|
107
|
+
+ ", ".join(error_messages)
|
|
108
|
+
)
|
|
109
|
+
else:
|
|
110
|
+
return instance
|
|
111
|
+
|
|
112
|
+
def to_json(self) -> str:
|
|
113
|
+
"""Returns the JSON representation of the actual instance"""
|
|
114
|
+
if self.actual_instance is None:
|
|
115
|
+
return "null"
|
|
116
|
+
|
|
117
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
118
|
+
return self.actual_instance.to_json()
|
|
119
|
+
else:
|
|
120
|
+
return json.dumps(self.actual_instance)
|
|
121
|
+
|
|
122
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], LokiLogSink]]:
|
|
123
|
+
"""Returns the dict representation of the actual instance"""
|
|
124
|
+
if self.actual_instance is None:
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
128
|
+
return self.actual_instance.to_dict()
|
|
129
|
+
else:
|
|
130
|
+
# primitive type
|
|
131
|
+
return self.actual_instance
|
|
132
|
+
|
|
133
|
+
def to_str(self) -> str:
|
|
134
|
+
"""Returns the string representation of the actual instance"""
|
|
135
|
+
return pprint.pformat(self.model_dump())
|
|
@@ -28,7 +28,7 @@ from pydantic_core import to_jsonable_python
|
|
|
28
28
|
from typing_extensions import Annotated, Self
|
|
29
29
|
|
|
30
30
|
from stackit.cdn.models.config_patch_backend import ConfigPatchBackend
|
|
31
|
-
from stackit.cdn.models.
|
|
31
|
+
from stackit.cdn.models.config_patch_log_sink import ConfigPatchLogSink
|
|
32
32
|
from stackit.cdn.models.optimizer_patch import OptimizerPatch
|
|
33
33
|
from stackit.cdn.models.redirect_config import RedirectConfig
|
|
34
34
|
from stackit.cdn.models.region import Region
|
|
@@ -62,7 +62,11 @@ class ConfigPatch(BaseModel):
|
|
|
62
62
|
description="Enabling this allows the 'Host' header to be passed through to the origin. ",
|
|
63
63
|
alias="forwardHostHeader",
|
|
64
64
|
)
|
|
65
|
-
|
|
65
|
+
labels: Optional[Dict[str, Optional[StrictStr]]] = Field(
|
|
66
|
+
default=None,
|
|
67
|
+
description="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. ",
|
|
68
|
+
)
|
|
69
|
+
log_sink: Optional[ConfigPatchLogSink] = Field(default=None, alias="logSink")
|
|
66
70
|
monthly_limit_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(
|
|
67
71
|
default=None,
|
|
68
72
|
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
|
|
@@ -84,6 +88,7 @@ class ConfigPatch(BaseModel):
|
|
|
84
88
|
"blockedIps",
|
|
85
89
|
"defaultCacheDuration",
|
|
86
90
|
"forwardHostHeader",
|
|
91
|
+
"labels",
|
|
87
92
|
"logSink",
|
|
88
93
|
"monthlyLimitBytes",
|
|
89
94
|
"optimizer",
|
|
@@ -182,7 +187,8 @@ class ConfigPatch(BaseModel):
|
|
|
182
187
|
"blockedIps": obj.get("blockedIps"),
|
|
183
188
|
"defaultCacheDuration": obj.get("defaultCacheDuration"),
|
|
184
189
|
"forwardHostHeader": obj.get("forwardHostHeader"),
|
|
185
|
-
"
|
|
190
|
+
"labels": obj.get("labels"),
|
|
191
|
+
"logSink": ConfigPatchLogSink.from_dict(obj["logSink"]) if obj.get("logSink") is not None else None,
|
|
186
192
|
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
|
|
187
193
|
"optimizer": OptimizerPatch.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
|
|
188
194
|
"redirects": RedirectConfig.from_dict(obj["redirects"]) if obj.get("redirects") is not None else None,
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT CDN API
|
|
5
|
+
|
|
6
|
+
API used to create and manage your CDN distributions.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, Dict, Optional, Set, Union
|
|
19
|
+
|
|
20
|
+
from pydantic import (
|
|
21
|
+
BaseModel,
|
|
22
|
+
ConfigDict,
|
|
23
|
+
ValidationError,
|
|
24
|
+
field_validator,
|
|
25
|
+
)
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
from stackit.cdn.models.loki_log_sink_patch import LokiLogSinkPatch
|
|
29
|
+
|
|
30
|
+
CONFIGPATCHLOGSINK_ONE_OF_SCHEMAS = ["LokiLogSinkPatch"]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ConfigPatchLogSink(BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
ConfigPatchLogSink
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
# data type: LokiLogSinkPatch
|
|
39
|
+
oneof_schema_1_validator: Optional[LokiLogSinkPatch] = None
|
|
40
|
+
actual_instance: Optional[Union[LokiLogSinkPatch]] = None
|
|
41
|
+
one_of_schemas: Set[str] = {"LokiLogSinkPatch"}
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
discriminator_value_class_map: Dict[str, str] = {}
|
|
49
|
+
|
|
50
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
51
|
+
if args:
|
|
52
|
+
if len(args) > 1:
|
|
53
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
54
|
+
if kwargs:
|
|
55
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
56
|
+
super().__init__(actual_instance=args[0])
|
|
57
|
+
else:
|
|
58
|
+
super().__init__(**kwargs)
|
|
59
|
+
|
|
60
|
+
@field_validator("actual_instance")
|
|
61
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
62
|
+
if v is None:
|
|
63
|
+
return v
|
|
64
|
+
|
|
65
|
+
instance = ConfigPatchLogSink.model_construct()
|
|
66
|
+
error_messages = []
|
|
67
|
+
match = 0
|
|
68
|
+
# validate data type: LokiLogSinkPatch
|
|
69
|
+
if not isinstance(v, LokiLogSinkPatch):
|
|
70
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `LokiLogSinkPatch`")
|
|
71
|
+
else:
|
|
72
|
+
match += 1
|
|
73
|
+
if match == 0:
|
|
74
|
+
# no match
|
|
75
|
+
raise ValueError(
|
|
76
|
+
"No match found when setting `actual_instance` in ConfigPatchLogSink with oneOf schemas: LokiLogSinkPatch. Details: "
|
|
77
|
+
+ ", ".join(error_messages)
|
|
78
|
+
)
|
|
79
|
+
else:
|
|
80
|
+
return v
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
84
|
+
return cls.from_json(json.dumps(obj))
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: Optional[str]) -> Self:
|
|
88
|
+
"""Returns the object represented by the json string"""
|
|
89
|
+
instance = cls.model_construct()
|
|
90
|
+
if json_str is None:
|
|
91
|
+
return instance
|
|
92
|
+
|
|
93
|
+
error_messages = []
|
|
94
|
+
match = 0
|
|
95
|
+
|
|
96
|
+
# deserialize data into LokiLogSinkPatch
|
|
97
|
+
try:
|
|
98
|
+
instance.actual_instance = LokiLogSinkPatch.from_json(json_str)
|
|
99
|
+
match += 1
|
|
100
|
+
except (ValidationError, ValueError) as e:
|
|
101
|
+
error_messages.append(str(e))
|
|
102
|
+
|
|
103
|
+
if match > 1:
|
|
104
|
+
# more than 1 match
|
|
105
|
+
raise ValueError(
|
|
106
|
+
"Multiple matches found when deserializing the JSON string into ConfigPatchLogSink with oneOf schemas: LokiLogSinkPatch. Details: "
|
|
107
|
+
+ ", ".join(error_messages)
|
|
108
|
+
)
|
|
109
|
+
elif match == 0:
|
|
110
|
+
# no match
|
|
111
|
+
raise ValueError(
|
|
112
|
+
"No match found when deserializing the JSON string into ConfigPatchLogSink with oneOf schemas: LokiLogSinkPatch. Details: "
|
|
113
|
+
+ ", ".join(error_messages)
|
|
114
|
+
)
|
|
115
|
+
else:
|
|
116
|
+
return instance
|
|
117
|
+
|
|
118
|
+
def to_json(self) -> str:
|
|
119
|
+
"""Returns the JSON representation of the actual instance"""
|
|
120
|
+
if self.actual_instance is None:
|
|
121
|
+
return "null"
|
|
122
|
+
|
|
123
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
124
|
+
return self.actual_instance.to_json()
|
|
125
|
+
else:
|
|
126
|
+
return json.dumps(self.actual_instance)
|
|
127
|
+
|
|
128
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], LokiLogSinkPatch]]:
|
|
129
|
+
"""Returns the dict representation of the actual instance"""
|
|
130
|
+
if self.actual_instance is None:
|
|
131
|
+
return None
|
|
132
|
+
|
|
133
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
134
|
+
return self.actual_instance.to_dict()
|
|
135
|
+
else:
|
|
136
|
+
# primitive type
|
|
137
|
+
return self.actual_instance
|
|
138
|
+
|
|
139
|
+
def to_str(self) -> str:
|
|
140
|
+
"""Returns the string representation of the actual instance"""
|
|
141
|
+
return pprint.pformat(self.model_dump())
|
{stackit_cdn-2.7.0 → stackit_cdn-2.9.0}/src/stackit/cdn/models/create_distribution_payload.py
RENAMED
|
@@ -30,7 +30,9 @@ from typing_extensions import Annotated, Self
|
|
|
30
30
|
from stackit.cdn.models.create_distribution_payload_backend import (
|
|
31
31
|
CreateDistributionPayloadBackend,
|
|
32
32
|
)
|
|
33
|
-
from stackit.cdn.models.
|
|
33
|
+
from stackit.cdn.models.create_distribution_payload_log_sink import (
|
|
34
|
+
CreateDistributionPayloadLogSink,
|
|
35
|
+
)
|
|
34
36
|
from stackit.cdn.models.optimizer import Optimizer
|
|
35
37
|
from stackit.cdn.models.redirect_config import RedirectConfig
|
|
36
38
|
from stackit.cdn.models.region import Region
|
|
@@ -69,7 +71,10 @@ class CreateDistributionPayload(BaseModel):
|
|
|
69
71
|
description="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. ",
|
|
70
72
|
alias="intentId",
|
|
71
73
|
)
|
|
72
|
-
|
|
74
|
+
labels: Optional[Dict[str, StrictStr]] = Field(
|
|
75
|
+
default=None, description="Labels are key-value string pairs that can be attached to a distribution."
|
|
76
|
+
)
|
|
77
|
+
log_sink: Optional[CreateDistributionPayloadLogSink] = Field(default=None, alias="logSink")
|
|
73
78
|
monthly_limit_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(
|
|
74
79
|
default=None,
|
|
75
80
|
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
|
|
@@ -94,6 +99,7 @@ class CreateDistributionPayload(BaseModel):
|
|
|
94
99
|
"defaultCacheDuration",
|
|
95
100
|
"forwardHostHeader",
|
|
96
101
|
"intentId",
|
|
102
|
+
"labels",
|
|
97
103
|
"logSink",
|
|
98
104
|
"monthlyLimitBytes",
|
|
99
105
|
"optimizer",
|
|
@@ -182,7 +188,12 @@ class CreateDistributionPayload(BaseModel):
|
|
|
182
188
|
"defaultCacheDuration": obj.get("defaultCacheDuration"),
|
|
183
189
|
"forwardHostHeader": obj.get("forwardHostHeader"),
|
|
184
190
|
"intentId": obj.get("intentId"),
|
|
185
|
-
"
|
|
191
|
+
"labels": obj.get("labels"),
|
|
192
|
+
"logSink": (
|
|
193
|
+
CreateDistributionPayloadLogSink.from_dict(obj["logSink"])
|
|
194
|
+
if obj.get("logSink") is not None
|
|
195
|
+
else None
|
|
196
|
+
),
|
|
186
197
|
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
|
|
187
198
|
"optimizer": Optimizer.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
|
|
188
199
|
"redirects": RedirectConfig.from_dict(obj["redirects"]) if obj.get("redirects") is not None else None,
|