@scaleway/sdk 2.29.0 → 2.31.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.
Files changed (50) hide show
  1. package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +23 -0
  3. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +23 -0
  4. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +11 -0
  5. package/dist/api/baremetal/v1/marshalling.gen.cjs +1 -0
  6. package/dist/api/baremetal/v1/marshalling.gen.js +1 -0
  7. package/dist/api/baremetal/v1/types.gen.d.ts +5 -0
  8. package/dist/api/block/v1alpha1/content.gen.cjs +2 -1
  9. package/dist/api/block/v1alpha1/content.gen.js +2 -1
  10. package/dist/api/block/v1alpha1/types.gen.d.ts +1 -1
  11. package/dist/api/index.d.ts +1 -0
  12. package/dist/api/instance/v1/api.gen.cjs +25 -0
  13. package/dist/api/instance/v1/api.gen.d.ts +17 -1
  14. package/dist/api/instance/v1/api.gen.js +26 -1
  15. package/dist/api/instance/v1/index.gen.d.ts +1 -1
  16. package/dist/api/instance/v1/marshalling.gen.cjs +14 -0
  17. package/dist/api/instance/v1/marshalling.gen.d.ts +2 -1
  18. package/dist/api/instance/v1/marshalling.gen.js +14 -0
  19. package/dist/api/instance/v1/types.gen.d.ts +25 -0
  20. package/dist/api/key_manager/index.cjs +4 -0
  21. package/dist/api/key_manager/index.d.ts +1 -0
  22. package/dist/api/key_manager/index.js +4 -0
  23. package/dist/api/key_manager/v1alpha1/api.gen.cjs +257 -0
  24. package/dist/api/key_manager/v1alpha1/api.gen.d.ts +142 -0
  25. package/dist/api/key_manager/v1alpha1/api.gen.js +257 -0
  26. package/dist/api/key_manager/v1alpha1/index.gen.cjs +4 -0
  27. package/dist/api/key_manager/v1alpha1/index.gen.d.ts +2 -0
  28. package/dist/api/key_manager/v1alpha1/index.gen.js +4 -0
  29. package/dist/api/key_manager/v1alpha1/marshalling.gen.cjs +143 -0
  30. package/dist/api/key_manager/v1alpha1/marshalling.gen.d.ts +12 -0
  31. package/dist/api/key_manager/v1alpha1/marshalling.gen.js +143 -0
  32. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +268 -0
  33. package/dist/api/llm_inference/v1beta1/api.gen.cjs +1 -1
  34. package/dist/api/llm_inference/v1beta1/api.gen.d.ts +3 -3
  35. package/dist/api/llm_inference/v1beta1/api.gen.js +1 -1
  36. package/dist/api/llm_inference/v1beta1/types.gen.d.ts +4 -4
  37. package/dist/api/vpc/v2/api.gen.cjs +28 -1
  38. package/dist/api/vpc/v2/api.gen.d.ts +14 -2
  39. package/dist/api/vpc/v2/api.gen.js +29 -2
  40. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  41. package/dist/api/vpc/v2/marshalling.gen.cjs +16 -1
  42. package/dist/api/vpc/v2/marshalling.gen.d.ts +2 -1
  43. package/dist/api/vpc/v2/marshalling.gen.js +16 -1
  44. package/dist/api/vpc/v2/types.gen.d.ts +41 -0
  45. package/dist/index.cjs +30 -28
  46. package/dist/index.js +30 -28
  47. package/dist/scw/constants.cjs +1 -1
  48. package/dist/scw/constants.d.ts +2 -2
  49. package/dist/scw/constants.js +1 -1
  50. package/package.json +2 -2
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const json = require("../../../helpers/json.cjs");
4
+ const marshalling = require("../../../helpers/marshalling.cjs");
5
+ const unmarshalKeyRotationPolicy = (data) => {
6
+ if (!json.isJSONObject(data)) {
7
+ throw new TypeError(
8
+ `Unmarshalling the type 'KeyRotationPolicy' failed as data isn't a dictionary.`
9
+ );
10
+ }
11
+ return {
12
+ nextRotationAt: marshalling.unmarshalDate(data.next_rotation_at),
13
+ rotationPeriod: data.rotation_period
14
+ };
15
+ };
16
+ const unmarshalKeyUsage = (data) => {
17
+ if (!json.isJSONObject(data)) {
18
+ throw new TypeError(
19
+ `Unmarshalling the type 'KeyUsage' failed as data isn't a dictionary.`
20
+ );
21
+ }
22
+ return {
23
+ symmetricEncryption: data.symmetric_encryption ? data.symmetric_encryption : void 0
24
+ };
25
+ };
26
+ const unmarshalKey = (data) => {
27
+ if (!json.isJSONObject(data)) {
28
+ throw new TypeError(
29
+ `Unmarshalling the type 'Key' failed as data isn't a dictionary.`
30
+ );
31
+ }
32
+ return {
33
+ createdAt: marshalling.unmarshalDate(data.created_at),
34
+ description: data.description,
35
+ id: data.id,
36
+ locked: data.locked,
37
+ name: data.name,
38
+ projectId: data.project_id,
39
+ protected: data.protected,
40
+ region: data.region,
41
+ rotatedAt: marshalling.unmarshalDate(data.rotated_at),
42
+ rotationCount: data.rotation_count,
43
+ rotationPolicy: data.rotation_policy ? unmarshalKeyRotationPolicy(data.rotation_policy) : void 0,
44
+ state: data.state,
45
+ tags: data.tags,
46
+ updatedAt: marshalling.unmarshalDate(data.updated_at),
47
+ usage: data.usage ? unmarshalKeyUsage(data.usage) : void 0
48
+ };
49
+ };
50
+ const unmarshalDataKey = (data) => {
51
+ if (!json.isJSONObject(data)) {
52
+ throw new TypeError(
53
+ `Unmarshalling the type 'DataKey' failed as data isn't a dictionary.`
54
+ );
55
+ }
56
+ return {
57
+ algorithm: data.algorithm,
58
+ ciphertext: data.ciphertext,
59
+ createdAt: marshalling.unmarshalDate(data.created_at),
60
+ keyId: data.key_id,
61
+ plaintext: data.plaintext
62
+ };
63
+ };
64
+ const unmarshalDecryptResponse = (data) => {
65
+ if (!json.isJSONObject(data)) {
66
+ throw new TypeError(
67
+ `Unmarshalling the type 'DecryptResponse' failed as data isn't a dictionary.`
68
+ );
69
+ }
70
+ return {
71
+ ciphertext: data.ciphertext,
72
+ keyId: data.key_id,
73
+ plaintext: data.plaintext
74
+ };
75
+ };
76
+ const unmarshalEncryptResponse = (data) => {
77
+ if (!json.isJSONObject(data)) {
78
+ throw new TypeError(
79
+ `Unmarshalling the type 'EncryptResponse' failed as data isn't a dictionary.`
80
+ );
81
+ }
82
+ return {
83
+ ciphertext: data.ciphertext,
84
+ keyId: data.key_id
85
+ };
86
+ };
87
+ const unmarshalListKeysResponse = (data) => {
88
+ if (!json.isJSONObject(data)) {
89
+ throw new TypeError(
90
+ `Unmarshalling the type 'ListKeysResponse' failed as data isn't a dictionary.`
91
+ );
92
+ }
93
+ return {
94
+ keys: marshalling.unmarshalArrayOfObject(data.keys, unmarshalKey),
95
+ totalCount: data.total_count
96
+ };
97
+ };
98
+ const marshalKeyRotationPolicy = (request, defaults) => ({
99
+ next_rotation_at: request.nextRotationAt,
100
+ rotation_period: request.rotationPeriod
101
+ });
102
+ const marshalKeyUsage = (request, defaults) => ({
103
+ ...marshalling.resolveOneOf([
104
+ { param: "symmetric_encryption", value: request.symmetricEncryption }
105
+ ])
106
+ });
107
+ const marshalCreateKeyRequest = (request, defaults) => ({
108
+ description: request.description,
109
+ name: request.name,
110
+ project_id: request.projectId ?? defaults.defaultProjectId,
111
+ rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy) : void 0,
112
+ tags: request.tags,
113
+ unprotected: request.unprotected,
114
+ usage: request.usage !== void 0 ? marshalKeyUsage(request.usage) : void 0
115
+ });
116
+ const marshalDecryptRequest = (request, defaults) => ({
117
+ associated_data: request.associatedData,
118
+ ciphertext: request.ciphertext
119
+ });
120
+ const marshalEncryptRequest = (request, defaults) => ({
121
+ associated_data: request.associatedData,
122
+ plaintext: request.plaintext
123
+ });
124
+ const marshalGenerateDataKeyRequest = (request, defaults) => ({
125
+ algorithm: request.algorithm,
126
+ without_plaintext: request.withoutPlaintext
127
+ });
128
+ const marshalUpdateKeyRequest = (request, defaults) => ({
129
+ description: request.description,
130
+ name: request.name,
131
+ rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy) : void 0,
132
+ tags: request.tags
133
+ });
134
+ exports.marshalCreateKeyRequest = marshalCreateKeyRequest;
135
+ exports.marshalDecryptRequest = marshalDecryptRequest;
136
+ exports.marshalEncryptRequest = marshalEncryptRequest;
137
+ exports.marshalGenerateDataKeyRequest = marshalGenerateDataKeyRequest;
138
+ exports.marshalUpdateKeyRequest = marshalUpdateKeyRequest;
139
+ exports.unmarshalDataKey = unmarshalDataKey;
140
+ exports.unmarshalDecryptResponse = unmarshalDecryptResponse;
141
+ exports.unmarshalEncryptResponse = unmarshalEncryptResponse;
142
+ exports.unmarshalKey = unmarshalKey;
143
+ exports.unmarshalListKeysResponse = unmarshalListKeysResponse;
@@ -0,0 +1,12 @@
1
+ import type { DefaultValues } from '../../../bridge';
2
+ import type { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, Key, ListKeysResponse, UpdateKeyRequest } from './types.gen';
3
+ export declare const unmarshalKey: (data: unknown) => Key;
4
+ export declare const unmarshalDataKey: (data: unknown) => DataKey;
5
+ export declare const unmarshalDecryptResponse: (data: unknown) => DecryptResponse;
6
+ export declare const unmarshalEncryptResponse: (data: unknown) => EncryptResponse;
7
+ export declare const unmarshalListKeysResponse: (data: unknown) => ListKeysResponse;
8
+ export declare const marshalCreateKeyRequest: (request: CreateKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
9
+ export declare const marshalDecryptRequest: (request: DecryptRequest, defaults: DefaultValues) => Record<string, unknown>;
10
+ export declare const marshalEncryptRequest: (request: EncryptRequest, defaults: DefaultValues) => Record<string, unknown>;
11
+ export declare const marshalGenerateDataKeyRequest: (request: GenerateDataKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
12
+ export declare const marshalUpdateKeyRequest: (request: UpdateKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -0,0 +1,143 @@
1
+ import { isJSONObject } from "../../../helpers/json.js";
2
+ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
3
+ const unmarshalKeyRotationPolicy = (data) => {
4
+ if (!isJSONObject(data)) {
5
+ throw new TypeError(
6
+ `Unmarshalling the type 'KeyRotationPolicy' failed as data isn't a dictionary.`
7
+ );
8
+ }
9
+ return {
10
+ nextRotationAt: unmarshalDate(data.next_rotation_at),
11
+ rotationPeriod: data.rotation_period
12
+ };
13
+ };
14
+ const unmarshalKeyUsage = (data) => {
15
+ if (!isJSONObject(data)) {
16
+ throw new TypeError(
17
+ `Unmarshalling the type 'KeyUsage' failed as data isn't a dictionary.`
18
+ );
19
+ }
20
+ return {
21
+ symmetricEncryption: data.symmetric_encryption ? data.symmetric_encryption : void 0
22
+ };
23
+ };
24
+ const unmarshalKey = (data) => {
25
+ if (!isJSONObject(data)) {
26
+ throw new TypeError(
27
+ `Unmarshalling the type 'Key' failed as data isn't a dictionary.`
28
+ );
29
+ }
30
+ return {
31
+ createdAt: unmarshalDate(data.created_at),
32
+ description: data.description,
33
+ id: data.id,
34
+ locked: data.locked,
35
+ name: data.name,
36
+ projectId: data.project_id,
37
+ protected: data.protected,
38
+ region: data.region,
39
+ rotatedAt: unmarshalDate(data.rotated_at),
40
+ rotationCount: data.rotation_count,
41
+ rotationPolicy: data.rotation_policy ? unmarshalKeyRotationPolicy(data.rotation_policy) : void 0,
42
+ state: data.state,
43
+ tags: data.tags,
44
+ updatedAt: unmarshalDate(data.updated_at),
45
+ usage: data.usage ? unmarshalKeyUsage(data.usage) : void 0
46
+ };
47
+ };
48
+ const unmarshalDataKey = (data) => {
49
+ if (!isJSONObject(data)) {
50
+ throw new TypeError(
51
+ `Unmarshalling the type 'DataKey' failed as data isn't a dictionary.`
52
+ );
53
+ }
54
+ return {
55
+ algorithm: data.algorithm,
56
+ ciphertext: data.ciphertext,
57
+ createdAt: unmarshalDate(data.created_at),
58
+ keyId: data.key_id,
59
+ plaintext: data.plaintext
60
+ };
61
+ };
62
+ const unmarshalDecryptResponse = (data) => {
63
+ if (!isJSONObject(data)) {
64
+ throw new TypeError(
65
+ `Unmarshalling the type 'DecryptResponse' failed as data isn't a dictionary.`
66
+ );
67
+ }
68
+ return {
69
+ ciphertext: data.ciphertext,
70
+ keyId: data.key_id,
71
+ plaintext: data.plaintext
72
+ };
73
+ };
74
+ const unmarshalEncryptResponse = (data) => {
75
+ if (!isJSONObject(data)) {
76
+ throw new TypeError(
77
+ `Unmarshalling the type 'EncryptResponse' failed as data isn't a dictionary.`
78
+ );
79
+ }
80
+ return {
81
+ ciphertext: data.ciphertext,
82
+ keyId: data.key_id
83
+ };
84
+ };
85
+ const unmarshalListKeysResponse = (data) => {
86
+ if (!isJSONObject(data)) {
87
+ throw new TypeError(
88
+ `Unmarshalling the type 'ListKeysResponse' failed as data isn't a dictionary.`
89
+ );
90
+ }
91
+ return {
92
+ keys: unmarshalArrayOfObject(data.keys, unmarshalKey),
93
+ totalCount: data.total_count
94
+ };
95
+ };
96
+ const marshalKeyRotationPolicy = (request, defaults) => ({
97
+ next_rotation_at: request.nextRotationAt,
98
+ rotation_period: request.rotationPeriod
99
+ });
100
+ const marshalKeyUsage = (request, defaults) => ({
101
+ ...resolveOneOf([
102
+ { param: "symmetric_encryption", value: request.symmetricEncryption }
103
+ ])
104
+ });
105
+ const marshalCreateKeyRequest = (request, defaults) => ({
106
+ description: request.description,
107
+ name: request.name,
108
+ project_id: request.projectId ?? defaults.defaultProjectId,
109
+ rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy) : void 0,
110
+ tags: request.tags,
111
+ unprotected: request.unprotected,
112
+ usage: request.usage !== void 0 ? marshalKeyUsage(request.usage) : void 0
113
+ });
114
+ const marshalDecryptRequest = (request, defaults) => ({
115
+ associated_data: request.associatedData,
116
+ ciphertext: request.ciphertext
117
+ });
118
+ const marshalEncryptRequest = (request, defaults) => ({
119
+ associated_data: request.associatedData,
120
+ plaintext: request.plaintext
121
+ });
122
+ const marshalGenerateDataKeyRequest = (request, defaults) => ({
123
+ algorithm: request.algorithm,
124
+ without_plaintext: request.withoutPlaintext
125
+ });
126
+ const marshalUpdateKeyRequest = (request, defaults) => ({
127
+ description: request.description,
128
+ name: request.name,
129
+ rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy) : void 0,
130
+ tags: request.tags
131
+ });
132
+ export {
133
+ marshalCreateKeyRequest,
134
+ marshalDecryptRequest,
135
+ marshalEncryptRequest,
136
+ marshalGenerateDataKeyRequest,
137
+ marshalUpdateKeyRequest,
138
+ unmarshalDataKey,
139
+ unmarshalDecryptResponse,
140
+ unmarshalEncryptResponse,
141
+ unmarshalKey,
142
+ unmarshalListKeysResponse
143
+ };
@@ -0,0 +1,268 @@
1
+ import type { Region } from '../../../bridge';
2
+ export type DataKeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
3
+ export type KeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
4
+ export type KeyState = 'unknown_state' | 'enabled' | 'disabled' | 'pending_key_material';
5
+ export type ListKeysRequestOrderBy = 'name_asc' | 'name_desc' | 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
6
+ export interface KeyRotationPolicy {
7
+ /**
8
+ * Duration between two key rotations. The minimum duration is 24 hours and
9
+ * the maximum duration is 876000 hours (1 year).
10
+ */
11
+ rotationPeriod?: string;
12
+ /** Date at which the key will be rotated next. */
13
+ nextRotationAt?: Date;
14
+ }
15
+ export interface KeyUsage {
16
+ /** One-of ('usage'): at most one of 'symmetricEncryption' could be set. */
17
+ symmetricEncryption?: KeyAlgorithmSymmetricEncryption;
18
+ }
19
+ export interface Key {
20
+ /** ID of the key. */
21
+ id: string;
22
+ /** ID of the Project containing the key. */
23
+ projectId: string;
24
+ /** Name of the key. */
25
+ name: string;
26
+ /**
27
+ * Keys with a usage set to `symmetric_encryption` are used to encrypt and
28
+ * decrypt data. The only key algorithm currently supported by Key Manager is
29
+ * AES-256-GCM.
30
+ */
31
+ usage?: KeyUsage;
32
+ /**
33
+ * Current state of the key. Values include: `unknown_state`: key is in an
34
+ * unknown state. `enabled`: key can be used for cryptographic operations.
35
+ * `disabled`: key cannot be used for cryptographic operations.
36
+ */
37
+ state: KeyState;
38
+ /** The rotation count tracks the amount of times that the key was rotated. */
39
+ rotationCount: number;
40
+ /** Key creation date. */
41
+ createdAt?: Date;
42
+ /** Key last modification date. */
43
+ updatedAt?: Date;
44
+ /** Returns `true` if key protection is applied to the key. */
45
+ protected: boolean;
46
+ /** Returns `true` if the key is locked. */
47
+ locked: boolean;
48
+ /** Description of the key. */
49
+ description?: string;
50
+ /** List of the key's tags. */
51
+ tags: string[];
52
+ /** Key last rotation date. */
53
+ rotatedAt?: Date;
54
+ /** Key rotation policy. */
55
+ rotationPolicy?: KeyRotationPolicy;
56
+ /** Region of the key. */
57
+ region: Region;
58
+ }
59
+ export type CreateKeyRequest = {
60
+ /**
61
+ * Region to target. If none is passed will use default region from the
62
+ * config.
63
+ */
64
+ region?: Region;
65
+ /** ID of the Project containing the key. */
66
+ projectId?: string;
67
+ /** (Optional) Name of the key. */
68
+ name?: string;
69
+ /**
70
+ * See the `Key.Algorithm.SymmetricEncryption` enum for a description of
71
+ * values.
72
+ */
73
+ usage?: KeyUsage;
74
+ /** (Optional) Description of the key. */
75
+ description?: string;
76
+ /** (Optional) List of the key's tags. */
77
+ tags?: string[];
78
+ /** If not specified, no rotation policy will be applied to the key. */
79
+ rotationPolicy?: KeyRotationPolicy;
80
+ /** Default value is `false`. */
81
+ unprotected: boolean;
82
+ };
83
+ export interface DataKey {
84
+ /** ID of the data encryption key. */
85
+ keyId: string;
86
+ /** Symmetric encryption algorithm of the data encryption key. */
87
+ algorithm: DataKeyAlgorithmSymmetricEncryption;
88
+ /**
89
+ * Your data encryption key's ciphertext can be stored safely. It can only be
90
+ * decrypted through the keys you create in Key Manager, using the relevant
91
+ * key ID.
92
+ */
93
+ ciphertext: string;
94
+ /**
95
+ * (Optional) Your data encryption key's plaintext allows you to use the key
96
+ * immediately upon creation. It must neither be stored or shared.
97
+ */
98
+ plaintext?: string;
99
+ /** Data encryption key creation date. */
100
+ createdAt?: Date;
101
+ }
102
+ export type DecryptRequest = {
103
+ /**
104
+ * Region to target. If none is passed will use default region from the
105
+ * config.
106
+ */
107
+ region?: Region;
108
+ /** ID of the key to decrypt. */
109
+ keyId: string;
110
+ /** Data size must be between 1 and 131071 bytes. */
111
+ ciphertext: string;
112
+ /** The additional data must match the value passed in the encryption request. */
113
+ associatedData?: string;
114
+ };
115
+ export interface DecryptResponse {
116
+ /** ID of the key used for decryption. */
117
+ keyId: string;
118
+ /** Key's decrypted data. */
119
+ plaintext: string;
120
+ /**
121
+ * If the data was already encrypted with the latest key rotation, no output
122
+ * will be returned in the response object.
123
+ */
124
+ ciphertext?: string;
125
+ }
126
+ export type DeleteKeyRequest = {
127
+ /**
128
+ * Region to target. If none is passed will use default region from the
129
+ * config.
130
+ */
131
+ region?: Region;
132
+ /** ID of the key to delete. */
133
+ keyId: string;
134
+ };
135
+ export type DisableKeyRequest = {
136
+ /**
137
+ * Region to target. If none is passed will use default region from the
138
+ * config.
139
+ */
140
+ region?: Region;
141
+ /** ID of the key to disable. */
142
+ keyId: string;
143
+ };
144
+ export type EnableKeyRequest = {
145
+ /**
146
+ * Region to target. If none is passed will use default region from the
147
+ * config.
148
+ */
149
+ region?: Region;
150
+ /** ID of the key to enable. */
151
+ keyId: string;
152
+ };
153
+ export type EncryptRequest = {
154
+ /**
155
+ * Region to target. If none is passed will use default region from the
156
+ * config.
157
+ */
158
+ region?: Region;
159
+ /** ID of the key to encrypt. */
160
+ keyId: string;
161
+ /** Data size must be between 1 and 65535 bytes. */
162
+ plaintext: string;
163
+ /**
164
+ * Additional data which will not be encrypted, but authenticated and appended
165
+ * to the encrypted payload.
166
+ */
167
+ associatedData?: string;
168
+ };
169
+ export interface EncryptResponse {
170
+ /** ID of the key used for encryption. */
171
+ keyId: string;
172
+ /** Key's encrypted data. */
173
+ ciphertext: string;
174
+ }
175
+ export type GenerateDataKeyRequest = {
176
+ /**
177
+ * Region to target. If none is passed will use default region from the
178
+ * config.
179
+ */
180
+ region?: Region;
181
+ /** ID of the key. */
182
+ keyId: string;
183
+ /** Symmetric encryption algorithm of the data encryption key. */
184
+ algorithm?: DataKeyAlgorithmSymmetricEncryption;
185
+ /**
186
+ * Default value is `false`, meaning that the plaintext is returned. Set it to
187
+ * `true` if you do not wish the plaintext to be returned in the response
188
+ * object.
189
+ */
190
+ withoutPlaintext: boolean;
191
+ };
192
+ export type GetKeyRequest = {
193
+ /**
194
+ * Region to target. If none is passed will use default region from the
195
+ * config.
196
+ */
197
+ region?: Region;
198
+ /** ID of the key to target. */
199
+ keyId: string;
200
+ };
201
+ export type ListKeysRequest = {
202
+ /**
203
+ * Region to target. If none is passed will use default region from the
204
+ * config.
205
+ */
206
+ region?: Region;
207
+ /** (Optional) Filter by Organization ID. */
208
+ organizationId?: string;
209
+ /** (Optional) Filter by Project ID. */
210
+ projectId?: string;
211
+ orderBy?: ListKeysRequestOrderBy;
212
+ page?: number;
213
+ pageSize?: number;
214
+ /** (Optional) List of tags to filter on. */
215
+ tags?: string[];
216
+ /** (Optional) Filter by key name. */
217
+ name?: string;
218
+ };
219
+ export interface ListKeysResponse {
220
+ /** Single page of keys matching the requested criteria. */
221
+ keys: Key[];
222
+ /** Total count of keys matching the requested criteria. */
223
+ totalCount: number;
224
+ }
225
+ export type ProtectKeyRequest = {
226
+ /**
227
+ * Region to target. If none is passed will use default region from the
228
+ * config.
229
+ */
230
+ region?: Region;
231
+ /** ID of the key to apply key protection to. */
232
+ keyId: string;
233
+ };
234
+ export type RotateKeyRequest = {
235
+ /**
236
+ * Region to target. If none is passed will use default region from the
237
+ * config.
238
+ */
239
+ region?: Region;
240
+ /** ID of the key to rotate. */
241
+ keyId: string;
242
+ };
243
+ export type UnprotectKeyRequest = {
244
+ /**
245
+ * Region to target. If none is passed will use default region from the
246
+ * config.
247
+ */
248
+ region?: Region;
249
+ /** ID of the key to remove key protection from. */
250
+ keyId: string;
251
+ };
252
+ export type UpdateKeyRequest = {
253
+ /**
254
+ * Region to target. If none is passed will use default region from the
255
+ * config.
256
+ */
257
+ region?: Region;
258
+ /** ID of the key to update. */
259
+ keyId: string;
260
+ /** (Optional) Updated name of the key. */
261
+ name?: string;
262
+ /** (Optional) Updated description of the key. */
263
+ description?: string;
264
+ /** (Optional) Updated list of the key's tags. */
265
+ tags?: string[];
266
+ /** If not specified, the key's existing rotation policy applies. */
267
+ rotationPolicy?: KeyRotationPolicy;
268
+ };
@@ -251,7 +251,7 @@ class API extends api.API {
251
251
  marshalling_gen.unmarshalListModelsResponse
252
252
  );
253
253
  /**
254
- * List models. List all available LLM models.
254
+ * List models. List all available models.
255
255
  *
256
256
  * @param request - The request {@link ListModelsRequest}
257
257
  * @returns A Promise of ListModelsResponse
@@ -2,9 +2,9 @@ import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region, WaitForOptions } from '../../../bridge';
3
3
  import type { AddDeploymentACLRulesRequest, AddDeploymentACLRulesResponse, CreateDeploymentRequest, CreateEndpointRequest, DeleteDeploymentACLRuleRequest, DeleteDeploymentRequest, DeleteEndpointRequest, Deployment, Endpoint, Eula, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelEulaRequest, GetModelRequest, ListDeploymentACLRulesRequest, ListDeploymentACLRulesResponse, ListDeploymentsRequest, ListDeploymentsResponse, ListModelsRequest, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, SetDeploymentACLRulesRequest, SetDeploymentACLRulesResponse, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
4
4
  /**
5
- * LLM Inference API.
5
+ * Managed Inference API.
6
6
  *
7
- * This API allows you to manage your LLM Inference services.
7
+ * This API allows you to manage your Inference services.
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
10
  /** Lists the available regions of the API. */
@@ -118,7 +118,7 @@ export declare class API extends ParentAPI {
118
118
  deleteDeploymentACLRule: (request: Readonly<DeleteDeploymentACLRuleRequest>) => Promise<void>;
119
119
  protected pageOfListModels: (request?: Readonly<ListModelsRequest>) => Promise<ListModelsResponse>;
120
120
  /**
121
- * List models. List all available LLM models.
121
+ * List models. List all available models.
122
122
  *
123
123
  * @param request - The request {@link ListModelsRequest}
124
124
  * @returns A Promise of ListModelsResponse
@@ -249,7 +249,7 @@ class API extends API$1 {
249
249
  unmarshalListModelsResponse
250
250
  );
251
251
  /**
252
- * List models. List all available LLM models.
252
+ * List models. List all available models.
253
253
  *
254
254
  * @param request - The request {@link ListModelsRequest}
255
255
  * @returns A Promise of ListModelsResponse
@@ -79,8 +79,8 @@ export interface EndpointSpec {
79
79
  */
80
80
  privateNetwork?: EndpointSpecPrivateNetwork;
81
81
  /**
82
- * By default, LLM deployments are protected by IAM authentication. When
83
- * setting this field to true, the authentication will be disabled.
82
+ * By default, deployments are protected by IAM authentication. When setting
83
+ * this field to true, the authentication will be disabled.
84
84
  */
85
85
  disableAuth: boolean;
86
86
  }
@@ -426,8 +426,8 @@ export type UpdateEndpointRequest = {
426
426
  /** ID of the endpoint to update. */
427
427
  endpointId: string;
428
428
  /**
429
- * By default, LLM deployments are protected by IAM authentication. When
430
- * setting this field to true, the authentication will be disabled.
429
+ * By default, deployments are protected by IAM authentication. When setting
430
+ * this field to true, the authentication will be disabled.
431
431
  */
432
432
  disableAuth?: boolean;
433
433
  };
@@ -244,8 +244,35 @@ class API extends api.API {
244
244
  },
245
245
  marshalling_gen.unmarshalVPC
246
246
  );
247
+ pageOfListSubnets = (request = {}) => this.client.fetch(
248
+ {
249
+ method: "GET",
250
+ path: `/vpc/v2/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subnets`,
251
+ urlParams: marshalling.urlParams(
252
+ ["order_by", request.orderBy],
253
+ ["organization_id", request.organizationId],
254
+ ["page", request.page],
255
+ [
256
+ "page_size",
257
+ request.pageSize ?? this.client.settings.defaultPageSize
258
+ ],
259
+ ["project_id", request.projectId],
260
+ ["subnet_ids", request.subnetIds],
261
+ ["vpc_id", request.vpcId]
262
+ )
263
+ },
264
+ marshalling_gen.unmarshalListSubnetsResponse
265
+ );
266
+ /**
267
+ * List subnets. List any Private Network's subnets. See ListPrivateNetworks
268
+ * to list a specific Private Network's subnets.
269
+ *
270
+ * @param request - The request {@link ListSubnetsRequest}
271
+ * @returns A Promise of ListSubnetsResponse
272
+ */
273
+ listSubnets = (request = {}) => resourcePaginator.enrichForPagination("subnets", this.pageOfListSubnets, request);
247
274
  /**
248
- * Set the subnets of a Private Network. Set subnets for an existing Private
275
+ * Set a Private Network's subnets. Set subnets for an existing Private
249
276
  * Network. Note that the method is PUT and not PATCH. Any existing subnets
250
277
  * will be removed in favor of the new specified set of subnets.
251
278
  *