@scaleway/sdk 1.17.0 → 1.19.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.
@@ -1353,6 +1353,7 @@ const marshalUpdatePrivateNICRequest = (request, defaults) => ({
1353
1353
  const marshalUpdateServerRequest = (request, defaults) => ({
1354
1354
  boot_type: request.bootType,
1355
1355
  bootscript: request.bootscript,
1356
+ commercial_type: request.commercialType,
1356
1357
  dynamic_ip_required: request.dynamicIpRequired,
1357
1358
  enable_ipv6: request.enableIpv6,
1358
1359
  name: request.name,
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
3
3
  import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
4
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
5
  import { CLUSTER_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, marshalMigrateToPrivateNetworkClusterRequest, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion, unmarshalListClusterTypesResponse } from './marshalling.gen.js';
6
+ import { unmarshalListClustersResponse, marshalCreateClusterRequest, unmarshalCluster, marshalUpdateClusterRequest, marshalUpgradeClusterRequest, marshalSetClusterTypeRequest, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterAvailableTypesResponse, marshalMigrateToPrivateNetworkClusterRequest, unmarshalListPoolsResponse, marshalCreatePoolRequest, unmarshalPool, marshalUpgradePoolRequest, marshalUpdatePoolRequest, unmarshalExternalNode, unmarshalListNodesResponse, unmarshalNode, unmarshalListVersionsResponse, unmarshalVersion, unmarshalListClusterTypesResponse } from './marshalling.gen.js';
7
7
 
8
8
  // This file was automatically generated. DO NOT EDIT.
9
9
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -148,6 +148,18 @@ class API extends API$1 {
148
148
  method: 'GET',
149
149
  path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-versions`
150
150
  }, unmarshalListClusterAvailableVersionsResponse);
151
+
152
+ /**
153
+ * List available cluster types for a cluster. List the cluster types that a
154
+ * specific Kubernetes cluster is allowed to switch to.
155
+ *
156
+ * @param request - The request {@link ListClusterAvailableTypesRequest}
157
+ * @returns A Promise of ListClusterAvailableTypesResponse
158
+ */
159
+ listClusterAvailableTypes = request => this.client.fetch({
160
+ method: 'GET',
161
+ path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-types`
162
+ }, unmarshalListClusterAvailableTypesResponse);
151
163
  _getClusterKubeConfig = request => this.client.fetch({
152
164
  method: 'GET',
153
165
  path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/kubeconfig`,
@@ -73,6 +73,7 @@ const unmarshalCluster = data => {
73
73
  autoUpgrade: data.auto_upgrade ? unmarshalClusterAutoUpgrade(data.auto_upgrade) : undefined,
74
74
  clusterUrl: data.cluster_url,
75
75
  cni: data.cni,
76
+ commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
76
77
  createdAt: unmarshalDate(data.created_at),
77
78
  dashboardEnabled: data.dashboard_enabled,
78
79
  description: data.description,
@@ -100,7 +101,11 @@ const unmarshalClusterType = data => {
100
101
  }
101
102
  return {
102
103
  availability: data.availability,
103
- name: data.name
104
+ commitmentDelay: data.commitment_delay,
105
+ maxNodes: data.max_nodes,
106
+ name: data.name,
107
+ resiliency: data.resiliency,
108
+ sla: data.sla
104
109
  };
105
110
  };
106
111
  const unmarshalNode = data => {
@@ -183,6 +188,15 @@ const unmarshalExternalNode = data => {
183
188
  poolVersion: data.pool_version
184
189
  };
185
190
  };
191
+ const unmarshalListClusterAvailableTypesResponse = data => {
192
+ if (!isJSONObject(data)) {
193
+ throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
194
+ }
195
+ return {
196
+ clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
197
+ totalCount: data.total_count
198
+ };
199
+ };
186
200
  const unmarshalListClusterAvailableVersionsResponse = data => {
187
201
  if (!isJSONObject(data)) {
188
202
  throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
@@ -399,4 +413,4 @@ const marshalUpgradePoolRequest = (request, defaults) => ({
399
413
  version: request.version
400
414
  });
401
415
 
402
- export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalMigrateToPrivateNetworkClusterRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
416
+ export { marshalCreateClusterRequest, marshalCreatePoolRequest, marshalMigrateToPrivateNetworkClusterRequest, marshalSetClusterTypeRequest, marshalUpdateClusterRequest, marshalUpdatePoolRequest, marshalUpgradeClusterRequest, marshalUpgradePoolRequest, unmarshalCluster, unmarshalExternalNode, unmarshalListClusterAvailableTypesResponse, unmarshalListClusterAvailableVersionsResponse, unmarshalListClusterTypesResponse, unmarshalListClustersResponse, unmarshalListNodesResponse, unmarshalListPoolsResponse, unmarshalListVersionsResponse, unmarshalNode, unmarshalPool, unmarshalVersion };
@@ -286,6 +286,7 @@ const unmarshalNodeType = data => {
286
286
  description: data.description,
287
287
  disabled: data.disabled,
288
288
  generation: data.generation,
289
+ instanceRange: data.instance_range,
289
290
  isBssdCompatible: data.is_bssd_compatible,
290
291
  isHaRequired: data.is_ha_required,
291
292
  memory: data.memory,
@@ -114,6 +114,35 @@ class API extends API$1 {
114
114
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
115
115
  });
116
116
 
117
+ /**
118
+ * Protect a secret. Protect a given secret specified by the `secret_id`
119
+ * parameter. A protected secret can be read and modified but cannot be
120
+ * deleted.
121
+ *
122
+ * @param request - The request {@link ProtectSecretRequest}
123
+ * @returns A Promise of Secret
124
+ */
125
+ protectSecret = request => this.client.fetch({
126
+ body: '{}',
127
+ headers: jsonContentHeaders,
128
+ method: 'POST',
129
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/protect`
130
+ }, unmarshalSecret);
131
+
132
+ /**
133
+ * Unprotect a secret. Unprotect a given secret specified by the `secret_id`
134
+ * parameter. An unprotected secret can be read, modified and deleted.
135
+ *
136
+ * @param request - The request {@link UnprotectSecretRequest}
137
+ * @returns A Promise of Secret
138
+ */
139
+ unprotectSecret = request => this.client.fetch({
140
+ body: '{}',
141
+ headers: jsonContentHeaders,
142
+ method: 'POST',
143
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/unprotect`
144
+ }, unmarshalSecret);
145
+
117
146
  /**
118
147
  * Allow a product to use the secret.
119
148
  *
@@ -12,6 +12,7 @@ const unmarshalSecret = data => {
12
12
  description: data.description,
13
13
  id: data.id,
14
14
  isManaged: data.is_managed,
15
+ isProtected: data.is_protected,
15
16
  name: data.name,
16
17
  projectId: data.project_id,
17
18
  region: data.region,
@@ -49,12 +49,20 @@ class API extends API$1 {
49
49
  * @param request - The request {@link CreateVPCRequest}
50
50
  * @returns A Promise of VPC
51
51
  */
52
- createVPC = request => this.client.fetch({
53
- body: JSON.stringify(marshalCreateVPCRequest(request, this.client.settings)),
54
- headers: jsonContentHeaders,
55
- method: 'POST',
56
- path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs`
57
- }, unmarshalVPC);
52
+ createVPC = (() => {
53
+ var _this3 = this;
54
+ return function (request) {
55
+ if (request === void 0) {
56
+ request = {};
57
+ }
58
+ return _this3.client.fetch({
59
+ body: JSON.stringify(marshalCreateVPCRequest(request, _this3.client.settings)),
60
+ headers: jsonContentHeaders,
61
+ method: 'POST',
62
+ path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/vpcs`
63
+ }, unmarshalVPC);
64
+ };
65
+ })();
58
66
 
59
67
  /**
60
68
  * Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
@@ -90,15 +98,15 @@ class API extends API$1 {
90
98
  path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}`
91
99
  });
92
100
  pageOfListPrivateNetworks = (() => {
93
- var _this3 = this;
101
+ var _this4 = this;
94
102
  return function (request) {
95
103
  if (request === void 0) {
96
104
  request = {};
97
105
  }
98
- return _this3.client.fetch({
106
+ return _this4.client.fetch({
99
107
  method: 'GET',
100
- path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/private-networks`,
101
- urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
108
+ path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/private-networks`,
109
+ urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
102
110
  }, unmarshalListPrivateNetworksResponse);
103
111
  };
104
112
  })();
@@ -113,12 +121,12 @@ class API extends API$1 {
113
121
  * @returns A Promise of ListPrivateNetworksResponse
114
122
  */
115
123
  listPrivateNetworks = (() => {
116
- var _this4 = this;
124
+ var _this5 = this;
117
125
  return function (request) {
118
126
  if (request === void 0) {
119
127
  request = {};
120
128
  }
121
- return enrichForPagination('privateNetworks', _this4.pageOfListPrivateNetworks, request);
129
+ return enrichForPagination('privateNetworks', _this5.pageOfListPrivateNetworks, request);
122
130
  };
123
131
  })();
124
132
 
@@ -130,16 +138,16 @@ class API extends API$1 {
130
138
  * @returns A Promise of PrivateNetwork
131
139
  */
132
140
  createPrivateNetwork = (() => {
133
- var _this5 = this;
141
+ var _this6 = this;
134
142
  return function (request) {
135
143
  if (request === void 0) {
136
144
  request = {};
137
145
  }
138
- return _this5.client.fetch({
139
- body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this5.client.settings)),
146
+ return _this6.client.fetch({
147
+ body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this6.client.settings)),
140
148
  headers: jsonContentHeaders,
141
149
  method: 'POST',
142
- path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/private-networks`
150
+ path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/private-networks`
143
151
  }, unmarshalPrivateNetwork);
144
152
  };
145
153
  })();
@@ -192,16 +200,16 @@ class API extends API$1 {
192
200
  * @param request - The request {@link MigrateZonalPrivateNetworksRequest}
193
201
  */
194
202
  migrateZonalPrivateNetworks = (() => {
195
- var _this6 = this;
203
+ var _this7 = this;
196
204
  return function (request) {
197
205
  if (request === void 0) {
198
206
  request = {};
199
207
  }
200
- return _this6.client.fetch({
201
- body: JSON.stringify(marshalMigrateZonalPrivateNetworksRequest(request, _this6.client.settings)),
208
+ return _this7.client.fetch({
209
+ body: JSON.stringify(marshalMigrateZonalPrivateNetworksRequest(request, _this7.client.settings)),
202
210
  headers: jsonContentHeaders,
203
211
  method: 'POST',
204
- path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/private-networks/migrate-zonal`
212
+ path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/private-networks/migrate-zonal`
205
213
  });
206
214
  };
207
215
  })();
@@ -103,7 +103,6 @@ const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
103
103
  vpc_id: request.vpcId
104
104
  });
105
105
  const marshalCreateVPCRequest = (request, defaults) => ({
106
- default_private_network_name: request.defaultPrivateNetworkName,
107
106
  name: request.name || randomName('vpc'),
108
107
  project_id: request.projectId ?? defaults.defaultProjectId,
109
108
  tags: request.tags
package/dist/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v1.16.0';
500
+ const version = 'v1.18.0';
501
501
  const userAgent = `scaleway-sdk-js/${version}`;
502
502
 
503
503
  const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
@@ -10677,6 +10677,7 @@ const marshalUpdatePrivateNICRequest = (request, defaults) => ({
10677
10677
  const marshalUpdateServerRequest = (request, defaults) => ({
10678
10678
  boot_type: request.bootType,
10679
10679
  bootscript: request.bootscript,
10680
+ commercial_type: request.commercialType,
10680
10681
  dynamic_ip_required: request.dynamicIpRequired,
10681
10682
  enable_ipv6: request.enableIpv6,
10682
10683
  name: request.name,
@@ -13273,6 +13274,7 @@ const unmarshalCluster$1 = data => {
13273
13274
  autoUpgrade: data.auto_upgrade ? unmarshalClusterAutoUpgrade(data.auto_upgrade) : undefined,
13274
13275
  clusterUrl: data.cluster_url,
13275
13276
  cni: data.cni,
13277
+ commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
13276
13278
  createdAt: unmarshalDate(data.created_at),
13277
13279
  dashboardEnabled: data.dashboard_enabled,
13278
13280
  description: data.description,
@@ -13300,7 +13302,11 @@ const unmarshalClusterType = data => {
13300
13302
  }
13301
13303
  return {
13302
13304
  availability: data.availability,
13303
- name: data.name
13305
+ commitmentDelay: data.commitment_delay,
13306
+ maxNodes: data.max_nodes,
13307
+ name: data.name,
13308
+ resiliency: data.resiliency,
13309
+ sla: data.sla
13304
13310
  };
13305
13311
  };
13306
13312
  const unmarshalNode = data => {
@@ -13383,6 +13389,15 @@ const unmarshalExternalNode = data => {
13383
13389
  poolVersion: data.pool_version
13384
13390
  };
13385
13391
  };
13392
+ const unmarshalListClusterAvailableTypesResponse = data => {
13393
+ if (!isJSONObject(data)) {
13394
+ throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
13395
+ }
13396
+ return {
13397
+ clusterTypes: unmarshalArrayOfObject(data.cluster_types, unmarshalClusterType),
13398
+ totalCount: data.total_count
13399
+ };
13400
+ };
13386
13401
  const unmarshalListClusterAvailableVersionsResponse = data => {
13387
13402
  if (!isJSONObject(data)) {
13388
13403
  throw new TypeError(`Unmarshalling the type 'ListClusterAvailableVersionsResponse' failed as data isn't a dictionary.`);
@@ -13726,6 +13741,18 @@ let API$e = class API extends API$s {
13726
13741
  method: 'GET',
13727
13742
  path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-versions`
13728
13743
  }, unmarshalListClusterAvailableVersionsResponse);
13744
+
13745
+ /**
13746
+ * List available cluster types for a cluster. List the cluster types that a
13747
+ * specific Kubernetes cluster is allowed to switch to.
13748
+ *
13749
+ * @param request - The request {@link ListClusterAvailableTypesRequest}
13750
+ * @returns A Promise of ListClusterAvailableTypesResponse
13751
+ */
13752
+ listClusterAvailableTypes = request => this.client.fetch({
13753
+ method: 'GET',
13754
+ path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-types`
13755
+ }, unmarshalListClusterAvailableTypesResponse);
13729
13756
  _getClusterKubeConfig = request => this.client.fetch({
13730
13757
  method: 'GET',
13731
13758
  path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/kubeconfig`,
@@ -17711,6 +17738,7 @@ const unmarshalNodeType$1 = data => {
17711
17738
  description: data.description,
17712
17739
  disabled: data.disabled,
17713
17740
  generation: data.generation,
17741
+ instanceRange: data.instance_range,
17714
17742
  isBssdCompatible: data.is_bssd_compatible,
17715
17743
  isHaRequired: data.is_ha_required,
17716
17744
  memory: data.memory,
@@ -20049,6 +20077,7 @@ const unmarshalSecret = data => {
20049
20077
  description: data.description,
20050
20078
  id: data.id,
20051
20079
  isManaged: data.is_managed,
20080
+ isProtected: data.is_protected,
20052
20081
  name: data.name,
20053
20082
  projectId: data.project_id,
20054
20083
  region: data.region,
@@ -20252,6 +20281,35 @@ let API$6 = class API extends API$s {
20252
20281
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
20253
20282
  });
20254
20283
 
20284
+ /**
20285
+ * Protect a secret. Protect a given secret specified by the `secret_id`
20286
+ * parameter. A protected secret can be read and modified but cannot be
20287
+ * deleted.
20288
+ *
20289
+ * @param request - The request {@link ProtectSecretRequest}
20290
+ * @returns A Promise of Secret
20291
+ */
20292
+ protectSecret = request => this.client.fetch({
20293
+ body: '{}',
20294
+ headers: jsonContentHeaders$6,
20295
+ method: 'POST',
20296
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/protect`
20297
+ }, unmarshalSecret);
20298
+
20299
+ /**
20300
+ * Unprotect a secret. Unprotect a given secret specified by the `secret_id`
20301
+ * parameter. An unprotected secret can be read, modified and deleted.
20302
+ *
20303
+ * @param request - The request {@link UnprotectSecretRequest}
20304
+ * @returns A Promise of Secret
20305
+ */
20306
+ unprotectSecret = request => this.client.fetch({
20307
+ body: '{}',
20308
+ headers: jsonContentHeaders$6,
20309
+ method: 'POST',
20310
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/unprotect`
20311
+ }, unmarshalSecret);
20312
+
20255
20313
  /**
20256
20314
  * Allow a product to use the secret.
20257
20315
  *
@@ -21290,7 +21348,6 @@ const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
21290
21348
  vpc_id: request.vpcId
21291
21349
  });
21292
21350
  const marshalCreateVPCRequest = (request, defaults) => ({
21293
- default_private_network_name: request.defaultPrivateNetworkName,
21294
21351
  name: request.name || randomName('vpc'),
21295
21352
  project_id: request.projectId ?? defaults.defaultProjectId,
21296
21353
  tags: request.tags
@@ -21352,7 +21409,7 @@ let API$2 = class API extends API$s {
21352
21409
  * @param request - The request {@link CreateVPCRequest}
21353
21410
  * @returns A Promise of VPC
21354
21411
  */
21355
- createVPC = request => this.client.fetch({
21412
+ createVPC = (request = {}) => this.client.fetch({
21356
21413
  body: JSON.stringify(marshalCreateVPCRequest(request, this.client.settings)),
21357
21414
  headers: jsonContentHeaders$2,
21358
21415
  method: 'POST',
package/dist/index.d.ts CHANGED
@@ -11582,6 +11582,18 @@ type UpdateServerRequest = {
11582
11582
  placementGroup?: string | null;
11583
11583
  /** Instance private NICs. */
11584
11584
  privateNics?: PrivateNIC[];
11585
+ /**
11586
+ * Set the commercial_type for this Instance. Warning: This field has some
11587
+ * restrictions:
11588
+ *
11589
+ * - Cannot be changed if the Instance is not in `stopped` state.
11590
+ * - Cannot be changed if the Instance is in a placement group.
11591
+ * - Local storage requirements of the target commercial_types must be fulfilled
11592
+ * (i.e. if an Instance has 80GB of local storage, it can be changed into a
11593
+ * GP1-XS, which has a maximum of 150GB, but it cannot be changed into a
11594
+ * DEV1-S, which has only 20GB).
11595
+ */
11596
+ commercialType?: string;
11585
11597
  };
11586
11598
  type SetImageRequest = {
11587
11599
  /** Zone to target. If none is passed will use default zone from the config. */
@@ -14544,6 +14556,7 @@ type AutoscalerExpander = 'unknown_expander' | 'random' | 'most_pods' | 'least_w
14544
14556
  type CNI = 'unknown_cni' | 'cilium' | 'calico' | 'weave' | 'flannel' | 'kilo';
14545
14557
  type ClusterStatus$1 = 'unknown' | 'creating' | 'ready' | 'deleting' | 'deleted' | 'updating' | 'locked' | 'pool_required';
14546
14558
  type ClusterTypeAvailability = 'available' | 'scarce' | 'shortage';
14559
+ type ClusterTypeResiliency = 'unknown_resiliency' | 'standard' | 'high_availability';
14547
14560
  type Ingress = 'unknown_ingress' | 'none' | 'nginx' | 'traefik' | 'traefik2';
14548
14561
  type ListClustersRequestOrderBy$1 = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc' | 'version_asc' | 'version_desc';
14549
14562
  type ListNodesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
@@ -14617,6 +14630,8 @@ interface Cluster$1 {
14617
14630
  apiserverCertSans: string[];
14618
14631
  /** Private network ID for internal cluster communication. */
14619
14632
  privateNetworkId?: string;
14633
+ /** Date on which it will be possible to switch to a smaller offer. */
14634
+ commitmentEndsAt?: Date;
14620
14635
  }
14621
14636
  /** Cluster. auto upgrade. */
14622
14637
  interface ClusterAutoUpgrade {
@@ -14710,6 +14725,14 @@ interface ClusterType {
14710
14725
  name: string;
14711
14726
  /** Cluster type availability. */
14712
14727
  availability: ClusterTypeAvailability;
14728
+ /** Maximum number of nodes supported by the offer. */
14729
+ maxNodes: number;
14730
+ /** Time period during which you can no longer switch to a lower offer. */
14731
+ commitmentDelay?: string;
14732
+ /** Value of the Service Level Agreement of the offer. */
14733
+ sla: number;
14734
+ /** Resiliency offered by the offer. */
14735
+ resiliency: ClusterTypeResiliency;
14713
14736
  }
14714
14737
  /** Create cluster request. auto upgrade. */
14715
14738
  interface CreateClusterRequestAutoUpgrade {
@@ -14875,6 +14898,13 @@ interface ExternalNode {
14875
14898
  kubeletConfig: string;
14876
14899
  externalIp: string;
14877
14900
  }
14901
+ /** List cluster available types response. */
14902
+ interface ListClusterAvailableTypesResponse {
14903
+ /** Available cluster types for the cluster. */
14904
+ clusterTypes: ClusterType[];
14905
+ /** Total number of types. */
14906
+ totalCount: number;
14907
+ }
14878
14908
  /** List cluster available versions response. */
14879
14909
  interface ListClusterAvailableVersionsResponse {
14880
14910
  /** Available Kubernetes versions for the cluster. */
@@ -15352,6 +15382,15 @@ type ListClusterAvailableVersionsRequest = {
15352
15382
  /** Cluster ID for which the available Kubernetes versions will be listed. */
15353
15383
  clusterId: string;
15354
15384
  };
15385
+ type ListClusterAvailableTypesRequest = {
15386
+ /**
15387
+ * Region to target. If none is passed will use default region from the
15388
+ * config.
15389
+ */
15390
+ region?: Region;
15391
+ /** Cluster ID for which the available Kubernetes types will be listed. */
15392
+ clusterId: string;
15393
+ };
15355
15394
  type ResetClusterAdminTokenRequest = {
15356
15395
  /**
15357
15396
  * Region to target. If none is passed will use default region from the
@@ -15705,6 +15744,14 @@ declare class API$e extends API$s {
15705
15744
  * @returns A Promise of ListClusterAvailableVersionsResponse
15706
15745
  */
15707
15746
  listClusterAvailableVersions: (request: Readonly<ListClusterAvailableVersionsRequest>) => Promise<ListClusterAvailableVersionsResponse>;
15747
+ /**
15748
+ * List available cluster types for a cluster. List the cluster types that a
15749
+ * specific Kubernetes cluster is allowed to switch to.
15750
+ *
15751
+ * @param request - The request {@link ListClusterAvailableTypesRequest}
15752
+ * @returns A Promise of ListClusterAvailableTypesResponse
15753
+ */
15754
+ listClusterAvailableTypes: (request: Readonly<ListClusterAvailableTypesRequest>) => Promise<ListClusterAvailableTypesResponse>;
15708
15755
  protected _getClusterKubeConfig: (request: Readonly<GetClusterKubeConfigRequest>) => Promise<Blob>;
15709
15756
  /**
15710
15757
  * Reset the admin token of a Cluster. Reset the admin token for a specific
@@ -16031,6 +16078,7 @@ type index$e_ClusterAutoscalerConfig = ClusterAutoscalerConfig;
16031
16078
  type index$e_ClusterOpenIDConnectConfig = ClusterOpenIDConnectConfig;
16032
16079
  type index$e_ClusterType = ClusterType;
16033
16080
  type index$e_ClusterTypeAvailability = ClusterTypeAvailability;
16081
+ type index$e_ClusterTypeResiliency = ClusterTypeResiliency;
16034
16082
  type index$e_CreateClusterRequestAutoUpgrade = CreateClusterRequestAutoUpgrade;
16035
16083
  type index$e_CreateClusterRequestPoolConfigUpgradePolicy = CreateClusterRequestPoolConfigUpgradePolicy;
16036
16084
  type index$e_CreateExternalNodeRequest = CreateExternalNodeRequest;
@@ -16042,6 +16090,8 @@ type index$e_GetClusterKubeConfigRequest = GetClusterKubeConfigRequest;
16042
16090
  type index$e_GetNodeRequest = GetNodeRequest;
16043
16091
  type index$e_GetPoolRequest = GetPoolRequest;
16044
16092
  type index$e_Ingress = Ingress;
16093
+ type index$e_ListClusterAvailableTypesRequest = ListClusterAvailableTypesRequest;
16094
+ type index$e_ListClusterAvailableTypesResponse = ListClusterAvailableTypesResponse;
16045
16095
  type index$e_ListClusterAvailableVersionsRequest = ListClusterAvailableVersionsRequest;
16046
16096
  type index$e_ListClusterAvailableVersionsResponse = ListClusterAvailableVersionsResponse;
16047
16097
  type index$e_ListClusterTypesResponse = ListClusterTypesResponse;
@@ -16084,6 +16134,7 @@ declare namespace index$e {
16084
16134
  ClusterStatus$1 as ClusterStatus,
16085
16135
  index$e_ClusterType as ClusterType,
16086
16136
  index$e_ClusterTypeAvailability as ClusterTypeAvailability,
16137
+ index$e_ClusterTypeResiliency as ClusterTypeResiliency,
16087
16138
  CreateClusterRequest$2 as CreateClusterRequest,
16088
16139
  index$e_CreateClusterRequestAutoUpgrade as CreateClusterRequestAutoUpgrade,
16089
16140
  CreateClusterRequestAutoscalerConfig$1 as CreateClusterRequestAutoscalerConfig,
@@ -16103,6 +16154,8 @@ declare namespace index$e {
16103
16154
  index$e_GetPoolRequest as GetPoolRequest,
16104
16155
  GetVersionRequest$2 as GetVersionRequest,
16105
16156
  index$e_Ingress as Ingress,
16157
+ index$e_ListClusterAvailableTypesRequest as ListClusterAvailableTypesRequest,
16158
+ index$e_ListClusterAvailableTypesResponse as ListClusterAvailableTypesResponse,
16106
16159
  index$e_ListClusterAvailableVersionsRequest as ListClusterAvailableVersionsRequest,
16107
16160
  index$e_ListClusterAvailableVersionsResponse as ListClusterAvailableVersionsResponse,
16108
16161
  ListClusterTypesRequest$1 as ListClusterTypesRequest,
@@ -21576,8 +21629,10 @@ interface NodeType$1 {
21576
21629
  availableVolumeTypes: NodeTypeVolumeType[];
21577
21630
  /** The Node Type can be used only with high availability option. */
21578
21631
  isHaRequired: boolean;
21579
- /** Generation associated the NodeType offer. */
21632
+ /** Generation associated with the NodeType offer. */
21580
21633
  generation: NodeTypeGeneration;
21634
+ /** Instance range associated with the NodeType offer. */
21635
+ instanceRange: string;
21581
21636
  /** Region the Node Type is in. */
21582
21637
  region: Region;
21583
21638
  }
@@ -24866,8 +24921,9 @@ interface Secret {
24866
24921
  /** Name of the secret. */
24867
24922
  name: string;
24868
24923
  /**
24869
- * Current status of the secret. `ready`: the secret is ready. `locked`: the
24870
- * secret is locked.
24924
+ * Current status of the secret. `ready`: the secret can be read, modified and
24925
+ * deleted. `locked`: no action can be performed on the secret. This status
24926
+ * can only be applied and removed by Scaleway.
24871
24927
  */
24872
24928
  status: SecretStatus;
24873
24929
  /** Date and time of the secret's creation. */
@@ -24882,6 +24938,8 @@ interface Secret {
24882
24938
  description?: string;
24883
24939
  /** Returns `true` for secrets that are managed by another product. */
24884
24940
  isManaged: boolean;
24941
+ /** Returns `true` for protected secrets that cannot be deleted. */
24942
+ isProtected: boolean;
24885
24943
  /** Type of the secret. See `Secret.Type` enum for description of values. */
24886
24944
  type: SecretType;
24887
24945
  /** Region of the secret. */
@@ -24999,6 +25057,24 @@ type DeleteSecretRequest = {
24999
25057
  /** ID of the secret. */
25000
25058
  secretId: string;
25001
25059
  };
25060
+ type ProtectSecretRequest = {
25061
+ /**
25062
+ * Region to target. If none is passed will use default region from the
25063
+ * config.
25064
+ */
25065
+ region?: Region;
25066
+ /** ID of the secret to protect. */
25067
+ secretId: string;
25068
+ };
25069
+ type UnprotectSecretRequest = {
25070
+ /**
25071
+ * Region to target. If none is passed will use default region from the
25072
+ * config.
25073
+ */
25074
+ region?: Region;
25075
+ /** ID of the secret to unprotect. */
25076
+ secretId: string;
25077
+ };
25002
25078
  type AddSecretOwnerRequest = {
25003
25079
  /**
25004
25080
  * Region to target. If none is passed will use default region from the
@@ -25316,6 +25392,23 @@ declare class API$6 extends API$s {
25316
25392
  * @param request - The request {@link DeleteSecretRequest}
25317
25393
  */
25318
25394
  deleteSecret: (request: Readonly<DeleteSecretRequest>) => Promise<void>;
25395
+ /**
25396
+ * Protect a secret. Protect a given secret specified by the `secret_id`
25397
+ * parameter. A protected secret can be read and modified but cannot be
25398
+ * deleted.
25399
+ *
25400
+ * @param request - The request {@link ProtectSecretRequest}
25401
+ * @returns A Promise of Secret
25402
+ */
25403
+ protectSecret: (request: Readonly<ProtectSecretRequest>) => Promise<Secret>;
25404
+ /**
25405
+ * Unprotect a secret. Unprotect a given secret specified by the `secret_id`
25406
+ * parameter. An unprotected secret can be read, modified and deleted.
25407
+ *
25408
+ * @param request - The request {@link UnprotectSecretRequest}
25409
+ * @returns A Promise of Secret
25410
+ */
25411
+ unprotectSecret: (request: Readonly<UnprotectSecretRequest>) => Promise<Secret>;
25319
25412
  /**
25320
25413
  * Allow a product to use the secret.
25321
25414
  *
@@ -25471,11 +25564,13 @@ type index_gen$6_ListTagsRequest = ListTagsRequest;
25471
25564
  type index_gen$6_ListTagsResponse = ListTagsResponse;
25472
25565
  type index_gen$6_PasswordGenerationParams = PasswordGenerationParams;
25473
25566
  type index_gen$6_Product = Product;
25567
+ type index_gen$6_ProtectSecretRequest = ProtectSecretRequest;
25474
25568
  type index_gen$6_Secret = Secret;
25475
25569
  type index_gen$6_SecretStatus = SecretStatus;
25476
25570
  type index_gen$6_SecretType = SecretType;
25477
25571
  type index_gen$6_SecretVersion = SecretVersion;
25478
25572
  type index_gen$6_SecretVersionStatus = SecretVersionStatus;
25573
+ type index_gen$6_UnprotectSecretRequest = UnprotectSecretRequest;
25479
25574
  type index_gen$6_UpdateSecretRequest = UpdateSecretRequest;
25480
25575
  type index_gen$6_UpdateSecretVersionRequest = UpdateSecretVersionRequest;
25481
25576
  declare namespace index_gen$6 {
@@ -25506,11 +25601,13 @@ declare namespace index_gen$6 {
25506
25601
  index_gen$6_ListTagsResponse as ListTagsResponse,
25507
25602
  index_gen$6_PasswordGenerationParams as PasswordGenerationParams,
25508
25603
  index_gen$6_Product as Product,
25604
+ index_gen$6_ProtectSecretRequest as ProtectSecretRequest,
25509
25605
  index_gen$6_Secret as Secret,
25510
25606
  index_gen$6_SecretStatus as SecretStatus,
25511
25607
  index_gen$6_SecretType as SecretType,
25512
25608
  index_gen$6_SecretVersion as SecretVersion,
25513
25609
  index_gen$6_SecretVersionStatus as SecretVersionStatus,
25610
+ index_gen$6_UnprotectSecretRequest as UnprotectSecretRequest,
25514
25611
  index_gen$6_UpdateSecretRequest as UpdateSecretRequest,
25515
25612
  index_gen$6_UpdateSecretVersionRequest as UpdateSecretVersionRequest,
25516
25613
  };
@@ -26583,8 +26680,6 @@ type CreateVPCRequest = {
26583
26680
  region?: Region;
26584
26681
  /** Name for the VPC. */
26585
26682
  name?: string;
26586
- /** Name for the VPC's associated default Private Network. */
26587
- defaultPrivateNetworkName: string;
26588
26683
  /** Scaleway Project in which to create the VPC. */
26589
26684
  projectId?: string;
26590
26685
  /** Tags for the VPC. */
@@ -26806,7 +26901,7 @@ declare class API$2 extends API$s {
26806
26901
  * @param request - The request {@link CreateVPCRequest}
26807
26902
  * @returns A Promise of VPC
26808
26903
  */
26809
- createVPC: (request: Readonly<CreateVPCRequest>) => Promise<VPC>;
26904
+ createVPC: (request?: Readonly<CreateVPCRequest>) => Promise<VPC>;
26810
26905
  /**
26811
26906
  * Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
26812
26907
  *
@@ -1,4 +1,4 @@
1
- const version = 'v1.16.0';
1
+ const version = 'v1.18.0';
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
 
4
4
  export { userAgent, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -35,5 +35,5 @@
35
35
  "bundledDependencies": [
36
36
  "@scaleway/random-name"
37
37
  ],
38
- "gitHead": "8c068299f4bbdfc08159636b09dc878e676cd856"
38
+ "gitHead": "3b57b4bfa4f59a53ad81f7cff21fc3fdb2bfc0e2"
39
39
  }