Skip to content

Commit 1d896e9

Browse files
Generator: Update SDK /services/kms (#1221)
* Generate kms * Update CHANGELOG.md and pyproject.toml --------- Co-authored-by: Marcel Jacek <[email protected]>
1 parent b2e8910 commit 1d896e9

File tree

7 files changed

+308
-7
lines changed

7 files changed

+308
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- **Bugfix:** Updated regex validator
66
- `iaas`: [v0.5.2](services/iaas/CHANGELOG.md#v052-2025-05-19)
77
- **Improvement:** Update descriptions
8+
- `kms`: [v0.0.4](services/kms/CHANGELOG.md#v004-2025-05-19)
9+
- **Feature:** Added new method `delete_wrapping_key`
810
- `lbapplication`: [v0.3.2](services/lbapplication/CHANGELOG.md#v032-2025-05-14)
911
- **Deprecated:** `lbapplication` service is deprecated and no longer maintained. Use the `alb` service instead
1012
- `resourcemanager` [v0.4.0](services/resourcemanager/CHANGELOG.md#v040-2025-05-14)

services/kms/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.0.4 (2025-05-19)
2+
- **Feature:** Added new method `delete_wrapping_key`
3+
14
## v0.0.3 (2025-05-09)
25
- **Feature:** Update user-agent header
36

services/kms/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-kms"
33

44
[tool.poetry]
55
name = "stackit-kms"
6-
version = "v0.0.3"
6+
version = "v0.0.4"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/kms/src/stackit/kms/api/default_api.py

Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,289 @@ def _delete_key_ring_serialize(
17911791
_request_auth=_request_auth,
17921792
)
17931793

1794+
@validate_call
1795+
def delete_wrapping_key(
1796+
self,
1797+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the key ring is part of.")],
1798+
region_id: Annotated[StrictStr, Field(description="The STACKIT region name the key ring is located in.")],
1799+
key_ring_id: Annotated[StrictStr, Field(description="The key ring UUID.")],
1800+
wrapping_key_id: Annotated[StrictStr, Field(description="The wrapping key UUID.")],
1801+
_request_timeout: Union[
1802+
None,
1803+
Annotated[StrictFloat, Field(gt=0)],
1804+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1805+
] = None,
1806+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1807+
_content_type: Optional[StrictStr] = None,
1808+
_headers: Optional[Dict[StrictStr, Any]] = None,
1809+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1810+
) -> None:
1811+
"""Delete wrapping key
1812+
1813+
Deletes the given wrapping key
1814+
1815+
:param project_id: The STACKIT portal project UUID the key ring is part of. (required)
1816+
:type project_id: str
1817+
:param region_id: The STACKIT region name the key ring is located in. (required)
1818+
:type region_id: str
1819+
:param key_ring_id: The key ring UUID. (required)
1820+
:type key_ring_id: str
1821+
:param wrapping_key_id: The wrapping key UUID. (required)
1822+
:type wrapping_key_id: str
1823+
:param _request_timeout: timeout setting for this request. If one
1824+
number provided, it will be total request
1825+
timeout. It can also be a pair (tuple) of
1826+
(connection, read) timeouts.
1827+
:type _request_timeout: int, tuple(int, int), optional
1828+
:param _request_auth: set to override the auth_settings for an a single
1829+
request; this effectively ignores the
1830+
authentication in the spec for a single request.
1831+
:type _request_auth: dict, optional
1832+
:param _content_type: force content-type for the request.
1833+
:type _content_type: str, Optional
1834+
:param _headers: set to override the headers for a single
1835+
request; this effectively ignores the headers
1836+
in the spec for a single request.
1837+
:type _headers: dict, optional
1838+
:param _host_index: set to override the host_index for a single
1839+
request; this effectively ignores the host_index
1840+
in the spec for a single request.
1841+
:type _host_index: int, optional
1842+
:return: Returns the result object.
1843+
""" # noqa: E501 docstring might be too long
1844+
1845+
_param = self._delete_wrapping_key_serialize(
1846+
project_id=project_id,
1847+
region_id=region_id,
1848+
key_ring_id=key_ring_id,
1849+
wrapping_key_id=wrapping_key_id,
1850+
_request_auth=_request_auth,
1851+
_content_type=_content_type,
1852+
_headers=_headers,
1853+
_host_index=_host_index,
1854+
)
1855+
1856+
_response_types_map: Dict[str, Optional[str]] = {
1857+
"204": None,
1858+
"400": "HttpError",
1859+
"401": "HttpError",
1860+
"404": "HttpError",
1861+
"500": "HttpError",
1862+
}
1863+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1864+
response_data.read()
1865+
return self.api_client.response_deserialize(
1866+
response_data=response_data,
1867+
response_types_map=_response_types_map,
1868+
).data
1869+
1870+
@validate_call
1871+
def delete_wrapping_key_with_http_info(
1872+
self,
1873+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the key ring is part of.")],
1874+
region_id: Annotated[StrictStr, Field(description="The STACKIT region name the key ring is located in.")],
1875+
key_ring_id: Annotated[StrictStr, Field(description="The key ring UUID.")],
1876+
wrapping_key_id: Annotated[StrictStr, Field(description="The wrapping key UUID.")],
1877+
_request_timeout: Union[
1878+
None,
1879+
Annotated[StrictFloat, Field(gt=0)],
1880+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1881+
] = None,
1882+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1883+
_content_type: Optional[StrictStr] = None,
1884+
_headers: Optional[Dict[StrictStr, Any]] = None,
1885+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1886+
) -> ApiResponse[None]:
1887+
"""Delete wrapping key
1888+
1889+
Deletes the given wrapping key
1890+
1891+
:param project_id: The STACKIT portal project UUID the key ring is part of. (required)
1892+
:type project_id: str
1893+
:param region_id: The STACKIT region name the key ring is located in. (required)
1894+
:type region_id: str
1895+
:param key_ring_id: The key ring UUID. (required)
1896+
:type key_ring_id: str
1897+
:param wrapping_key_id: The wrapping key UUID. (required)
1898+
:type wrapping_key_id: str
1899+
:param _request_timeout: timeout setting for this request. If one
1900+
number provided, it will be total request
1901+
timeout. It can also be a pair (tuple) of
1902+
(connection, read) timeouts.
1903+
:type _request_timeout: int, tuple(int, int), optional
1904+
:param _request_auth: set to override the auth_settings for an a single
1905+
request; this effectively ignores the
1906+
authentication in the spec for a single request.
1907+
:type _request_auth: dict, optional
1908+
:param _content_type: force content-type for the request.
1909+
:type _content_type: str, Optional
1910+
:param _headers: set to override the headers for a single
1911+
request; this effectively ignores the headers
1912+
in the spec for a single request.
1913+
:type _headers: dict, optional
1914+
:param _host_index: set to override the host_index for a single
1915+
request; this effectively ignores the host_index
1916+
in the spec for a single request.
1917+
:type _host_index: int, optional
1918+
:return: Returns the result object.
1919+
""" # noqa: E501 docstring might be too long
1920+
1921+
_param = self._delete_wrapping_key_serialize(
1922+
project_id=project_id,
1923+
region_id=region_id,
1924+
key_ring_id=key_ring_id,
1925+
wrapping_key_id=wrapping_key_id,
1926+
_request_auth=_request_auth,
1927+
_content_type=_content_type,
1928+
_headers=_headers,
1929+
_host_index=_host_index,
1930+
)
1931+
1932+
_response_types_map: Dict[str, Optional[str]] = {
1933+
"204": None,
1934+
"400": "HttpError",
1935+
"401": "HttpError",
1936+
"404": "HttpError",
1937+
"500": "HttpError",
1938+
}
1939+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1940+
response_data.read()
1941+
return self.api_client.response_deserialize(
1942+
response_data=response_data,
1943+
response_types_map=_response_types_map,
1944+
)
1945+
1946+
@validate_call
1947+
def delete_wrapping_key_without_preload_content(
1948+
self,
1949+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the key ring is part of.")],
1950+
region_id: Annotated[StrictStr, Field(description="The STACKIT region name the key ring is located in.")],
1951+
key_ring_id: Annotated[StrictStr, Field(description="The key ring UUID.")],
1952+
wrapping_key_id: Annotated[StrictStr, Field(description="The wrapping key UUID.")],
1953+
_request_timeout: Union[
1954+
None,
1955+
Annotated[StrictFloat, Field(gt=0)],
1956+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1957+
] = None,
1958+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1959+
_content_type: Optional[StrictStr] = None,
1960+
_headers: Optional[Dict[StrictStr, Any]] = None,
1961+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1962+
) -> RESTResponseType:
1963+
"""Delete wrapping key
1964+
1965+
Deletes the given wrapping key
1966+
1967+
:param project_id: The STACKIT portal project UUID the key ring is part of. (required)
1968+
:type project_id: str
1969+
:param region_id: The STACKIT region name the key ring is located in. (required)
1970+
:type region_id: str
1971+
:param key_ring_id: The key ring UUID. (required)
1972+
:type key_ring_id: str
1973+
:param wrapping_key_id: The wrapping key UUID. (required)
1974+
:type wrapping_key_id: str
1975+
:param _request_timeout: timeout setting for this request. If one
1976+
number provided, it will be total request
1977+
timeout. It can also be a pair (tuple) of
1978+
(connection, read) timeouts.
1979+
:type _request_timeout: int, tuple(int, int), optional
1980+
:param _request_auth: set to override the auth_settings for an a single
1981+
request; this effectively ignores the
1982+
authentication in the spec for a single request.
1983+
:type _request_auth: dict, optional
1984+
:param _content_type: force content-type for the request.
1985+
:type _content_type: str, Optional
1986+
:param _headers: set to override the headers for a single
1987+
request; this effectively ignores the headers
1988+
in the spec for a single request.
1989+
:type _headers: dict, optional
1990+
:param _host_index: set to override the host_index for a single
1991+
request; this effectively ignores the host_index
1992+
in the spec for a single request.
1993+
:type _host_index: int, optional
1994+
:return: Returns the result object.
1995+
""" # noqa: E501 docstring might be too long
1996+
1997+
_param = self._delete_wrapping_key_serialize(
1998+
project_id=project_id,
1999+
region_id=region_id,
2000+
key_ring_id=key_ring_id,
2001+
wrapping_key_id=wrapping_key_id,
2002+
_request_auth=_request_auth,
2003+
_content_type=_content_type,
2004+
_headers=_headers,
2005+
_host_index=_host_index,
2006+
)
2007+
2008+
_response_types_map: Dict[str, Optional[str]] = {
2009+
"204": None,
2010+
"400": "HttpError",
2011+
"401": "HttpError",
2012+
"404": "HttpError",
2013+
"500": "HttpError",
2014+
}
2015+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2016+
return response_data.response
2017+
2018+
def _delete_wrapping_key_serialize(
2019+
self,
2020+
project_id,
2021+
region_id,
2022+
key_ring_id,
2023+
wrapping_key_id,
2024+
_request_auth,
2025+
_content_type,
2026+
_headers,
2027+
_host_index,
2028+
) -> RequestSerialized:
2029+
2030+
_host = None
2031+
2032+
_collection_formats: Dict[str, str] = {}
2033+
2034+
_path_params: Dict[str, str] = {}
2035+
_query_params: List[Tuple[str, str]] = []
2036+
_header_params: Dict[str, Optional[str]] = _headers or {}
2037+
_form_params: List[Tuple[str, str]] = []
2038+
_files: Dict[str, Union[str, bytes]] = {}
2039+
_body_params: Optional[bytes] = None
2040+
2041+
# process the path parameters
2042+
if project_id is not None:
2043+
_path_params["projectId"] = project_id
2044+
if region_id is not None:
2045+
_path_params["regionId"] = region_id
2046+
if key_ring_id is not None:
2047+
_path_params["keyRingId"] = key_ring_id
2048+
if wrapping_key_id is not None:
2049+
_path_params["wrappingKeyId"] = wrapping_key_id
2050+
# process the query parameters
2051+
# process the header parameters
2052+
# process the form parameters
2053+
# process the body parameter
2054+
2055+
# set the HTTP header `Accept`
2056+
if "Accept" not in _header_params:
2057+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2058+
2059+
# authentication setting
2060+
_auth_settings: List[str] = []
2061+
2062+
return self.api_client.param_serialize(
2063+
method="DELETE",
2064+
resource_path="/v1beta/projects/{projectId}/regions/{regionId}/keyrings/{keyRingId}/wrappingkeys/{wrappingKeyId}",
2065+
path_params=_path_params,
2066+
query_params=_query_params,
2067+
header_params=_header_params,
2068+
body=_body_params,
2069+
post_params=_form_params,
2070+
files=_files,
2071+
auth_settings=_auth_settings,
2072+
collection_formats=_collection_formats,
2073+
_host=_host,
2074+
_request_auth=_request_auth,
2075+
)
2076+
17942077
@validate_call
17952078
def destroy_version(
17962079
self,

services/kms/src/stackit/kms/models/key.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ class Key(BaseModel):
8080
@field_validator("state")
8181
def state_validate_enum(cls, value):
8282
"""Validates the enum"""
83-
if value not in set(["active", "version_not_ready", "deleted"]):
84-
raise ValueError("must be one of enum values ('active', 'version_not_ready', 'deleted')")
83+
if value not in set(["active", "deleted", "not_available", "errors_exist", "no_version"]):
84+
raise ValueError(
85+
"must be one of enum values ('active', 'deleted', 'not_available', 'errors_exist', 'no_version')"
86+
)
8587
return value
8688

8789
model_config = ConfigDict(

services/kms/src/stackit/kms/models/version.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,18 @@ class Version(BaseModel):
6969
@field_validator("state")
7070
def state_validate_enum(cls, value):
7171
"""Validates the enum"""
72-
if value not in set(["active", "key_material_not_ready", "key_material_invalid", "disabled", "destroyed"]):
72+
if value not in set(
73+
[
74+
"active",
75+
"key_material_not_ready",
76+
"key_material_invalid",
77+
"key_material_unavailable",
78+
"disabled",
79+
"destroyed",
80+
]
81+
):
7382
raise ValueError(
74-
"must be one of enum values ('active', 'key_material_not_ready', 'key_material_invalid', 'disabled', 'destroyed')"
83+
"must be one of enum values ('active', 'key_material_not_ready', 'key_material_invalid', 'key_material_unavailable', 'disabled', 'destroyed')"
7584
)
7685
return value
7786

services/kms/src/stackit/kms/models/wrapping_key.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ class WrappingKey(BaseModel):
6969
@field_validator("state")
7070
def state_validate_enum(cls, value):
7171
"""Validates the enum"""
72-
if value not in set(["active", "key_material_not_ready", "expired", "deleting"]):
73-
raise ValueError("must be one of enum values ('active', 'key_material_not_ready', 'expired', 'deleting')")
72+
if value not in set(["active", "key_material_not_ready", "expired", "deleted", "key_material_unavailable"]):
73+
raise ValueError(
74+
"must be one of enum values ('active', 'key_material_not_ready', 'expired', 'deleted', 'key_material_unavailable')"
75+
)
7476
return value
7577

7678
model_config = ConfigDict(

0 commit comments

Comments
 (0)