@scaleway/sdk 1.34.0 → 2.0.0-alpha.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/api/account/v2/api.gen.js +1 -1
- package/dist/api/account/v3/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
- package/dist/api/billing/v2alpha1/api.gen.js +3 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
- package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
- package/dist/api/container/v1beta1/api.gen.js +11 -11
- package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
- package/dist/api/document_db/v1beta1/api.gen.js +6 -6
- package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
- package/dist/api/domain/v2beta1/api.gen.js +45 -38
- package/dist/api/domain/v2beta1/index.gen.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
- package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +11 -11
- package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
- package/dist/api/iam/v1alpha1/api.gen.js +64 -32
- package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +397 -602
- package/dist/api/iot/v1/api.gen.js +35 -27
- package/dist/api/iot/v1/marshalling.gen.js +111 -162
- package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
- package/dist/api/k8s/v1/api.gen.js +3 -3
- package/dist/api/k8s/v1/marshalling.gen.js +109 -194
- package/dist/api/lb/v1/api.gen.js +583 -552
- package/dist/api/lb/v1/marshalling.gen.js +245 -361
- package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
- package/dist/api/marketplace/v2/api.gen.js +6 -6
- package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
- package/dist/api/rdb/v1/api.gen.js +7 -7
- package/dist/api/rdb/v1/marshalling.gen.js +184 -240
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +73 -97
- package/dist/api/registry/v1/api.gen.js +3 -3
- package/dist/api/registry/v1/marshalling.gen.js +5 -7
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
- package/dist/api/tem/v1alpha1/api.gen.js +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
- package/dist/api/test/v1/api.gen.js +8 -25
- package/dist/api/test/v1/marshalling.gen.js +5 -7
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +2 -2
- package/dist/api/vpc/v2/marshalling.gen.js +3 -5
- package/dist/api/vpcgw/v1/api.gen.js +6 -6
- package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
- package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +3127 -3989
- package/dist/index.d.ts +9658 -12221
- package/package.json +2 -2
|
@@ -3,35 +3,35 @@ import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshall
|
|
|
3
3
|
|
|
4
4
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
5
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
6
|
-
const
|
|
6
|
+
const unmarshalPinInfo = data => {
|
|
7
7
|
if (!isJSONObject(data)) {
|
|
8
|
-
throw new TypeError(`Unmarshalling the type '
|
|
8
|
+
throw new TypeError(`Unmarshalling the type 'PinInfo' failed as data isn't a dictionary.`);
|
|
9
9
|
}
|
|
10
10
|
return {
|
|
11
|
-
id: data.id
|
|
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
|
|
12
16
|
};
|
|
13
17
|
};
|
|
14
|
-
const
|
|
18
|
+
const unmarshalPinCIDMeta = data => {
|
|
15
19
|
if (!isJSONObject(data)) {
|
|
16
|
-
throw new TypeError(`Unmarshalling the type '
|
|
20
|
+
throw new TypeError(`Unmarshalling the type 'PinCIDMeta' failed as data isn't a dictionary.`);
|
|
17
21
|
}
|
|
18
22
|
return {
|
|
19
|
-
|
|
20
|
-
meta: data.meta ? unmarshalPinCIDMeta(data.meta) : undefined,
|
|
21
|
-
name: data.name,
|
|
22
|
-
origins: data.origins
|
|
23
|
+
id: data.id ? data.id : undefined
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
|
-
const
|
|
26
|
+
const unmarshalPinCID = data => {
|
|
26
27
|
if (!isJSONObject(data)) {
|
|
27
|
-
throw new TypeError(`Unmarshalling the type '
|
|
28
|
+
throw new TypeError(`Unmarshalling the type 'PinCID' failed as data isn't a dictionary.`);
|
|
28
29
|
}
|
|
29
30
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
url: data.url
|
|
31
|
+
cid: data.cid ? data.cid : undefined,
|
|
32
|
+
meta: unmarshalPinCIDMeta(data.meta),
|
|
33
|
+
name: data.name ? data.name : undefined,
|
|
34
|
+
origins: data.origins
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
const unmarshalPin = data => {
|
|
@@ -39,10 +39,10 @@ const unmarshalPin = data => {
|
|
|
39
39
|
throw new TypeError(`Unmarshalling the type 'Pin' failed as data isn't a dictionary.`);
|
|
40
40
|
}
|
|
41
41
|
return {
|
|
42
|
-
cid:
|
|
42
|
+
cid: unmarshalPinCID(data.cid),
|
|
43
43
|
createdAt: unmarshalDate(data.created_at),
|
|
44
44
|
delegates: data.delegates,
|
|
45
|
-
info:
|
|
45
|
+
info: unmarshalPinInfo(data.info),
|
|
46
46
|
pinId: data.pin_id,
|
|
47
47
|
status: data.status
|
|
48
48
|
};
|
|
@@ -58,7 +58,7 @@ const unmarshalVolume = data => {
|
|
|
58
58
|
name: data.name,
|
|
59
59
|
projectId: data.project_id,
|
|
60
60
|
region: data.region,
|
|
61
|
-
size: data.size,
|
|
61
|
+
size: data.size ? data.size : undefined,
|
|
62
62
|
tags: data.tags,
|
|
63
63
|
updatedAt: unmarshalDate(data.updated_at)
|
|
64
64
|
};
|
|
@@ -86,23 +86,19 @@ const unmarshalReplacePinResponse = data => {
|
|
|
86
86
|
throw new TypeError(`Unmarshalling the type 'ReplacePinResponse' failed as data isn't a dictionary.`);
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
|
-
pin:
|
|
89
|
+
pin: unmarshalPin(data.pin)
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
|
-
const marshalPinOptions = (request, defaults) => ({
|
|
93
|
-
replication_count: request.replicationCount,
|
|
94
|
-
required_zones: request.requiredZones
|
|
95
|
-
});
|
|
96
92
|
const marshalCreatePinByCIDRequest = (request, defaults) => ({
|
|
97
93
|
cid: request.cid,
|
|
98
94
|
name: request.name,
|
|
99
95
|
origins: request.origins,
|
|
100
|
-
pin_options: request.pinOptions
|
|
96
|
+
pin_options: request.pinOptions,
|
|
101
97
|
volume_id: request.volumeId
|
|
102
98
|
});
|
|
103
99
|
const marshalCreatePinByURLRequest = (request, defaults) => ({
|
|
104
100
|
name: request.name,
|
|
105
|
-
pin_options: request.pinOptions
|
|
101
|
+
pin_options: request.pinOptions,
|
|
106
102
|
url: request.url,
|
|
107
103
|
volume_id: request.volumeId
|
|
108
104
|
});
|
|
@@ -114,7 +110,7 @@ const marshalReplacePinRequest = (request, defaults) => ({
|
|
|
114
110
|
cid: request.cid,
|
|
115
111
|
name: request.name,
|
|
116
112
|
origins: request.origins,
|
|
117
|
-
pin_options: request.pinOptions
|
|
113
|
+
pin_options: request.pinOptions,
|
|
118
114
|
volume_id: request.volumeId
|
|
119
115
|
});
|
|
120
116
|
const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
@@ -24,7 +24,7 @@ class API extends API$1 {
|
|
|
24
24
|
return _this.client.fetch({
|
|
25
25
|
method: 'GET',
|
|
26
26
|
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/clusters`,
|
|
27
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
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
28
|
}, unmarshalListClustersResponse);
|
|
29
29
|
};
|
|
30
30
|
})();
|
|
@@ -202,7 +202,7 @@ class API extends API$1 {
|
|
|
202
202
|
pageOfListPools = request => this.client.fetch({
|
|
203
203
|
method: 'GET',
|
|
204
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
|
|
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
206
|
}, unmarshalListPoolsResponse);
|
|
207
207
|
|
|
208
208
|
/**
|
|
@@ -307,7 +307,7 @@ class API extends API$1 {
|
|
|
307
307
|
pageOfListNodes = request => this.client.fetch({
|
|
308
308
|
method: 'GET',
|
|
309
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
|
|
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
311
|
}, unmarshalListNodesResponse);
|
|
312
312
|
|
|
313
313
|
/**
|
|
@@ -4,39 +4,58 @@ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../he
|
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
-
const
|
|
7
|
+
const unmarshalPoolUpgradePolicy = data => {
|
|
8
8
|
if (!isJSONObject(data)) {
|
|
9
|
-
throw new TypeError(`Unmarshalling the type '
|
|
9
|
+
throw new TypeError(`Unmarshalling the type 'PoolUpgradePolicy' failed as data isn't a dictionary.`);
|
|
10
10
|
}
|
|
11
11
|
return {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
maxSurge: data.max_surge,
|
|
13
|
+
maxUnavailable: data.max_unavailable
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
const
|
|
16
|
+
const unmarshalPool = data => {
|
|
17
17
|
if (!isJSONObject(data)) {
|
|
18
|
-
throw new TypeError(`Unmarshalling the type '
|
|
18
|
+
throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
|
|
19
19
|
}
|
|
20
20
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
autohealing: data.autohealing,
|
|
22
|
+
autoscaling: data.autoscaling,
|
|
23
|
+
clusterId: data.cluster_id,
|
|
24
|
+
containerRuntime: data.container_runtime,
|
|
25
|
+
createdAt: unmarshalDate(data.created_at),
|
|
26
|
+
id: data.id,
|
|
27
|
+
kubeletArgs: data.kubelet_args,
|
|
28
|
+
maxSize: data.max_size,
|
|
29
|
+
minSize: data.min_size,
|
|
30
|
+
name: data.name,
|
|
31
|
+
nodeType: data.node_type,
|
|
32
|
+
placementGroupId: data.placement_group_id ? data.placement_group_id : undefined,
|
|
33
|
+
region: data.region,
|
|
34
|
+
rootVolumeSize: data.root_volume_size ? data.root_volume_size : undefined,
|
|
35
|
+
rootVolumeType: data.root_volume_type,
|
|
36
|
+
size: data.size,
|
|
37
|
+
status: data.status,
|
|
38
|
+
tags: data.tags,
|
|
39
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
40
|
+
upgradePolicy: unmarshalPoolUpgradePolicy(data.upgrade_policy),
|
|
41
|
+
version: data.version,
|
|
42
|
+
zone: data.zone
|
|
23
43
|
};
|
|
24
44
|
};
|
|
25
|
-
const
|
|
45
|
+
const unmarshalVersion = data => {
|
|
26
46
|
if (!isJSONObject(data)) {
|
|
27
|
-
throw new TypeError(`Unmarshalling the type '
|
|
47
|
+
throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
|
|
28
48
|
}
|
|
29
49
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
|
|
50
|
+
availableAdmissionPlugins: data.available_admission_plugins,
|
|
51
|
+
availableCnis: data.available_cnis,
|
|
52
|
+
availableContainerRuntimes: data.available_container_runtimes,
|
|
53
|
+
availableFeatureGates: data.available_feature_gates,
|
|
54
|
+
availableIngresses: data.available_ingresses ? data.available_ingresses : undefined,
|
|
55
|
+
availableKubeletArgs: data.available_kubelet_args,
|
|
56
|
+
label: data.label,
|
|
57
|
+
name: data.name,
|
|
58
|
+
region: data.region
|
|
40
59
|
};
|
|
41
60
|
};
|
|
42
61
|
const unmarshalClusterOpenIDConnectConfig = data => {
|
|
@@ -53,13 +72,39 @@ const unmarshalClusterOpenIDConnectConfig = data => {
|
|
|
53
72
|
usernamePrefix: data.username_prefix
|
|
54
73
|
};
|
|
55
74
|
};
|
|
56
|
-
const
|
|
75
|
+
const unmarshalMaintenanceWindow = data => {
|
|
57
76
|
if (!isJSONObject(data)) {
|
|
58
|
-
throw new TypeError(`Unmarshalling the type '
|
|
77
|
+
throw new TypeError(`Unmarshalling the type 'MaintenanceWindow' failed as data isn't a dictionary.`);
|
|
59
78
|
}
|
|
60
79
|
return {
|
|
61
|
-
|
|
62
|
-
|
|
80
|
+
day: data.day,
|
|
81
|
+
startHour: data.start_hour
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
const unmarshalClusterAutoUpgrade = data => {
|
|
85
|
+
if (!isJSONObject(data)) {
|
|
86
|
+
throw new TypeError(`Unmarshalling the type 'ClusterAutoUpgrade' failed as data isn't a dictionary.`);
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
enabled: data.enabled,
|
|
90
|
+
maintenanceWindow: unmarshalMaintenanceWindow(data.maintenance_window)
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
const unmarshalClusterAutoscalerConfig = data => {
|
|
94
|
+
if (!isJSONObject(data)) {
|
|
95
|
+
throw new TypeError(`Unmarshalling the type 'ClusterAutoscalerConfig' failed as data isn't a dictionary.`);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
balanceSimilarNodeGroups: data.balance_similar_node_groups,
|
|
99
|
+
estimator: data.estimator,
|
|
100
|
+
expander: data.expander,
|
|
101
|
+
expendablePodsPriorityCutoff: data.expendable_pods_priority_cutoff,
|
|
102
|
+
ignoreDaemonsetsUtilization: data.ignore_daemonsets_utilization,
|
|
103
|
+
maxGracefulTerminationSec: data.max_graceful_termination_sec,
|
|
104
|
+
scaleDownDelayAfterAdd: data.scale_down_delay_after_add,
|
|
105
|
+
scaleDownDisabled: data.scale_down_disabled,
|
|
106
|
+
scaleDownUnneededTime: data.scale_down_unneeded_time,
|
|
107
|
+
scaleDownUtilizationThreshold: data.scale_down_utilization_threshold
|
|
63
108
|
};
|
|
64
109
|
};
|
|
65
110
|
const unmarshalCluster = data => {
|
|
@@ -69,22 +114,22 @@ const unmarshalCluster = data => {
|
|
|
69
114
|
return {
|
|
70
115
|
admissionPlugins: data.admission_plugins,
|
|
71
116
|
apiserverCertSans: data.apiserver_cert_sans,
|
|
72
|
-
|
|
73
|
-
|
|
117
|
+
autoUpgrade: unmarshalClusterAutoUpgrade(data.auto_upgrade),
|
|
118
|
+
autoscalerConfig: unmarshalClusterAutoscalerConfig(data.autoscaler_config),
|
|
74
119
|
clusterUrl: data.cluster_url,
|
|
75
120
|
cni: data.cni,
|
|
76
121
|
commitmentEndsAt: unmarshalDate(data.commitment_ends_at),
|
|
77
122
|
createdAt: unmarshalDate(data.created_at),
|
|
78
|
-
dashboardEnabled: data.dashboard_enabled,
|
|
123
|
+
dashboardEnabled: data.dashboard_enabled ? data.dashboard_enabled : undefined,
|
|
79
124
|
description: data.description,
|
|
80
125
|
dnsWildcard: data.dns_wildcard,
|
|
81
126
|
featureGates: data.feature_gates,
|
|
82
127
|
id: data.id,
|
|
83
|
-
ingress: data.ingress,
|
|
128
|
+
ingress: data.ingress ? data.ingress : undefined,
|
|
84
129
|
name: data.name,
|
|
85
|
-
openIdConnectConfig:
|
|
130
|
+
openIdConnectConfig: unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config),
|
|
86
131
|
organizationId: data.organization_id,
|
|
87
|
-
privateNetworkId: data.private_network_id,
|
|
132
|
+
privateNetworkId: data.private_network_id ? data.private_network_id : undefined,
|
|
88
133
|
projectId: data.project_id,
|
|
89
134
|
region: data.region,
|
|
90
135
|
status: data.status,
|
|
@@ -95,86 +140,26 @@ const unmarshalCluster = data => {
|
|
|
95
140
|
version: data.version
|
|
96
141
|
};
|
|
97
142
|
};
|
|
98
|
-
const unmarshalClusterType = data => {
|
|
99
|
-
if (!isJSONObject(data)) {
|
|
100
|
-
throw new TypeError(`Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`);
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
availability: data.availability,
|
|
104
|
-
commitmentDelay: data.commitment_delay,
|
|
105
|
-
dedicated: data.dedicated,
|
|
106
|
-
maxNodes: data.max_nodes,
|
|
107
|
-
memory: data.memory,
|
|
108
|
-
name: data.name,
|
|
109
|
-
resiliency: data.resiliency,
|
|
110
|
-
sla: data.sla
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
143
|
const unmarshalNode = data => {
|
|
114
144
|
if (!isJSONObject(data)) {
|
|
115
145
|
throw new TypeError(`Unmarshalling the type 'Node' failed as data isn't a dictionary.`);
|
|
116
146
|
}
|
|
117
147
|
return {
|
|
118
148
|
clusterId: data.cluster_id,
|
|
119
|
-
conditions: data.conditions,
|
|
149
|
+
conditions: data.conditions ? data.conditions : undefined,
|
|
120
150
|
createdAt: unmarshalDate(data.created_at),
|
|
121
|
-
errorMessage: data.error_message,
|
|
151
|
+
errorMessage: data.error_message ? data.error_message : undefined,
|
|
122
152
|
id: data.id,
|
|
123
153
|
name: data.name,
|
|
124
154
|
poolId: data.pool_id,
|
|
125
155
|
providerId: data.provider_id,
|
|
126
|
-
publicIpV4: data.public_ip_v4,
|
|
127
|
-
publicIpV6: data.public_ip_v6,
|
|
156
|
+
publicIpV4: data.public_ip_v4 ? data.public_ip_v4 : undefined,
|
|
157
|
+
publicIpV6: data.public_ip_v6 ? data.public_ip_v6 : undefined,
|
|
128
158
|
region: data.region,
|
|
129
159
|
status: data.status,
|
|
130
160
|
updatedAt: unmarshalDate(data.updated_at)
|
|
131
161
|
};
|
|
132
162
|
};
|
|
133
|
-
const unmarshalPool = data => {
|
|
134
|
-
if (!isJSONObject(data)) {
|
|
135
|
-
throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
|
|
136
|
-
}
|
|
137
|
-
return {
|
|
138
|
-
autohealing: data.autohealing,
|
|
139
|
-
autoscaling: data.autoscaling,
|
|
140
|
-
clusterId: data.cluster_id,
|
|
141
|
-
containerRuntime: data.container_runtime,
|
|
142
|
-
createdAt: unmarshalDate(data.created_at),
|
|
143
|
-
id: data.id,
|
|
144
|
-
kubeletArgs: data.kubelet_args,
|
|
145
|
-
maxSize: data.max_size,
|
|
146
|
-
minSize: data.min_size,
|
|
147
|
-
name: data.name,
|
|
148
|
-
nodeType: data.node_type,
|
|
149
|
-
placementGroupId: data.placement_group_id,
|
|
150
|
-
region: data.region,
|
|
151
|
-
rootVolumeSize: data.root_volume_size,
|
|
152
|
-
rootVolumeType: data.root_volume_type,
|
|
153
|
-
size: data.size,
|
|
154
|
-
status: data.status,
|
|
155
|
-
tags: data.tags,
|
|
156
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
157
|
-
upgradePolicy: data.upgrade_policy ? unmarshalPoolUpgradePolicy(data.upgrade_policy) : undefined,
|
|
158
|
-
version: data.version,
|
|
159
|
-
zone: data.zone
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
const unmarshalVersion = data => {
|
|
163
|
-
if (!isJSONObject(data)) {
|
|
164
|
-
throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
availableAdmissionPlugins: data.available_admission_plugins,
|
|
168
|
-
availableCnis: data.available_cnis,
|
|
169
|
-
availableContainerRuntimes: data.available_container_runtimes,
|
|
170
|
-
availableFeatureGates: data.available_feature_gates,
|
|
171
|
-
availableIngresses: data.available_ingresses,
|
|
172
|
-
availableKubeletArgs: data.available_kubelet_args,
|
|
173
|
-
label: data.label,
|
|
174
|
-
name: data.name,
|
|
175
|
-
region: data.region
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
163
|
const unmarshalExternalNode = data => {
|
|
179
164
|
if (!isJSONObject(data)) {
|
|
180
165
|
throw new TypeError(`Unmarshalling the type 'ExternalNode' failed as data isn't a dictionary.`);
|
|
@@ -184,12 +169,27 @@ const unmarshalExternalNode = data => {
|
|
|
184
169
|
clusterUrl: data.cluster_url,
|
|
185
170
|
externalIp: data.external_ip,
|
|
186
171
|
id: data.id,
|
|
187
|
-
kubeletConfig: data.kubelet_config,
|
|
188
172
|
kubeToken: data.kube_token,
|
|
173
|
+
kubeletConfig: data.kubelet_config,
|
|
189
174
|
name: data.name,
|
|
190
175
|
poolVersion: data.pool_version
|
|
191
176
|
};
|
|
192
177
|
};
|
|
178
|
+
const unmarshalClusterType = data => {
|
|
179
|
+
if (!isJSONObject(data)) {
|
|
180
|
+
throw new TypeError(`Unmarshalling the type 'ClusterType' failed as data isn't a dictionary.`);
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
availability: data.availability,
|
|
184
|
+
commitmentDelay: data.commitment_delay ? data.commitment_delay : undefined,
|
|
185
|
+
dedicated: data.dedicated,
|
|
186
|
+
maxNodes: data.max_nodes,
|
|
187
|
+
memory: data.memory,
|
|
188
|
+
name: data.name,
|
|
189
|
+
resiliency: data.resiliency,
|
|
190
|
+
sla: data.sla
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
193
|
const unmarshalListClusterAvailableTypesResponse = data => {
|
|
194
194
|
if (!isJSONObject(data)) {
|
|
195
195
|
throw new TypeError(`Unmarshalling the type 'ListClusterAvailableTypesResponse' failed as data isn't a dictionary.`);
|
|
@@ -251,120 +251,35 @@ const unmarshalListVersionsResponse = data => {
|
|
|
251
251
|
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
252
252
|
};
|
|
253
253
|
};
|
|
254
|
-
const marshalCreateClusterRequestPoolConfigUpgradePolicy = (request, defaults) => ({
|
|
255
|
-
max_surge: request.maxSurge,
|
|
256
|
-
max_unavailable: request.maxUnavailable
|
|
257
|
-
});
|
|
258
|
-
const marshalMaintenanceWindow = (request, defaults) => ({
|
|
259
|
-
day: request.day,
|
|
260
|
-
start_hour: request.startHour
|
|
261
|
-
});
|
|
262
|
-
const marshalCreateClusterRequestAutoUpgrade = (request, defaults) => ({
|
|
263
|
-
enable: request.enable,
|
|
264
|
-
maintenance_window: request.maintenanceWindow ? marshalMaintenanceWindow(request.maintenanceWindow) : undefined
|
|
265
|
-
});
|
|
266
|
-
const marshalCreateClusterRequestAutoscalerConfig = (request, defaults) => ({
|
|
267
|
-
balance_similar_node_groups: request.balanceSimilarNodeGroups,
|
|
268
|
-
estimator: request.estimator,
|
|
269
|
-
expander: request.expander,
|
|
270
|
-
expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
|
|
271
|
-
ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
|
|
272
|
-
max_graceful_termination_sec: request.maxGracefulTerminationSec,
|
|
273
|
-
scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
|
|
274
|
-
scale_down_disabled: request.scaleDownDisabled,
|
|
275
|
-
scale_down_unneeded_time: request.scaleDownUnneededTime,
|
|
276
|
-
scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
|
|
277
|
-
});
|
|
278
|
-
const marshalCreateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
|
|
279
|
-
client_id: request.clientId,
|
|
280
|
-
groups_claim: request.groupsClaim,
|
|
281
|
-
groups_prefix: request.groupsPrefix,
|
|
282
|
-
issuer_url: request.issuerUrl,
|
|
283
|
-
required_claim: request.requiredClaim,
|
|
284
|
-
username_claim: request.usernameClaim,
|
|
285
|
-
username_prefix: request.usernamePrefix
|
|
286
|
-
});
|
|
287
|
-
const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
288
|
-
autohealing: request.autohealing,
|
|
289
|
-
autoscaling: request.autoscaling,
|
|
290
|
-
container_runtime: request.containerRuntime,
|
|
291
|
-
kubelet_args: request.kubeletArgs,
|
|
292
|
-
max_size: request.maxSize,
|
|
293
|
-
min_size: request.minSize,
|
|
294
|
-
name: request.name,
|
|
295
|
-
node_type: request.nodeType,
|
|
296
|
-
placement_group_id: request.placementGroupId,
|
|
297
|
-
root_volume_size: request.rootVolumeSize,
|
|
298
|
-
root_volume_type: request.rootVolumeType,
|
|
299
|
-
size: request.size,
|
|
300
|
-
tags: request.tags,
|
|
301
|
-
upgrade_policy: request.upgradePolicy ? marshalCreateClusterRequestPoolConfigUpgradePolicy(request.upgradePolicy) : undefined,
|
|
302
|
-
zone: request.zone
|
|
303
|
-
});
|
|
304
|
-
const marshalCreatePoolRequestUpgradePolicy = (request, defaults) => ({
|
|
305
|
-
max_surge: request.maxSurge,
|
|
306
|
-
max_unavailable: request.maxUnavailable
|
|
307
|
-
});
|
|
308
|
-
const marshalUpdateClusterRequestAutoUpgrade = (request, defaults) => ({
|
|
309
|
-
enable: request.enable,
|
|
310
|
-
maintenance_window: request.maintenanceWindow ? marshalMaintenanceWindow(request.maintenanceWindow) : undefined
|
|
311
|
-
});
|
|
312
|
-
const marshalUpdateClusterRequestAutoscalerConfig = (request, defaults) => ({
|
|
313
|
-
balance_similar_node_groups: request.balanceSimilarNodeGroups,
|
|
314
|
-
estimator: request.estimator,
|
|
315
|
-
expander: request.expander,
|
|
316
|
-
expendable_pods_priority_cutoff: request.expendablePodsPriorityCutoff,
|
|
317
|
-
ignore_daemonsets_utilization: request.ignoreDaemonsetsUtilization,
|
|
318
|
-
max_graceful_termination_sec: request.maxGracefulTerminationSec,
|
|
319
|
-
scale_down_delay_after_add: request.scaleDownDelayAfterAdd,
|
|
320
|
-
scale_down_disabled: request.scaleDownDisabled,
|
|
321
|
-
scale_down_unneeded_time: request.scaleDownUnneededTime,
|
|
322
|
-
scale_down_utilization_threshold: request.scaleDownUtilizationThreshold
|
|
323
|
-
});
|
|
324
|
-
const marshalUpdateClusterRequestOpenIDConnectConfig = (request, defaults) => ({
|
|
325
|
-
client_id: request.clientId,
|
|
326
|
-
groups_claim: request.groupsClaim,
|
|
327
|
-
groups_prefix: request.groupsPrefix,
|
|
328
|
-
issuer_url: request.issuerUrl,
|
|
329
|
-
required_claim: request.requiredClaim,
|
|
330
|
-
username_claim: request.usernameClaim,
|
|
331
|
-
username_prefix: request.usernamePrefix
|
|
332
|
-
});
|
|
333
|
-
const marshalUpdatePoolRequestUpgradePolicy = (request, defaults) => ({
|
|
334
|
-
max_surge: request.maxSurge,
|
|
335
|
-
max_unavailable: request.maxUnavailable
|
|
336
|
-
});
|
|
337
254
|
const marshalCreateClusterRequest = (request, defaults) => ({
|
|
338
255
|
admission_plugins: request.admissionPlugins,
|
|
339
256
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
340
|
-
auto_upgrade: request.autoUpgrade
|
|
341
|
-
autoscaler_config: request.autoscalerConfig
|
|
257
|
+
auto_upgrade: request.autoUpgrade,
|
|
258
|
+
autoscaler_config: request.autoscalerConfig,
|
|
342
259
|
cni: request.cni,
|
|
343
260
|
description: request.description,
|
|
344
261
|
enable_dashboard: request.enableDashboard,
|
|
345
262
|
feature_gates: request.featureGates,
|
|
346
263
|
ingress: request.ingress,
|
|
347
264
|
name: request.name || randomName('k8s'),
|
|
348
|
-
open_id_connect_config: request.openIdConnectConfig
|
|
349
|
-
pools: request.pools
|
|
265
|
+
open_id_connect_config: request.openIdConnectConfig,
|
|
266
|
+
pools: request.pools,
|
|
350
267
|
private_network_id: request.privateNetworkId,
|
|
351
268
|
tags: request.tags,
|
|
352
269
|
type: request.type,
|
|
353
270
|
version: request.version,
|
|
354
271
|
...resolveOneOf([{
|
|
355
|
-
default: defaults.defaultProjectId,
|
|
356
|
-
param: 'project_id',
|
|
357
|
-
value: request.projectId
|
|
358
|
-
}, {
|
|
359
|
-
default: defaults.defaultOrganizationId,
|
|
360
272
|
param: 'organization_id',
|
|
361
273
|
value: request.organizationId
|
|
274
|
+
}, {
|
|
275
|
+
param: 'project_id',
|
|
276
|
+
value: request.projectId
|
|
362
277
|
}])
|
|
363
278
|
});
|
|
364
279
|
const marshalCreatePoolRequest = (request, defaults) => ({
|
|
365
280
|
autohealing: request.autohealing,
|
|
366
281
|
autoscaling: request.autoscaling,
|
|
367
|
-
container_runtime: request.containerRuntime
|
|
282
|
+
container_runtime: request.containerRuntime,
|
|
368
283
|
kubelet_args: request.kubeletArgs,
|
|
369
284
|
max_size: request.maxSize,
|
|
370
285
|
min_size: request.minSize,
|
|
@@ -372,10 +287,10 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
372
287
|
node_type: request.nodeType,
|
|
373
288
|
placement_group_id: request.placementGroupId,
|
|
374
289
|
root_volume_size: request.rootVolumeSize,
|
|
375
|
-
root_volume_type: request.rootVolumeType
|
|
290
|
+
root_volume_type: request.rootVolumeType,
|
|
376
291
|
size: request.size,
|
|
377
292
|
tags: request.tags,
|
|
378
|
-
upgrade_policy: request.upgradePolicy
|
|
293
|
+
upgrade_policy: request.upgradePolicy,
|
|
379
294
|
zone: request.zone ?? defaults.defaultZone
|
|
380
295
|
});
|
|
381
296
|
const marshalMigrateToPrivateNetworkClusterRequest = (request, defaults) => ({
|
|
@@ -387,14 +302,14 @@ const marshalSetClusterTypeRequest = (request, defaults) => ({
|
|
|
387
302
|
const marshalUpdateClusterRequest = (request, defaults) => ({
|
|
388
303
|
admission_plugins: request.admissionPlugins,
|
|
389
304
|
apiserver_cert_sans: request.apiserverCertSans,
|
|
390
|
-
auto_upgrade: request.autoUpgrade
|
|
391
|
-
autoscaler_config: request.autoscalerConfig
|
|
305
|
+
auto_upgrade: request.autoUpgrade,
|
|
306
|
+
autoscaler_config: request.autoscalerConfig,
|
|
392
307
|
description: request.description,
|
|
393
308
|
enable_dashboard: request.enableDashboard,
|
|
394
309
|
feature_gates: request.featureGates,
|
|
395
310
|
ingress: request.ingress,
|
|
396
311
|
name: request.name,
|
|
397
|
-
open_id_connect_config: request.openIdConnectConfig
|
|
312
|
+
open_id_connect_config: request.openIdConnectConfig,
|
|
398
313
|
tags: request.tags
|
|
399
314
|
});
|
|
400
315
|
const marshalUpdatePoolRequest = (request, defaults) => ({
|
|
@@ -405,7 +320,7 @@ const marshalUpdatePoolRequest = (request, defaults) => ({
|
|
|
405
320
|
min_size: request.minSize,
|
|
406
321
|
size: request.size,
|
|
407
322
|
tags: request.tags,
|
|
408
|
-
upgrade_policy: request.upgradePolicy
|
|
323
|
+
upgrade_policy: request.upgradePolicy
|
|
409
324
|
});
|
|
410
325
|
const marshalUpgradeClusterRequest = (request, defaults) => ({
|
|
411
326
|
upgrade_pools: request.upgradePools,
|