stackit-kms 0.0.1__tar.gz → 0.0.4__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.
Files changed (40) hide show
  1. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/PKG-INFO +1 -1
  2. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/pyproject.toml +1 -1
  3. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/api/default_api.py +283 -0
  4. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/api_client.py +1 -1
  5. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/configuration.py +6 -2
  6. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/key.py +4 -2
  7. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/version.py +11 -2
  8. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/wrapping_key.py +4 -2
  9. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/LICENSE.md +0 -0
  10. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/README.md +0 -0
  11. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/__init__.py +0 -0
  12. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/api/__init__.py +0 -0
  13. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/api_response.py +0 -0
  14. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/exceptions.py +0 -0
  15. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/__init__.py +0 -0
  16. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/algorithm.py +0 -0
  17. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/backend.py +0 -0
  18. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/create_key_payload.py +0 -0
  19. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/create_key_ring_payload.py +0 -0
  20. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/create_wrapping_key_payload.py +0 -0
  21. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/decrypt_payload.py +0 -0
  22. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/decrypted_data.py +0 -0
  23. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/encrypt_payload.py +0 -0
  24. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/encrypted_data.py +0 -0
  25. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/http_error.py +0 -0
  26. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/import_key_payload.py +0 -0
  27. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/key_list.py +0 -0
  28. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/key_ring.py +0 -0
  29. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/key_ring_list.py +0 -0
  30. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/purpose.py +0 -0
  31. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/sign_payload.py +0 -0
  32. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/signed_data.py +0 -0
  33. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/verified_data.py +0 -0
  34. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/verify_payload.py +0 -0
  35. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/version_list.py +0 -0
  36. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/wrapping_algorithm.py +0 -0
  37. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/wrapping_key_list.py +0 -0
  38. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/models/wrapping_purpose.py +0 -0
  39. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/py.typed +0 -0
  40. {stackit_kms-0.0.1 → stackit_kms-0.0.4}/src/stackit/kms/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stackit-kms
3
- Version: 0.0.1
3
+ Version: 0.0.4
4
4
  Summary: STACKIT Key Management Service API
5
5
  Author: STACKIT Developer Tools
6
6
  Author-email: developer-tools@stackit.cloud
@@ -3,7 +3,7 @@ name = "stackit-kms"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "stackit-kms"
6
- version = "v0.0.1"
6
+ version = "v0.0.4"
7
7
  authors = [
8
8
  "STACKIT Developer Tools <developer-tools@stackit.cloud>",
9
9
  ]
@@ -1791,6 +1791,289 @@ class DefaultApi:
1791
1791
  _request_auth=_request_auth,
1792
1792
  )
1793
1793
 
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
+
1794
2077
  @validate_call
1795
2078
  def destroy_version(
1796
2079
  self,
@@ -81,7 +81,7 @@ class ApiClient:
81
81
  self.default_headers[header_name] = header_value
82
82
  self.cookie = cookie
83
83
  # Set default User-Agent.
84
- self.user_agent = "OpenAPI-Generator/1.0.0/python"
84
+ self.user_agent = "stackit-sdk-python/kms"
85
85
 
86
86
  def __enter__(self):
87
87
  return self
@@ -1,5 +1,10 @@
1
1
  # coding: utf-8
2
2
 
3
+ import sys
4
+
5
+ import os
6
+
7
+
3
8
  """
4
9
  STACKIT Key Management Service API
5
10
 
@@ -11,8 +16,6 @@
11
16
  Do not edit the class manually.
12
17
  """ # noqa: E501 docstring might be too long
13
18
 
14
- import os
15
-
16
19
 
17
20
  class HostConfiguration:
18
21
  def __init__(
@@ -29,6 +32,7 @@ class HostConfiguration:
29
32
  "as a function argument instead of being set in the client configuration.\n"
30
33
  "Once all services have migrated, the methods to specify the region in the client configuration "
31
34
  "will be removed.",
35
+ file=sys.stderr,
32
36
  )
33
37
  """Constructor
34
38
  """
@@ -80,8 +80,10 @@ class Key(BaseModel):
80
80
  @field_validator("state")
81
81
  def state_validate_enum(cls, value):
82
82
  """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
+ )
85
87
  return value
86
88
 
87
89
  model_config = ConfigDict(
@@ -69,9 +69,18 @@ class Version(BaseModel):
69
69
  @field_validator("state")
70
70
  def state_validate_enum(cls, value):
71
71
  """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
+ ):
73
82
  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')"
75
84
  )
76
85
  return value
77
86
 
@@ -69,8 +69,10 @@ class WrappingKey(BaseModel):
69
69
  @field_validator("state")
70
70
  def state_validate_enum(cls, value):
71
71
  """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
+ )
74
76
  return value
75
77
 
76
78
  model_config = ConfigDict(
File without changes
File without changes