You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scaleway-async/scaleway_async/key_manager/v1alpha1/api.py
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ async def create_key(
64
64
) ->Key:
65
65
"""
66
66
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**.
68
68
:param unprotected: Default value is `false`.
69
69
:param region: Region to target. If none is passed will use default region from the config.
70
70
:param project_id: ID of the Project containing the key.
@@ -118,7 +118,7 @@ async def get_key(
118
118
) ->Key:
119
119
"""
120
120
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.
122
122
:param key_id: ID of the key to target.
123
123
:param region: Region to target. If none is passed will use default region from the config.
124
124
:return: :class:`Key <Key>`
@@ -156,7 +156,7 @@ async def update_key(
156
156
) ->Key:
157
157
"""
158
158
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.
160
160
:param key_id: ID of the key to update.
161
161
:param region: Region to target. If none is passed will use default region from the config.
162
162
:param name: (Optional) Updated name of the key.
@@ -205,7 +205,7 @@ async def delete_key(
205
205
) ->None:
206
206
"""
207
207
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.
209
209
:param key_id: ID of the key to delete.
210
210
:param region: Region to target. If none is passed will use default region from the config.
211
211
@@ -237,7 +237,7 @@ async def rotate_key(
237
237
) ->Key:
238
238
"""
239
239
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.
241
241
:param key_id: ID of the key to rotate.
242
242
:param region: Region to target. If none is passed will use default region from the config.
243
243
:return: :class:`Key <Key>`
@@ -272,7 +272,7 @@ async def protect_key(
272
272
) ->Key:
273
273
"""
274
274
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.
276
276
:param key_id: ID of the key to apply key protection to.
277
277
:param region: Region to target. If none is passed will use default region from the config.
278
278
:return: :class:`Key <Key>`
@@ -377,7 +377,7 @@ async def disable_key(
377
377
) ->Key:
378
378
"""
379
379
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.
381
381
:param key_id: ID of the key to disable.
382
382
:param region: Region to target. If none is passed will use default region from the config.
383
383
:return: :class:`Key <Key>`
@@ -418,7 +418,7 @@ async def list_keys(
418
418
) ->ListKeysResponse:
419
419
"""
420
420
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`.
422
422
:param region: Region to target. If none is passed will use default region from the config.
423
423
:param organization_id: (Optional) Filter by Organization ID.
424
424
:param project_id: (Optional) Filter by Project ID.
@@ -471,7 +471,7 @@ async def list_keys_all(
471
471
) ->List[Key]:
472
472
"""
473
473
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`.
475
475
:param region: Region to target. If none is passed will use default region from the config.
476
476
:param organization_id: (Optional) Filter by Organization ID.
477
477
:param project_id: (Optional) Filter by Project ID.
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.
518
518
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.
520
520
:param key_id: ID of the key.
521
521
:param without_plaintext: Default value is `false`, meaning that the plaintext is returned.
522
522
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(
564
564
associated_data: Optional[str] =None,
565
565
) ->EncryptResponse:
566
566
"""
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.
569
569
:param key_id: ID of the key to encrypt.
570
570
:param plaintext: Data size must be between 1 and 65535 bytes.
571
571
:param region: Region to target. If none is passed will use default region from the config.
@@ -612,8 +612,8 @@ async def decrypt(
612
612
associated_data: Optional[str] =None,
613
613
) ->DecryptResponse:
614
614
"""
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).
617
617
:param key_id: ID of the key to decrypt.
618
618
:param ciphertext: Data size must be between 1 and 131071 bytes.
619
619
:param region: Region to target. If none is passed will use default region from the config.
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`.
666
666
:param key_material: The key material The key material is a random sequence of bytes used to derive a cryptographic key.
667
667
: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).
Copy file name to clipboardExpand all lines: scaleway-async/scaleway_async/key_manager/v1alpha1/types.py
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -66,12 +66,12 @@ def __str__(self) -> str:
66
66
classKeyRotationPolicy:
67
67
rotation_period: Optional[str]
68
68
"""
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).
70
70
"""
71
71
72
72
next_rotation_at: Optional[datetime]
73
73
"""
74
-
Date at which the key will be rotated next.
74
+
Timestamp indicating the next scheduled rotation.
75
75
"""
76
76
77
77
@@ -99,17 +99,17 @@ class Key:
99
99
100
100
state: KeyState
101
101
"""
102
-
See the `Key.State` enum for a description of values.
102
+
See the `Key.State` enum for a description of possible values.
103
103
"""
104
104
105
105
rotation_count: int
106
106
"""
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.
108
108
"""
109
109
110
110
usage: Optional[KeyUsage]
111
111
"""
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`.
113
113
"""
114
114
115
115
created_at: Optional[datetime]
@@ -144,7 +144,7 @@ class Key:
144
144
145
145
region: ScwRegion
146
146
"""
147
-
Region of the key.
147
+
Region where the key is stored.
148
148
"""
149
149
150
150
description: Optional[str]
@@ -220,7 +220,7 @@ class DataKey:
220
220
221
221
algorithm: DataKeyAlgorithmSymmetricEncryption
222
222
"""
223
-
Symmetric encryption algorithm of the data encryption key.
223
+
Symmetric encryption algorithm of the data encryption key (`AES-256-GCM`).
224
224
"""
225
225
226
226
ciphertext: str
@@ -409,7 +409,7 @@ class GetKeyRequest:
409
409
classImportKeyMaterialRequest:
410
410
key_id: str
411
411
"""
412
-
The key's origin must be 'external'.
412
+
The key's origin must be `external`.
413
413
"""
414
414
415
415
key_material: str
@@ -424,7 +424,7 @@ class ImportKeyMaterialRequest:
424
424
425
425
salt: Optional[str]
426
426
"""
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).
0 commit comments