stackit-kms 0.4.1__tar.gz → 0.6.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.
Files changed (42) hide show
  1. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/PKG-INFO +1 -1
  2. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/pyproject.toml +1 -1
  3. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/create_key_payload.py +11 -1
  4. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/create_key_ring_payload.py +11 -2
  5. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/create_wrapping_key_payload.py +11 -2
  6. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/key.py +4 -4
  7. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/key_ring.py +2 -2
  8. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/version.py +1 -1
  9. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/wrapping_key.py +9 -6
  10. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/LICENSE.md +0 -0
  11. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/NOTICE.txt +0 -0
  12. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/README.md +0 -0
  13. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/__init__.py +0 -0
  14. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/api/__init__.py +0 -0
  15. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/api/default_api.py +0 -0
  16. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/api_client.py +0 -0
  17. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/api_response.py +0 -0
  18. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/configuration.py +0 -0
  19. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/exceptions.py +0 -0
  20. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/__init__.py +0 -0
  21. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/access_scope.py +0 -0
  22. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/algorithm.py +0 -0
  23. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/decrypt_payload.py +0 -0
  24. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/decrypted_data.py +0 -0
  25. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/encrypt_payload.py +0 -0
  26. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/encrypted_data.py +0 -0
  27. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/http_error.py +0 -0
  28. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/import_key_payload.py +0 -0
  29. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/key_list.py +0 -0
  30. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/key_ring_list.py +0 -0
  31. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/protection.py +0 -0
  32. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/purpose.py +0 -0
  33. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/sign_payload.py +0 -0
  34. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/signed_data.py +0 -0
  35. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/verified_data.py +0 -0
  36. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/verify_payload.py +0 -0
  37. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/version_list.py +0 -0
  38. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/wrapping_algorithm.py +0 -0
  39. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/wrapping_key_list.py +0 -0
  40. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/models/wrapping_purpose.py +0 -0
  41. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/py.typed +0 -0
  42. {stackit_kms-0.4.1 → stackit_kms-0.6.0}/src/stackit/kms/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-kms
3
- Version: 0.4.1
3
+ Version: 0.6.0
4
4
  Summary: STACKIT Key Management Service API
5
5
  License-File: LICENSE.md
6
6
  License-File: NOTICE.txt
@@ -3,7 +3,7 @@ name = "stackit-kms"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "stackit-kms"
6
- version = "v0.4.1"
6
+ version = "v0.6.0"
7
7
  authors = [
8
8
  "STACKIT Developer Tools <developer-tools@stackit.cloud>",
9
9
  ]
@@ -15,6 +15,7 @@ from __future__ import annotations
15
15
 
16
16
  import json
17
17
  import pprint
18
+ import re # noqa: F401
18
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
20
 
20
21
  from pydantic import (
@@ -23,6 +24,7 @@ from pydantic import (
23
24
  Field,
24
25
  StrictBool,
25
26
  StrictStr,
27
+ field_validator,
26
28
  )
27
29
  from typing_extensions import Annotated, Self
28
30
 
@@ -43,7 +45,8 @@ class CreateKeyPayload(BaseModel):
43
45
  default=None, description="A user chosen description to distinguish multiple keys."
44
46
  )
45
47
  display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
46
- description="The display name to distinguish multiple keys.", alias="displayName"
48
+ description="The display name to distinguish multiple keys. Valid characters: letters, digits, underscores and hyphens.",
49
+ alias="displayName",
47
50
  )
48
51
  import_only: Optional[StrictBool] = Field(
49
52
  default=False, description="States whether versions can be created or only imported.", alias="importOnly"
@@ -60,6 +63,13 @@ class CreateKeyPayload(BaseModel):
60
63
  "purpose",
61
64
  ]
62
65
 
66
+ @field_validator("display_name")
67
+ def display_name_validate_regular_expression(cls, value):
68
+ """Validates the regular expression"""
69
+ if not re.match(r"^[a-zA-Z0-9_-]+$", value):
70
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9_-]+$/")
71
+ return value
72
+
63
73
  model_config = ConfigDict(
64
74
  populate_by_name=True,
65
75
  validate_assignment=True,
@@ -15,9 +15,10 @@ from __future__ import annotations
15
15
 
16
16
  import json
17
17
  import pprint
18
+ import re # noqa: F401
18
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
20
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
 
@@ -30,10 +31,18 @@ class CreateKeyRingPayload(BaseModel):
30
31
  default=None, description="A user chosen description to distinguish multiple key rings."
31
32
  )
32
33
  display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
33
- description="The display name to distinguish multiple key rings.", alias="displayName"
34
+ description="The display name to distinguish multiple key rings. Valid characters: letters, digits, underscores and hyphens.",
35
+ alias="displayName",
34
36
  )
35
37
  __properties: ClassVar[List[str]] = ["description", "displayName"]
36
38
 
39
+ @field_validator("display_name")
40
+ def display_name_validate_regular_expression(cls, value):
41
+ """Validates the regular expression"""
42
+ if not re.match(r"^[a-zA-Z0-9_-]+$", value):
43
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9_-]+$/")
44
+ return value
45
+
37
46
  model_config = ConfigDict(
38
47
  populate_by_name=True,
39
48
  validate_assignment=True,
@@ -15,9 +15,10 @@ from __future__ import annotations
15
15
 
16
16
  import json
17
17
  import pprint
18
+ import re # noqa: F401
18
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
20
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.kms.models.access_scope import AccessScope
@@ -37,7 +38,8 @@ class CreateWrappingKeyPayload(BaseModel):
37
38
  default=None, description="A user chosen description to distinguish multiple wrapping keys."
38
39
  )
39
40
  display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
40
- description="The display name to distinguish multiple wrapping keys.", alias="displayName"
41
+ description="The display name to distinguish multiple wrapping keys. Valid characters: letters, digits, underscores and hyphens.",
42
+ alias="displayName",
41
43
  )
42
44
  protection: Protection
43
45
  purpose: WrappingPurpose
@@ -50,6 +52,13 @@ class CreateWrappingKeyPayload(BaseModel):
50
52
  "purpose",
51
53
  ]
52
54
 
55
+ @field_validator("display_name")
56
+ def display_name_validate_regular_expression(cls, value):
57
+ """Validates the regular expression"""
58
+ if not re.match(r"^[a-zA-Z0-9_-]+$", value):
59
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9_-]+$/")
60
+ return value
61
+
53
62
  model_config = ConfigDict(
54
63
  populate_by_name=True,
55
64
  validate_assignment=True,
@@ -50,15 +50,15 @@ class Key(BaseModel):
50
50
  description="This date is set when a key is pending deletion and refers to the scheduled date of deletion",
51
51
  alias="deletionDate",
52
52
  )
53
- description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
54
- default=None, description="A user chosen description to distinguish multiple keys."
53
+ description: Annotated[str, Field(strict=True, max_length=256)] = Field(
54
+ description="A user chosen description to distinguish multiple keys."
55
55
  )
56
56
  display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
57
57
  description="The display name to distinguish multiple keys.", alias="displayName"
58
58
  )
59
59
  id: StrictStr = Field(description="A auto generated unique id which identifies the keys.")
60
- import_only: Optional[StrictBool] = Field(
61
- default=False, description="States whether versions can be created or only imported.", alias="importOnly"
60
+ import_only: StrictBool = Field(
61
+ description="States whether versions can be created or only imported.", alias="importOnly"
62
62
  )
63
63
  key_ring_id: StrictStr = Field(
64
64
  description="The unique id of the key ring this key is assigned to.", alias="keyRingId"
@@ -31,8 +31,8 @@ class KeyRing(BaseModel):
31
31
  created_at: datetime = Field(
32
32
  description="The date and time the creation of the key ring was triggered.", alias="createdAt"
33
33
  )
34
- description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
35
- default=None, description="A user chosen description to distinguish multiple key rings."
34
+ description: Annotated[str, Field(strict=True, max_length=256)] = Field(
35
+ description="A user chosen description to distinguish multiple key rings."
36
36
  )
37
37
  display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
38
38
  description="The display name to distinguish multiple key rings.", alias="displayName"
@@ -44,7 +44,7 @@ class Version(BaseModel):
44
44
  description="The scheduled date when a version's key material will be erased completely from the backend",
45
45
  alias="destroyDate",
46
46
  )
47
- disabled: Optional[StrictBool] = Field(default=False, description="States whether versions is enabled or disabled.")
47
+ disabled: StrictBool = Field(description="States whether versions is enabled or disabled.")
48
48
  key_id: StrictStr = Field(description="The unique id of the key this version is assigned to.", alias="keyId")
49
49
  key_ring_id: StrictStr = Field(
50
50
  description="The unique id of the key ring the key of this version is assigned to.", alias="keyRingId"
@@ -38,8 +38,8 @@ class WrappingKey(BaseModel):
38
38
  created_at: datetime = Field(
39
39
  description="The date and time the creation of the wrapping key was triggered.", alias="createdAt"
40
40
  )
41
- description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
42
- default=None, description="A user chosen description to distinguish multiple wrapping keys."
41
+ description: Annotated[str, Field(strict=True, max_length=256)] = Field(
42
+ description="A user chosen description to distinguish multiple wrapping keys."
43
43
  )
44
44
  display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
45
45
  description="The display name to distinguish multiple wrapping keys.", alias="displayName"
@@ -50,9 +50,7 @@ class WrappingKey(BaseModel):
50
50
  description="The unique id of the key ring this wrapping key is assigned to.", alias="keyRingId"
51
51
  )
52
52
  protection: Protection
53
- public_key: Optional[StrictStr] = Field(
54
- default=None, description="The public key of the wrapping key.", alias="publicKey"
55
- )
53
+ public_key: StrictStr = Field(description="The public key of the wrapping key.", alias="publicKey")
56
54
  purpose: WrappingPurpose
57
55
  state: StrictStr = Field(description="The current state of the wrapping key.")
58
56
  __properties: ClassVar[List[str]] = [
@@ -134,8 +132,13 @@ class WrappingKey(BaseModel):
134
132
  * `None` is only added to the output dict for nullable fields that
135
133
  were set at model initialization. Other fields with value `None`
136
134
  are ignored.
135
+ * OpenAPI `readOnly` fields are excluded.
137
136
  """
138
- excluded_fields: Set[str] = set([])
137
+ excluded_fields: Set[str] = set(
138
+ [
139
+ "public_key",
140
+ ]
141
+ )
139
142
 
140
143
  _dict = self.model_dump(
141
144
  by_alias=True,
File without changes
File without changes
File without changes