basaltic-sdk-python 0.3.0__tar.gz → 0.4.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 (51) hide show
  1. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/PKG-INFO +15 -1
  2. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/README.md +14 -0
  3. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/pyproject.toml +1 -1
  4. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/_version.py +1 -1
  5. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/audit.py +23 -2
  6. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/billing.py +38 -17
  7. basaltic_sdk_python-0.4.0/src/basaltic/models/catalog.py +187 -0
  8. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/kms.py +102 -11
  9. basaltic_sdk_python-0.4.0/src/basaltic/services/catalog.py +420 -0
  10. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/kms.py +388 -0
  11. basaltic_sdk_python-0.3.0/src/basaltic/models/catalog.py +0 -35
  12. basaltic_sdk_python-0.3.0/src/basaltic/services/catalog.py +0 -172
  13. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/.gitignore +0 -0
  14. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/LICENSE +0 -0
  15. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/SECURITY.md +0 -0
  16. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/__init__.py +0 -0
  17. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/_client.py +0 -0
  18. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/_common.py +0 -0
  19. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/_transport.py +0 -0
  20. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/auth.py +0 -0
  21. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/client.py +0 -0
  22. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/config.py +0 -0
  23. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/errors.py +0 -0
  24. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/__init__.py +0 -0
  25. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/certificate.py +0 -0
  26. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/compute.py +0 -0
  27. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/dns.py +0 -0
  28. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/iam.py +0 -0
  29. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/loadbalancer.py +0 -0
  30. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/network.py +0 -0
  31. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/quota.py +0 -0
  32. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/secrets.py +0 -0
  33. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/storage.py +0 -0
  34. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/telemetry.py +0 -0
  35. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/models/workspace.py +0 -0
  36. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/py.typed +0 -0
  37. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/response.py +0 -0
  38. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/__init__.py +0 -0
  39. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/audit.py +0 -0
  40. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/billing.py +0 -0
  41. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/certificate.py +0 -0
  42. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/compute.py +0 -0
  43. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/dns.py +0 -0
  44. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/iam.py +0 -0
  45. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/loadbalancer.py +0 -0
  46. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/network.py +0 -0
  47. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/quota.py +0 -0
  48. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/secrets.py +0 -0
  49. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/storage.py +0 -0
  50. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/telemetry.py +0 -0
  51. {basaltic_sdk_python-0.3.0 → basaltic_sdk_python-0.4.0}/src/basaltic/services/workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: basaltic-sdk-python
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Official typed synchronous and asynchronous Python SDK for Basaltic
5
5
  Project-URL: Homepage, https://basaltic.sh
6
6
  Project-URL: Documentation, https://docs.basaltic.sh
@@ -209,3 +209,17 @@ python -m pip install -r requirements-dev.txt -e .
209
209
  python scripts/check.py
210
210
  python scripts/check_package.py
211
211
  ```
212
+
213
+ ## KMS key rotation
214
+
215
+ The KMS client supports automatic rotation policies, on-demand rotation, paginated
216
+ rotation history, public keys by material version, and ciphertext rewrapping.
217
+ Reuse an idempotency key when retrying the same on-demand rotation. A `202`
218
+ response represents accepted work; poll its rotation ID until it completes.
219
+ Persist the material version returned by signing and supply it when verifying
220
+ or retrieving a public key. Verification without a version remains compatible
221
+ with older signatures. Rotation retains existing key identities and historical
222
+ material; it does not rewrite stored ciphertext.
223
+
224
+ See [KMS rotation](https://docs.basaltic.sh/kms/rotation) for the lifecycle,
225
+ permissions, and migration workflow.
@@ -189,3 +189,17 @@ python -m pip install -r requirements-dev.txt -e .
189
189
  python scripts/check.py
190
190
  python scripts/check_package.py
191
191
  ```
192
+
193
+ ## KMS key rotation
194
+
195
+ The KMS client supports automatic rotation policies, on-demand rotation, paginated
196
+ rotation history, public keys by material version, and ciphertext rewrapping.
197
+ Reuse an idempotency key when retrying the same on-demand rotation. A `202`
198
+ response represents accepted work; poll its rotation ID until it completes.
199
+ Persist the material version returned by signing and supply it when verifying
200
+ or retrieving a public key. Verification without a version remains compatible
201
+ with older signatures. Rotation retains existing key identities and historical
202
+ material; it does not rewrite stored ciphertext.
203
+
204
+ See [KMS rotation](https://docs.basaltic.sh/kms/rotation) for the lifecycle,
205
+ permissions, and migration workflow.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "basaltic-sdk-python"
7
- version = "0.3.0"
7
+ version = "0.4.0"
8
8
  description = "Official typed synchronous and asynchronous Python SDK for Basaltic"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,3 +1,3 @@
1
1
  """Basaltic SDK version."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.4.0"
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Literal, NotRequired, TypeAlias, TypedDict
5
+ from typing import Literal, NotRequired, Required, TypeAlias, TypedDict
6
6
 
7
7
  AuditLogResponse = TypedDict(
8
8
  "AuditLogResponse", {"audit_log": "NotRequired[AuditLog]"}, total=False
@@ -23,12 +23,33 @@ AuditLog = TypedDict(
23
23
  "ip_address": "NotRequired[str | None]",
24
24
  "user_agent": "NotRequired[str | None]",
25
25
  "request_id": "NotRequired[str | None]",
26
- "details": "NotRequired[dict[str, object]]",
26
+ "details": "NotRequired[AuditLogDetails]",
27
27
  "error_code": "NotRequired[str | None]",
28
28
  "error_message": "NotRequired[str | None]",
29
29
  },
30
30
  total=False,
31
31
  )
32
+ AuditLogDetails = TypedDict(
33
+ "AuditLogDetails", {"auth_chain": "NotRequired[list[AuditAuthenticationStep]]"}, total=False
34
+ )
35
+ AuditAuthenticationStep = TypedDict(
36
+ "AuditAuthenticationStep",
37
+ {
38
+ "principal_id": "Required[str]",
39
+ "principal_type": "Required[str]",
40
+ "principal_crn": "NotRequired[str]",
41
+ "name": "NotRequired[str]",
42
+ "issuer": "NotRequired[str]",
43
+ "subject": "NotRequired[str]",
44
+ "email": "NotRequired[str]",
45
+ "session_id": "NotRequired[str]",
46
+ "session_crn": "NotRequired[str]",
47
+ "session_name": "NotRequired[str]",
48
+ "grant_type": "NotRequired[str]",
49
+ "issued_at": "NotRequired[str]",
50
+ },
51
+ total=False,
52
+ )
32
53
  GetAuditLogResponse: TypeAlias = "AuditLogResponse"
33
54
  GetAuditLogResource: TypeAlias = "AuditLog"
34
55
  GetAuditLogScope = TypedDict(
@@ -7,24 +7,37 @@ from typing import Literal, NotRequired, Required, TypeAlias, TypedDict
7
7
  BillingProfile = TypedDict(
8
8
  "BillingProfile",
9
9
  {
10
- "customer_type": "NotRequired[Literal['', 'individual', 'company']]",
11
- "company_name": "NotRequired[str]",
12
- "country": "NotRequired[str]",
13
- "tax_id": "NotRequired[str]",
14
- "foreign_tax_id": "NotRequired[str]",
15
- "no_tax_id_reason": "NotRequired[str]",
16
- "email": "NotRequired[str]",
17
- "phone": "NotRequired[str]",
10
+ "customer_type": "Required[Literal['', 'individual', 'company']]",
11
+ "company_name": "Required[str]",
12
+ "tax_id": "Required[str]",
13
+ "tax_id_kind": "Required[str]",
14
+ "no_tax_id_reason": "Required[str]",
15
+ "email": "Required[str]",
16
+ "phone": "Required[str]",
17
+ "country": "Required[ResourceRef]",
18
+ "state": "Required[ResourceRef | Literal[None] | None]",
19
+ "city": "Required[ResourceRef | Literal[None] | None]",
20
+ "address": "Required[BillingAddress]",
21
+ "ready": "Required[bool]",
22
+ "missing_fields": "Required[list[str]]",
23
+ },
24
+ total=False,
25
+ )
26
+ ResourceRef = TypedDict(
27
+ "ResourceRef",
28
+ {"id": "Required[str]", "crn": "Required[str]", "name": "NotRequired[str]"},
29
+ total=False,
30
+ )
31
+ BillingAddress = TypedDict(
32
+ "BillingAddress",
33
+ {
18
34
  "street_name": "NotRequired[str]",
19
35
  "street_number": "NotRequired[str]",
20
36
  "complement": "NotRequired[str]",
21
37
  "neighborhood": "NotRequired[str]",
22
38
  "city": "NotRequired[str]",
23
- "municipality_code": "NotRequired[str]",
24
39
  "state": "NotRequired[str]",
25
40
  "postal_code": "NotRequired[str]",
26
- "ready": "NotRequired[bool]",
27
- "missing_fields": "NotRequired[list[str]]",
28
41
  },
29
42
  total=False,
30
43
  )
@@ -258,27 +271,35 @@ Transaction = TypedDict(
258
271
  )
259
272
  ListTransactionsResponse: TypeAlias = "TransactionListResponse"
260
273
  ListTransactionsItem: TypeAlias = "Transaction"
261
- BillingProfileInput = TypedDict(
262
- "BillingProfileInput",
274
+ BillingProfileUpdateInput = TypedDict(
275
+ "BillingProfileUpdateInput",
263
276
  {
264
277
  "customer_type": "NotRequired[Literal['', 'individual', 'company']]",
265
278
  "company_name": "NotRequired[str]",
266
- "country": "NotRequired[str]",
267
279
  "tax_id": "NotRequired[str]",
268
- "foreign_tax_id": "NotRequired[str]",
280
+ "tax_id_kind": "NotRequired[str]",
269
281
  "no_tax_id_reason": "NotRequired[str]",
270
282
  "email": "NotRequired[str]",
271
283
  "phone": "NotRequired[str]",
284
+ "country": "NotRequired[str]",
285
+ "state": "NotRequired[str]",
286
+ "city": "NotRequired[str]",
287
+ "address": "NotRequired[BillingAddressInput]",
288
+ },
289
+ total=False,
290
+ )
291
+ BillingAddressInput = TypedDict(
292
+ "BillingAddressInput",
293
+ {
272
294
  "street_name": "NotRequired[str]",
273
295
  "street_number": "NotRequired[str]",
274
296
  "complement": "NotRequired[str]",
275
297
  "neighborhood": "NotRequired[str]",
276
298
  "city": "NotRequired[str]",
277
- "municipality_code": "NotRequired[str]",
278
299
  "state": "NotRequired[str]",
279
300
  "postal_code": "NotRequired[str]",
280
301
  },
281
302
  total=False,
282
303
  )
283
- UpdateBillingProfileBody: TypeAlias = "BillingProfileInput"
304
+ UpdateBillingProfileBody: TypeAlias = "BillingProfileUpdateInput"
284
305
  UpdateBillingProfileResponse: TypeAlias = "BillingProfile"
@@ -0,0 +1,187 @@
1
+ """Generated API models. Dictionary keys retain their wire names."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Literal, NotRequired, Required, TypeAlias, TypedDict
6
+
7
+ GetCountryResult = TypedDict(
8
+ "GetCountryResult", {"country": "Required[CountryDetail]"}, total=False
9
+ )
10
+ CountryDetail = TypedDict(
11
+ "CountryDetail",
12
+ {
13
+ "id": "Required[str]",
14
+ "crn": "Required[str]",
15
+ "code": "Required[str]",
16
+ "iso3": "Required[str]",
17
+ "name": "Required[str]",
18
+ "calling_code": "Required[str]",
19
+ "rules": "Required[CountryRules]",
20
+ "postal_lookup": "Required[bool]",
21
+ },
22
+ total=False,
23
+ )
24
+ CountryRules = TypedDict(
25
+ "CountryRules",
26
+ {
27
+ "customer_types": "Required[list[Literal['individual', 'company']]]",
28
+ "name_labels": "Required[dict[str, str]]",
29
+ "tax_ids": "Required[dict[str, list[TaxIDRule]]]",
30
+ "fields": "Required[list[AddressField]]",
31
+ },
32
+ total=False,
33
+ )
34
+ TaxIDRule = TypedDict(
35
+ "TaxIDRule",
36
+ {
37
+ "kind": "Required[str]",
38
+ "label": "Required[str]",
39
+ "mask": "NotRequired[str]",
40
+ "pattern": "NotRequired[str]",
41
+ "validator": "NotRequired[Literal['br_cpf', 'br_cnpj', 'ar_cuit', 'cl_rut']]",
42
+ "example": "NotRequired[str]",
43
+ "required": "Required[bool]",
44
+ },
45
+ total=False,
46
+ )
47
+ AddressField = TypedDict(
48
+ "AddressField",
49
+ {
50
+ "key": "Required[Literal['street_name', 'street_number', 'complement', 'neighborhood', 'city', 'state', 'postal_code']]",
51
+ "label": "Required[str]",
52
+ "required": "Required[bool]",
53
+ "max": "NotRequired[int]",
54
+ "mask": "NotRequired[str]",
55
+ "pattern": "NotRequired[str]",
56
+ "example": "NotRequired[str]",
57
+ "source": "NotRequired[Literal['list', 'free']]",
58
+ "require_metadata": "NotRequired[str]",
59
+ },
60
+ total=False,
61
+ )
62
+ GetCountryResponse: TypeAlias = "GetCountryResult"
63
+ Region = TypedDict(
64
+ "Region",
65
+ {
66
+ "state": "Required[Literal['planned', 'active', 'restricted', 'retiring', 'retired']]",
67
+ "accepting_new_resources": "Required[bool]",
68
+ "crn": "Required[str]",
69
+ "code": "Required[str]",
70
+ "name": "Required[str]",
71
+ "location": "Required[str]",
72
+ "country_code": "Required[str]",
73
+ "available": "Required[bool]",
74
+ "coming_soon": "Required[bool]",
75
+ },
76
+ total=False,
77
+ )
78
+ GetRegionResponse: TypeAlias = "Region"
79
+ GetRegionResource: TypeAlias = "GetRegionResponse"
80
+ GetRegionScope = TypedDict("GetRegionScope", {}, total=False)
81
+ ListCitiesParameters = TypedDict(
82
+ "ListCitiesParameters",
83
+ {
84
+ "state": "NotRequired[str]",
85
+ "country": "NotRequired[str]",
86
+ "q": "NotRequired[str]",
87
+ "limit": "NotRequired[int]",
88
+ },
89
+ total=False,
90
+ )
91
+ ListCitiesQuery: TypeAlias = "ListCitiesParameters"
92
+ ListCitiesResult = TypedDict(
93
+ "ListCitiesResult", {"cities": "Required[list[City]]", "meta": "Required[GeoPage]"}, total=False
94
+ )
95
+ City = TypedDict(
96
+ "City",
97
+ {
98
+ "id": "Required[str]",
99
+ "crn": "Required[str]",
100
+ "name": "Required[str]",
101
+ "country": "Required[ResourceRef]",
102
+ "state": "Required[ResourceRef | Literal[None] | None]",
103
+ },
104
+ total=False,
105
+ )
106
+ ResourceRef = TypedDict(
107
+ "ResourceRef",
108
+ {"id": "Required[str]", "crn": "Required[str]", "name": "NotRequired[str]"},
109
+ total=False,
110
+ )
111
+ GeoPage = TypedDict(
112
+ "GeoPage",
113
+ {"total": "Required[int]", "limit": "Required[int]", "has_more": "Required[bool]"},
114
+ total=False,
115
+ )
116
+ ListCitiesResponse: TypeAlias = "ListCitiesResult"
117
+ ListCitiesItem: TypeAlias = "City"
118
+ ListCountriesResult = TypedDict(
119
+ "ListCountriesResult",
120
+ {"countries": "Required[list[Country]]", "meta": "Required[GeoPage]"},
121
+ total=False,
122
+ )
123
+ Country = TypedDict(
124
+ "Country",
125
+ {
126
+ "id": "Required[str]",
127
+ "crn": "Required[str]",
128
+ "code": "Required[str]",
129
+ "iso3": "Required[str]",
130
+ "name": "Required[str]",
131
+ "calling_code": "Required[str]",
132
+ },
133
+ total=False,
134
+ )
135
+ ListCountriesResponse: TypeAlias = "ListCountriesResult"
136
+ ListCountriesItem: TypeAlias = "Country"
137
+ ListRegionsParameters = TypedDict(
138
+ "ListRegionsParameters", {"name": "NotRequired[str]", "crn": "NotRequired[str]"}, total=False
139
+ )
140
+ ListRegionsQuery: TypeAlias = "ListRegionsParameters"
141
+ ListRegionsResult = TypedDict(
142
+ "ListRegionsResult",
143
+ {"regions": "Required[list[Region]]", "default": "Required[str]"},
144
+ total=False,
145
+ )
146
+ ListRegionsResponse: TypeAlias = "ListRegionsResult"
147
+ ListRegionsItem: TypeAlias = "Region"
148
+ ListStatesParameters = TypedDict("ListStatesParameters", {"country": "Required[str]"}, total=False)
149
+ ListStatesQuery: TypeAlias = "ListStatesParameters"
150
+ ListStatesResult = TypedDict(
151
+ "ListStatesResult",
152
+ {"states": "Required[list[State]]", "meta": "Required[GeoPage]"},
153
+ total=False,
154
+ )
155
+ State = TypedDict(
156
+ "State",
157
+ {
158
+ "id": "Required[str]",
159
+ "crn": "Required[str]",
160
+ "code": "Required[str]",
161
+ "name": "Required[str]",
162
+ "country": "Required[ResourceRef]",
163
+ },
164
+ total=False,
165
+ )
166
+ ListStatesResponse: TypeAlias = "ListStatesResult"
167
+ ListStatesItem: TypeAlias = "State"
168
+ LookupPostalCodeParameters = TypedDict(
169
+ "LookupPostalCodeParameters", {"country": "Required[str]"}, total=False
170
+ )
171
+ LookupPostalCodeQuery: TypeAlias = "LookupPostalCodeParameters"
172
+ LookupPostalCodeResult = TypedDict(
173
+ "LookupPostalCodeResult", {"postal_code": "Required[PostalCode]"}, total=False
174
+ )
175
+ PostalCode = TypedDict(
176
+ "PostalCode",
177
+ {
178
+ "code": "Required[str]",
179
+ "country": "Required[ResourceRef]",
180
+ "state": "Required[ResourceRef | Literal[None] | None]",
181
+ "city": "Required[ResourceRef | Literal[None] | None]",
182
+ "address": "Required[dict[str, str]]",
183
+ "source": "Required[str]",
184
+ },
185
+ total=False,
186
+ )
187
+ LookupPostalCodeResponse: TypeAlias = "LookupPostalCodeResult"
@@ -82,6 +82,79 @@ GetKeyScope = TypedDict(
82
82
  "GetKeyScope", {"limit": "NotRequired[int]", "state": "NotRequired[KeyStateInput]"}, total=False
83
83
  )
84
84
  KeyStateInput: TypeAlias = "Literal['enabled', 'disabled', 'pending_deletion']"
85
+ KeyRotationResponse = TypedDict(
86
+ "KeyRotationResponse", {"rotation": "Required[KeyRotation]"}, total=False
87
+ )
88
+ KeyRotation = TypedDict(
89
+ "KeyRotation",
90
+ {
91
+ "id": "Required[str]",
92
+ "key_id": "Required[str]",
93
+ "trigger": "Required[Literal['on_demand', 'automatic']]",
94
+ "status": "Required[Literal['pending', 'in_progress', 'reconciliation_required', 'succeeded', 'failed']]",
95
+ "previous_version": "Required[int | None]",
96
+ "key_version": "Required[int | None]",
97
+ "requested_at": "Required[str]",
98
+ "started_at": "Required[str | None]",
99
+ "completed_at": "Required[str | None]",
100
+ "error_code": "Required[str | None]",
101
+ },
102
+ total=False,
103
+ )
104
+ GetKeyRotationResponse: TypeAlias = "KeyRotationResponse"
105
+ KeyRotationStatusResponse = TypedDict(
106
+ "KeyRotationStatusResponse", {"rotation": "Required[KeyRotationStatus]"}, total=False
107
+ )
108
+ KeyRotationStatus = TypedDict(
109
+ "KeyRotationStatus",
110
+ {
111
+ "enabled": "Required[bool]",
112
+ "rotation_period_days": "Required[int]",
113
+ "next_rotation_at": "Required[str | None]",
114
+ "current_version": "Required[int]",
115
+ },
116
+ total=False,
117
+ )
118
+ GetKeyRotationStatusResponse: TypeAlias = "KeyRotationStatusResponse"
119
+ GetPublicKeyParameters = TypedDict(
120
+ "GetPublicKeyParameters", {"key_version": "NotRequired[int]"}, total=False
121
+ )
122
+ GetPublicKeyQuery: TypeAlias = "GetPublicKeyParameters"
123
+ PublicKeyResponse = TypedDict(
124
+ "PublicKeyResponse",
125
+ {
126
+ "key_crn": "Required[str]",
127
+ "key_version": "Required[int]",
128
+ "key_spec": "Required[KeySpec]",
129
+ "key_usage": "Required[KeyUsage]",
130
+ "public_key": "Required[str]",
131
+ },
132
+ total=False,
133
+ )
134
+ GetPublicKeyResponse: TypeAlias = "PublicKeyResponse"
135
+ ListKeyRotationsParameters = TypedDict(
136
+ "ListKeyRotationsParameters",
137
+ {"limit": "NotRequired[int]", "marker": "NotRequired[str]"},
138
+ total=False,
139
+ )
140
+ ListKeyRotationsQuery: TypeAlias = "ListKeyRotationsParameters"
141
+ KeyRotationListResponse = TypedDict(
142
+ "KeyRotationListResponse",
143
+ {"rotations": "Required[list[KeyRotation]]", "meta": "Required[PaginationMeta]"},
144
+ total=False,
145
+ )
146
+ PaginationMeta = TypedDict(
147
+ "PaginationMeta",
148
+ {
149
+ "total": "NotRequired[int]",
150
+ "limit": "NotRequired[int]",
151
+ "marker": "NotRequired[str]",
152
+ "has_more": "NotRequired[bool]",
153
+ },
154
+ total=False,
155
+ )
156
+ ListKeyRotationsResponse: TypeAlias = "KeyRotationListResponse"
157
+ ListKeyRotationsItem: TypeAlias = "KeyRotation"
85
158
  ListKeysParameters = TypedDict(
86
159
  "ListKeysParameters",
87
160
  {
@@ -99,23 +172,36 @@ KeyListResponse = TypedDict(
99
172
  {"keys": "NotRequired[list[Key]]", "meta": "NotRequired[PaginationMeta]"},
100
173
  total=False,
101
174
  )
102
- PaginationMeta = TypedDict(
103
- "PaginationMeta",
104
- {
105
- "total": "NotRequired[int]",
106
- "limit": "NotRequired[int]",
107
- "marker": "NotRequired[str]",
108
- "has_more": "NotRequired[bool]",
109
- },
110
- total=False,
111
- )
112
175
  ListKeysResponse: TypeAlias = "KeyListResponse"
113
176
  ListKeysItem: TypeAlias = "Key"
177
+ RewrapRequestInput = TypedDict("RewrapRequestInput", {"ciphertext": "Required[str]"}, total=False)
178
+ RewrapBody: TypeAlias = "RewrapRequestInput"
179
+ RewrapResponse: TypeAlias = "EncryptResponse2"
180
+ RotateKeyOnDemandResponse: TypeAlias = "KeyRotationResponse"
114
181
  ScheduleKeyDeletionRequestInput = TypedDict(
115
182
  "ScheduleKeyDeletionRequestInput", {"recovery_window_days": "NotRequired[int]"}, total=False
116
183
  )
117
184
  ScheduleKeyDeletionBody: TypeAlias = "ScheduleKeyDeletionRequestInput"
118
185
  ScheduleKeyDeletionResponse: TypeAlias = "KeyResponse"
186
+ SetKeyRotationRequestInput = TypedDict(
187
+ "SetKeyRotationRequestInput",
188
+ {"enabled": "Required[bool]", "rotation_period_days": "NotRequired[int]"},
189
+ total=False,
190
+ )
191
+ SetKeyRotationBody: TypeAlias = "SetKeyRotationRequestInput"
192
+ KeyRotationPolicyResponse = TypedDict(
193
+ "KeyRotationPolicyResponse", {"rotation": "Required[KeyRotationPolicy]"}, total=False
194
+ )
195
+ KeyRotationPolicy = TypedDict(
196
+ "KeyRotationPolicy",
197
+ {
198
+ "enabled": "Required[bool]",
199
+ "rotation_period_days": "Required[int]",
200
+ "next_rotation_at": "Required[str | None]",
201
+ },
202
+ total=False,
203
+ )
204
+ SetKeyRotationResponse: TypeAlias = "KeyRotationPolicyResponse"
119
205
  SignRequestInput = TypedDict(
120
206
  "SignRequestInput",
121
207
  {"message": "Required[str]", "signing_algorithm": "NotRequired[SigningAlgorithmInput]"},
@@ -127,7 +213,11 @@ SigningAlgorithmInput: TypeAlias = (
127
213
  SignBody: TypeAlias = "SignRequestInput"
128
214
  SignResponse2 = TypedDict(
129
215
  "SignResponse2",
130
- {"signature": "NotRequired[str]", "signing_algorithm": "NotRequired[SigningAlgorithm]"},
216
+ {
217
+ "key_version": "NotRequired[int]",
218
+ "signature": "NotRequired[str]",
219
+ "signing_algorithm": "NotRequired[SigningAlgorithm]",
220
+ },
131
221
  total=False,
132
222
  )
133
223
  SigningAlgorithm: TypeAlias = (
@@ -144,6 +234,7 @@ UpdateKeyResponse: TypeAlias = "KeyResponse"
144
234
  VerifyRequestInput = TypedDict(
145
235
  "VerifyRequestInput",
146
236
  {
237
+ "key_version": "NotRequired[int]",
147
238
  "message": "Required[str]",
148
239
  "signature": "Required[str]",
149
240
  "signing_algorithm": "NotRequired[SigningAlgorithmInput]",