@scaleway/sdk-key-manager 2.16.1 → 2.18.0
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.
- package/LICENSE +191 -0
- package/dist/_virtual/_rolldown/runtime.js +11 -6
- package/dist/index.gen.d.ts +2 -5
- package/dist/index.gen.js +2 -1
- package/dist/metadata.gen.d.ts +7 -5
- package/dist/metadata.gen.js +2 -1
- package/dist/v1alpha1/api.gen.d.ts +163 -161
- package/dist/v1alpha1/api.gen.js +6 -4
- package/dist/v1alpha1/constants.gen.d.ts +5 -1
- package/dist/v1alpha1/constants.gen.js +10 -2
- package/dist/v1alpha1/index.gen.d.ts +10 -5
- package/dist/v1alpha1/index.gen.js +5 -2
- package/dist/v1alpha1/marshalling.gen.d.ts +4 -2
- package/dist/v1alpha1/marshalling.gen.js +5 -1
- package/dist/v1alpha1/metadata.gen.d.ts +64 -62
- package/dist/v1alpha1/metadata.gen.js +2 -1
- package/dist/v1alpha1/types.gen.d.ts +532 -517
- package/dist/v1alpha1/validation-rules.gen.d.ts +8 -3
- package/dist/v1alpha1/validation-rules.gen.js +3 -1
- package/package.json +5 -7
- package/dist/.vite/license.md +0 -3
- package/dist/v1alpha1/types.gen.js +0 -0
|
@@ -1,609 +1,624 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Region } from "@scaleway/sdk-client";
|
|
2
|
+
//#region src/v1alpha1/types.gen.d.ts
|
|
2
3
|
export type DataKeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
|
|
3
4
|
export type KeyAlgorithmAsymmetricEncryption = 'unknown_asymmetric_encryption' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
|
|
4
5
|
export type KeyAlgorithmAsymmetricSigning = 'unknown_asymmetric_signing' | 'ec_p256_sha256' | 'ec_p384_sha384' | 'rsa_pss_2048_sha256' | 'rsa_pss_3072_sha256' | 'rsa_pss_4096_sha256' | 'rsa_pkcs1_2048_sha256' | 'rsa_pkcs1_3072_sha256' | 'rsa_pkcs1_4096_sha256' | 'ml_dsa_44' | 'ml_dsa_65' | 'ml_dsa_87' | 'ec_secp256k1_sha256';
|
|
5
6
|
export type KeyAlgorithmKeyEncapsulation = 'unknown_key_encapsulation' | 'ml_kem_768' | 'ml_kem_1024';
|
|
6
7
|
export type KeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
|
|
7
8
|
export type KeyOrigin = 'unknown_origin' | 'scaleway_kms' | 'external';
|
|
9
|
+
export type KeyProtectionLevel = 'unknown_protection_level' | 'software' | 'hsm';
|
|
8
10
|
export type KeyRotationStatus = 'unknown_status' | 'enabled' | 'deleted';
|
|
9
11
|
export type KeyState = 'unknown_state' | 'enabled' | 'disabled' | 'pending_key_material' | 'scheduled_for_deletion';
|
|
10
12
|
export type ListAlgorithmsRequestUsage = 'unknown_usage' | 'symmetric_encryption' | 'asymmetric_encryption' | 'asymmetric_signing' | 'key_encapsulation';
|
|
11
13
|
export type ListKeyRotationsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
12
14
|
export type ListKeysRequestOrderBy = 'name_asc' | 'name_desc' | 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
|
|
13
|
-
export type ListKeysRequestUsage = 'unknown_usage' | 'symmetric_encryption' | 'asymmetric_encryption' | 'asymmetric_signing';
|
|
15
|
+
export type ListKeysRequestUsage = 'unknown_usage' | 'symmetric_encryption' | 'asymmetric_encryption' | 'asymmetric_signing' | 'key_encapsulation';
|
|
14
16
|
export interface KeyRotationPolicy {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
|
|
19
|
+
*/
|
|
20
|
+
rotationPeriod?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp indicating the next scheduled rotation.
|
|
23
|
+
*/
|
|
24
|
+
nextRotationAt?: Date;
|
|
23
25
|
}
|
|
24
26
|
export interface KeyUsage {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
/**
|
|
28
|
+
* See the `Key.Algorithm.SymmetricEncryption` enum for a description of values.
|
|
29
|
+
*
|
|
30
|
+
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
31
|
+
*/
|
|
32
|
+
symmetricEncryption?: KeyAlgorithmSymmetricEncryption;
|
|
33
|
+
/**
|
|
34
|
+
* See the `Key.Algorithm.AsymmetricEncryption` enum for a description of values.
|
|
35
|
+
*
|
|
36
|
+
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
37
|
+
*/
|
|
38
|
+
asymmetricEncryption?: KeyAlgorithmAsymmetricEncryption;
|
|
39
|
+
/**
|
|
40
|
+
* See the `Key.Algorithm.AsymmetricSigning` enum for a description of values.
|
|
41
|
+
*
|
|
42
|
+
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
43
|
+
*/
|
|
44
|
+
asymmetricSigning?: KeyAlgorithmAsymmetricSigning;
|
|
45
|
+
/**
|
|
46
|
+
* See the `Key.Algorithm.KeyEncapulation` enum for a description of values.
|
|
47
|
+
*
|
|
48
|
+
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
49
|
+
*/
|
|
50
|
+
keyEncapsulation?: KeyAlgorithmKeyEncapsulation;
|
|
49
51
|
}
|
|
50
52
|
export interface ListAlgorithmsResponseAlgorithm {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
usage: string;
|
|
54
|
+
name: string;
|
|
55
|
+
recommended: boolean;
|
|
54
56
|
}
|
|
55
57
|
export interface KeyRotation {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
/**
|
|
59
|
+
* ID of the associated key.
|
|
60
|
+
*/
|
|
61
|
+
keyId: string;
|
|
62
|
+
/**
|
|
63
|
+
* The rotation index tracks the specific version of the key material.
|
|
64
|
+
*/
|
|
65
|
+
index: number;
|
|
66
|
+
/**
|
|
67
|
+
* See the `KeyRotation.Status` enum for a description of possible values.
|
|
68
|
+
*/
|
|
69
|
+
status: KeyRotationStatus;
|
|
70
|
+
/**
|
|
71
|
+
* Returns `true` if the key was rotated manually, or `false` if it was rotated automatically by a rotation policy.
|
|
72
|
+
*/
|
|
73
|
+
manuallyRotated: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Key rotation creation date.
|
|
76
|
+
*/
|
|
77
|
+
createdAt?: Date;
|
|
78
|
+
/**
|
|
79
|
+
* Key rotation last modification date.
|
|
80
|
+
*/
|
|
81
|
+
updatedAt?: Date;
|
|
82
|
+
/**
|
|
83
|
+
* Key rotation deletion date.
|
|
84
|
+
*/
|
|
85
|
+
deletedAt?: Date;
|
|
84
86
|
}
|
|
85
87
|
export interface Key {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
88
|
+
/**
|
|
89
|
+
* ID of the key.
|
|
90
|
+
*/
|
|
91
|
+
id: string;
|
|
92
|
+
/**
|
|
93
|
+
* The SRN of the key.
|
|
94
|
+
*/
|
|
95
|
+
srn: string;
|
|
96
|
+
/**
|
|
97
|
+
* ID of the Project containing the key.
|
|
98
|
+
*/
|
|
99
|
+
projectId: string;
|
|
100
|
+
/**
|
|
101
|
+
* Name of the key.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* See the `Key.Usage` enum for a description of possible values.
|
|
106
|
+
*/
|
|
107
|
+
usage?: KeyUsage;
|
|
108
|
+
/**
|
|
109
|
+
* See the `Key.State` enum for a description of possible values.
|
|
110
|
+
*/
|
|
111
|
+
state: KeyState;
|
|
112
|
+
/**
|
|
113
|
+
* The rotation count tracks the number of times the key has been rotated.
|
|
114
|
+
*/
|
|
115
|
+
rotationCount: number;
|
|
116
|
+
/**
|
|
117
|
+
* Key creation date.
|
|
118
|
+
*/
|
|
119
|
+
createdAt?: Date;
|
|
120
|
+
/**
|
|
121
|
+
* Key last modification date.
|
|
122
|
+
*/
|
|
123
|
+
updatedAt?: Date;
|
|
124
|
+
/**
|
|
125
|
+
* Returns `true` if key protection is applied to the key.
|
|
126
|
+
*/
|
|
127
|
+
protected: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Returns `true` if the key is locked.
|
|
130
|
+
*/
|
|
131
|
+
locked: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Description of the key.
|
|
134
|
+
*/
|
|
135
|
+
description?: string;
|
|
136
|
+
/**
|
|
137
|
+
* List of the key's tags.
|
|
138
|
+
*/
|
|
139
|
+
tags: string[];
|
|
140
|
+
/**
|
|
141
|
+
* Key last rotation date.
|
|
142
|
+
*/
|
|
143
|
+
rotatedAt?: Date;
|
|
144
|
+
/**
|
|
145
|
+
* Key rotation policy.
|
|
146
|
+
*/
|
|
147
|
+
rotationPolicy?: KeyRotationPolicy;
|
|
148
|
+
/**
|
|
149
|
+
* Refer to the `Key.Origin` enum for a description of values.
|
|
150
|
+
*/
|
|
151
|
+
origin: KeyOrigin;
|
|
152
|
+
/**
|
|
153
|
+
* Returns the time at which deletion was requested.
|
|
154
|
+
*/
|
|
155
|
+
deletionRequestedAt?: Date;
|
|
156
|
+
/**
|
|
157
|
+
* Refer to the `Key.ProtectionLevel` enum for a description of values.
|
|
158
|
+
*/
|
|
159
|
+
protectionLevel: KeyProtectionLevel;
|
|
160
|
+
/**
|
|
161
|
+
* Region where the key is stored.
|
|
162
|
+
*/
|
|
163
|
+
region: Region;
|
|
158
164
|
}
|
|
159
165
|
export type CreateKeyRequest = {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Region to target. If none is passed will use default region from the config.
|
|
168
|
+
*/
|
|
169
|
+
region?: Region;
|
|
170
|
+
/**
|
|
171
|
+
* ID of the Project containing the key.
|
|
172
|
+
*/
|
|
173
|
+
projectId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* (Optional) Name of the key.
|
|
176
|
+
*/
|
|
177
|
+
name?: string;
|
|
178
|
+
/**
|
|
179
|
+
* See the `Key.Usage` enum for a description of possible values.
|
|
180
|
+
*/
|
|
181
|
+
usage?: KeyUsage;
|
|
182
|
+
/**
|
|
183
|
+
* (Optional) Description of the key.
|
|
184
|
+
*/
|
|
185
|
+
description?: string;
|
|
186
|
+
/**
|
|
187
|
+
* (Optional) List of the key's tags.
|
|
188
|
+
*/
|
|
189
|
+
tags?: string[];
|
|
190
|
+
/**
|
|
191
|
+
* If not specified, no rotation policy will be applied to the key.
|
|
192
|
+
*/
|
|
193
|
+
rotationPolicy?: KeyRotationPolicy;
|
|
194
|
+
/**
|
|
195
|
+
* Default value is `false`.
|
|
196
|
+
*/
|
|
197
|
+
unprotected: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Refer to the `Key.Origin` enum for a description of values.
|
|
200
|
+
*/
|
|
201
|
+
origin?: KeyOrigin;
|
|
202
|
+
/**
|
|
203
|
+
* Refer to the `Key.Protection` enum for a description of values.
|
|
204
|
+
*/
|
|
205
|
+
protectionLevel?: KeyProtectionLevel;
|
|
196
206
|
};
|
|
197
207
|
export interface DataKey {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
208
|
+
/**
|
|
209
|
+
* ID of the data encryption key.
|
|
210
|
+
*/
|
|
211
|
+
keyId: string;
|
|
212
|
+
/**
|
|
213
|
+
* Symmetric encryption algorithm of the data encryption key (`AES-256-GCM`).
|
|
214
|
+
*/
|
|
215
|
+
algorithm: DataKeyAlgorithmSymmetricEncryption;
|
|
216
|
+
/**
|
|
217
|
+
* Your data encryption key's ciphertext can be stored safely. It can only be decrypted through the keys you create in Key Manager, using the relevant key ID.
|
|
218
|
+
*/
|
|
219
|
+
ciphertext: string;
|
|
220
|
+
/**
|
|
221
|
+
* (Optional) Your data encryption key's plaintext allows you to use the key immediately upon creation. It must neither be stored or shared.
|
|
222
|
+
*/
|
|
223
|
+
plaintext?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Data encryption key creation date.
|
|
226
|
+
*/
|
|
227
|
+
createdAt?: Date;
|
|
218
228
|
}
|
|
219
229
|
export type DecryptRequest = {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
/**
|
|
231
|
+
* Region to target. If none is passed will use default region from the config.
|
|
232
|
+
*/
|
|
233
|
+
region?: Region;
|
|
234
|
+
/**
|
|
235
|
+
* The key must have an usage set to `symmetric_encryption` or `asymmetric_encryption`.
|
|
236
|
+
*/
|
|
237
|
+
keyId: string;
|
|
238
|
+
/**
|
|
239
|
+
* Data size must be between 1 and 131071 bytes.
|
|
240
|
+
*/
|
|
241
|
+
ciphertext: string;
|
|
242
|
+
/**
|
|
243
|
+
* The additional data must match the value passed in the encryption request. Only supported by keys with a usage set to `symmetric_encryption`.
|
|
244
|
+
*/
|
|
245
|
+
associatedData?: string;
|
|
236
246
|
};
|
|
237
247
|
export interface DecryptResponse {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
/**
|
|
249
|
+
* ID of the key used for decryption.
|
|
250
|
+
*/
|
|
251
|
+
keyId: string;
|
|
252
|
+
/**
|
|
253
|
+
* Key's decrypted data.
|
|
254
|
+
*/
|
|
255
|
+
plaintext: string;
|
|
256
|
+
/**
|
|
257
|
+
* If the data was already encrypted with the latest key rotation, no output will be returned in the response object.
|
|
258
|
+
*/
|
|
259
|
+
ciphertext?: string;
|
|
250
260
|
}
|
|
251
261
|
export type DeleteKeyMaterialRequest = {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
/**
|
|
263
|
+
* Region to target. If none is passed will use default region from the config.
|
|
264
|
+
*/
|
|
265
|
+
region?: Region;
|
|
266
|
+
/**
|
|
267
|
+
* ID of the key of which to delete the key material.
|
|
268
|
+
*/
|
|
269
|
+
keyId: string;
|
|
270
|
+
/**
|
|
271
|
+
* Default to latest rotation if not set.
|
|
272
|
+
*/
|
|
273
|
+
keyRotationIndex?: number;
|
|
264
274
|
};
|
|
265
275
|
export type DeleteKeyRequest = {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Region to target. If none is passed will use default region from the config.
|
|
278
|
+
*/
|
|
279
|
+
region?: Region;
|
|
280
|
+
/**
|
|
281
|
+
* ID of the key to delete.
|
|
282
|
+
*/
|
|
283
|
+
keyId: string;
|
|
274
284
|
};
|
|
275
285
|
export type DisableKeyRequest = {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Region to target. If none is passed will use default region from the config.
|
|
288
|
+
*/
|
|
289
|
+
region?: Region;
|
|
290
|
+
/**
|
|
291
|
+
* ID of the key to disable.
|
|
292
|
+
*/
|
|
293
|
+
keyId: string;
|
|
284
294
|
};
|
|
285
295
|
export type EnableKeyRequest = {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Region to target. If none is passed will use default region from the config.
|
|
298
|
+
*/
|
|
299
|
+
region?: Region;
|
|
300
|
+
/**
|
|
301
|
+
* ID of the key to enable.
|
|
302
|
+
*/
|
|
303
|
+
keyId: string;
|
|
294
304
|
};
|
|
295
305
|
export type EncryptRequest = {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Region to target. If none is passed will use default region from the config.
|
|
308
|
+
*/
|
|
309
|
+
region?: Region;
|
|
310
|
+
/**
|
|
311
|
+
* The key must have an usage set to `symmetric_encryption` or `asymmetric_encryption`.
|
|
312
|
+
*/
|
|
313
|
+
keyId: string;
|
|
314
|
+
/**
|
|
315
|
+
* Data size must be between 1 and 65535 bytes.
|
|
316
|
+
*/
|
|
317
|
+
plaintext: string;
|
|
318
|
+
/**
|
|
319
|
+
* Additional data which will not be encrypted, but authenticated and appended to the encrypted payload. Only supported by keys with a usage set to `symmetric_encryption`.
|
|
320
|
+
*/
|
|
321
|
+
associatedData?: string;
|
|
312
322
|
};
|
|
313
323
|
export interface EncryptResponse {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
324
|
+
/**
|
|
325
|
+
* ID of the key used for encryption.
|
|
326
|
+
*/
|
|
327
|
+
keyId: string;
|
|
328
|
+
/**
|
|
329
|
+
* Key's encrypted data.
|
|
330
|
+
*/
|
|
331
|
+
ciphertext: string;
|
|
322
332
|
}
|
|
323
333
|
export type GenerateDataKeyRequest = {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
/**
|
|
335
|
+
* Region to target. If none is passed will use default region from the config.
|
|
336
|
+
*/
|
|
337
|
+
region?: Region;
|
|
338
|
+
/**
|
|
339
|
+
* ID of the key.
|
|
340
|
+
*/
|
|
341
|
+
keyId: string;
|
|
342
|
+
/**
|
|
343
|
+
* See the `DataKey.Algorithm.SymmetricEncryption` enum for a description of values.
|
|
344
|
+
*/
|
|
345
|
+
algorithm?: DataKeyAlgorithmSymmetricEncryption;
|
|
346
|
+
/**
|
|
337
347
|
* Default value is `false`, meaning that the plaintext is returned.
|
|
338
348
|
Set it to `true` if you do not wish the plaintext to be returned in the response object.
|
|
339
349
|
*/
|
|
340
|
-
|
|
350
|
+
withoutPlaintext: boolean;
|
|
341
351
|
};
|
|
342
352
|
export type GetKeyRequest = {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
353
|
+
/**
|
|
354
|
+
* Region to target. If none is passed will use default region from the config.
|
|
355
|
+
*/
|
|
356
|
+
region?: Region;
|
|
357
|
+
/**
|
|
358
|
+
* ID of the key to target.
|
|
359
|
+
*/
|
|
360
|
+
keyId: string;
|
|
351
361
|
};
|
|
352
362
|
export type GetPublicKeyRequest = {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
363
|
+
/**
|
|
364
|
+
* Region to target. If none is passed will use default region from the config.
|
|
365
|
+
*/
|
|
366
|
+
region?: Region;
|
|
367
|
+
/**
|
|
368
|
+
* ID of the key.
|
|
369
|
+
*/
|
|
370
|
+
keyId: string;
|
|
361
371
|
};
|
|
362
372
|
export type ImportKeyMaterialRequest = {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
/**
|
|
374
|
+
* Region to target. If none is passed will use default region from the config.
|
|
375
|
+
*/
|
|
376
|
+
region?: Region;
|
|
377
|
+
/**
|
|
378
|
+
* The key's origin must be `external`.
|
|
379
|
+
*/
|
|
380
|
+
keyId: string;
|
|
381
|
+
/**
|
|
382
|
+
* The key material is a random sequence of bytes used to derive a cryptographic key.
|
|
383
|
+
*/
|
|
384
|
+
keyMaterial: string;
|
|
385
|
+
/**
|
|
386
|
+
* 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).
|
|
387
|
+
*/
|
|
388
|
+
salt?: string;
|
|
379
389
|
};
|
|
380
390
|
export type ListAlgorithmsRequest = {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
391
|
+
/**
|
|
392
|
+
* Region to target. If none is passed will use default region from the config.
|
|
393
|
+
*/
|
|
394
|
+
region?: Region;
|
|
395
|
+
/**
|
|
396
|
+
* Filter by key usage.
|
|
397
|
+
*/
|
|
398
|
+
usages?: ListAlgorithmsRequestUsage[];
|
|
389
399
|
};
|
|
390
400
|
export interface ListAlgorithmsResponse {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
401
|
+
/**
|
|
402
|
+
* Returns a list of algorithms matching the requested criteria.
|
|
403
|
+
*/
|
|
404
|
+
algorithms: ListAlgorithmsResponseAlgorithm[];
|
|
395
405
|
}
|
|
396
406
|
export type ListKeyRotationsRequest = {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
407
|
+
/**
|
|
408
|
+
* Region to target. If none is passed will use default region from the config.
|
|
409
|
+
*/
|
|
410
|
+
region?: Region;
|
|
411
|
+
/**
|
|
412
|
+
* ID of the key to list rotations for.
|
|
413
|
+
*/
|
|
414
|
+
keyId: string;
|
|
415
|
+
orderBy?: ListKeyRotationsRequestOrderBy;
|
|
416
|
+
page?: number;
|
|
417
|
+
pageSize?: number;
|
|
418
|
+
/**
|
|
419
|
+
* See the `KeyRotation.Status` enum for a description of possible values.
|
|
420
|
+
*/
|
|
421
|
+
status?: KeyRotationStatus[];
|
|
412
422
|
};
|
|
413
423
|
export interface ListKeyRotationsResponse {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
424
|
+
/**
|
|
425
|
+
* Single page of key rotations matching the requested criteria.
|
|
426
|
+
*/
|
|
427
|
+
rotations: KeyRotation[];
|
|
428
|
+
/**
|
|
429
|
+
* Total count of key rotations matching the requested criteria.
|
|
430
|
+
*/
|
|
431
|
+
totalCount: number;
|
|
422
432
|
}
|
|
423
433
|
export type ListKeysRequest = {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
434
|
+
/**
|
|
435
|
+
* Region to target. If none is passed will use default region from the config.
|
|
436
|
+
*/
|
|
437
|
+
region?: Region;
|
|
438
|
+
/**
|
|
439
|
+
* (Optional) Filter by Organization ID.
|
|
440
|
+
*/
|
|
441
|
+
organizationId?: string;
|
|
442
|
+
/**
|
|
443
|
+
* (Optional) Filter by Project ID.
|
|
444
|
+
*/
|
|
445
|
+
projectId?: string;
|
|
446
|
+
orderBy?: ListKeysRequestOrderBy;
|
|
447
|
+
page?: number;
|
|
448
|
+
pageSize?: number;
|
|
449
|
+
/**
|
|
450
|
+
* (Optional) List of tags to filter on.
|
|
451
|
+
*/
|
|
452
|
+
tags?: string[];
|
|
453
|
+
/**
|
|
454
|
+
* (Optional) Filter by key name.
|
|
455
|
+
*/
|
|
456
|
+
name?: string;
|
|
457
|
+
/**
|
|
458
|
+
* Select from symmetric encryption, asymmetric encryption, asymmetric signing or key_encapsulation.
|
|
459
|
+
*/
|
|
460
|
+
usage?: ListKeysRequestUsage;
|
|
461
|
+
/**
|
|
462
|
+
* Filter keys based on their deletion status. By default, only keys not scheduled for deletion are returned in the output.
|
|
463
|
+
*/
|
|
464
|
+
scheduledForDeletion: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Select from software or hsm.
|
|
467
|
+
*/
|
|
468
|
+
protectionLevel?: KeyProtectionLevel;
|
|
455
469
|
};
|
|
456
470
|
export interface ListKeysResponse {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
471
|
+
/**
|
|
472
|
+
* Single page of keys matching the requested criteria.
|
|
473
|
+
*/
|
|
474
|
+
keys: Key[];
|
|
475
|
+
/**
|
|
476
|
+
* Total count of keys matching the requested criteria.
|
|
477
|
+
*/
|
|
478
|
+
totalCount: number;
|
|
465
479
|
}
|
|
466
480
|
export type ProtectKeyRequest = {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
481
|
+
/**
|
|
482
|
+
* Region to target. If none is passed will use default region from the config.
|
|
483
|
+
*/
|
|
484
|
+
region?: Region;
|
|
485
|
+
/**
|
|
486
|
+
* ID of the key to apply key protection to.
|
|
487
|
+
*/
|
|
488
|
+
keyId: string;
|
|
475
489
|
};
|
|
476
490
|
export interface PublicKey {
|
|
477
|
-
|
|
491
|
+
pem: string;
|
|
478
492
|
}
|
|
479
493
|
export type RestoreKeyRequest = {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Region to target. If none is passed will use default region from the config.
|
|
496
|
+
*/
|
|
497
|
+
region?: Region;
|
|
498
|
+
keyId: string;
|
|
485
499
|
};
|
|
486
500
|
export type RotateKeyRequest = {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Region to target. If none is passed will use default region from the config.
|
|
503
|
+
*/
|
|
504
|
+
region?: Region;
|
|
505
|
+
/**
|
|
506
|
+
* ID of the key to rotate.
|
|
507
|
+
*/
|
|
508
|
+
keyId: string;
|
|
495
509
|
};
|
|
496
510
|
export type SignRequest = {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
511
|
+
/**
|
|
512
|
+
* Region to target. If none is passed will use default region from the config.
|
|
513
|
+
*/
|
|
514
|
+
region?: Region;
|
|
515
|
+
/**
|
|
516
|
+
* ID of the key to use for signing.
|
|
517
|
+
*/
|
|
518
|
+
keyId: string;
|
|
519
|
+
/**
|
|
520
|
+
* The digest must be generated using the same algorithm defined in the key’s algorithm settings.
|
|
521
|
+
*/
|
|
522
|
+
digest: string;
|
|
509
523
|
};
|
|
510
524
|
export interface SignResponse {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
525
|
+
/**
|
|
526
|
+
* ID of the key used to generate the signature.
|
|
527
|
+
*/
|
|
528
|
+
keyId: string;
|
|
529
|
+
/**
|
|
530
|
+
* The message signature.
|
|
531
|
+
*/
|
|
532
|
+
signature: string;
|
|
519
533
|
}
|
|
520
534
|
export type UnprotectKeyRequest = {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
535
|
+
/**
|
|
536
|
+
* Region to target. If none is passed will use default region from the config.
|
|
537
|
+
*/
|
|
538
|
+
region?: Region;
|
|
539
|
+
/**
|
|
540
|
+
* ID of the key to remove key protection from.
|
|
541
|
+
*/
|
|
542
|
+
keyId: string;
|
|
529
543
|
};
|
|
530
544
|
export type UnwrapKeyRequest = {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
545
|
+
/**
|
|
546
|
+
* Region to target. If none is passed will use default region from the config.
|
|
547
|
+
*/
|
|
548
|
+
region?: Region;
|
|
549
|
+
keyId: string;
|
|
550
|
+
ciphertext: string;
|
|
551
|
+
associatedData?: string;
|
|
538
552
|
};
|
|
539
553
|
export interface UnwrapKeyResponse {
|
|
540
|
-
|
|
541
|
-
|
|
554
|
+
keyId: string;
|
|
555
|
+
plaintext: string;
|
|
542
556
|
}
|
|
543
557
|
export type UpdateKeyRequest = {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
558
|
+
/**
|
|
559
|
+
* Region to target. If none is passed will use default region from the config.
|
|
560
|
+
*/
|
|
561
|
+
region?: Region;
|
|
562
|
+
/**
|
|
563
|
+
* ID of the key to update.
|
|
564
|
+
*/
|
|
565
|
+
keyId: string;
|
|
566
|
+
/**
|
|
567
|
+
* (Optional) Updated name of the key.
|
|
568
|
+
*/
|
|
569
|
+
name?: string;
|
|
570
|
+
/**
|
|
571
|
+
* (Optional) Updated description of the key.
|
|
572
|
+
*/
|
|
573
|
+
description?: string;
|
|
574
|
+
/**
|
|
575
|
+
* (Optional) Updated list of the key's tags.
|
|
576
|
+
*/
|
|
577
|
+
tags?: string[];
|
|
578
|
+
/**
|
|
579
|
+
* If not specified, the key's existing rotation policy applies.
|
|
580
|
+
*/
|
|
581
|
+
rotationPolicy?: KeyRotationPolicy;
|
|
568
582
|
};
|
|
569
583
|
export type VerifyRequest = {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
584
|
+
/**
|
|
585
|
+
* Region to target. If none is passed will use default region from the config.
|
|
586
|
+
*/
|
|
587
|
+
region?: Region;
|
|
588
|
+
/**
|
|
589
|
+
* ID of the key to use for signature verification.
|
|
590
|
+
*/
|
|
591
|
+
keyId: string;
|
|
592
|
+
/**
|
|
593
|
+
* Must be generated using the same algorithm specified in the key’s configuration.
|
|
594
|
+
*/
|
|
595
|
+
digest: string;
|
|
596
|
+
/**
|
|
597
|
+
* The message signature to verify.
|
|
598
|
+
*/
|
|
599
|
+
signature: string;
|
|
586
600
|
};
|
|
587
601
|
export interface VerifyResponse {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
602
|
+
/**
|
|
603
|
+
* ID of the key used for verification.
|
|
604
|
+
*/
|
|
605
|
+
keyId: string;
|
|
606
|
+
/**
|
|
607
|
+
* Returns `true` if the signature is valid for the digest and key, and `false` otherwise.
|
|
608
|
+
*/
|
|
609
|
+
valid: boolean;
|
|
596
610
|
}
|
|
597
611
|
export type WrapKeyRequest = {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
612
|
+
/**
|
|
613
|
+
* Region to target. If none is passed will use default region from the config.
|
|
614
|
+
*/
|
|
615
|
+
region?: Region;
|
|
616
|
+
keyId: string;
|
|
617
|
+
plaintext: string;
|
|
618
|
+
associatedData?: string;
|
|
605
619
|
};
|
|
606
620
|
export interface WrapKeyResponse {
|
|
607
|
-
|
|
608
|
-
|
|
621
|
+
keyId: string;
|
|
622
|
+
ciphertext: string;
|
|
609
623
|
}
|
|
624
|
+
//#endregion
|