@scaleway/sdk 2.64.0 → 2.65.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/dist/api/cockpit/v1/api.gen.cjs +19 -1
- package/dist/api/cockpit/v1/api.gen.d.ts +4 -3
- package/dist/api/cockpit/v1/api.gen.js +20 -2
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +13 -0
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +13 -0
- package/dist/api/cockpit/v1/types.gen.d.ts +50 -31
- package/dist/api/ipam/v1/api.gen.cjs +5 -1
- package/dist/api/ipam/v1/api.gen.d.ts +2 -2
- package/dist/api/ipam/v1/api.gen.js +5 -1
- package/dist/api/ipam/v1/types.gen.d.ts +13 -13
- package/dist/api/key_manager/v1alpha1/api.gen.cjs +41 -37
- package/dist/api/key_manager/v1alpha1/api.gen.d.ts +38 -38
- package/dist/api/key_manager/v1alpha1/api.gen.js +41 -37
- package/dist/api/key_manager/v1alpha1/types.gen.d.ts +31 -30
- package/dist/api/lb/v1/api.gen.cjs +5 -1
- package/dist/api/lb/v1/api.gen.d.ts +3 -3
- package/dist/api/lb/v1/api.gen.js +5 -1
- package/dist/api/lb/v1/types.gen.d.ts +116 -116
- package/dist/api/webhosting/v1/api.gen.cjs +58 -2
- package/dist/api/webhosting/v1/api.gen.d.ts +31 -3
- package/dist/api/webhosting/v1/api.gen.js +60 -4
- package/dist/api/webhosting/v1/content.gen.cjs +4 -0
- package/dist/api/webhosting/v1/content.gen.d.ts +5 -1
- package/dist/api/webhosting/v1/content.gen.js +4 -0
- package/dist/api/webhosting/v1/index.gen.cjs +2 -0
- package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
- package/dist/api/webhosting/v1/index.gen.js +3 -1
- package/dist/api/webhosting/v1/marshalling.gen.cjs +45 -0
- package/dist/api/webhosting/v1/marshalling.gen.d.ts +3 -1
- package/dist/api/webhosting/v1/marshalling.gen.js +45 -0
- package/dist/api/webhosting/v1/types.gen.d.ts +66 -0
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +1 -1
- package/dist/api/webhosting/v1alpha1/api.gen.js +1 -1
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -10,12 +10,16 @@ const jsonContentHeaders = {
|
|
|
10
10
|
};
|
|
11
11
|
class API extends api.API {
|
|
12
12
|
/** Lists the available regions of the API. */
|
|
13
|
-
static LOCALITIES = [
|
|
13
|
+
static LOCALITIES = [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
];
|
|
14
18
|
/**
|
|
15
19
|
* Create a key. Create a key in a given region specified by the `region`
|
|
16
20
|
* parameter. Keys only support symmetric encryption. You can use keys to
|
|
17
|
-
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys
|
|
18
|
-
*
|
|
21
|
+
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys.
|
|
22
|
+
* **Data encryption keys are not stored in Key Manager**.
|
|
19
23
|
*
|
|
20
24
|
* @param request - The request {@link CreateKeyRequest}
|
|
21
25
|
* @returns A Promise of Key
|
|
@@ -32,7 +36,7 @@ class API extends api.API {
|
|
|
32
36
|
marshalling_gen.unmarshalKey
|
|
33
37
|
);
|
|
34
38
|
/**
|
|
35
|
-
* Get key metadata. Retrieve
|
|
39
|
+
* Get key metadata. Retrieve metadata for a specified key using the `region`
|
|
36
40
|
* and `key_id` parameters.
|
|
37
41
|
*
|
|
38
42
|
* @param request - The request {@link GetKeyRequest}
|
|
@@ -46,7 +50,7 @@ class API extends api.API {
|
|
|
46
50
|
marshalling_gen.unmarshalKey
|
|
47
51
|
);
|
|
48
52
|
/**
|
|
49
|
-
* Update a key.
|
|
53
|
+
* Update a key. Modify a key's metadata including name, description and tags,
|
|
50
54
|
* specified by the `key_id` and `region` parameters.
|
|
51
55
|
*
|
|
52
56
|
* @param request - The request {@link UpdateKeyRequest}
|
|
@@ -64,10 +68,9 @@ class API extends api.API {
|
|
|
64
68
|
marshalling_gen.unmarshalKey
|
|
65
69
|
);
|
|
66
70
|
/**
|
|
67
|
-
* Delete a key.
|
|
68
|
-
* parameters.
|
|
69
|
-
*
|
|
70
|
-
* unusable.
|
|
71
|
+
* Delete a key. Permanently delete a key specified by the `region` and
|
|
72
|
+
* `key_id` parameters. This action is irreversible. Any data encrypted with
|
|
73
|
+
* this key, including data encryption keys, will no longer be decipherable.
|
|
71
74
|
*
|
|
72
75
|
* @param request - The request {@link DeleteKeyRequest}
|
|
73
76
|
*/
|
|
@@ -76,10 +79,10 @@ class API extends api.API {
|
|
|
76
79
|
path: `/key-manager/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${marshalling.validatePathParam("keyId", request.keyId)}`
|
|
77
80
|
});
|
|
78
81
|
/**
|
|
79
|
-
* Rotate a key. Generate a new version of an existing key with
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
82
|
+
* Rotate a key. Generate a new version of an existing key with new key
|
|
83
|
+
* material. Previous key versions remain usable to decrypt previously
|
|
84
|
+
* encrypted data, but the key's new version will be used for subsequent
|
|
85
|
+
* encryption operations and data key generation.
|
|
83
86
|
*
|
|
84
87
|
* @param request - The request {@link RotateKeyRequest}
|
|
85
88
|
* @returns A Promise of Key
|
|
@@ -94,7 +97,7 @@ class API extends api.API {
|
|
|
94
97
|
marshalling_gen.unmarshalKey
|
|
95
98
|
);
|
|
96
99
|
/**
|
|
97
|
-
* Apply key protection. Apply
|
|
100
|
+
* Apply key protection. Apply protection to a given key specified by the
|
|
98
101
|
* `key_id` parameter. Applying key protection means that your key can be used
|
|
99
102
|
* and modified, but it cannot be deleted.
|
|
100
103
|
*
|
|
@@ -145,9 +148,9 @@ class API extends api.API {
|
|
|
145
148
|
marshalling_gen.unmarshalKey
|
|
146
149
|
);
|
|
147
150
|
/**
|
|
148
|
-
* Disable key. Disable a given key to be used for
|
|
149
|
-
* Disabling a key renders it unusable. You must
|
|
150
|
-
* `key_id` parameters.
|
|
151
|
+
* Disable key. Disable a given key, preventing it to be used for
|
|
152
|
+
* cryptographic operations. Disabling a key renders it unusable. You must
|
|
153
|
+
* specify the `region` and `key_id` parameters.
|
|
151
154
|
*
|
|
152
155
|
* @param request - The request {@link DisableKeyRequest}
|
|
153
156
|
* @returns A Promise of Key
|
|
@@ -181,25 +184,24 @@ class API extends api.API {
|
|
|
181
184
|
marshalling_gen.unmarshalListKeysResponse
|
|
182
185
|
);
|
|
183
186
|
/**
|
|
184
|
-
* List keys. Retrieve
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
+
* List keys. Retrieve a list of keys across all Projects in an Organization
|
|
188
|
+
* or within a specific Project. You must specify the `region`, and either the
|
|
189
|
+
* `organization_id` or the `project_id`.
|
|
187
190
|
*
|
|
188
191
|
* @param request - The request {@link ListKeysRequest}
|
|
189
192
|
* @returns A Promise of ListKeysResponse
|
|
190
193
|
*/
|
|
191
194
|
listKeys = (request = {}) => resourcePaginator.enrichForPagination("keys", this.pageOfListKeys, request);
|
|
192
195
|
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* does not store your data encryption key. The data encryption key is
|
|
196
|
+
* Create a data encryption key. Create a new data encryption key for
|
|
197
|
+
* cryptographic operations outside of Key Manager. The data encryption key is
|
|
196
198
|
* encrypted and must be decrypted using the key you have created in Key
|
|
197
|
-
* Manager.
|
|
198
|
-
* object, for immediate usage.
|
|
199
|
+
* Manager.
|
|
199
200
|
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
201
|
+
* The data encryption key is returned in plaintext and ciphertext but it
|
|
202
|
+
* should only be stored in its encrypted form (ciphertext). Key Manager does
|
|
203
|
+
* not store your data encryption key. To retrieve your key's plaintext, use
|
|
204
|
+
* the `Decrypt` method with your key's ID and ciphertext.
|
|
203
205
|
*
|
|
204
206
|
* @param request - The request {@link GenerateDataKeyRequest}
|
|
205
207
|
* @returns A Promise of DataKey
|
|
@@ -216,10 +218,10 @@ class API extends api.API {
|
|
|
216
218
|
marshalling_gen.unmarshalDataKey
|
|
217
219
|
);
|
|
218
220
|
/**
|
|
219
|
-
* Encrypt
|
|
220
|
-
* parameter. Only keys with a usage set to
|
|
221
|
-
* supported by this method. The maximum payload
|
|
222
|
-
*
|
|
221
|
+
* Encrypt a payload. Encrypt a payload using an existing key, specified by
|
|
222
|
+
* the `key_id` parameter. Only keys with a usage set to
|
|
223
|
+
* `symmetric_encryption` are supported by this method. The maximum payload
|
|
224
|
+
* size that can be encrypted is 64 KB of plaintext.
|
|
223
225
|
*
|
|
224
226
|
* @param request - The request {@link EncryptRequest}
|
|
225
227
|
* @returns A Promise of EncryptResponse
|
|
@@ -236,9 +238,10 @@ class API extends api.API {
|
|
|
236
238
|
marshalling_gen.unmarshalEncryptResponse
|
|
237
239
|
);
|
|
238
240
|
/**
|
|
239
|
-
* Decrypt
|
|
240
|
-
* parameter. The maximum payload size
|
|
241
|
-
* the
|
|
241
|
+
* Decrypt an encrypted payload. Decrypt an encrypted payload using an
|
|
242
|
+
* existing key, specified by the `key_id` parameter. The maximum payload size
|
|
243
|
+
* that can be decrypted is equivalent to the encrypted output of 64 KB of
|
|
244
|
+
* data (around 131 KB).
|
|
242
245
|
*
|
|
243
246
|
* @param request - The request {@link DecryptRequest}
|
|
244
247
|
* @returns A Promise of DecryptResponse
|
|
@@ -255,8 +258,9 @@ class API extends api.API {
|
|
|
255
258
|
marshalling_gen.unmarshalDecryptResponse
|
|
256
259
|
);
|
|
257
260
|
/**
|
|
258
|
-
* Import key material. Import key material
|
|
259
|
-
* cryptographic key. The key's origin must be
|
|
261
|
+
* Import key material. Import externally generated key material into Key
|
|
262
|
+
* Manager to derive a new cryptographic key. The key's origin must be
|
|
263
|
+
* `external`.
|
|
260
264
|
*
|
|
261
265
|
* @param request - The request {@link ImportKeyMaterialRequest}
|
|
262
266
|
* @returns A Promise of Key
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
|
-
import type { Region } from '../../../bridge';
|
|
2
|
+
import type { Region as ScwRegion } from '../../../bridge';
|
|
3
3
|
import type { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, ImportKeyMaterialRequest, Key, ListKeysRequest, ListKeysResponse, ProtectKeyRequest, RotateKeyRequest, UnprotectKeyRequest, UpdateKeyRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Key Manager API.
|
|
@@ -9,19 +9,19 @@ import type { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, Delete
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class API extends ParentAPI {
|
|
11
11
|
/** Lists the available regions of the API. */
|
|
12
|
-
static readonly LOCALITIES:
|
|
12
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
13
13
|
/**
|
|
14
14
|
* Create a key. Create a key in a given region specified by the `region`
|
|
15
15
|
* parameter. Keys only support symmetric encryption. You can use keys to
|
|
16
|
-
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys
|
|
17
|
-
*
|
|
16
|
+
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys.
|
|
17
|
+
* **Data encryption keys are not stored in Key Manager**.
|
|
18
18
|
*
|
|
19
19
|
* @param request - The request {@link CreateKeyRequest}
|
|
20
20
|
* @returns A Promise of Key
|
|
21
21
|
*/
|
|
22
22
|
createKey: (request: Readonly<CreateKeyRequest>) => Promise<Key>;
|
|
23
23
|
/**
|
|
24
|
-
* Get key metadata. Retrieve
|
|
24
|
+
* Get key metadata. Retrieve metadata for a specified key using the `region`
|
|
25
25
|
* and `key_id` parameters.
|
|
26
26
|
*
|
|
27
27
|
* @param request - The request {@link GetKeyRequest}
|
|
@@ -29,7 +29,7 @@ export declare class API extends ParentAPI {
|
|
|
29
29
|
*/
|
|
30
30
|
getKey: (request: Readonly<GetKeyRequest>) => Promise<Key>;
|
|
31
31
|
/**
|
|
32
|
-
* Update a key.
|
|
32
|
+
* Update a key. Modify a key's metadata including name, description and tags,
|
|
33
33
|
* specified by the `key_id` and `region` parameters.
|
|
34
34
|
*
|
|
35
35
|
* @param request - The request {@link UpdateKeyRequest}
|
|
@@ -37,26 +37,25 @@ export declare class API extends ParentAPI {
|
|
|
37
37
|
*/
|
|
38
38
|
updateKey: (request: Readonly<UpdateKeyRequest>) => Promise<Key>;
|
|
39
39
|
/**
|
|
40
|
-
* Delete a key.
|
|
41
|
-
* parameters.
|
|
42
|
-
*
|
|
43
|
-
* unusable.
|
|
40
|
+
* Delete a key. Permanently delete a key specified by the `region` and
|
|
41
|
+
* `key_id` parameters. This action is irreversible. Any data encrypted with
|
|
42
|
+
* this key, including data encryption keys, will no longer be decipherable.
|
|
44
43
|
*
|
|
45
44
|
* @param request - The request {@link DeleteKeyRequest}
|
|
46
45
|
*/
|
|
47
46
|
deleteKey: (request: Readonly<DeleteKeyRequest>) => Promise<void>;
|
|
48
47
|
/**
|
|
49
|
-
* Rotate a key. Generate a new version of an existing key with
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
48
|
+
* Rotate a key. Generate a new version of an existing key with new key
|
|
49
|
+
* material. Previous key versions remain usable to decrypt previously
|
|
50
|
+
* encrypted data, but the key's new version will be used for subsequent
|
|
51
|
+
* encryption operations and data key generation.
|
|
53
52
|
*
|
|
54
53
|
* @param request - The request {@link RotateKeyRequest}
|
|
55
54
|
* @returns A Promise of Key
|
|
56
55
|
*/
|
|
57
56
|
rotateKey: (request: Readonly<RotateKeyRequest>) => Promise<Key>;
|
|
58
57
|
/**
|
|
59
|
-
* Apply key protection. Apply
|
|
58
|
+
* Apply key protection. Apply protection to a given key specified by the
|
|
60
59
|
* `key_id` parameter. Applying key protection means that your key can be used
|
|
61
60
|
* and modified, but it cannot be deleted.
|
|
62
61
|
*
|
|
@@ -83,9 +82,9 @@ export declare class API extends ParentAPI {
|
|
|
83
82
|
*/
|
|
84
83
|
enableKey: (request: Readonly<EnableKeyRequest>) => Promise<Key>;
|
|
85
84
|
/**
|
|
86
|
-
* Disable key. Disable a given key to be used for
|
|
87
|
-
* Disabling a key renders it unusable. You must
|
|
88
|
-
* `key_id` parameters.
|
|
85
|
+
* Disable key. Disable a given key, preventing it to be used for
|
|
86
|
+
* cryptographic operations. Disabling a key renders it unusable. You must
|
|
87
|
+
* specify the `region` and `key_id` parameters.
|
|
89
88
|
*
|
|
90
89
|
* @param request - The request {@link DisableKeyRequest}
|
|
91
90
|
* @returns A Promise of Key
|
|
@@ -93,9 +92,9 @@ export declare class API extends ParentAPI {
|
|
|
93
92
|
disableKey: (request: Readonly<DisableKeyRequest>) => Promise<Key>;
|
|
94
93
|
protected pageOfListKeys: (request?: Readonly<ListKeysRequest>) => Promise<ListKeysResponse>;
|
|
95
94
|
/**
|
|
96
|
-
* List keys. Retrieve
|
|
97
|
-
*
|
|
98
|
-
*
|
|
95
|
+
* List keys. Retrieve a list of keys across all Projects in an Organization
|
|
96
|
+
* or within a specific Project. You must specify the `region`, and either the
|
|
97
|
+
* `organization_id` or the `project_id`.
|
|
99
98
|
*
|
|
100
99
|
* @param request - The request {@link ListKeysRequest}
|
|
101
100
|
* @returns A Promise of ListKeysResponse
|
|
@@ -105,43 +104,44 @@ export declare class API extends ParentAPI {
|
|
|
105
104
|
[Symbol.asyncIterator]: () => AsyncGenerator<Key[], void, void>;
|
|
106
105
|
};
|
|
107
106
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* does not store your data encryption key. The data encryption key is
|
|
107
|
+
* Create a data encryption key. Create a new data encryption key for
|
|
108
|
+
* cryptographic operations outside of Key Manager. The data encryption key is
|
|
111
109
|
* encrypted and must be decrypted using the key you have created in Key
|
|
112
|
-
* Manager.
|
|
113
|
-
* object, for immediate usage.
|
|
110
|
+
* Manager.
|
|
114
111
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
112
|
+
* The data encryption key is returned in plaintext and ciphertext but it
|
|
113
|
+
* should only be stored in its encrypted form (ciphertext). Key Manager does
|
|
114
|
+
* not store your data encryption key. To retrieve your key's plaintext, use
|
|
115
|
+
* the `Decrypt` method with your key's ID and ciphertext.
|
|
118
116
|
*
|
|
119
117
|
* @param request - The request {@link GenerateDataKeyRequest}
|
|
120
118
|
* @returns A Promise of DataKey
|
|
121
119
|
*/
|
|
122
120
|
generateDataKey: (request: Readonly<GenerateDataKeyRequest>) => Promise<DataKey>;
|
|
123
121
|
/**
|
|
124
|
-
* Encrypt
|
|
125
|
-
* parameter. Only keys with a usage set to
|
|
126
|
-
* supported by this method. The maximum payload
|
|
127
|
-
*
|
|
122
|
+
* Encrypt a payload. Encrypt a payload using an existing key, specified by
|
|
123
|
+
* the `key_id` parameter. Only keys with a usage set to
|
|
124
|
+
* `symmetric_encryption` are supported by this method. The maximum payload
|
|
125
|
+
* size that can be encrypted is 64 KB of plaintext.
|
|
128
126
|
*
|
|
129
127
|
* @param request - The request {@link EncryptRequest}
|
|
130
128
|
* @returns A Promise of EncryptResponse
|
|
131
129
|
*/
|
|
132
130
|
encrypt: (request: Readonly<EncryptRequest>) => Promise<EncryptResponse>;
|
|
133
131
|
/**
|
|
134
|
-
* Decrypt
|
|
135
|
-
* parameter. The maximum payload size
|
|
136
|
-
* the
|
|
132
|
+
* Decrypt an encrypted payload. Decrypt an encrypted payload using an
|
|
133
|
+
* existing key, specified by the `key_id` parameter. The maximum payload size
|
|
134
|
+
* that can be decrypted is equivalent to the encrypted output of 64 KB of
|
|
135
|
+
* data (around 131 KB).
|
|
137
136
|
*
|
|
138
137
|
* @param request - The request {@link DecryptRequest}
|
|
139
138
|
* @returns A Promise of DecryptResponse
|
|
140
139
|
*/
|
|
141
140
|
decrypt: (request: Readonly<DecryptRequest>) => Promise<DecryptResponse>;
|
|
142
141
|
/**
|
|
143
|
-
* Import key material. Import key material
|
|
144
|
-
* cryptographic key. The key's origin must be
|
|
142
|
+
* Import key material. Import externally generated key material into Key
|
|
143
|
+
* Manager to derive a new cryptographic key. The key's origin must be
|
|
144
|
+
* `external`.
|
|
145
145
|
*
|
|
146
146
|
* @param request - The request {@link ImportKeyMaterialRequest}
|
|
147
147
|
* @returns A Promise of Key
|
|
@@ -8,12 +8,16 @@ const jsonContentHeaders = {
|
|
|
8
8
|
};
|
|
9
9
|
class API extends API$1 {
|
|
10
10
|
/** Lists the available regions of the API. */
|
|
11
|
-
static LOCALITIES = [
|
|
11
|
+
static LOCALITIES = [
|
|
12
|
+
"fr-par",
|
|
13
|
+
"nl-ams",
|
|
14
|
+
"pl-waw"
|
|
15
|
+
];
|
|
12
16
|
/**
|
|
13
17
|
* Create a key. Create a key in a given region specified by the `region`
|
|
14
18
|
* parameter. Keys only support symmetric encryption. You can use keys to
|
|
15
|
-
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys
|
|
16
|
-
*
|
|
19
|
+
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys.
|
|
20
|
+
* **Data encryption keys are not stored in Key Manager**.
|
|
17
21
|
*
|
|
18
22
|
* @param request - The request {@link CreateKeyRequest}
|
|
19
23
|
* @returns A Promise of Key
|
|
@@ -30,7 +34,7 @@ class API extends API$1 {
|
|
|
30
34
|
unmarshalKey
|
|
31
35
|
);
|
|
32
36
|
/**
|
|
33
|
-
* Get key metadata. Retrieve
|
|
37
|
+
* Get key metadata. Retrieve metadata for a specified key using the `region`
|
|
34
38
|
* and `key_id` parameters.
|
|
35
39
|
*
|
|
36
40
|
* @param request - The request {@link GetKeyRequest}
|
|
@@ -44,7 +48,7 @@ class API extends API$1 {
|
|
|
44
48
|
unmarshalKey
|
|
45
49
|
);
|
|
46
50
|
/**
|
|
47
|
-
* Update a key.
|
|
51
|
+
* Update a key. Modify a key's metadata including name, description and tags,
|
|
48
52
|
* specified by the `key_id` and `region` parameters.
|
|
49
53
|
*
|
|
50
54
|
* @param request - The request {@link UpdateKeyRequest}
|
|
@@ -62,10 +66,9 @@ class API extends API$1 {
|
|
|
62
66
|
unmarshalKey
|
|
63
67
|
);
|
|
64
68
|
/**
|
|
65
|
-
* Delete a key.
|
|
66
|
-
* parameters.
|
|
67
|
-
*
|
|
68
|
-
* unusable.
|
|
69
|
+
* Delete a key. Permanently delete a key specified by the `region` and
|
|
70
|
+
* `key_id` parameters. This action is irreversible. Any data encrypted with
|
|
71
|
+
* this key, including data encryption keys, will no longer be decipherable.
|
|
69
72
|
*
|
|
70
73
|
* @param request - The request {@link DeleteKeyRequest}
|
|
71
74
|
*/
|
|
@@ -74,10 +77,10 @@ class API extends API$1 {
|
|
|
74
77
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`
|
|
75
78
|
});
|
|
76
79
|
/**
|
|
77
|
-
* Rotate a key. Generate a new version of an existing key with
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
80
|
+
* Rotate a key. Generate a new version of an existing key with new key
|
|
81
|
+
* material. Previous key versions remain usable to decrypt previously
|
|
82
|
+
* encrypted data, but the key's new version will be used for subsequent
|
|
83
|
+
* encryption operations and data key generation.
|
|
81
84
|
*
|
|
82
85
|
* @param request - The request {@link RotateKeyRequest}
|
|
83
86
|
* @returns A Promise of Key
|
|
@@ -92,7 +95,7 @@ class API extends API$1 {
|
|
|
92
95
|
unmarshalKey
|
|
93
96
|
);
|
|
94
97
|
/**
|
|
95
|
-
* Apply key protection. Apply
|
|
98
|
+
* Apply key protection. Apply protection to a given key specified by the
|
|
96
99
|
* `key_id` parameter. Applying key protection means that your key can be used
|
|
97
100
|
* and modified, but it cannot be deleted.
|
|
98
101
|
*
|
|
@@ -143,9 +146,9 @@ class API extends API$1 {
|
|
|
143
146
|
unmarshalKey
|
|
144
147
|
);
|
|
145
148
|
/**
|
|
146
|
-
* Disable key. Disable a given key to be used for
|
|
147
|
-
* Disabling a key renders it unusable. You must
|
|
148
|
-
* `key_id` parameters.
|
|
149
|
+
* Disable key. Disable a given key, preventing it to be used for
|
|
150
|
+
* cryptographic operations. Disabling a key renders it unusable. You must
|
|
151
|
+
* specify the `region` and `key_id` parameters.
|
|
149
152
|
*
|
|
150
153
|
* @param request - The request {@link DisableKeyRequest}
|
|
151
154
|
* @returns A Promise of Key
|
|
@@ -179,25 +182,24 @@ class API extends API$1 {
|
|
|
179
182
|
unmarshalListKeysResponse
|
|
180
183
|
);
|
|
181
184
|
/**
|
|
182
|
-
* List keys. Retrieve
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
+
* List keys. Retrieve a list of keys across all Projects in an Organization
|
|
186
|
+
* or within a specific Project. You must specify the `region`, and either the
|
|
187
|
+
* `organization_id` or the `project_id`.
|
|
185
188
|
*
|
|
186
189
|
* @param request - The request {@link ListKeysRequest}
|
|
187
190
|
* @returns A Promise of ListKeysResponse
|
|
188
191
|
*/
|
|
189
192
|
listKeys = (request = {}) => enrichForPagination("keys", this.pageOfListKeys, request);
|
|
190
193
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* does not store your data encryption key. The data encryption key is
|
|
194
|
+
* Create a data encryption key. Create a new data encryption key for
|
|
195
|
+
* cryptographic operations outside of Key Manager. The data encryption key is
|
|
194
196
|
* encrypted and must be decrypted using the key you have created in Key
|
|
195
|
-
* Manager.
|
|
196
|
-
* object, for immediate usage.
|
|
197
|
+
* Manager.
|
|
197
198
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
199
|
+
* The data encryption key is returned in plaintext and ciphertext but it
|
|
200
|
+
* should only be stored in its encrypted form (ciphertext). Key Manager does
|
|
201
|
+
* not store your data encryption key. To retrieve your key's plaintext, use
|
|
202
|
+
* the `Decrypt` method with your key's ID and ciphertext.
|
|
201
203
|
*
|
|
202
204
|
* @param request - The request {@link GenerateDataKeyRequest}
|
|
203
205
|
* @returns A Promise of DataKey
|
|
@@ -214,10 +216,10 @@ class API extends API$1 {
|
|
|
214
216
|
unmarshalDataKey
|
|
215
217
|
);
|
|
216
218
|
/**
|
|
217
|
-
* Encrypt
|
|
218
|
-
* parameter. Only keys with a usage set to
|
|
219
|
-
* supported by this method. The maximum payload
|
|
220
|
-
*
|
|
219
|
+
* Encrypt a payload. Encrypt a payload using an existing key, specified by
|
|
220
|
+
* the `key_id` parameter. Only keys with a usage set to
|
|
221
|
+
* `symmetric_encryption` are supported by this method. The maximum payload
|
|
222
|
+
* size that can be encrypted is 64 KB of plaintext.
|
|
221
223
|
*
|
|
222
224
|
* @param request - The request {@link EncryptRequest}
|
|
223
225
|
* @returns A Promise of EncryptResponse
|
|
@@ -234,9 +236,10 @@ class API extends API$1 {
|
|
|
234
236
|
unmarshalEncryptResponse
|
|
235
237
|
);
|
|
236
238
|
/**
|
|
237
|
-
* Decrypt
|
|
238
|
-
* parameter. The maximum payload size
|
|
239
|
-
* the
|
|
239
|
+
* Decrypt an encrypted payload. Decrypt an encrypted payload using an
|
|
240
|
+
* existing key, specified by the `key_id` parameter. The maximum payload size
|
|
241
|
+
* that can be decrypted is equivalent to the encrypted output of 64 KB of
|
|
242
|
+
* data (around 131 KB).
|
|
240
243
|
*
|
|
241
244
|
* @param request - The request {@link DecryptRequest}
|
|
242
245
|
* @returns A Promise of DecryptResponse
|
|
@@ -253,8 +256,9 @@ class API extends API$1 {
|
|
|
253
256
|
unmarshalDecryptResponse
|
|
254
257
|
);
|
|
255
258
|
/**
|
|
256
|
-
* Import key material. Import key material
|
|
257
|
-
* cryptographic key. The key's origin must be
|
|
259
|
+
* Import key material. Import externally generated key material into Key
|
|
260
|
+
* Manager to derive a new cryptographic key. The key's origin must be
|
|
261
|
+
* `external`.
|
|
258
262
|
*
|
|
259
263
|
* @param request - The request {@link ImportKeyMaterialRequest}
|
|
260
264
|
* @returns A Promise of Key
|