Skip to content

Commit cf9c0e9

Browse files
committed
feat: update generated APIs
1 parent 7b4a738 commit cf9c0e9

File tree

4 files changed

+56
-56
lines changed

4 files changed

+56
-56
lines changed

scaleway-async/scaleway_async/key_manager/v1alpha1/api.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def create_key(
6464
) -> Key:
6565
"""
6666
Create a key.
67-
Create a key in a given region specified by the `region` parameter. Keys only support symmetric encryption. You can use keys to encrypt or decrypt arbitrary payloads, or to generate data encryption keys that can be used without being stored in Key Manager.
67+
Create a key in a given region specified by the `region` parameter. Keys only support symmetric encryption. You can use keys to encrypt or decrypt arbitrary payloads, or to generate data encryption keys. **Data encryption keys are not stored in Key Manager**.
6868
:param unprotected: Default value is `false`.
6969
:param region: Region to target. If none is passed will use default region from the config.
7070
:param project_id: ID of the Project containing the key.
@@ -118,7 +118,7 @@ async def get_key(
118118
) -> Key:
119119
"""
120120
Get key metadata.
121-
Retrieve the metadata of a key specified by the `region` and `key_id` parameters.
121+
Retrieve metadata for a specified key using the `region` and `key_id` parameters.
122122
:param key_id: ID of the key to target.
123123
:param region: Region to target. If none is passed will use default region from the config.
124124
:return: :class:`Key <Key>`
@@ -156,7 +156,7 @@ async def update_key(
156156
) -> Key:
157157
"""
158158
Update a key.
159-
Update a key's metadata (name, description and tags), specified by the `key_id` and `region` parameters.
159+
Modify a key's metadata including name, description and tags, specified by the `key_id` and `region` parameters.
160160
:param key_id: ID of the key to update.
161161
:param region: Region to target. If none is passed will use default region from the config.
162162
:param name: (Optional) Updated name of the key.
@@ -205,7 +205,7 @@ async def delete_key(
205205
) -> None:
206206
"""
207207
Delete a key.
208-
Delete an existing key specified by the `region` and `key_id` parameters. Deleting a key is permanent and cannot be undone. All data encrypted using this key, including data encryption keys, will become unusable.
208+
Permanently delete a key specified by the `region` and `key_id` parameters. This action is irreversible. Any data encrypted with this key, including data encryption keys, will no longer be decipherable.
209209
:param key_id: ID of the key to delete.
210210
:param region: Region to target. If none is passed will use default region from the config.
211211
@@ -237,7 +237,7 @@ async def rotate_key(
237237
) -> Key:
238238
"""
239239
Rotate a key.
240-
Generate a new version of an existing key with randomly generated key material. Rotated keys can still be used to decrypt previously encrypted data. The key's new material will be used for subsequent encryption operations and data key generation.
240+
Generate a new version of an existing key with new key material. Previous key versions remain usable to decrypt previously encrypted data, but the key's new version will be used for subsequent encryption operations and data key generation.
241241
:param key_id: ID of the key to rotate.
242242
:param region: Region to target. If none is passed will use default region from the config.
243243
:return: :class:`Key <Key>`
@@ -272,7 +272,7 @@ async def protect_key(
272272
) -> Key:
273273
"""
274274
Apply key protection.
275-
Apply key protection to a given key specified by the `key_id` parameter. Applying key protection means that your key can be used and modified, but it cannot be deleted.
275+
Apply protection to a given key specified by the `key_id` parameter. Applying key protection means that your key can be used and modified, but it cannot be deleted.
276276
:param key_id: ID of the key to apply key protection to.
277277
:param region: Region to target. If none is passed will use default region from the config.
278278
:return: :class:`Key <Key>`
@@ -377,7 +377,7 @@ async def disable_key(
377377
) -> Key:
378378
"""
379379
Disable key.
380-
Disable a given key to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the `region` and `key_id` parameters.
380+
Disable a given key, preventing it to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the `region` and `key_id` parameters.
381381
:param key_id: ID of the key to disable.
382382
:param region: Region to target. If none is passed will use default region from the config.
383383
:return: :class:`Key <Key>`
@@ -418,7 +418,7 @@ async def list_keys(
418418
) -> ListKeysResponse:
419419
"""
420420
List keys.
421-
Retrieve the list of keys created within all Projects of an Organization or in a given Project. You must specify the `region`, and either the `organization_id` or the `project_id`.
421+
Retrieve a list of keys across all Projects in an Organization or within a specific Project. You must specify the `region`, and either the `organization_id` or the `project_id`.
422422
:param region: Region to target. If none is passed will use default region from the config.
423423
:param organization_id: (Optional) Filter by Organization ID.
424424
:param project_id: (Optional) Filter by Project ID.
@@ -471,7 +471,7 @@ async def list_keys_all(
471471
) -> List[Key]:
472472
"""
473473
List keys.
474-
Retrieve the list of keys created within all Projects of an Organization or in a given Project. You must specify the `region`, and either the `organization_id` or the `project_id`.
474+
Retrieve a list of keys across all Projects in an Organization or within a specific Project. You must specify the `region`, and either the `organization_id` or the `project_id`.
475475
:param region: Region to target. If none is passed will use default region from the config.
476476
:param organization_id: (Optional) Filter by Organization ID.
477477
:param project_id: (Optional) Filter by Project ID.
@@ -513,10 +513,10 @@ async def generate_data_key(
513513
algorithm: Optional[DataKeyAlgorithmSymmetricEncryption] = None,
514514
) -> DataKey:
515515
"""
516-
Generate a data encryption key.
517-
Generate a new data encryption key to use for cryptographic operations outside of Key Manager. Note that Key Manager does not store your data encryption key. The data encryption key is encrypted and must be decrypted using the key you have created in Key Manager. The data encryption key's plaintext is returned in the response object, for immediate usage.
516+
Create a data encryption key.
517+
Create a new data encryption key for cryptographic operations outside of Key Manager. The data encryption key is encrypted and must be decrypted using the key you have created in Key Manager.
518518
519-
Always store the data encryption key's ciphertext, rather than its plaintext, which must not be stored. To retrieve your key's plaintext, call the Decrypt endpoint with your key's ID and ciphertext.
519+
The data encryption key is returned in plaintext and ciphertext but it should only be stored in its encrypted form (ciphertext). Key Manager does not store your data encryption key. To retrieve your key's plaintext, use the `Decrypt` method with your key's ID and ciphertext.
520520
:param key_id: ID of the key.
521521
:param without_plaintext: Default value is `false`, meaning that the plaintext is returned.
522522
Set it to `true` if you do not wish the plaintext to be returned in the response object.
@@ -564,8 +564,8 @@ async def encrypt(
564564
associated_data: Optional[str] = None,
565565
) -> EncryptResponse:
566566
"""
567-
Encrypt data.
568-
Encrypt data using an existing key, specified by the `key_id` parameter. Only keys with a usage set to **symmetric_encryption** are supported by this method. The maximum payload size that can be encrypted is 64KB of plaintext.
567+
Encrypt a payload.
568+
Encrypt a payload using an existing key, specified by the `key_id` parameter. Only keys with a usage set to `symmetric_encryption` are supported by this method. The maximum payload size that can be encrypted is 64 KB of plaintext.
569569
:param key_id: ID of the key to encrypt.
570570
:param plaintext: Data size must be between 1 and 65535 bytes.
571571
:param region: Region to target. If none is passed will use default region from the config.
@@ -612,8 +612,8 @@ async def decrypt(
612612
associated_data: Optional[str] = None,
613613
) -> DecryptResponse:
614614
"""
615-
Decrypt data.
616-
Decrypt data using an existing key, specified by the `key_id` parameter. The maximum payload size that can be decrypted is the result of the encryption of 64KB of data (around 131KB).
615+
Decrypt an encrypted payload.
616+
Decrypt an encrypted payload using an existing key, specified by the `key_id` parameter. The maximum payload size that can be decrypted is equivalent to the encrypted output of 64 KB of data (around 131 KB).
617617
:param key_id: ID of the key to decrypt.
618618
:param ciphertext: Data size must be between 1 and 131071 bytes.
619619
:param region: Region to target. If none is passed will use default region from the config.
@@ -661,11 +661,11 @@ async def import_key_material(
661661
) -> Key:
662662
"""
663663
Import key material.
664-
Import key material to use to derive a new cryptographic key. The key's origin must be `external`.
665-
:param key_id: The key's origin must be 'external'.
664+
Import externally generated key material into Key Manager to derive a new cryptographic key. The key's origin must be `external`.
665+
:param key_id: The key's origin must be `external`.
666666
:param key_material: The key material The key material is a random sequence of bytes used to derive a cryptographic key.
667667
:param region: Region to target. If none is passed will use default region from the config.
668-
:param salt: A salt can be used to improve the quality of randomness when the key material is generated from a low entropy source.
668+
:param salt: A salt is random data added to key material to ensure unique derived keys, even if the input is similar. It helps strengthen security when the key material has low randomness (low entropy).
669669
:return: :class:`Key <Key>`
670670
671671
Usage:

scaleway-async/scaleway_async/key_manager/v1alpha1/types.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ def __str__(self) -> str:
6666
class KeyRotationPolicy:
6767
rotation_period: Optional[str]
6868
"""
69-
Duration between two key rotations. The minimum duration is 24 hours and the maximum duration is 876000 hours (1 year).
69+
Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
7070
"""
7171

7272
next_rotation_at: Optional[datetime]
7373
"""
74-
Date at which the key will be rotated next.
74+
Timestamp indicating the next scheduled rotation.
7575
"""
7676

7777

@@ -99,17 +99,17 @@ class Key:
9999

100100
state: KeyState
101101
"""
102-
See the `Key.State` enum for a description of values.
102+
See the `Key.State` enum for a description of possible values.
103103
"""
104104

105105
rotation_count: int
106106
"""
107-
The rotation count tracks the amount of times that the key was rotated.
107+
The rotation count tracks the number of times the key has been rotated.
108108
"""
109109

110110
usage: Optional[KeyUsage]
111111
"""
112-
Keys with a usage set to `symmetric_encryption` are used to encrypt and decrypt data. The only key algorithm currently supported by Key Manager is AES-256-GCM.
112+
Keys with a usage set to `symmetric_encryption` can encrypt and decrypt data using the `AES-256-GCM` key algorithm. Key Manager currently only supports `AES-256-GCM`.
113113
"""
114114

115115
created_at: Optional[datetime]
@@ -144,7 +144,7 @@ class Key:
144144

145145
region: ScwRegion
146146
"""
147-
Region of the key.
147+
Region where the key is stored.
148148
"""
149149

150150
description: Optional[str]
@@ -220,7 +220,7 @@ class DataKey:
220220

221221
algorithm: DataKeyAlgorithmSymmetricEncryption
222222
"""
223-
Symmetric encryption algorithm of the data encryption key.
223+
Symmetric encryption algorithm of the data encryption key (`AES-256-GCM`).
224224
"""
225225

226226
ciphertext: str
@@ -409,7 +409,7 @@ class GetKeyRequest:
409409
class ImportKeyMaterialRequest:
410410
key_id: str
411411
"""
412-
The key's origin must be 'external'.
412+
The key's origin must be `external`.
413413
"""
414414

415415
key_material: str
@@ -424,7 +424,7 @@ class ImportKeyMaterialRequest:
424424

425425
salt: Optional[str]
426426
"""
427-
A salt can be used to improve the quality of randomness when the key material is generated from a low entropy source.
427+
A salt is random data added to key material to ensure unique derived keys, even if the input is similar. It helps strengthen security when the key material has low randomness (low entropy).
428428
"""
429429

430430

0 commit comments

Comments
 (0)