@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
-
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
3
|
-
|
|
4
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
5
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
6
|
-
const unmarshalPinInfo = data => {
|
|
7
|
-
if (!isJSONObject(data)) {
|
|
8
|
-
throw new TypeError(`Unmarshalling the type 'PinInfo' failed as data isn't a dictionary.`);
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
id: data.id ? data.id : undefined,
|
|
12
|
-
progress: data.progress ? data.progress : undefined,
|
|
13
|
-
size: data.size ? data.size : undefined,
|
|
14
|
-
statusDetails: data.status_details,
|
|
15
|
-
url: data.url ? data.url : undefined
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
const unmarshalPinCIDMeta = data => {
|
|
19
|
-
if (!isJSONObject(data)) {
|
|
20
|
-
throw new TypeError(`Unmarshalling the type 'PinCIDMeta' failed as data isn't a dictionary.`);
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
id: data.id ? data.id : undefined
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
const unmarshalPinCID = data => {
|
|
27
|
-
if (!isJSONObject(data)) {
|
|
28
|
-
throw new TypeError(`Unmarshalling the type 'PinCID' failed as data isn't a dictionary.`);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
cid: data.cid ? data.cid : undefined,
|
|
32
|
-
meta: unmarshalPinCIDMeta(data.meta),
|
|
33
|
-
name: data.name ? data.name : undefined,
|
|
34
|
-
origins: data.origins
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
const unmarshalPin = data => {
|
|
38
|
-
if (!isJSONObject(data)) {
|
|
39
|
-
throw new TypeError(`Unmarshalling the type 'Pin' failed as data isn't a dictionary.`);
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
cid: unmarshalPinCID(data.cid),
|
|
43
|
-
createdAt: unmarshalDate(data.created_at),
|
|
44
|
-
delegates: data.delegates,
|
|
45
|
-
info: unmarshalPinInfo(data.info),
|
|
46
|
-
pinId: data.pin_id,
|
|
47
|
-
status: data.status
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
const unmarshalVolume = data => {
|
|
51
|
-
if (!isJSONObject(data)) {
|
|
52
|
-
throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
countPin: data.count_pin,
|
|
56
|
-
createdAt: unmarshalDate(data.created_at),
|
|
57
|
-
id: data.id,
|
|
58
|
-
name: data.name,
|
|
59
|
-
projectId: data.project_id,
|
|
60
|
-
region: data.region,
|
|
61
|
-
size: data.size ? data.size : undefined,
|
|
62
|
-
tags: data.tags,
|
|
63
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
const unmarshalListPinsResponse = data => {
|
|
67
|
-
if (!isJSONObject(data)) {
|
|
68
|
-
throw new TypeError(`Unmarshalling the type 'ListPinsResponse' failed as data isn't a dictionary.`);
|
|
69
|
-
}
|
|
70
|
-
return {
|
|
71
|
-
pins: unmarshalArrayOfObject(data.pins, unmarshalPin),
|
|
72
|
-
totalCount: data.total_count
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
const unmarshalListVolumesResponse = data => {
|
|
76
|
-
if (!isJSONObject(data)) {
|
|
77
|
-
throw new TypeError(`Unmarshalling the type 'ListVolumesResponse' failed as data isn't a dictionary.`);
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
totalCount: data.total_count,
|
|
81
|
-
volumes: unmarshalArrayOfObject(data.volumes, unmarshalVolume)
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
const unmarshalReplacePinResponse = data => {
|
|
85
|
-
if (!isJSONObject(data)) {
|
|
86
|
-
throw new TypeError(`Unmarshalling the type 'ReplacePinResponse' failed as data isn't a dictionary.`);
|
|
87
|
-
}
|
|
88
|
-
return {
|
|
89
|
-
pin: unmarshalPin(data.pin)
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
const marshalCreatePinByCIDRequest = (request, defaults) => ({
|
|
93
|
-
cid: request.cid,
|
|
94
|
-
name: request.name,
|
|
95
|
-
origins: request.origins,
|
|
96
|
-
pin_options: request.pinOptions,
|
|
97
|
-
volume_id: request.volumeId
|
|
98
|
-
});
|
|
99
|
-
const marshalCreatePinByURLRequest = (request, defaults) => ({
|
|
100
|
-
name: request.name,
|
|
101
|
-
pin_options: request.pinOptions,
|
|
102
|
-
url: request.url,
|
|
103
|
-
volume_id: request.volumeId
|
|
104
|
-
});
|
|
105
|
-
const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
106
|
-
name: request.name,
|
|
107
|
-
project_id: request.projectId ?? defaults.defaultProjectId
|
|
108
|
-
});
|
|
109
|
-
const marshalReplacePinRequest = (request, defaults) => ({
|
|
110
|
-
cid: request.cid,
|
|
111
|
-
name: request.name,
|
|
112
|
-
origins: request.origins,
|
|
113
|
-
pin_options: request.pinOptions,
|
|
114
|
-
volume_id: request.volumeId
|
|
115
|
-
});
|
|
116
|
-
const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
117
|
-
name: request.name,
|
|
118
|
-
tags: request.tags
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
export { marshalCreatePinByCIDRequest, marshalCreatePinByURLRequest, marshalCreateVolumeRequest, marshalReplacePinRequest, marshalUpdateVolumeRequest, unmarshalListPinsResponse, unmarshalListVolumesResponse, unmarshalPin, unmarshalReplacePinResponse, unmarshalVolume };
|
package/dist/api/k8s/index.js
DELETED
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
3
|
-
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
-
import { CLUSTER_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES } from './content.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
|
-
|
|
8
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
9
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
10
|
-
const jsonContentHeaders = {
|
|
11
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/** Kubernetes API. */
|
|
15
|
-
class API extends API$1 {
|
|
16
|
-
/** Lists the available regions of the API. */
|
|
17
|
-
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
18
|
-
pageOfListClusters = (() => {
|
|
19
|
-
var _this = this;
|
|
20
|
-
return function (request) {
|
|
21
|
-
if (request === void 0) {
|
|
22
|
-
request = {};
|
|
23
|
-
}
|
|
24
|
-
return _this.client.fetch({
|
|
25
|
-
method: 'GET',
|
|
26
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/clusters`,
|
|
27
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['project_id', request.projectId], ['status', request.status], ['type', request.type])
|
|
28
|
-
}, unmarshalListClustersResponse);
|
|
29
|
-
};
|
|
30
|
-
})();
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* List Clusters. List all existing Kubernetes clusters in a specific region.
|
|
34
|
-
*
|
|
35
|
-
* @param request - The request {@link ListClustersRequest}
|
|
36
|
-
* @returns A Promise of ListClustersResponse
|
|
37
|
-
*/
|
|
38
|
-
listClusters = (() => {
|
|
39
|
-
var _this2 = this;
|
|
40
|
-
return function (request) {
|
|
41
|
-
if (request === void 0) {
|
|
42
|
-
request = {};
|
|
43
|
-
}
|
|
44
|
-
return enrichForPagination('clusters', _this2.pageOfListClusters, request);
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Create a new Cluster. Create a new Kubernetes cluster in a Scaleway region.
|
|
50
|
-
*
|
|
51
|
-
* @param request - The request {@link CreateClusterRequest}
|
|
52
|
-
* @returns A Promise of Cluster
|
|
53
|
-
*/
|
|
54
|
-
createCluster = request => this.client.fetch({
|
|
55
|
-
body: JSON.stringify(marshalCreateClusterRequest(request, this.client.settings)),
|
|
56
|
-
headers: jsonContentHeaders,
|
|
57
|
-
method: 'POST',
|
|
58
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters`
|
|
59
|
-
}, unmarshalCluster);
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Get a Cluster. Retrieve information about a specific Kubernetes cluster.
|
|
63
|
-
*
|
|
64
|
-
* @param request - The request {@link GetClusterRequest}
|
|
65
|
-
* @returns A Promise of Cluster
|
|
66
|
-
*/
|
|
67
|
-
getCluster = request => this.client.fetch({
|
|
68
|
-
method: 'GET',
|
|
69
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}`
|
|
70
|
-
}, unmarshalCluster);
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Waits for {@link Cluster} to be in a final state.
|
|
74
|
-
*
|
|
75
|
-
* @param request - The request {@link GetClusterRequest}
|
|
76
|
-
* @param options - The waiting options
|
|
77
|
-
* @returns A Promise of Cluster
|
|
78
|
-
*/
|
|
79
|
-
waitForCluster = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Update a Cluster. Update information on a specific Kubernetes cluster. You
|
|
83
|
-
* can update details such as its name, description, tags and configuration.
|
|
84
|
-
* To upgrade a cluster, you will need to use the dedicated endpoint.
|
|
85
|
-
*
|
|
86
|
-
* @param request - The request {@link UpdateClusterRequest}
|
|
87
|
-
* @returns A Promise of Cluster
|
|
88
|
-
*/
|
|
89
|
-
updateCluster = request => this.client.fetch({
|
|
90
|
-
body: JSON.stringify(marshalUpdateClusterRequest(request, this.client.settings)),
|
|
91
|
-
headers: jsonContentHeaders,
|
|
92
|
-
method: 'PATCH',
|
|
93
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}`
|
|
94
|
-
}, unmarshalCluster);
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Delete a Cluster. Delete a specific Kubernetes cluster and all its
|
|
98
|
-
* associated pools and nodes. Note that this method will not delete any Load
|
|
99
|
-
* Balancer or Block Volume that are associated with the cluster.
|
|
100
|
-
*
|
|
101
|
-
* @param request - The request {@link DeleteClusterRequest}
|
|
102
|
-
* @returns A Promise of Cluster
|
|
103
|
-
*/
|
|
104
|
-
deleteCluster = request => this.client.fetch({
|
|
105
|
-
method: 'DELETE',
|
|
106
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}`,
|
|
107
|
-
urlParams: urlParams(['with_additional_resources', request.withAdditionalResources])
|
|
108
|
-
}, unmarshalCluster);
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Upgrade a Cluster. Upgrade a specific Kubernetes cluster and possibly its
|
|
112
|
-
* associated pools to a specific and supported Kubernetes version.
|
|
113
|
-
*
|
|
114
|
-
* @param request - The request {@link UpgradeClusterRequest}
|
|
115
|
-
* @returns A Promise of Cluster
|
|
116
|
-
*/
|
|
117
|
-
upgradeCluster = request => this.client.fetch({
|
|
118
|
-
body: JSON.stringify(marshalUpgradeClusterRequest(request, this.client.settings)),
|
|
119
|
-
headers: jsonContentHeaders,
|
|
120
|
-
method: 'POST',
|
|
121
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/upgrade`
|
|
122
|
-
}, unmarshalCluster);
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Change the Cluster type. Change the type of a specific Kubernetes cluster.
|
|
126
|
-
* To see the possible values you can enter for the `type` field, [list
|
|
127
|
-
* available cluster
|
|
128
|
-
* types](#path-clusters-list-available-cluster-types-for-a-cluster).
|
|
129
|
-
*
|
|
130
|
-
* @param request - The request {@link SetClusterTypeRequest}
|
|
131
|
-
* @returns A Promise of Cluster
|
|
132
|
-
*/
|
|
133
|
-
setClusterType = request => this.client.fetch({
|
|
134
|
-
body: JSON.stringify(marshalSetClusterTypeRequest(request, this.client.settings)),
|
|
135
|
-
headers: jsonContentHeaders,
|
|
136
|
-
method: 'POST',
|
|
137
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/set-type`
|
|
138
|
-
}, unmarshalCluster);
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* List available versions for a Cluster. List the versions that a specific
|
|
142
|
-
* Kubernetes cluster is allowed to upgrade to. Results will include every
|
|
143
|
-
* patch version greater than the current patch, as well as one minor version
|
|
144
|
-
* ahead of the current version. Any upgrade skipping a minor version will not
|
|
145
|
-
* work.
|
|
146
|
-
*
|
|
147
|
-
* @param request - The request {@link ListClusterAvailableVersionsRequest}
|
|
148
|
-
* @returns A Promise of ListClusterAvailableVersionsResponse
|
|
149
|
-
*/
|
|
150
|
-
listClusterAvailableVersions = request => this.client.fetch({
|
|
151
|
-
method: 'GET',
|
|
152
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-versions`
|
|
153
|
-
}, unmarshalListClusterAvailableVersionsResponse);
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* List available cluster types for a cluster. List the cluster types that a
|
|
157
|
-
* specific Kubernetes cluster is allowed to switch to.
|
|
158
|
-
*
|
|
159
|
-
* @param request - The request {@link ListClusterAvailableTypesRequest}
|
|
160
|
-
* @returns A Promise of ListClusterAvailableTypesResponse
|
|
161
|
-
*/
|
|
162
|
-
listClusterAvailableTypes = request => this.client.fetch({
|
|
163
|
-
method: 'GET',
|
|
164
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/available-types`
|
|
165
|
-
}, unmarshalListClusterAvailableTypesResponse);
|
|
166
|
-
_getClusterKubeConfig = request => this.client.fetch({
|
|
167
|
-
method: 'GET',
|
|
168
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/kubeconfig`,
|
|
169
|
-
urlParams: urlParams(['dl', 1]),
|
|
170
|
-
responseType: 'blob'
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Reset the admin token of a Cluster. Reset the admin token for a specific
|
|
175
|
-
* Kubernetes cluster. This will revoke the old admin token (which will not be
|
|
176
|
-
* usable afterwards) and create a new one. Note that you will need to
|
|
177
|
-
* download kubeconfig again to keep interacting with the cluster.
|
|
178
|
-
*
|
|
179
|
-
* @param request - The request {@link ResetClusterAdminTokenRequest}
|
|
180
|
-
*/
|
|
181
|
-
resetClusterAdminToken = request => this.client.fetch({
|
|
182
|
-
body: '{}',
|
|
183
|
-
headers: jsonContentHeaders,
|
|
184
|
-
method: 'POST',
|
|
185
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/reset-admin-token`
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Migrate an existing cluster to a Private Network cluster. Migrate a cluster
|
|
190
|
-
* that was created before the release of Private Network clusters to a new
|
|
191
|
-
* one with a Private Network.
|
|
192
|
-
*
|
|
193
|
-
* @param request - The request {@link MigrateToPrivateNetworkClusterRequest}
|
|
194
|
-
* @returns A Promise of Cluster
|
|
195
|
-
*/
|
|
196
|
-
migrateToPrivateNetworkCluster = request => this.client.fetch({
|
|
197
|
-
body: JSON.stringify(marshalMigrateToPrivateNetworkClusterRequest(request, this.client.settings)),
|
|
198
|
-
headers: jsonContentHeaders,
|
|
199
|
-
method: 'POST',
|
|
200
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/migrate-to-private-network`
|
|
201
|
-
}, unmarshalCluster);
|
|
202
|
-
pageOfListPools = request => this.client.fetch({
|
|
203
|
-
method: 'GET',
|
|
204
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/pools`,
|
|
205
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['status', request.status])
|
|
206
|
-
}, unmarshalListPoolsResponse);
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* List Pools in a Cluster. List all the existing pools for a specific
|
|
210
|
-
* Kubernetes cluster.
|
|
211
|
-
*
|
|
212
|
-
* @param request - The request {@link ListPoolsRequest}
|
|
213
|
-
* @returns A Promise of ListPoolsResponse
|
|
214
|
-
*/
|
|
215
|
-
listPools = request => enrichForPagination('pools', this.pageOfListPools, request);
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Create a new Pool in a Cluster. Create a new pool in a specific Kubernetes
|
|
219
|
-
* cluster.
|
|
220
|
-
*
|
|
221
|
-
* @param request - The request {@link CreatePoolRequest}
|
|
222
|
-
* @returns A Promise of Pool
|
|
223
|
-
*/
|
|
224
|
-
createPool = request => this.client.fetch({
|
|
225
|
-
body: JSON.stringify(marshalCreatePoolRequest(request, this.client.settings)),
|
|
226
|
-
headers: jsonContentHeaders,
|
|
227
|
-
method: 'POST',
|
|
228
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/pools`
|
|
229
|
-
}, unmarshalPool);
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Get a Pool in a Cluster. Retrieve details about a specific pool in a
|
|
233
|
-
* Kubernetes cluster.
|
|
234
|
-
*
|
|
235
|
-
* @param request - The request {@link GetPoolRequest}
|
|
236
|
-
* @returns A Promise of Pool
|
|
237
|
-
*/
|
|
238
|
-
getPool = request => this.client.fetch({
|
|
239
|
-
method: 'GET',
|
|
240
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}`
|
|
241
|
-
}, unmarshalPool);
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Waits for {@link Pool} to be in a final state.
|
|
245
|
-
*
|
|
246
|
-
* @param request - The request {@link GetPoolRequest}
|
|
247
|
-
* @param options - The waiting options
|
|
248
|
-
* @returns A Promise of Pool
|
|
249
|
-
*/
|
|
250
|
-
waitForPool = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!POOL_TRANSIENT_STATUSES.includes(res.status))), this.getPool, request, options);
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Upgrade a Pool in a Cluster. Upgrade the Kubernetes version of a specific
|
|
254
|
-
* pool. Note that it only works if the targeted version matches the cluster's
|
|
255
|
-
* version.
|
|
256
|
-
*
|
|
257
|
-
* @param request - The request {@link UpgradePoolRequest}
|
|
258
|
-
* @returns A Promise of Pool
|
|
259
|
-
*/
|
|
260
|
-
upgradePool = request => this.client.fetch({
|
|
261
|
-
body: JSON.stringify(marshalUpgradePoolRequest(request, this.client.settings)),
|
|
262
|
-
headers: jsonContentHeaders,
|
|
263
|
-
method: 'POST',
|
|
264
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}/upgrade`
|
|
265
|
-
}, unmarshalPool);
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Update a Pool in a Cluster. Update the attributes of a specific pool, such
|
|
269
|
-
* as its desired size, autoscaling settings, and tags.
|
|
270
|
-
*
|
|
271
|
-
* @param request - The request {@link UpdatePoolRequest}
|
|
272
|
-
* @returns A Promise of Pool
|
|
273
|
-
*/
|
|
274
|
-
updatePool = request => this.client.fetch({
|
|
275
|
-
body: JSON.stringify(marshalUpdatePoolRequest(request, this.client.settings)),
|
|
276
|
-
headers: jsonContentHeaders,
|
|
277
|
-
method: 'PATCH',
|
|
278
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}`
|
|
279
|
-
}, unmarshalPool);
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Delete a Pool in a Cluster. Delete a specific pool from a cluster. Note
|
|
283
|
-
* that all the pool's nodes will also be deleted.
|
|
284
|
-
*
|
|
285
|
-
* @param request - The request {@link DeletePoolRequest}
|
|
286
|
-
* @returns A Promise of Pool
|
|
287
|
-
*/
|
|
288
|
-
deletePool = request => this.client.fetch({
|
|
289
|
-
method: 'DELETE',
|
|
290
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}`
|
|
291
|
-
}, unmarshalPool);
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is
|
|
295
|
-
* not intended to be called by end users but rather programmatically by the
|
|
296
|
-
* kapsule-node-agent.
|
|
297
|
-
*
|
|
298
|
-
* @param request - The request {@link CreateExternalNodeRequest}
|
|
299
|
-
* @returns A Promise of ExternalNode
|
|
300
|
-
*/
|
|
301
|
-
createExternalNode = request => this.client.fetch({
|
|
302
|
-
body: '{}',
|
|
303
|
-
headers: jsonContentHeaders,
|
|
304
|
-
method: 'POST',
|
|
305
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools/${validatePathParam('poolId', request.poolId)}/external-nodes`
|
|
306
|
-
}, unmarshalExternalNode);
|
|
307
|
-
pageOfListNodes = request => this.client.fetch({
|
|
308
|
-
method: 'GET',
|
|
309
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/clusters/${validatePathParam('clusterId', request.clusterId)}/nodes`,
|
|
310
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['pool_id', request.poolId], ['status', request.status])
|
|
311
|
-
}, unmarshalListNodesResponse);
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* List Nodes in a Cluster. List all the existing nodes for a specific
|
|
315
|
-
* Kubernetes cluster.
|
|
316
|
-
*
|
|
317
|
-
* @param request - The request {@link ListNodesRequest}
|
|
318
|
-
* @returns A Promise of ListNodesResponse
|
|
319
|
-
*/
|
|
320
|
-
listNodes = request => enrichForPagination('nodes', this.pageOfListNodes, request);
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Get a Node in a Cluster. Retrieve details about a specific Kubernetes Node.
|
|
324
|
-
*
|
|
325
|
-
* @param request - The request {@link GetNodeRequest}
|
|
326
|
-
* @returns A Promise of Node
|
|
327
|
-
*/
|
|
328
|
-
getNode = request => this.client.fetch({
|
|
329
|
-
method: 'GET',
|
|
330
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}`
|
|
331
|
-
}, unmarshalNode);
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Waits for {@link Node} to be in a final state.
|
|
335
|
-
*
|
|
336
|
-
* @param request - The request {@link GetNodeRequest}
|
|
337
|
-
* @param options - The waiting options
|
|
338
|
-
* @returns A Promise of Node
|
|
339
|
-
*/
|
|
340
|
-
waitForNode = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NODE_TRANSIENT_STATUSES.includes(res.status))), this.getNode, request, options);
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Replace a Node in a Cluster. Replace a specific Node. The node will first
|
|
344
|
-
* be cordoned (scheduling will be disabled on it). The existing pods on the
|
|
345
|
-
* node will then be drained and rescheduled onto another schedulable node.
|
|
346
|
-
* Note that when there is not enough space to reschedule all the pods (such
|
|
347
|
-
* as in a one-node cluster), disruption of your applications can be
|
|
348
|
-
* expected.
|
|
349
|
-
*
|
|
350
|
-
* @deprecated
|
|
351
|
-
* @param request - The request {@link ReplaceNodeRequest}
|
|
352
|
-
* @returns A Promise of Node
|
|
353
|
-
*/
|
|
354
|
-
replaceNode = request => this.client.fetch({
|
|
355
|
-
body: '{}',
|
|
356
|
-
headers: jsonContentHeaders,
|
|
357
|
-
method: 'POST',
|
|
358
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}/replace`
|
|
359
|
-
}, unmarshalNode);
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Reboot a Node in a Cluster. Reboot a specific Node. The node will first be
|
|
363
|
-
* cordoned (scheduling will be disabled on it). The existing pods on the node
|
|
364
|
-
* will then be drained and rescheduled onto another schedulable node. Note
|
|
365
|
-
* that when there is not enough space to reschedule all the pods (such as in
|
|
366
|
-
* a one-node cluster), disruption of your applications can be expected.
|
|
367
|
-
*
|
|
368
|
-
* @param request - The request {@link RebootNodeRequest}
|
|
369
|
-
* @returns A Promise of Node
|
|
370
|
-
*/
|
|
371
|
-
rebootNode = request => this.client.fetch({
|
|
372
|
-
body: '{}',
|
|
373
|
-
headers: jsonContentHeaders,
|
|
374
|
-
method: 'POST',
|
|
375
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}/reboot`
|
|
376
|
-
}, unmarshalNode);
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Delete a Node in a Cluster. Delete a specific Node. Note that when there is
|
|
380
|
-
* not enough space to reschedule all the pods (such as in a one-node
|
|
381
|
-
* cluster), disruption of your applications can be expected.
|
|
382
|
-
*
|
|
383
|
-
* @param request - The request {@link DeleteNodeRequest}
|
|
384
|
-
* @returns A Promise of Node
|
|
385
|
-
*/
|
|
386
|
-
deleteNode = request => this.client.fetch({
|
|
387
|
-
method: 'DELETE',
|
|
388
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}`,
|
|
389
|
-
urlParams: urlParams(['replace', request.replace], ['skip_drain', request.skipDrain])
|
|
390
|
-
}, unmarshalNode);
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* List all available Versions. List all available versions for the creation
|
|
394
|
-
* of a new Kubernetes cluster.
|
|
395
|
-
*
|
|
396
|
-
* @param request - The request {@link ListVersionsRequest}
|
|
397
|
-
* @returns A Promise of ListVersionsResponse
|
|
398
|
-
*/
|
|
399
|
-
listVersions = (() => {
|
|
400
|
-
var _this3 = this;
|
|
401
|
-
return function (request) {
|
|
402
|
-
if (request === void 0) {
|
|
403
|
-
request = {};
|
|
404
|
-
}
|
|
405
|
-
return _this3.client.fetch({
|
|
406
|
-
method: 'GET',
|
|
407
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/versions`
|
|
408
|
-
}, unmarshalListVersionsResponse);
|
|
409
|
-
};
|
|
410
|
-
})();
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Get a Version. Retrieve a specific Kubernetes version and its details.
|
|
414
|
-
*
|
|
415
|
-
* @param request - The request {@link GetVersionRequest}
|
|
416
|
-
* @returns A Promise of Version
|
|
417
|
-
*/
|
|
418
|
-
getVersion = request => this.client.fetch({
|
|
419
|
-
method: 'GET',
|
|
420
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/versions/${validatePathParam('versionName', request.versionName)}`
|
|
421
|
-
}, unmarshalVersion);
|
|
422
|
-
pageOfListClusterTypes = (() => {
|
|
423
|
-
var _this4 = this;
|
|
424
|
-
return function (request) {
|
|
425
|
-
if (request === void 0) {
|
|
426
|
-
request = {};
|
|
427
|
-
}
|
|
428
|
-
return _this4.client.fetch({
|
|
429
|
-
method: 'GET',
|
|
430
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/cluster-types`,
|
|
431
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
|
|
432
|
-
}, unmarshalListClusterTypesResponse);
|
|
433
|
-
};
|
|
434
|
-
})();
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* List cluster types. List available cluster types and their technical
|
|
438
|
-
* details.
|
|
439
|
-
*
|
|
440
|
-
* @param request - The request {@link ListClusterTypesRequest}
|
|
441
|
-
* @returns A Promise of ListClusterTypesResponse
|
|
442
|
-
*/
|
|
443
|
-
listClusterTypes = (() => {
|
|
444
|
-
var _this5 = this;
|
|
445
|
-
return function (request) {
|
|
446
|
-
if (request === void 0) {
|
|
447
|
-
request = {};
|
|
448
|
-
}
|
|
449
|
-
return enrichForPagination('clusterTypes', _this5.pageOfListClusterTypes, request);
|
|
450
|
-
};
|
|
451
|
-
})();
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export { API };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { API } from './api.gen.js';
|
|
2
|
-
|
|
3
|
-
class K8SUtilsAPI extends API {
|
|
4
|
-
/**
|
|
5
|
-
* Get configuration of a kube cluster.
|
|
6
|
-
*
|
|
7
|
-
* @param request - The request {@link GetClusterKubeConfigRequest}
|
|
8
|
-
* @returns A Promise of Blob
|
|
9
|
-
*/
|
|
10
|
-
getClusterKubeConfig = request => this._getClusterKubeConfig(request);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { K8SUtilsAPI };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
-
|
|
4
|
-
/** Lists transient statutes of the enum {@link ClusterStatus}. */
|
|
5
|
-
const CLUSTER_TRANSIENT_STATUSES = ['creating', 'deleting', 'updating'];
|
|
6
|
-
|
|
7
|
-
/** Lists transient statutes of the enum {@link NodeStatus}. */
|
|
8
|
-
const NODE_TRANSIENT_STATUSES = ['creating', 'deleting', 'rebooting', 'upgrading', 'starting', 'registering'];
|
|
9
|
-
|
|
10
|
-
/** Lists transient statutes of the enum {@link PoolStatus}. */
|
|
11
|
-
const POOL_TRANSIENT_STATUSES = ['deleting', 'scaling', 'upgrading'];
|
|
12
|
-
|
|
13
|
-
export { CLUSTER_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES };
|
package/dist/api/k8s/v1/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { K8SUtilsAPI as API } from './api.utils.js';
|
|
2
|
-
export { CLUSTER_TRANSIENT_STATUSES, NODE_TRANSIENT_STATUSES, POOL_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
|
-
import * as validationRules_gen from './validation-rules.gen.js';
|
|
4
|
-
export { validationRules_gen as ValidationRules };
|