@scaleway/sdk 2.41.0 → 2.43.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 (64) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +5 -1
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +5 -1
  3. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +14 -2
  4. package/dist/api/block/v1alpha1/api.gen.cjs +4 -3
  5. package/dist/api/block/v1alpha1/api.gen.d.ts +4 -3
  6. package/dist/api/block/v1alpha1/api.gen.js +4 -3
  7. package/dist/api/container/v1beta1/marshalling.gen.cjs +3 -0
  8. package/dist/api/container/v1beta1/marshalling.gen.js +3 -0
  9. package/dist/api/container/v1beta1/types.gen.d.ts +6 -0
  10. package/dist/api/domain/v2beta1/types.gen.d.ts +1 -1
  11. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +2 -0
  12. package/dist/api/iam/v1alpha1/marshalling.gen.js +2 -0
  13. package/dist/api/iam/v1alpha1/types.gen.d.ts +4 -0
  14. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +6 -0
  15. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +5 -0
  16. package/dist/api/iam/v1alpha1/validation-rules.gen.js +6 -0
  17. package/dist/api/instance/v1/types.gen.d.ts +2 -1
  18. package/dist/api/k8s/v1/api.gen.cjs +32 -0
  19. package/dist/api/k8s/v1/api.gen.d.ts +19 -1
  20. package/dist/api/k8s/v1/api.gen.js +33 -1
  21. package/dist/api/k8s/v1/index.gen.d.ts +1 -1
  22. package/dist/api/k8s/v1/marshalling.gen.cjs +53 -0
  23. package/dist/api/k8s/v1/marshalling.gen.d.ts +3 -1
  24. package/dist/api/k8s/v1/marshalling.gen.js +53 -0
  25. package/dist/api/k8s/v1/types.gen.d.ts +48 -0
  26. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +7 -7
  27. package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
  28. package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
  29. package/dist/api/secret/v1beta1/types.gen.d.ts +2 -0
  30. package/dist/api/tem/v1alpha1/api.gen.cjs +60 -0
  31. package/dist/api/tem/v1alpha1/api.gen.d.ts +45 -1
  32. package/dist/api/tem/v1alpha1/api.gen.js +61 -1
  33. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  34. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +10 -0
  35. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +2 -1
  36. package/dist/api/tem/v1alpha1/marshalling.gen.js +10 -0
  37. package/dist/api/tem/v1alpha1/types.gen.d.ts +30 -0
  38. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
  39. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
  40. package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -0
  41. package/dist/api/vpcgw/v1/api.gen.cjs +8 -5
  42. package/dist/api/vpcgw/v1/api.gen.d.ts +5 -4
  43. package/dist/api/vpcgw/v1/api.gen.js +9 -6
  44. package/dist/api/vpcgw/v1/marshalling.gen.cjs +4 -0
  45. package/dist/api/vpcgw/v1/marshalling.gen.d.ts +2 -1
  46. package/dist/api/vpcgw/v1/marshalling.gen.js +4 -0
  47. package/dist/api/vpcgw/v1/types.gen.d.ts +2 -0
  48. package/dist/api/webhosting/v1alpha1/api.gen.cjs +91 -0
  49. package/dist/api/webhosting/v1alpha1/api.gen.d.ts +47 -1
  50. package/dist/api/webhosting/v1alpha1/api.gen.js +93 -2
  51. package/dist/api/webhosting/v1alpha1/index.gen.cjs +1 -0
  52. package/dist/api/webhosting/v1alpha1/index.gen.d.ts +2 -2
  53. package/dist/api/webhosting/v1alpha1/index.gen.js +2 -1
  54. package/dist/api/webhosting/v1alpha1/marshalling.gen.cjs +48 -0
  55. package/dist/api/webhosting/v1alpha1/marshalling.gen.d.ts +5 -1
  56. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +48 -0
  57. package/dist/api/webhosting/v1alpha1/types.gen.d.ts +84 -0
  58. package/dist/api/webhosting/v1alpha1/validation-rules.gen.cjs +10 -0
  59. package/dist/api/webhosting/v1alpha1/validation-rules.gen.d.ts +9 -0
  60. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -0
  61. package/dist/scw/constants.cjs +1 -1
  62. package/dist/scw/constants.d.ts +2 -2
  63. package/dist/scw/constants.js +1 -1
  64. package/package.json +2 -2
@@ -103,13 +103,16 @@ const unmarshalServer = (data) => {
103
103
  return {
104
104
  createdAt: marshalling.unmarshalDate(data.created_at),
105
105
  deletableAt: marshalling.unmarshalDate(data.deletable_at),
106
+ deletionScheduled: data.deletion_scheduled,
106
107
  id: data.id,
107
108
  ip: data.ip,
108
109
  name: data.name,
109
110
  organizationId: data.organization_id,
110
111
  os: data.os ? unmarshalOS(data.os) : void 0,
111
112
  projectId: data.project_id,
113
+ sshUsername: data.ssh_username,
112
114
  status: data.status,
115
+ sudoPassword: data.sudo_password,
113
116
  type: data.type,
114
117
  updatedAt: marshalling.unmarshalDate(data.updated_at),
115
118
  vncUrl: data.vnc_url,
@@ -158,7 +161,8 @@ const marshalReinstallServerRequest = (request, defaults) => ({
158
161
  os_id: request.osId
159
162
  });
160
163
  const marshalUpdateServerRequest = (request, defaults) => ({
161
- name: request.name
164
+ name: request.name,
165
+ schedule_deletion: request.scheduleDeletion
162
166
  });
163
167
  exports.marshalCreateServerRequest = marshalCreateServerRequest;
164
168
  exports.marshalReinstallServerRequest = marshalReinstallServerRequest;
@@ -101,13 +101,16 @@ const unmarshalServer = (data) => {
101
101
  return {
102
102
  createdAt: unmarshalDate(data.created_at),
103
103
  deletableAt: unmarshalDate(data.deletable_at),
104
+ deletionScheduled: data.deletion_scheduled,
104
105
  id: data.id,
105
106
  ip: data.ip,
106
107
  name: data.name,
107
108
  organizationId: data.organization_id,
108
109
  os: data.os ? unmarshalOS(data.os) : void 0,
109
110
  projectId: data.project_id,
111
+ sshUsername: data.ssh_username,
110
112
  status: data.status,
113
+ sudoPassword: data.sudo_password,
111
114
  type: data.type,
112
115
  updatedAt: unmarshalDate(data.updated_at),
113
116
  vncUrl: data.vnc_url,
@@ -156,7 +159,8 @@ const marshalReinstallServerRequest = (request, defaults) => ({
156
159
  os_id: request.osId
157
160
  });
158
161
  const marshalUpdateServerRequest = (request, defaults) => ({
159
- name: request.name
162
+ name: request.name,
163
+ schedule_deletion: request.scheduleDeletion
160
164
  });
161
165
  export {
162
166
  marshalCreateServerRequest,
@@ -74,8 +74,12 @@ export interface Server {
74
74
  organizationId: string;
75
75
  /** IPv4 address of the server. */
76
76
  ip: string;
77
- /** URL of the VNC. */
77
+ /** Vnc:// URL to access Apple Remote Desktop. */
78
78
  vncUrl: string;
79
+ /** SSH Username for remote shell. */
80
+ sshUsername: string;
81
+ /** Admin password required to execute commands. */
82
+ sudoPassword: string;
79
83
  /**
80
84
  * Initially installed OS, this does not necessarily reflect the current OS
81
85
  * version.
@@ -87,8 +91,14 @@ export interface Server {
87
91
  createdAt?: Date;
88
92
  /** Date on which the server was last updated. */
89
93
  updatedAt?: Date;
90
- /** Date on which the server was last deleted. */
94
+ /** Date from which the server can be deleted. */
91
95
  deletableAt?: Date;
96
+ /**
97
+ * Set to true to mark the server for automatic deletion depending on
98
+ * `deletable_at` date. Set to false to cancel an existing deletion schedule.
99
+ * Leave unset otherwise.
100
+ */
101
+ deletionScheduled: boolean;
92
102
  /** Zone of the server. */
93
103
  zone: Zone;
94
104
  }
@@ -211,4 +221,6 @@ export type UpdateServerRequest = {
211
221
  serverId: string;
212
222
  /** Updated name for your server. */
213
223
  name?: string;
224
+ /** Specify whether the server should be flagged for automatic deletion. */
225
+ scheduleDeletion?: boolean;
214
226
  };
@@ -224,9 +224,10 @@ class API extends api.API {
224
224
  marshalling_gen.unmarshalSnapshot
225
225
  );
226
226
  /**
227
- * Import a snapshot from a Scaleway Object Storage bucket. The bucket must
228
- * contain a QCOW2 image. The bucket can be imported into any Availability
229
- * Zone as long as it is in the same region as the bucket.
227
+ * (Deprecated in favor of `ImportSnapshotFromObjectStorage`). Import a
228
+ * snapshot from a Scaleway Object Storage bucket The bucket must contain a
229
+ * QCOW2 image. The bucket can be imported into any Availability Zone as long
230
+ * as it is in the same region as the bucket.
230
231
  *
231
232
  * @deprecated
232
233
  * @param request - The request {@link ImportSnapshotFromS3Request}
@@ -119,9 +119,10 @@ export declare class API extends ParentAPI {
119
119
  */
120
120
  createSnapshot: (request: Readonly<CreateSnapshotRequest>) => Promise<Snapshot>;
121
121
  /**
122
- * Import a snapshot from a Scaleway Object Storage bucket. The bucket must
123
- * contain a QCOW2 image. The bucket can be imported into any Availability
124
- * Zone as long as it is in the same region as the bucket.
122
+ * (Deprecated in favor of `ImportSnapshotFromObjectStorage`). Import a
123
+ * snapshot from a Scaleway Object Storage bucket The bucket must contain a
124
+ * QCOW2 image. The bucket can be imported into any Availability Zone as long
125
+ * as it is in the same region as the bucket.
125
126
  *
126
127
  * @deprecated
127
128
  * @param request - The request {@link ImportSnapshotFromS3Request}
@@ -222,9 +222,10 @@ class API extends API$1 {
222
222
  unmarshalSnapshot
223
223
  );
224
224
  /**
225
- * Import a snapshot from a Scaleway Object Storage bucket. The bucket must
226
- * contain a QCOW2 image. The bucket can be imported into any Availability
227
- * Zone as long as it is in the same region as the bucket.
225
+ * (Deprecated in favor of `ImportSnapshotFromObjectStorage`). Import a
226
+ * snapshot from a Scaleway Object Storage bucket The bucket must contain a
227
+ * QCOW2 image. The bucket can be imported into any Availability Zone as long
228
+ * as it is in the same region as the bucket.
228
229
  *
229
230
  * @deprecated
230
231
  * @param request - The request {@link ImportSnapshotFromS3Request}
@@ -29,6 +29,7 @@ const unmarshalContainer = (data) => {
29
29
  errorMessage: data.error_message,
30
30
  httpOption: data.http_option,
31
31
  id: data.id,
32
+ localStorageLimit: data.local_storage_limit,
32
33
  maxConcurrency: data.max_concurrency,
33
34
  maxScale: data.max_scale,
34
35
  memoryLimit: data.memory_limit,
@@ -254,6 +255,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
254
255
  description: request.description,
255
256
  environment_variables: request.environmentVariables,
256
257
  http_option: request.httpOption,
258
+ local_storage_limit: request.localStorageLimit,
257
259
  max_concurrency: request.maxConcurrency,
258
260
  max_scale: request.maxScale,
259
261
  memory_limit: request.memoryLimit,
@@ -344,6 +346,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
344
346
  description: request.description,
345
347
  environment_variables: request.environmentVariables,
346
348
  http_option: request.httpOption,
349
+ local_storage_limit: request.localStorageLimit,
347
350
  max_concurrency: request.maxConcurrency,
348
351
  max_scale: request.maxScale,
349
352
  memory_limit: request.memoryLimit,
@@ -27,6 +27,7 @@ const unmarshalContainer = (data) => {
27
27
  errorMessage: data.error_message,
28
28
  httpOption: data.http_option,
29
29
  id: data.id,
30
+ localStorageLimit: data.local_storage_limit,
30
31
  maxConcurrency: data.max_concurrency,
31
32
  maxScale: data.max_scale,
32
33
  memoryLimit: data.memory_limit,
@@ -252,6 +253,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
252
253
  description: request.description,
253
254
  environment_variables: request.environmentVariables,
254
255
  http_option: request.httpOption,
256
+ local_storage_limit: request.localStorageLimit,
255
257
  max_concurrency: request.maxConcurrency,
256
258
  max_scale: request.maxScale,
257
259
  memory_limit: request.memoryLimit,
@@ -342,6 +344,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
342
344
  description: request.description,
343
345
  environment_variables: request.environmentVariables,
344
346
  http_option: request.httpOption,
347
+ local_storage_limit: request.localStorageLimit,
345
348
  max_concurrency: request.maxConcurrency,
346
349
  max_scale: request.maxScale,
347
350
  memory_limit: request.memoryLimit,
@@ -134,6 +134,8 @@ export interface Container {
134
134
  httpOption: ContainerHttpOption;
135
135
  /** Execution environment of the container. */
136
136
  sandbox: ContainerSandbox;
137
+ /** Local storage limit of the container (in MB). */
138
+ localStorageLimit: number;
137
139
  /** Region in which the container will be deployed. */
138
140
  region: Region;
139
141
  }
@@ -307,6 +309,8 @@ export type CreateContainerRequest = {
307
309
  httpOption?: ContainerHttpOption;
308
310
  /** Execution environment of the container. */
309
311
  sandbox?: ContainerSandbox;
312
+ /** Local storage limit of the container (in MB). */
313
+ localStorageLimit?: number;
310
314
  };
311
315
  export type CreateCronRequest = {
312
316
  /**
@@ -738,6 +742,8 @@ export type UpdateContainerRequest = {
738
742
  httpOption?: ContainerHttpOption;
739
743
  /** Execution environment of the container. */
740
744
  sandbox?: ContainerSandbox;
745
+ /** Local storage limit of the container (in MB). */
746
+ localStorageLimit?: number;
741
747
  };
742
748
  export type UpdateCronRequest = {
743
749
  /**
@@ -10,7 +10,7 @@ export type DSRecordAlgorithm = 'rsamd5' | 'dh' | 'dsa' | 'rsasha1' | 'dsa_nsec3
10
10
  export type DSRecordDigestType = 'sha_1' | 'sha_256' | 'gost_r_34_11_94' | 'sha_384';
11
11
  export type DomainFeatureStatus = 'feature_status_unknown' | 'enabling' | 'enabled' | 'disabling' | 'disabled';
12
12
  export type DomainRecordHTTPServiceConfigStrategy = 'random' | 'hashed' | 'all';
13
- export type DomainRecordType = 'unknown' | 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'TLSA' | 'MX' | 'NS' | 'PTR' | 'CAA' | 'ALIAS' | 'LOC' | 'SSHFP' | 'HINFO' | 'RP' | 'URI' | 'DS' | 'NAPTR' | 'DNAME';
13
+ export type DomainRecordType = 'unknown' | 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'TLSA' | 'MX' | 'NS' | 'PTR' | 'CAA' | 'ALIAS' | 'LOC' | 'SSHFP' | 'HINFO' | 'RP' | 'URI' | 'DS' | 'NAPTR' | 'DNAME' | 'SVCB' | 'HTTPS';
14
14
  export type DomainRegistrationStatusTransferStatus = 'status_unknown' | 'pending' | 'waiting_vote' | 'rejected' | 'processing' | 'done';
15
15
  export type DomainStatus = 'status_unknown' | 'active' | 'creating' | 'create_error' | 'renewing' | 'renew_error' | 'xfering' | 'xfer_error' | 'expired' | 'expiring' | 'updating' | 'checking' | 'locked' | 'deleting';
16
16
  export type HostStatus = 'unknown_status' | 'active' | 'updating' | 'deleting';
@@ -302,6 +302,7 @@ const unmarshalRule = (data) => {
302
302
  }
303
303
  return {
304
304
  accountRootUserId: data.account_root_user_id,
305
+ condition: data.condition,
305
306
  id: data.id,
306
307
  organizationId: data.organization_id,
307
308
  permissionSetNames: data.permission_set_names,
@@ -388,6 +389,7 @@ const marshalCreateJWTRequest = (request, defaults) => ({
388
389
  user_id: request.userId
389
390
  });
390
391
  const marshalRuleSpecs = (request, defaults) => ({
392
+ condition: request.condition,
391
393
  permission_set_names: request.permissionSetNames,
392
394
  ...marshalling.resolveOneOf([
393
395
  { param: "project_ids", value: request.projectIds },
@@ -300,6 +300,7 @@ const unmarshalRule = (data) => {
300
300
  }
301
301
  return {
302
302
  accountRootUserId: data.account_root_user_id,
303
+ condition: data.condition,
303
304
  id: data.id,
304
305
  organizationId: data.organization_id,
305
306
  permissionSetNames: data.permission_set_names,
@@ -386,6 +387,7 @@ const marshalCreateJWTRequest = (request, defaults) => ({
386
387
  user_id: request.userId
387
388
  });
388
389
  const marshalRuleSpecs = (request, defaults) => ({
390
+ condition: request.condition,
389
391
  permission_set_names: request.permissionSetNames,
390
392
  ...resolveOneOf([
391
393
  { param: "project_ids", value: request.projectIds },
@@ -17,6 +17,8 @@ export type UserType = 'unknown_type' | 'guest' | 'owner';
17
17
  export interface RuleSpecs {
18
18
  /** Names of permission sets bound to the rule. */
19
19
  permissionSetNames?: string[];
20
+ /** Condition expression to evaluate. */
21
+ condition: string;
20
22
  /**
21
23
  * List of Project IDs the rule is scoped to.
22
24
  *
@@ -235,6 +237,8 @@ export interface Rule {
235
237
  permissionSetNames?: string[];
236
238
  /** Permission_set_names have the same scope_type. */
237
239
  permissionSetsScopeType: PermissionSetScopeType;
240
+ /** Condition expression to evaluate. */
241
+ condition: string;
238
242
  /**
239
243
  * List of Project IDs the rule is scoped to.
240
244
  *
@@ -171,6 +171,11 @@ const ListUsersRequest = {
171
171
  lessThanOrEqual: 100
172
172
  }
173
173
  };
174
+ const RuleSpecs = {
175
+ condition: {
176
+ maxLength: 255
177
+ }
178
+ };
174
179
  const UpdateAPIKeyRequest = {
175
180
  description: {
176
181
  maxLength: 200
@@ -228,6 +233,7 @@ exports.ListQuotaRequest = ListQuotaRequest;
228
233
  exports.ListRulesRequest = ListRulesRequest;
229
234
  exports.ListSSHKeysRequest = ListSSHKeysRequest;
230
235
  exports.ListUsersRequest = ListUsersRequest;
236
+ exports.RuleSpecs = RuleSpecs;
231
237
  exports.UpdateAPIKeyRequest = UpdateAPIKeyRequest;
232
238
  exports.UpdateApplicationRequest = UpdateApplicationRequest;
233
239
  exports.UpdateGroupRequest = UpdateGroupRequest;
@@ -169,6 +169,11 @@ export declare const ListUsersRequest: {
169
169
  lessThanOrEqual: number;
170
170
  };
171
171
  };
172
+ export declare const RuleSpecs: {
173
+ condition: {
174
+ maxLength: number;
175
+ };
176
+ };
172
177
  export declare const UpdateAPIKeyRequest: {
173
178
  description: {
174
179
  maxLength: number;
@@ -169,6 +169,11 @@ const ListUsersRequest = {
169
169
  lessThanOrEqual: 100
170
170
  }
171
171
  };
172
+ const RuleSpecs = {
173
+ condition: {
174
+ maxLength: 255
175
+ }
176
+ };
172
177
  const UpdateAPIKeyRequest = {
173
178
  description: {
174
179
  maxLength: 200
@@ -227,6 +232,7 @@ export {
227
232
  ListRulesRequest,
228
233
  ListSSHKeysRequest,
229
234
  ListUsersRequest,
235
+ RuleSpecs,
230
236
  UpdateAPIKeyRequest,
231
237
  UpdateApplicationRequest,
232
238
  UpdateGroupRequest,
@@ -216,7 +216,8 @@ export interface ServerMaintenance {
216
216
  export interface VolumeServer {
217
217
  id: string;
218
218
  name: string;
219
- exportUri: string;
219
+ /** @deprecated */
220
+ exportUri?: string;
220
221
  organization: string;
221
222
  server?: ServerSummary;
222
223
  size: number;
@@ -348,6 +348,38 @@ class API extends api.API {
348
348
  },
349
349
  marshalling_gen.unmarshalPool
350
350
  );
351
+ /**
352
+ * Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node.
353
+ * This method is not intended to be called by end users but rather
354
+ * programmatically by the node-installer.
355
+ *
356
+ * @param request - The request {@link GetNodeMetadataRequest}
357
+ * @returns A Promise of NodeMetadata
358
+ */
359
+ getNodeMetadata = (request = {}) => this.client.fetch(
360
+ {
361
+ method: "GET",
362
+ path: `/k8s/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/nodes/metadata`
363
+ },
364
+ marshalling_gen.unmarshalNodeMetadata
365
+ );
366
+ /**
367
+ * Authenticate Kosmos external node. Creates a newer Kosmos node and returns
368
+ * its token. This method is not intended to be called by end users but rather
369
+ * programmatically by the node-installer.
370
+ *
371
+ * @param request - The request {@link AuthExternalNodeRequest}
372
+ * @returns A Promise of ExternalNodeAuth
373
+ */
374
+ authExternalNode = (request) => this.client.fetch(
375
+ {
376
+ body: "{}",
377
+ headers: jsonContentHeaders,
378
+ method: "POST",
379
+ path: `/k8s/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${marshalling.validatePathParam("poolId", request.poolId)}/external-nodes/auth`
380
+ },
381
+ marshalling_gen.unmarshalExternalNodeAuth
382
+ );
351
383
  /**
352
384
  * Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is
353
385
  * not intended to be called by end users but rather programmatically by the
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region, WaitForOptions } from '../../../bridge';
3
- import type { Cluster, CreateClusterRequest, CreateExternalNodeRequest, CreatePoolRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListClustersRequest, ListClustersResponse, ListNodesRequest, ListNodesResponse, ListPoolsRequest, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, MigrateClusterToRoutedIPsRequest, Node, Pool, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, SetClusterTypeRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen';
3
+ import type { AuthExternalNodeRequest, Cluster, CreateClusterRequest, CreateExternalNodeRequest, CreatePoolRequest, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeAuth, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListClustersRequest, ListClustersResponse, ListNodesRequest, ListNodesResponse, ListPoolsRequest, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, MigrateClusterToRoutedIPsRequest, Node, NodeMetadata, Pool, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, SetClusterTypeRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen';
4
4
  /**
5
5
  * Kubernetes API.
6
6
  *
@@ -176,6 +176,24 @@ export declare class API extends ParentAPI {
176
176
  * @returns A Promise of Pool
177
177
  */
178
178
  deletePool: (request: Readonly<DeletePoolRequest>) => Promise<Pool>;
179
+ /**
180
+ * Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node.
181
+ * This method is not intended to be called by end users but rather
182
+ * programmatically by the node-installer.
183
+ *
184
+ * @param request - The request {@link GetNodeMetadataRequest}
185
+ * @returns A Promise of NodeMetadata
186
+ */
187
+ getNodeMetadata: (request?: Readonly<GetNodeMetadataRequest>) => Promise<NodeMetadata>;
188
+ /**
189
+ * Authenticate Kosmos external node. Creates a newer Kosmos node and returns
190
+ * its token. This method is not intended to be called by end users but rather
191
+ * programmatically by the node-installer.
192
+ *
193
+ * @param request - The request {@link AuthExternalNodeRequest}
194
+ * @returns A Promise of ExternalNodeAuth
195
+ */
196
+ authExternalNode: (request: Readonly<AuthExternalNodeRequest>) => Promise<ExternalNodeAuth>;
179
197
  /**
180
198
  * Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is
181
199
  * not intended to be called by end users but rather programmatically by the
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
6
  import { CLUSTER_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES } from "./content.gen.js";
7
- import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion, unmarshalListClusterTypesResponse } from "./marshalling.gen.js";
7
+ import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterAvailableTypesResponse, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalNodeMetadata, unmarshalExternalNodeAuth, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion, unmarshalListClusterTypesResponse } from "./marshalling.gen.js";
8
8
  const jsonContentHeaders = {
9
9
  "Content-Type": "application/json; charset=utf-8"
10
10
  };
@@ -346,6 +346,38 @@ class API extends API$1 {
346
346
  },
347
347
  unmarshalPool
348
348
  );
349
+ /**
350
+ * Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node.
351
+ * This method is not intended to be called by end users but rather
352
+ * programmatically by the node-installer.
353
+ *
354
+ * @param request - The request {@link GetNodeMetadataRequest}
355
+ * @returns A Promise of NodeMetadata
356
+ */
357
+ getNodeMetadata = (request = {}) => this.client.fetch(
358
+ {
359
+ method: "GET",
360
+ path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/nodes/metadata`
361
+ },
362
+ unmarshalNodeMetadata
363
+ );
364
+ /**
365
+ * Authenticate Kosmos external node. Creates a newer Kosmos node and returns
366
+ * its token. This method is not intended to be called by end users but rather
367
+ * programmatically by the node-installer.
368
+ *
369
+ * @param request - The request {@link AuthExternalNodeRequest}
370
+ * @returns A Promise of ExternalNodeAuth
371
+ */
372
+ authExternalNode = (request) => this.client.fetch(
373
+ {
374
+ body: "{}",
375
+ headers: jsonContentHeaders,
376
+ method: "POST",
377
+ path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam("poolId", request.poolId)}/external-nodes/auth`
378
+ },
379
+ unmarshalExternalNodeAuth
380
+ );
349
381
  /**
350
382
  * Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is
351
383
  * not intended to be called by end users but rather programmatically by the
@@ -1,4 +1,4 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { AutoscalerEstimator, AutoscalerExpander, CNI, Cluster, ClusterAutoUpgrade, ClusterAutoscalerConfig, ClusterOpenIDConnectConfig, ClusterStatus, ClusterType, ClusterTypeAvailability, ClusterTypeResiliency, CreateClusterRequest, CreateClusterRequestAutoUpgrade, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreateClusterRequestPoolConfigUpgradePolicy, CreateExternalNodeRequest, CreatePoolRequest, CreatePoolRequestUpgradePolicy, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeCoreV1Taint, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListClustersRequest, ListClustersRequestOrderBy, ListClustersResponse, ListNodesRequest, ListNodesRequestOrderBy, ListNodesResponse, ListPoolsRequest, ListPoolsRequestOrderBy, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, MaintenanceWindow, MaintenanceWindowDayOfTheWeek, MigrateClusterToRoutedIPsRequest, Node, NodeStatus, Pool, PoolStatus, PoolUpgradePolicy, PoolVolumeType, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, Runtime, SetClusterTypeRequest, UpdateClusterRequest, UpdateClusterRequestAutoUpgrade, UpdateClusterRequestAutoscalerConfig, UpdateClusterRequestOpenIDConnectConfig, UpdatePoolRequest, UpdatePoolRequestUpgradePolicy, UpgradeClusterRequest, UpgradePoolRequest, Version, } from './types.gen';
3
+ export type { AuthExternalNodeRequest, AutoscalerEstimator, AutoscalerExpander, CNI, Cluster, ClusterAutoUpgrade, ClusterAutoscalerConfig, ClusterOpenIDConnectConfig, ClusterStatus, ClusterType, ClusterTypeAvailability, ClusterTypeResiliency, CreateClusterRequest, CreateClusterRequestAutoUpgrade, CreateClusterRequestAutoscalerConfig, CreateClusterRequestOpenIDConnectConfig, CreateClusterRequestPoolConfig, CreateClusterRequestPoolConfigUpgradePolicy, CreateExternalNodeRequest, CreatePoolRequest, CreatePoolRequestUpgradePolicy, DeleteClusterRequest, DeleteNodeRequest, DeletePoolRequest, ExternalNode, ExternalNodeAuth, ExternalNodeCoreV1Taint, GetClusterKubeConfigRequest, GetClusterRequest, GetNodeMetadataRequest, GetNodeRequest, GetPoolRequest, GetVersionRequest, ListClusterAvailableTypesRequest, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsRequest, ListClusterAvailableVersionsResponse, ListClusterTypesRequest, ListClusterTypesResponse, ListClustersRequest, ListClustersRequestOrderBy, ListClustersResponse, ListNodesRequest, ListNodesRequestOrderBy, ListNodesResponse, ListPoolsRequest, ListPoolsRequestOrderBy, ListPoolsResponse, ListVersionsRequest, ListVersionsResponse, MaintenanceWindow, MaintenanceWindowDayOfTheWeek, MigrateClusterToRoutedIPsRequest, Node, NodeMetadata, NodeMetadataCoreV1Taint, NodeStatus, Pool, PoolStatus, PoolUpgradePolicy, PoolVolumeType, RebootNodeRequest, ReplaceNodeRequest, ResetClusterAdminTokenRequest, Runtime, SetClusterTypeRequest, UpdateClusterRequest, UpdateClusterRequestAutoUpgrade, UpdateClusterRequestAutoscalerConfig, UpdateClusterRequestOpenIDConnectConfig, UpdatePoolRequest, UpdatePoolRequestUpgradePolicy, UpgradeClusterRequest, UpgradePoolRequest, Version, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -147,6 +147,7 @@ const unmarshalCluster = (data) => {
147
147
  projectId: data.project_id,
148
148
  region: data.region,
149
149
  routedIpEnabled: data.routed_ip_enabled,
150
+ sbsCsiEnabled: data.sbs_csi_enabled,
150
151
  status: data.status,
151
152
  tags: data.tags,
152
153
  type: data.type,
@@ -214,6 +215,17 @@ const unmarshalExternalNode = (data) => {
214
215
  runcVersion: data.runc_version
215
216
  };
216
217
  };
218
+ const unmarshalExternalNodeAuth = (data) => {
219
+ if (!json.isJSONObject(data)) {
220
+ throw new TypeError(
221
+ `Unmarshalling the type 'ExternalNodeAuth' failed as data isn't a dictionary.`
222
+ );
223
+ }
224
+ return {
225
+ apiUrl: data.api_url,
226
+ nodeToken: data.node_token
227
+ };
228
+ };
217
229
  const unmarshalClusterType = (data) => {
218
230
  if (!json.isJSONObject(data)) {
219
231
  throw new TypeError(
@@ -225,6 +237,7 @@ const unmarshalClusterType = (data) => {
225
237
  availability: data.availability,
226
238
  commitmentDelay: data.commitment_delay,
227
239
  dedicated: data.dedicated,
240
+ maxEtcdSize: data.max_etcd_size,
228
241
  maxNodes: data.max_nodes,
229
242
  memory: data.memory,
230
243
  name: data.name,
@@ -313,6 +326,44 @@ const unmarshalListVersionsResponse = (data) => {
313
326
  versions: marshalling.unmarshalArrayOfObject(data.versions, unmarshalVersion)
314
327
  };
315
328
  };
329
+ const unmarshalNodeMetadataCoreV1Taint = (data) => {
330
+ if (!json.isJSONObject(data)) {
331
+ throw new TypeError(
332
+ `Unmarshalling the type 'NodeMetadataCoreV1Taint' failed as data isn't a dictionary.`
333
+ );
334
+ }
335
+ return {
336
+ effect: data.effect,
337
+ key: data.key,
338
+ value: data.value
339
+ };
340
+ };
341
+ const unmarshalNodeMetadata = (data) => {
342
+ if (!json.isJSONObject(data)) {
343
+ throw new TypeError(
344
+ `Unmarshalling the type 'NodeMetadata' failed as data isn't a dictionary.`
345
+ );
346
+ }
347
+ return {
348
+ clusterCa: data.cluster_ca,
349
+ clusterUrl: data.cluster_url,
350
+ credentialProviderConfig: data.credential_provider_config,
351
+ externalIp: data.external_ip,
352
+ fullIsolation: data.full_isolation,
353
+ hasGpu: data.has_gpu,
354
+ id: data.id,
355
+ kapsuleIfaceMac: data.kapsule_iface_mac,
356
+ kubeletConfig: data.kubelet_config,
357
+ name: data.name,
358
+ nodeLabels: data.node_labels,
359
+ nodeTaints: marshalling.unmarshalArrayOfObject(
360
+ data.node_taints,
361
+ unmarshalNodeMetadataCoreV1Taint
362
+ ),
363
+ poolVersion: data.pool_version,
364
+ privateNetworkMode: data.private_network_mode
365
+ };
366
+ };
316
367
  const marshalMaintenanceWindow = (request, defaults) => ({
317
368
  day: request.day,
318
369
  start_hour: request.startHour
@@ -495,6 +546,7 @@ exports.marshalUpgradeClusterRequest = marshalUpgradeClusterRequest;
495
546
  exports.marshalUpgradePoolRequest = marshalUpgradePoolRequest;
496
547
  exports.unmarshalCluster = unmarshalCluster;
497
548
  exports.unmarshalExternalNode = unmarshalExternalNode;
549
+ exports.unmarshalExternalNodeAuth = unmarshalExternalNodeAuth;
498
550
  exports.unmarshalListClusterAvailableTypesResponse = unmarshalListClusterAvailableTypesResponse;
499
551
  exports.unmarshalListClusterAvailableVersionsResponse = unmarshalListClusterAvailableVersionsResponse;
500
552
  exports.unmarshalListClusterTypesResponse = unmarshalListClusterTypesResponse;
@@ -503,5 +555,6 @@ exports.unmarshalListNodesResponse = unmarshalListNodesResponse;
503
555
  exports.unmarshalListPoolsResponse = unmarshalListPoolsResponse;
504
556
  exports.unmarshalListVersionsResponse = unmarshalListVersionsResponse;
505
557
  exports.unmarshalNode = unmarshalNode;
558
+ exports.unmarshalNodeMetadata = unmarshalNodeMetadata;
506
559
  exports.unmarshalPool = unmarshalPool;
507
560
  exports.unmarshalVersion = unmarshalVersion;
@@ -1,10 +1,11 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { Cluster, CreateClusterRequest, CreatePoolRequest, ExternalNode, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClusterTypesResponse, ListClustersResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse, Node, Pool, SetClusterTypeRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen';
2
+ import type { Cluster, CreateClusterRequest, CreatePoolRequest, ExternalNode, ExternalNodeAuth, ListClusterAvailableTypesResponse, ListClusterAvailableVersionsResponse, ListClusterTypesResponse, ListClustersResponse, ListNodesResponse, ListPoolsResponse, ListVersionsResponse, Node, NodeMetadata, Pool, SetClusterTypeRequest, UpdateClusterRequest, UpdatePoolRequest, UpgradeClusterRequest, UpgradePoolRequest, Version } from './types.gen';
3
3
  export declare const unmarshalPool: (data: unknown) => Pool;
4
4
  export declare const unmarshalVersion: (data: unknown) => Version;
5
5
  export declare const unmarshalCluster: (data: unknown) => Cluster;
6
6
  export declare const unmarshalNode: (data: unknown) => Node;
7
7
  export declare const unmarshalExternalNode: (data: unknown) => ExternalNode;
8
+ export declare const unmarshalExternalNodeAuth: (data: unknown) => ExternalNodeAuth;
8
9
  export declare const unmarshalListClusterAvailableTypesResponse: (data: unknown) => ListClusterAvailableTypesResponse;
9
10
  export declare const unmarshalListClusterAvailableVersionsResponse: (data: unknown) => ListClusterAvailableVersionsResponse;
10
11
  export declare const unmarshalListClusterTypesResponse: (data: unknown) => ListClusterTypesResponse;
@@ -12,6 +13,7 @@ export declare const unmarshalListClustersResponse: (data: unknown) => ListClust
12
13
  export declare const unmarshalListNodesResponse: (data: unknown) => ListNodesResponse;
13
14
  export declare const unmarshalListPoolsResponse: (data: unknown) => ListPoolsResponse;
14
15
  export declare const unmarshalListVersionsResponse: (data: unknown) => ListVersionsResponse;
16
+ export declare const unmarshalNodeMetadata: (data: unknown) => NodeMetadata;
15
17
  export declare const marshalCreateClusterRequest: (request: CreateClusterRequest, defaults: DefaultValues) => Record<string, unknown>;
16
18
  export declare const marshalCreatePoolRequest: (request: CreatePoolRequest, defaults: DefaultValues) => Record<string, unknown>;
17
19
  export declare const marshalSetClusterTypeRequest: (request: SetClusterTypeRequest, defaults: DefaultValues) => Record<string, unknown>;