Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Release (2025-MM-DD)
- `cdn`: [v1.6.0](services/cdn/CHANGELOG.md#v160)
- **Feature:** Added Attribute `LogSink` to `ConfigPatch`
- **Feature:** Added Attribute `Geofencing` to `DistributionPayload`, `HttpBackend` and `HttpBackendPatch`
- **Feature:** Added new function `GetLogsSearchFilters`
- `modelserving`: [v0.2.1](services/modelserving/CHANGELOG.md#v021)
- **Feature:** Extend enums in field `type` in model `Model`: `audio`, `image`
- `objectstorage`: [v1.2.0](services/objectstorage/CHANGELOG.md#v120)
Expand All @@ -23,8 +27,11 @@
- **Feature:** Add new field `kubernetes` to `Nodepool` model
- `serviceaccount`: [v0.4.1](services/serviceaccount/CHANGELOG.md#v041)
- **Improvement:** Improve error handling for `CreateShortLivedAccessToken`
- `stackitmarketplace`: [v1.8.0](services/stackitmarketplace/CHANGELOG.md#v180)
- **Feature:** Add new field `free_trial` in `CatalogProductOverview` model
- `stackitmarketplace`:
- [v1.9.0](services/stackitmarketplace/CHANGELOG.md#v190)
- **Feature:** Added `RequestPrivatePlan` to `InquiriesCreateInquiryPayload`
- [v1.8.0](services/stackitmarketplace/CHANGELOG.md#v180)
- **Feature:** Add new field `free_trial` in `CatalogProductOverview` model

## Release (2025-08-29)
- `kms`: [v0.3.0](services/kms/CHANGELOG.md#v030)
Expand Down
5 changes: 5 additions & 0 deletions services/cdn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.6.0
- **Feature:** Added Attribute `LogSink` to `ConfigPatch`
- **Feature:** Added Attribute `Geofencing` to `DistributionPayload`, `HttpBackend` and `HttpBackendPatch`
- **Feature:** Added new function `GetLogsSearchFilters`

## v1.5.0
- **Feature:** Added new filter functions `DataCenterRegion`, `RequestCountryCode`, `StatusCode` and `CacheHit`
- **Feature:** Added Attribute `LogSink` and `Certificate`
Expand Down
2 changes: 1 addition & 1 deletion services/cdn/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-cdn"

[tool.poetry]
name = "stackit-cdn"
version = "v1.5.0"
version = "v1.6.0"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
4 changes: 4 additions & 0 deletions services/cdn/src/stackit/cdn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"GetCustomDomainResponseCertificate",
"GetDistributionResponse",
"GetLogsResponse",
"GetLogsSearchFiltersResponse",
"GetStatisticsResponse",
"HttpBackend",
"HttpBackendPatch",
Expand Down Expand Up @@ -152,6 +153,9 @@
GetDistributionResponse as GetDistributionResponse,
)
from stackit.cdn.models.get_logs_response import GetLogsResponse as GetLogsResponse
from stackit.cdn.models.get_logs_search_filters_response import (
GetLogsSearchFiltersResponse as GetLogsSearchFiltersResponse,
)
from stackit.cdn.models.get_statistics_response import (
GetStatisticsResponse as GetStatisticsResponse,
)
Expand Down
297 changes: 291 additions & 6 deletions services/cdn/src/stackit/cdn/api/default_api.py

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions services/cdn/src/stackit/cdn/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
)
from stackit.cdn.models.get_distribution_response import GetDistributionResponse
from stackit.cdn.models.get_logs_response import GetLogsResponse
from stackit.cdn.models.get_logs_search_filters_response import (
GetLogsSearchFiltersResponse,
)
from stackit.cdn.models.get_statistics_response import GetStatisticsResponse
from stackit.cdn.models.http_backend import HttpBackend
from stackit.cdn.models.http_backend_patch import HttpBackendPatch
Expand Down
12 changes: 12 additions & 0 deletions services/cdn/src/stackit/cdn/models/config_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from stackit.cdn.models.http_backend_patch import HttpBackendPatch
from stackit.cdn.models.optimizer_patch import OptimizerPatch
from stackit.cdn.models.patch_loki_log_sink import PatchLokiLogSink
from stackit.cdn.models.region import Region


Expand All @@ -46,6 +47,7 @@ class ConfigPatch(BaseModel):
description="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) ",
alias="defaultCacheDuration",
)
log_sink: Optional[PatchLokiLogSink] = Field(default=None, alias="logSink")
monthly_limit_bytes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(
default=None,
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
Expand All @@ -58,6 +60,7 @@ class ConfigPatch(BaseModel):
"blockedCountries",
"blockedIPs",
"defaultCacheDuration",
"logSink",
"monthlyLimitBytes",
"optimizer",
"regions",
Expand Down Expand Up @@ -103,6 +106,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of backend
if self.backend:
_dict["backend"] = self.backend.to_dict()
# override the default output from pydantic by calling `to_dict()` of log_sink
if self.log_sink:
_dict["logSink"] = self.log_sink.to_dict()
# override the default output from pydantic by calling `to_dict()` of optimizer
if self.optimizer:
_dict["optimizer"] = self.optimizer.to_dict()
Expand All @@ -111,6 +117,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.default_cache_duration is None and "default_cache_duration" in self.model_fields_set:
_dict["defaultCacheDuration"] = None

# set to None if log_sink (nullable) is None
# and model_fields_set contains the field
if self.log_sink is None and "log_sink" in self.model_fields_set:
_dict["logSink"] = None

# set to None if monthly_limit_bytes (nullable) is None
# and model_fields_set contains the field
if self.monthly_limit_bytes is None and "monthly_limit_bytes" in self.model_fields_set:
Expand All @@ -133,6 +144,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"blockedCountries": obj.get("blockedCountries"),
"blockedIPs": obj.get("blockedIPs"),
"defaultCacheDuration": obj.get("defaultCacheDuration"),
"logSink": PatchLokiLogSink.from_dict(obj["logSink"]) if obj.get("logSink") is not None else None,
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
"optimizer": OptimizerPatch.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
"regions": obj.get("regions"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class CreateDistributionPayload(BaseModel):
description="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) ",
alias="defaultCacheDuration",
)
geofencing: Optional[Dict[str, List[StrictStr]]] = Field(
default=None,
description="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 can not have a country be assigned to multiple alternative origins. ",
)
intent_id: Optional[StrictStr] = Field(
default=None,
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. ",
Expand Down Expand Up @@ -73,6 +77,7 @@ class CreateDistributionPayload(BaseModel):
"blockedCountries",
"blockedIPs",
"defaultCacheDuration",
"geofencing",
"intentId",
"logSink",
"monthlyLimitBytes",
Expand Down Expand Up @@ -141,6 +146,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"blockedCountries": obj.get("blockedCountries"),
"blockedIPs": obj.get("blockedIPs"),
"defaultCacheDuration": obj.get("defaultCacheDuration"),
"geofencing": obj.get("geofencing"),
"intentId": obj.get("intentId"),
"logSink": PatchLokiLogSink.from_dict(obj["logSink"]) if obj.get("logSink") is not None else None,
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# coding: utf-8

"""
CDN API

API used to create and manage your CDN distributions.

The version of the OpenAPI document: 1beta.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, StrictStr
from typing_extensions import Self


class GetLogsSearchFiltersResponse(BaseModel):
"""
GetLogsSearchFiltersResponse
""" # noqa: E501

filters: List[StrictStr]
__properties: ClassVar[List[str]] = ["filters"]

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetLogsSearchFiltersResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetLogsSearchFiltersResponse from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"filters": obj.get("filters")})
return _obj
6 changes: 5 additions & 1 deletion services/cdn/src/stackit/cdn/models/http_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ class HttpBackend(BaseModel):
HttpBackend
""" # noqa: E501

geofencing: Dict[str, List[StrictStr]] = Field(
description="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. "
)
origin_request_headers: Dict[str, StrictStr] = Field(
description="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. ",
alias="originRequestHeaders",
)
origin_url: StrictStr = Field(alias="originUrl")
type: StrictStr
__properties: ClassVar[List[str]] = ["originRequestHeaders", "originUrl", "type"]
__properties: ClassVar[List[str]] = ["geofencing", "originRequestHeaders", "originUrl", "type"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -84,6 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"geofencing": obj.get("geofencing"),
"originRequestHeaders": obj.get("originRequestHeaders"),
"originUrl": obj.get("originUrl"),
"type": obj.get("type"),
Expand Down
7 changes: 6 additions & 1 deletion services/cdn/src/stackit/cdn/models/http_backend_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ class HttpBackendPatch(BaseModel):
A partial HTTP Backend
""" # noqa: E501

geofencing: Optional[Dict[str, List[StrictStr]]] = Field(
default=None,
description="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. ",
)
origin_request_headers: Optional[Dict[str, StrictStr]] = Field(
default=None,
description="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. ",
alias="originRequestHeaders",
)
origin_url: Optional[StrictStr] = Field(default=None, alias="originUrl")
type: StrictStr = Field(description="This property is required to determine the used backend type.")
__properties: ClassVar[List[str]] = ["originRequestHeaders", "originUrl", "type"]
__properties: ClassVar[List[str]] = ["geofencing", "originRequestHeaders", "originUrl", "type"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -85,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"geofencing": obj.get("geofencing"),
"originRequestHeaders": obj.get("originRequestHeaders"),
"originUrl": obj.get("originUrl"),
"type": obj.get("type"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class PutCustomDomainCustomCertificate(BaseModel):
Returned if a custom certificate is used. Response does not contain the certificate or key.
""" # noqa: E501

certificate: StrictStr = Field(description="base64-encoded certificate")
key: StrictStr = Field(description="base64-encoded key")
certificate: StrictStr = Field(description="base64-encoded PEM-encoded certificate")
key: StrictStr = Field(description="base64-encoded PEM encoded key")
type: StrictStr
__properties: ClassVar[List[str]] = ["certificate", "key", "type"]

Expand Down
3 changes: 3 additions & 0 deletions services/stackitmarketplace/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.9.0
- **Feature:** Added `RequestPrivatePlan` to `InquiriesCreateInquiryPayload`

## v1.8.0
- **Feature:** Add new field `free_trial` in `CatalogProductOverview` model

Expand Down
2 changes: 1 addition & 1 deletion services/stackitmarketplace/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-stackitmarketplace"

[tool.poetry]
name = "stackit-stackitmarketplace"
version = "v1.8.0"
version = "v1.9.0"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"InquiryContactSales",
"InquiryFormType",
"InquiryRegisterTesting",
"InquiryRequestPrivatePlan",
"InquirySuggestProduct",
"ListCatalogProductsResponse",
"ListVendorSubscriptionsResponse",
Expand All @@ -61,6 +62,7 @@
"PricingOptionUnit",
"ProductLifecycleState",
"RegisterTesting",
"RequestPrivatePlan",
"ResolveCustomerPayload",
"ServiceCertificate",
"SubscriptionLifecycleState",
Expand Down Expand Up @@ -144,6 +146,9 @@
from stackit.stackitmarketplace.models.inquiry_register_testing import (
InquiryRegisterTesting as InquiryRegisterTesting,
)
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
InquiryRequestPrivatePlan as InquiryRequestPrivatePlan,
)
from stackit.stackitmarketplace.models.inquiry_suggest_product import (
InquirySuggestProduct as InquirySuggestProduct,
)
Expand All @@ -168,6 +173,9 @@
from stackit.stackitmarketplace.models.register_testing import (
RegisterTesting as RegisterTesting,
)
from stackit.stackitmarketplace.models.request_private_plan import (
RequestPrivatePlan as RequestPrivatePlan,
)
from stackit.stackitmarketplace.models.resolve_customer_payload import (
ResolveCustomerPayload as ResolveCustomerPayload,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def inquiries_create_inquiry(
) -> None:
"""Create inquiry

Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes.
Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes.

:param inquiries_create_inquiry_payload: (required)
:type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload
Expand Down Expand Up @@ -937,7 +937,7 @@ def inquiries_create_inquiry_with_http_info(
) -> ApiResponse[None]:
"""Create inquiry

Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes.
Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes.

:param inquiries_create_inquiry_payload: (required)
:type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload
Expand Down Expand Up @@ -1001,7 +1001,7 @@ def inquiries_create_inquiry_without_preload_content(
) -> RESTResponseType:
"""Create inquiry

Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes.
Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes.

:param inquiries_create_inquiry_payload: (required)
:type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
from stackit.stackitmarketplace.models.inquiry_register_testing import (
InquiryRegisterTesting,
)
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
InquiryRequestPrivatePlan,
)
from stackit.stackitmarketplace.models.inquiry_suggest_product import (
InquirySuggestProduct,
)
Expand All @@ -81,6 +84,7 @@
ProductLifecycleState,
)
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
from stackit.stackitmarketplace.models.request_private_plan import RequestPrivatePlan
from stackit.stackitmarketplace.models.resolve_customer_payload import (
ResolveCustomerPayload,
)
Expand Down
Loading