@databricks/sdk-instancepools 0.34.0 → 0.36.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.
- package/dist/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/v2/client.d.ts +24 -20
- package/dist/v2/client.d.ts.map +1 -1
- package/dist/v2/client.js +137 -170
- package/dist/v2/client.js.map +1 -1
- package/dist/v2/index.d.ts +3 -7
- package/dist/v2/index.js +4 -7
- package/dist/v2/model.d.ts +594 -604
- package/dist/v2/model.d.ts.map +1 -1
- package/dist/v2/model.js +358 -521
- package/dist/v2/model.js.map +1 -1
- package/dist/v2/transport.d.ts +21 -17
- package/dist/v2/transport.d.ts.map +1 -1
- package/dist/v2/transport.js +60 -69
- package/dist/v2/transport.js.map +1 -1
- package/dist/v2/utils.d.ts +18 -14
- package/dist/v2/utils.d.ts.map +1 -1
- package/dist/v2/utils.js +76 -103
- package/dist/v2/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/v2/index.d.ts.map +0 -1
- package/dist/v2/index.js.map +0 -1
package/dist/v2/model.js
CHANGED
|
@@ -1,553 +1,390 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/v2/model.ts
|
|
3
4
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/** Use on-demand instances. */
|
|
13
|
-
ON_DEMAND: 'ON_DEMAND',
|
|
14
|
-
/**
|
|
15
|
-
* Preferably use spot instances, but fall back to on-demand instances if spot instances cannot
|
|
16
|
-
* be acquired (e.g., if AWS spot prices are too high).
|
|
17
|
-
*/
|
|
18
|
-
SPOT_WITH_FALLBACK: 'SPOT_WITH_FALLBACK',
|
|
5
|
+
* Availability type used for all subsequent nodes past the `first_on_demand` ones.
|
|
6
|
+
*
|
|
7
|
+
* Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster.
|
|
8
|
+
*/
|
|
9
|
+
const AwsAvailability = {
|
|
10
|
+
SPOT: "SPOT",
|
|
11
|
+
ON_DEMAND: "ON_DEMAND",
|
|
12
|
+
SPOT_WITH_FALLBACK: "SPOT_WITH_FALLBACK"
|
|
19
13
|
};
|
|
20
14
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/** Use on-demand instances. */
|
|
29
|
-
ON_DEMAND_AZURE: 'ON_DEMAND_AZURE',
|
|
30
|
-
/**
|
|
31
|
-
* Preferably use spot instances, but fall back to on-demand instances if spot instances cannot
|
|
32
|
-
* be acquired (e.g., if Azure is out of Quota).
|
|
33
|
-
*/
|
|
34
|
-
SPOT_WITH_FALLBACK_AZURE: 'SPOT_WITH_FALLBACK_AZURE',
|
|
15
|
+
* Availability type used for all subsequent nodes past the `first_on_demand` ones.
|
|
16
|
+
* Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster.
|
|
17
|
+
*/
|
|
18
|
+
const AzureAvailability = {
|
|
19
|
+
SPOT_AZURE: "SPOT_AZURE",
|
|
20
|
+
ON_DEMAND_AZURE: "ON_DEMAND_AZURE",
|
|
21
|
+
SPOT_WITH_FALLBACK_AZURE: "SPOT_WITH_FALLBACK_AZURE"
|
|
35
22
|
};
|
|
36
23
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
PREMIUM_LRS: 'PREMIUM_LRS',
|
|
44
|
-
/** Standard storage tier, backed by HDDs. */
|
|
45
|
-
STANDARD_LRS: 'STANDARD_LRS',
|
|
24
|
+
* All Azure Disk types that <Databricks> supports.
|
|
25
|
+
* See https://docs.microsoft.com/en-us/azure/storage/storage-about-disks-and-vhds-linux#types-of-disks
|
|
26
|
+
*/
|
|
27
|
+
const AzureDiskVolumeType = {
|
|
28
|
+
PREMIUM_LRS: "PREMIUM_LRS",
|
|
29
|
+
STANDARD_LRS: "STANDARD_LRS"
|
|
46
30
|
};
|
|
47
31
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
GENERAL_PURPOSE_SSD: 'GENERAL_PURPOSE_SSD',
|
|
55
|
-
/** Provision extra storage using AWS st1 volumes. */
|
|
56
|
-
THROUGHPUT_OPTIMIZED_HDD: 'THROUGHPUT_OPTIMIZED_HDD',
|
|
32
|
+
* All EBS volume types that <Databricks> supports.
|
|
33
|
+
* See https://aws.amazon.com/ebs/details/ for details.
|
|
34
|
+
*/
|
|
35
|
+
const EbsVolumeType = {
|
|
36
|
+
GENERAL_PURPOSE_SSD: "GENERAL_PURPOSE_SSD",
|
|
37
|
+
THROUGHPUT_OPTIMIZED_HDD: "THROUGHPUT_OPTIMIZED_HDD"
|
|
57
38
|
};
|
|
58
39
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
PREEMPTIBLE_WITH_FALLBACK_GCP: 'PREEMPTIBLE_WITH_FALLBACK_GCP',
|
|
40
|
+
* This field determines whether the instance pool will contain preemptible
|
|
41
|
+
* VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable.
|
|
42
|
+
*/
|
|
43
|
+
const GcpAvailability = {
|
|
44
|
+
PREEMPTIBLE_GCP: "PREEMPTIBLE_GCP",
|
|
45
|
+
ON_DEMAND_GCP: "ON_DEMAND_GCP",
|
|
46
|
+
PREEMPTIBLE_WITH_FALLBACK_GCP: "PREEMPTIBLE_WITH_FALLBACK_GCP"
|
|
67
47
|
};
|
|
68
48
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Indicates an instance pool has been stopped so no more clusters should be able to get instances
|
|
82
|
-
* from the pool.
|
|
83
|
-
*/
|
|
84
|
-
STOPPED: 'STOPPED',
|
|
85
|
-
/** Indicates the instance pool has been deleted and should no longer exist. */
|
|
86
|
-
DELETED: 'DELETED',
|
|
49
|
+
* The state of a Cluster. The current allowable state transitions are as follows:
|
|
50
|
+
*
|
|
51
|
+
* - ``ACTIVE`` -> ``STOPPED``
|
|
52
|
+
* - ``ACTIVE`` -> ``DELETED``
|
|
53
|
+
* - ``STOPPED`` -> ``ACTIVE``
|
|
54
|
+
* - ``STOPPED`` -> ``DELETED``
|
|
55
|
+
*/
|
|
56
|
+
const InstancePoolState = {
|
|
57
|
+
ACTIVE: "ACTIVE",
|
|
58
|
+
STOPPED: "STOPPED",
|
|
59
|
+
DELETED: "DELETED"
|
|
87
60
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
61
|
+
const unmarshalCreateInstancePoolResponseSchema = z.object({ instance_pool_id: z.string().optional() }).transform((d) => ({ instancePoolId: d.instance_pool_id }));
|
|
62
|
+
const unmarshalDeleteInstancePoolResponseSchema = z.object({});
|
|
63
|
+
const unmarshalDiskSpecSchema = z.object({
|
|
64
|
+
disk_type: z.lazy(() => unmarshalDiskTypeSchema).optional(),
|
|
65
|
+
disk_count: z.number().optional(),
|
|
66
|
+
disk_size: z.number().optional(),
|
|
67
|
+
disk_iops: z.number().optional(),
|
|
68
|
+
disk_throughput: z.number().optional()
|
|
69
|
+
}).transform((d) => ({
|
|
70
|
+
diskType: d.disk_type,
|
|
71
|
+
diskCount: d.disk_count,
|
|
72
|
+
diskSize: d.disk_size,
|
|
73
|
+
diskIops: d.disk_iops,
|
|
74
|
+
diskThroughput: d.disk_throughput
|
|
94
75
|
}));
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
76
|
+
const unmarshalDiskTypeSchema = z.object({
|
|
77
|
+
ebs_volume_type: z.string().optional(),
|
|
78
|
+
azure_disk_volume_type: z.string().optional()
|
|
79
|
+
}).transform((d) => ({ remoteVolumeType: d.ebs_volume_type !== void 0 ? {
|
|
80
|
+
$case: "ebsVolumeType",
|
|
81
|
+
ebsVolumeType: d.ebs_volume_type
|
|
82
|
+
} : d.azure_disk_volume_type !== void 0 ? {
|
|
83
|
+
$case: "azureDiskVolumeType",
|
|
84
|
+
azureDiskVolumeType: d.azure_disk_volume_type
|
|
85
|
+
} : void 0 }));
|
|
86
|
+
const unmarshalDockerBasicAuthSchema = z.object({
|
|
87
|
+
username: z.string().optional(),
|
|
88
|
+
password: z.string().optional()
|
|
89
|
+
}).transform((d) => ({
|
|
90
|
+
username: d.username,
|
|
91
|
+
password: d.password
|
|
110
92
|
}));
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
? {
|
|
121
|
-
$case: 'azureDiskVolumeType',
|
|
122
|
-
azureDiskVolumeType: d.azure_disk_volume_type,
|
|
123
|
-
}
|
|
124
|
-
: undefined,
|
|
93
|
+
const unmarshalDockerImageSchema = z.object({
|
|
94
|
+
url: z.string().optional(),
|
|
95
|
+
basic_auth: z.lazy(() => unmarshalDockerBasicAuthSchema).optional()
|
|
96
|
+
}).transform((d) => ({
|
|
97
|
+
url: d.url,
|
|
98
|
+
credsOneof: d.basic_auth !== void 0 ? {
|
|
99
|
+
$case: "basicAuth",
|
|
100
|
+
basicAuth: d.basic_auth
|
|
101
|
+
} : void 0
|
|
125
102
|
}));
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
103
|
+
const unmarshalEditInstancePoolResponseSchema = z.object({});
|
|
104
|
+
const unmarshalGetInstancePoolResponseSchema = z.object({
|
|
105
|
+
stats: z.lazy(() => unmarshalInstancePoolStatsSchema).optional(),
|
|
106
|
+
status: z.lazy(() => unmarshalInstancePoolStatusSchema).optional(),
|
|
107
|
+
instance_pool_id: z.string().optional(),
|
|
108
|
+
default_tags: z.record(z.string(), z.string()).optional(),
|
|
109
|
+
state: z.string().optional(),
|
|
110
|
+
instance_pool_name: z.string().optional(),
|
|
111
|
+
min_idle_instances: z.number().optional(),
|
|
112
|
+
max_capacity: z.number().optional(),
|
|
113
|
+
aws_attributes: z.lazy(() => unmarshalInstancePoolAwsAttributesSchema).optional(),
|
|
114
|
+
node_type_id: z.string().optional(),
|
|
115
|
+
custom_tags: z.record(z.string(), z.string()).optional(),
|
|
116
|
+
idle_instance_autotermination_minutes: z.number().optional(),
|
|
117
|
+
enable_elastic_disk: z.boolean().optional(),
|
|
118
|
+
disk_spec: z.lazy(() => unmarshalDiskSpecSchema).optional(),
|
|
119
|
+
preloaded_docker_images: z.array(z.lazy(() => unmarshalDockerImageSchema)).optional(),
|
|
120
|
+
preloaded_spark_versions: z.array(z.string()).optional(),
|
|
121
|
+
azure_attributes: z.lazy(() => unmarshalInstancePoolAzureAttributesSchema).optional(),
|
|
122
|
+
gcp_attributes: z.lazy(() => unmarshalInstancePoolGcpAttributesSchema).optional(),
|
|
123
|
+
node_type_flexibility: z.lazy(() => unmarshalNodeTypeFlexibilitySchema).optional(),
|
|
124
|
+
remote_disk_throughput: z.number().optional(),
|
|
125
|
+
total_initial_remote_disk_size: z.number().optional()
|
|
126
|
+
}).transform((d) => ({
|
|
127
|
+
stats: d.stats,
|
|
128
|
+
status: d.status,
|
|
129
|
+
instancePoolId: d.instance_pool_id,
|
|
130
|
+
defaultTags: d.default_tags,
|
|
131
|
+
state: d.state,
|
|
132
|
+
instancePoolName: d.instance_pool_name,
|
|
133
|
+
minIdleInstances: d.min_idle_instances,
|
|
134
|
+
maxCapacity: d.max_capacity,
|
|
135
|
+
awsAttributes: d.aws_attributes,
|
|
136
|
+
nodeTypeId: d.node_type_id,
|
|
137
|
+
customTags: d.custom_tags,
|
|
138
|
+
idleInstanceAutoterminationMinutes: d.idle_instance_autotermination_minutes,
|
|
139
|
+
enableElasticDisk: d.enable_elastic_disk,
|
|
140
|
+
diskSpec: d.disk_spec,
|
|
141
|
+
preloadedDockerImages: d.preloaded_docker_images,
|
|
142
|
+
preloadedSparkVersions: d.preloaded_spark_versions,
|
|
143
|
+
azureAttributes: d.azure_attributes,
|
|
144
|
+
gcpAttributes: d.gcp_attributes,
|
|
145
|
+
nodeTypeFlexibility: d.node_type_flexibility,
|
|
146
|
+
remoteDiskThroughput: d.remote_disk_throughput,
|
|
147
|
+
totalInitialRemoteDiskSize: d.total_initial_remote_disk_size
|
|
134
148
|
}));
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
const unmarshalInstancePoolAndStatsSchema = z.object({
|
|
150
|
+
stats: z.lazy(() => unmarshalInstancePoolStatsSchema).optional(),
|
|
151
|
+
status: z.lazy(() => unmarshalInstancePoolStatusSchema).optional(),
|
|
152
|
+
instance_pool_id: z.string().optional(),
|
|
153
|
+
default_tags: z.record(z.string(), z.string()).optional(),
|
|
154
|
+
state: z.string().optional(),
|
|
155
|
+
instance_pool_name: z.string().optional(),
|
|
156
|
+
min_idle_instances: z.number().optional(),
|
|
157
|
+
max_capacity: z.number().optional(),
|
|
158
|
+
aws_attributes: z.lazy(() => unmarshalInstancePoolAwsAttributesSchema).optional(),
|
|
159
|
+
node_type_id: z.string().optional(),
|
|
160
|
+
custom_tags: z.record(z.string(), z.string()).optional(),
|
|
161
|
+
idle_instance_autotermination_minutes: z.number().optional(),
|
|
162
|
+
enable_elastic_disk: z.boolean().optional(),
|
|
163
|
+
disk_spec: z.lazy(() => unmarshalDiskSpecSchema).optional(),
|
|
164
|
+
preloaded_docker_images: z.array(z.lazy(() => unmarshalDockerImageSchema)).optional(),
|
|
165
|
+
preloaded_spark_versions: z.array(z.string()).optional(),
|
|
166
|
+
azure_attributes: z.lazy(() => unmarshalInstancePoolAzureAttributesSchema).optional(),
|
|
167
|
+
gcp_attributes: z.lazy(() => unmarshalInstancePoolGcpAttributesSchema).optional(),
|
|
168
|
+
node_type_flexibility: z.lazy(() => unmarshalNodeTypeFlexibilitySchema).optional(),
|
|
169
|
+
remote_disk_throughput: z.number().optional(),
|
|
170
|
+
total_initial_remote_disk_size: z.number().optional()
|
|
171
|
+
}).transform((d) => ({
|
|
172
|
+
stats: d.stats,
|
|
173
|
+
status: d.status,
|
|
174
|
+
instancePoolId: d.instance_pool_id,
|
|
175
|
+
defaultTags: d.default_tags,
|
|
176
|
+
state: d.state,
|
|
177
|
+
instancePoolName: d.instance_pool_name,
|
|
178
|
+
minIdleInstances: d.min_idle_instances,
|
|
179
|
+
maxCapacity: d.max_capacity,
|
|
180
|
+
awsAttributes: d.aws_attributes,
|
|
181
|
+
nodeTypeId: d.node_type_id,
|
|
182
|
+
customTags: d.custom_tags,
|
|
183
|
+
idleInstanceAutoterminationMinutes: d.idle_instance_autotermination_minutes,
|
|
184
|
+
enableElasticDisk: d.enable_elastic_disk,
|
|
185
|
+
diskSpec: d.disk_spec,
|
|
186
|
+
preloadedDockerImages: d.preloaded_docker_images,
|
|
187
|
+
preloadedSparkVersions: d.preloaded_spark_versions,
|
|
188
|
+
azureAttributes: d.azure_attributes,
|
|
189
|
+
gcpAttributes: d.gcp_attributes,
|
|
190
|
+
nodeTypeFlexibility: d.node_type_flexibility,
|
|
191
|
+
remoteDiskThroughput: d.remote_disk_throughput,
|
|
192
|
+
totalInitialRemoteDiskSize: d.total_initial_remote_disk_size
|
|
145
193
|
}));
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
max_capacity: z.number().optional(),
|
|
157
|
-
aws_attributes: z
|
|
158
|
-
.lazy(() => unmarshalInstancePoolAwsAttributesSchema)
|
|
159
|
-
.optional(),
|
|
160
|
-
node_type_id: z.string().optional(),
|
|
161
|
-
custom_tags: z.record(z.string(), z.string()).optional(),
|
|
162
|
-
idle_instance_autotermination_minutes: z.number().optional(),
|
|
163
|
-
enable_elastic_disk: z.boolean().optional(),
|
|
164
|
-
disk_spec: z.lazy(() => unmarshalDiskSpecSchema).optional(),
|
|
165
|
-
preloaded_docker_images: z
|
|
166
|
-
.array(z.lazy(() => unmarshalDockerImageSchema))
|
|
167
|
-
.optional(),
|
|
168
|
-
preloaded_spark_versions: z.array(z.string()).optional(),
|
|
169
|
-
azure_attributes: z
|
|
170
|
-
.lazy(() => unmarshalInstancePoolAzureAttributesSchema)
|
|
171
|
-
.optional(),
|
|
172
|
-
gcp_attributes: z
|
|
173
|
-
.lazy(() => unmarshalInstancePoolGcpAttributesSchema)
|
|
174
|
-
.optional(),
|
|
175
|
-
node_type_flexibility: z
|
|
176
|
-
.lazy(() => unmarshalNodeTypeFlexibilitySchema)
|
|
177
|
-
.optional(),
|
|
178
|
-
remote_disk_throughput: z.number().optional(),
|
|
179
|
-
total_initial_remote_disk_size: z.number().optional(),
|
|
180
|
-
})
|
|
181
|
-
.transform(d => ({
|
|
182
|
-
stats: d.stats,
|
|
183
|
-
status: d.status,
|
|
184
|
-
instancePoolId: d.instance_pool_id,
|
|
185
|
-
defaultTags: d.default_tags,
|
|
186
|
-
state: d.state,
|
|
187
|
-
instancePoolName: d.instance_pool_name,
|
|
188
|
-
minIdleInstances: d.min_idle_instances,
|
|
189
|
-
maxCapacity: d.max_capacity,
|
|
190
|
-
awsAttributes: d.aws_attributes,
|
|
191
|
-
nodeTypeId: d.node_type_id,
|
|
192
|
-
customTags: d.custom_tags,
|
|
193
|
-
idleInstanceAutoterminationMinutes: d.idle_instance_autotermination_minutes,
|
|
194
|
-
enableElasticDisk: d.enable_elastic_disk,
|
|
195
|
-
diskSpec: d.disk_spec,
|
|
196
|
-
preloadedDockerImages: d.preloaded_docker_images,
|
|
197
|
-
preloadedSparkVersions: d.preloaded_spark_versions,
|
|
198
|
-
azureAttributes: d.azure_attributes,
|
|
199
|
-
gcpAttributes: d.gcp_attributes,
|
|
200
|
-
nodeTypeFlexibility: d.node_type_flexibility,
|
|
201
|
-
remoteDiskThroughput: d.remote_disk_throughput,
|
|
202
|
-
totalInitialRemoteDiskSize: d.total_initial_remote_disk_size,
|
|
194
|
+
const unmarshalInstancePoolAwsAttributesSchema = z.object({
|
|
195
|
+
availability: z.string().optional(),
|
|
196
|
+
zone_id: z.string().optional(),
|
|
197
|
+
spot_bid_price_percent: z.number().optional(),
|
|
198
|
+
instance_profile_arn: z.string().optional()
|
|
199
|
+
}).transform((d) => ({
|
|
200
|
+
availability: d.availability,
|
|
201
|
+
zoneId: d.zone_id,
|
|
202
|
+
spotBidPricePercent: d.spot_bid_price_percent,
|
|
203
|
+
instanceProfileArn: d.instance_profile_arn
|
|
203
204
|
}));
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
min_idle_instances: z.number().optional(),
|
|
213
|
-
max_capacity: z.number().optional(),
|
|
214
|
-
aws_attributes: z
|
|
215
|
-
.lazy(() => unmarshalInstancePoolAwsAttributesSchema)
|
|
216
|
-
.optional(),
|
|
217
|
-
node_type_id: z.string().optional(),
|
|
218
|
-
custom_tags: z.record(z.string(), z.string()).optional(),
|
|
219
|
-
idle_instance_autotermination_minutes: z.number().optional(),
|
|
220
|
-
enable_elastic_disk: z.boolean().optional(),
|
|
221
|
-
disk_spec: z.lazy(() => unmarshalDiskSpecSchema).optional(),
|
|
222
|
-
preloaded_docker_images: z
|
|
223
|
-
.array(z.lazy(() => unmarshalDockerImageSchema))
|
|
224
|
-
.optional(),
|
|
225
|
-
preloaded_spark_versions: z.array(z.string()).optional(),
|
|
226
|
-
azure_attributes: z
|
|
227
|
-
.lazy(() => unmarshalInstancePoolAzureAttributesSchema)
|
|
228
|
-
.optional(),
|
|
229
|
-
gcp_attributes: z
|
|
230
|
-
.lazy(() => unmarshalInstancePoolGcpAttributesSchema)
|
|
231
|
-
.optional(),
|
|
232
|
-
node_type_flexibility: z
|
|
233
|
-
.lazy(() => unmarshalNodeTypeFlexibilitySchema)
|
|
234
|
-
.optional(),
|
|
235
|
-
remote_disk_throughput: z.number().optional(),
|
|
236
|
-
total_initial_remote_disk_size: z.number().optional(),
|
|
237
|
-
})
|
|
238
|
-
.transform(d => ({
|
|
239
|
-
stats: d.stats,
|
|
240
|
-
status: d.status,
|
|
241
|
-
instancePoolId: d.instance_pool_id,
|
|
242
|
-
defaultTags: d.default_tags,
|
|
243
|
-
state: d.state,
|
|
244
|
-
instancePoolName: d.instance_pool_name,
|
|
245
|
-
minIdleInstances: d.min_idle_instances,
|
|
246
|
-
maxCapacity: d.max_capacity,
|
|
247
|
-
awsAttributes: d.aws_attributes,
|
|
248
|
-
nodeTypeId: d.node_type_id,
|
|
249
|
-
customTags: d.custom_tags,
|
|
250
|
-
idleInstanceAutoterminationMinutes: d.idle_instance_autotermination_minutes,
|
|
251
|
-
enableElasticDisk: d.enable_elastic_disk,
|
|
252
|
-
diskSpec: d.disk_spec,
|
|
253
|
-
preloadedDockerImages: d.preloaded_docker_images,
|
|
254
|
-
preloadedSparkVersions: d.preloaded_spark_versions,
|
|
255
|
-
azureAttributes: d.azure_attributes,
|
|
256
|
-
gcpAttributes: d.gcp_attributes,
|
|
257
|
-
nodeTypeFlexibility: d.node_type_flexibility,
|
|
258
|
-
remoteDiskThroughput: d.remote_disk_throughput,
|
|
259
|
-
totalInitialRemoteDiskSize: d.total_initial_remote_disk_size,
|
|
205
|
+
const unmarshalInstancePoolAzureAttributesSchema = z.object({
|
|
206
|
+
availability: z.string().optional(),
|
|
207
|
+
spot_bid_max_price: z.number().optional(),
|
|
208
|
+
capacity_reservation_group: z.string().optional()
|
|
209
|
+
}).transform((d) => ({
|
|
210
|
+
availability: d.availability,
|
|
211
|
+
spotBidMaxPrice: d.spot_bid_max_price,
|
|
212
|
+
capacityReservationGroup: d.capacity_reservation_group
|
|
260
213
|
}));
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
availability: d.availability,
|
|
270
|
-
zoneId: d.zone_id,
|
|
271
|
-
spotBidPricePercent: d.spot_bid_price_percent,
|
|
272
|
-
instanceProfileArn: d.instance_profile_arn,
|
|
214
|
+
const unmarshalInstancePoolGcpAttributesSchema = z.object({
|
|
215
|
+
gcp_availability: z.string().optional(),
|
|
216
|
+
local_ssd_count: z.number().optional(),
|
|
217
|
+
zone_id: z.string().optional()
|
|
218
|
+
}).transform((d) => ({
|
|
219
|
+
gcpAvailability: d.gcp_availability,
|
|
220
|
+
localSsdCount: d.local_ssd_count,
|
|
221
|
+
zoneId: d.zone_id
|
|
273
222
|
}));
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
})
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
223
|
+
const unmarshalInstancePoolStatsSchema = z.object({
|
|
224
|
+
used_count: z.number().optional(),
|
|
225
|
+
idle_count: z.number().optional(),
|
|
226
|
+
pending_used_count: z.number().optional(),
|
|
227
|
+
pending_idle_count: z.number().optional()
|
|
228
|
+
}).transform((d) => ({
|
|
229
|
+
usedCount: d.used_count,
|
|
230
|
+
idleCount: d.idle_count,
|
|
231
|
+
pendingUsedCount: d.pending_used_count,
|
|
232
|
+
pendingIdleCount: d.pending_idle_count
|
|
284
233
|
}));
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
zoneId: d.zone_id,
|
|
234
|
+
const unmarshalInstancePoolStatusSchema = z.object({ pending_instance_errors: z.array(z.lazy(() => unmarshalPendingInstanceErrorSchema)).optional() }).transform((d) => ({ pendingInstanceErrors: d.pending_instance_errors }));
|
|
235
|
+
const unmarshalListInstancePoolsResponseSchema = z.object({ instance_pools: z.array(z.lazy(() => unmarshalInstancePoolAndStatsSchema)).optional() }).transform((d) => ({ instancePools: d.instance_pools }));
|
|
236
|
+
const unmarshalNodeTypeFlexibilitySchema = z.object({ alternate_node_type_ids: z.array(z.string()).optional() }).transform((d) => ({ alternateNodeTypeIds: d.alternate_node_type_ids }));
|
|
237
|
+
const unmarshalPendingInstanceErrorSchema = z.object({
|
|
238
|
+
instance_id: z.string().optional(),
|
|
239
|
+
message: z.string().optional()
|
|
240
|
+
}).transform((d) => ({
|
|
241
|
+
instanceId: d.instance_id,
|
|
242
|
+
message: d.message
|
|
295
243
|
}));
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
244
|
+
const marshalCreateInstancePoolRequestSchema = z.object({
|
|
245
|
+
instancePoolName: z.string().optional(),
|
|
246
|
+
minIdleInstances: z.number().optional(),
|
|
247
|
+
maxCapacity: z.number().optional(),
|
|
248
|
+
awsAttributes: z.lazy(() => marshalInstancePoolAwsAttributesSchema).optional(),
|
|
249
|
+
nodeTypeId: z.string().optional(),
|
|
250
|
+
customTags: z.record(z.string(), z.string()).optional(),
|
|
251
|
+
idleInstanceAutoterminationMinutes: z.number().optional(),
|
|
252
|
+
enableElasticDisk: z.boolean().optional(),
|
|
253
|
+
diskSpec: z.lazy(() => marshalDiskSpecSchema).optional(),
|
|
254
|
+
preloadedDockerImages: z.array(z.lazy(() => marshalDockerImageSchema)).optional(),
|
|
255
|
+
preloadedSparkVersions: z.array(z.string()).optional(),
|
|
256
|
+
azureAttributes: z.lazy(() => marshalInstancePoolAzureAttributesSchema).optional(),
|
|
257
|
+
gcpAttributes: z.lazy(() => marshalInstancePoolGcpAttributesSchema).optional(),
|
|
258
|
+
nodeTypeFlexibility: z.lazy(() => marshalNodeTypeFlexibilitySchema).optional(),
|
|
259
|
+
remoteDiskThroughput: z.number().optional(),
|
|
260
|
+
totalInitialRemoteDiskSize: z.number().optional()
|
|
261
|
+
}).transform((d) => ({
|
|
262
|
+
instance_pool_name: d.instancePoolName,
|
|
263
|
+
min_idle_instances: d.minIdleInstances,
|
|
264
|
+
max_capacity: d.maxCapacity,
|
|
265
|
+
aws_attributes: d.awsAttributes,
|
|
266
|
+
node_type_id: d.nodeTypeId,
|
|
267
|
+
custom_tags: d.customTags,
|
|
268
|
+
idle_instance_autotermination_minutes: d.idleInstanceAutoterminationMinutes,
|
|
269
|
+
enable_elastic_disk: d.enableElasticDisk,
|
|
270
|
+
disk_spec: d.diskSpec,
|
|
271
|
+
preloaded_docker_images: d.preloadedDockerImages,
|
|
272
|
+
preloaded_spark_versions: d.preloadedSparkVersions,
|
|
273
|
+
azure_attributes: d.azureAttributes,
|
|
274
|
+
gcp_attributes: d.gcpAttributes,
|
|
275
|
+
node_type_flexibility: d.nodeTypeFlexibility,
|
|
276
|
+
remote_disk_throughput: d.remoteDiskThroughput,
|
|
277
|
+
total_initial_remote_disk_size: d.totalInitialRemoteDiskSize
|
|
308
278
|
}));
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
279
|
+
const marshalDeleteInstancePoolRequestSchema = z.object({ instancePoolId: z.string().optional() }).transform((d) => ({ instance_pool_id: d.instancePoolId }));
|
|
280
|
+
const marshalDiskSpecSchema = z.object({
|
|
281
|
+
diskType: z.lazy(() => marshalDiskTypeSchema).optional(),
|
|
282
|
+
diskCount: z.number().optional(),
|
|
283
|
+
diskSize: z.number().optional(),
|
|
284
|
+
diskIops: z.number().optional(),
|
|
285
|
+
diskThroughput: z.number().optional()
|
|
286
|
+
}).transform((d) => ({
|
|
287
|
+
disk_type: d.diskType,
|
|
288
|
+
disk_count: d.diskCount,
|
|
289
|
+
disk_size: d.diskSize,
|
|
290
|
+
disk_iops: d.diskIops,
|
|
291
|
+
disk_throughput: d.diskThroughput
|
|
317
292
|
}));
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
293
|
+
const marshalDiskTypeSchema = z.object({ remoteVolumeType: z.discriminatedUnion("$case", [z.object({
|
|
294
|
+
$case: z.literal("ebsVolumeType"),
|
|
295
|
+
ebsVolumeType: z.string()
|
|
296
|
+
}), z.object({
|
|
297
|
+
$case: z.literal("azureDiskVolumeType"),
|
|
298
|
+
azureDiskVolumeType: z.string()
|
|
299
|
+
})]).optional() }).transform((d) => ({
|
|
300
|
+
...d.remoteVolumeType?.$case === "ebsVolumeType" && { ebs_volume_type: d.remoteVolumeType.ebsVolumeType },
|
|
301
|
+
...d.remoteVolumeType?.$case === "azureDiskVolumeType" && { azure_disk_volume_type: d.remoteVolumeType.azureDiskVolumeType }
|
|
326
302
|
}));
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
})
|
|
331
|
-
|
|
332
|
-
|
|
303
|
+
const marshalDockerBasicAuthSchema = z.object({
|
|
304
|
+
username: z.string().optional(),
|
|
305
|
+
password: z.string().optional()
|
|
306
|
+
}).transform((d) => ({
|
|
307
|
+
username: d.username,
|
|
308
|
+
password: d.password
|
|
333
309
|
}));
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
310
|
+
const marshalDockerImageSchema = z.object({
|
|
311
|
+
url: z.string().optional(),
|
|
312
|
+
credsOneof: z.discriminatedUnion("$case", [z.object({
|
|
313
|
+
$case: z.literal("basicAuth"),
|
|
314
|
+
basicAuth: z.lazy(() => marshalDockerBasicAuthSchema)
|
|
315
|
+
})]).optional()
|
|
316
|
+
}).transform((d) => ({
|
|
317
|
+
url: d.url,
|
|
318
|
+
...d.credsOneof?.$case === "basicAuth" && { basic_auth: d.credsOneof.basicAuth }
|
|
342
319
|
}));
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
idle_instance_autotermination_minutes: d.idleInstanceAutoterminationMinutes,
|
|
380
|
-
enable_elastic_disk: d.enableElasticDisk,
|
|
381
|
-
disk_spec: d.diskSpec,
|
|
382
|
-
preloaded_docker_images: d.preloadedDockerImages,
|
|
383
|
-
preloaded_spark_versions: d.preloadedSparkVersions,
|
|
384
|
-
azure_attributes: d.azureAttributes,
|
|
385
|
-
gcp_attributes: d.gcpAttributes,
|
|
386
|
-
node_type_flexibility: d.nodeTypeFlexibility,
|
|
387
|
-
remote_disk_throughput: d.remoteDiskThroughput,
|
|
388
|
-
total_initial_remote_disk_size: d.totalInitialRemoteDiskSize,
|
|
320
|
+
const marshalEditInstancePoolRequestSchema = z.object({
|
|
321
|
+
instancePoolId: z.string().optional(),
|
|
322
|
+
instancePoolName: z.string().optional(),
|
|
323
|
+
minIdleInstances: z.number().optional(),
|
|
324
|
+
maxCapacity: z.number().optional(),
|
|
325
|
+
awsAttributes: z.lazy(() => marshalInstancePoolAwsAttributesSchema).optional(),
|
|
326
|
+
nodeTypeId: z.string().optional(),
|
|
327
|
+
customTags: z.record(z.string(), z.string()).optional(),
|
|
328
|
+
idleInstanceAutoterminationMinutes: z.number().optional(),
|
|
329
|
+
enableElasticDisk: z.boolean().optional(),
|
|
330
|
+
diskSpec: z.lazy(() => marshalDiskSpecSchema).optional(),
|
|
331
|
+
preloadedDockerImages: z.array(z.lazy(() => marshalDockerImageSchema)).optional(),
|
|
332
|
+
preloadedSparkVersions: z.array(z.string()).optional(),
|
|
333
|
+
azureAttributes: z.lazy(() => marshalInstancePoolAzureAttributesSchema).optional(),
|
|
334
|
+
gcpAttributes: z.lazy(() => marshalInstancePoolGcpAttributesSchema).optional(),
|
|
335
|
+
nodeTypeFlexibility: z.lazy(() => marshalNodeTypeFlexibilitySchema).optional(),
|
|
336
|
+
remoteDiskThroughput: z.number().optional(),
|
|
337
|
+
totalInitialRemoteDiskSize: z.number().optional()
|
|
338
|
+
}).transform((d) => ({
|
|
339
|
+
instance_pool_id: d.instancePoolId,
|
|
340
|
+
instance_pool_name: d.instancePoolName,
|
|
341
|
+
min_idle_instances: d.minIdleInstances,
|
|
342
|
+
max_capacity: d.maxCapacity,
|
|
343
|
+
aws_attributes: d.awsAttributes,
|
|
344
|
+
node_type_id: d.nodeTypeId,
|
|
345
|
+
custom_tags: d.customTags,
|
|
346
|
+
idle_instance_autotermination_minutes: d.idleInstanceAutoterminationMinutes,
|
|
347
|
+
enable_elastic_disk: d.enableElasticDisk,
|
|
348
|
+
disk_spec: d.diskSpec,
|
|
349
|
+
preloaded_docker_images: d.preloadedDockerImages,
|
|
350
|
+
preloaded_spark_versions: d.preloadedSparkVersions,
|
|
351
|
+
azure_attributes: d.azureAttributes,
|
|
352
|
+
gcp_attributes: d.gcpAttributes,
|
|
353
|
+
node_type_flexibility: d.nodeTypeFlexibility,
|
|
354
|
+
remote_disk_throughput: d.remoteDiskThroughput,
|
|
355
|
+
total_initial_remote_disk_size: d.totalInitialRemoteDiskSize
|
|
389
356
|
}));
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
357
|
+
const marshalInstancePoolAwsAttributesSchema = z.object({
|
|
358
|
+
availability: z.string().optional(),
|
|
359
|
+
zoneId: z.string().optional(),
|
|
360
|
+
spotBidPricePercent: z.number().optional(),
|
|
361
|
+
instanceProfileArn: z.string().optional()
|
|
362
|
+
}).transform((d) => ({
|
|
363
|
+
availability: d.availability,
|
|
364
|
+
zone_id: d.zoneId,
|
|
365
|
+
spot_bid_price_percent: d.spotBidPricePercent,
|
|
366
|
+
instance_profile_arn: d.instanceProfileArn
|
|
396
367
|
}));
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
.transform(d => ({
|
|
406
|
-
disk_type: d.diskType,
|
|
407
|
-
disk_count: d.diskCount,
|
|
408
|
-
disk_size: d.diskSize,
|
|
409
|
-
disk_iops: d.diskIops,
|
|
410
|
-
disk_throughput: d.diskThroughput,
|
|
368
|
+
const marshalInstancePoolAzureAttributesSchema = z.object({
|
|
369
|
+
availability: z.string().optional(),
|
|
370
|
+
spotBidMaxPrice: z.number().optional(),
|
|
371
|
+
capacityReservationGroup: z.string().optional()
|
|
372
|
+
}).transform((d) => ({
|
|
373
|
+
availability: d.availability,
|
|
374
|
+
spot_bid_max_price: d.spotBidMaxPrice,
|
|
375
|
+
capacity_reservation_group: d.capacityReservationGroup
|
|
411
376
|
}));
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
z.object({
|
|
421
|
-
$case: z.literal('azureDiskVolumeType'),
|
|
422
|
-
azureDiskVolumeType: z.string(),
|
|
423
|
-
}),
|
|
424
|
-
])
|
|
425
|
-
.optional(),
|
|
426
|
-
})
|
|
427
|
-
.transform(d => ({
|
|
428
|
-
...(d.remoteVolumeType?.$case === 'ebsVolumeType' && {
|
|
429
|
-
ebs_volume_type: d.remoteVolumeType.ebsVolumeType,
|
|
430
|
-
}),
|
|
431
|
-
...(d.remoteVolumeType?.$case === 'azureDiskVolumeType' && {
|
|
432
|
-
azure_disk_volume_type: d.remoteVolumeType.azureDiskVolumeType,
|
|
433
|
-
}),
|
|
434
|
-
}));
|
|
435
|
-
export const marshalDockerBasicAuthSchema = z
|
|
436
|
-
.object({
|
|
437
|
-
username: z.string().optional(),
|
|
438
|
-
password: z.string().optional(),
|
|
439
|
-
})
|
|
440
|
-
.transform(d => ({
|
|
441
|
-
username: d.username,
|
|
442
|
-
password: d.password,
|
|
443
|
-
}));
|
|
444
|
-
export const marshalDockerImageSchema = z
|
|
445
|
-
.object({
|
|
446
|
-
url: z.string().optional(),
|
|
447
|
-
credsOneof: z
|
|
448
|
-
.discriminatedUnion('$case', [
|
|
449
|
-
z.object({
|
|
450
|
-
$case: z.literal('basicAuth'),
|
|
451
|
-
basicAuth: z.lazy(() => marshalDockerBasicAuthSchema),
|
|
452
|
-
}),
|
|
453
|
-
])
|
|
454
|
-
.optional(),
|
|
455
|
-
})
|
|
456
|
-
.transform(d => ({
|
|
457
|
-
url: d.url,
|
|
458
|
-
...(d.credsOneof?.$case === 'basicAuth' && {
|
|
459
|
-
basic_auth: d.credsOneof.basicAuth,
|
|
460
|
-
}),
|
|
461
|
-
}));
|
|
462
|
-
export const marshalEditInstancePoolRequestSchema = z
|
|
463
|
-
.object({
|
|
464
|
-
instancePoolId: z.string().optional(),
|
|
465
|
-
instancePoolName: z.string().optional(),
|
|
466
|
-
minIdleInstances: z.number().optional(),
|
|
467
|
-
maxCapacity: z.number().optional(),
|
|
468
|
-
awsAttributes: z
|
|
469
|
-
.lazy(() => marshalInstancePoolAwsAttributesSchema)
|
|
470
|
-
.optional(),
|
|
471
|
-
nodeTypeId: z.string().optional(),
|
|
472
|
-
customTags: z.record(z.string(), z.string()).optional(),
|
|
473
|
-
idleInstanceAutoterminationMinutes: z.number().optional(),
|
|
474
|
-
enableElasticDisk: z.boolean().optional(),
|
|
475
|
-
diskSpec: z.lazy(() => marshalDiskSpecSchema).optional(),
|
|
476
|
-
preloadedDockerImages: z
|
|
477
|
-
.array(z.lazy(() => marshalDockerImageSchema))
|
|
478
|
-
.optional(),
|
|
479
|
-
preloadedSparkVersions: z.array(z.string()).optional(),
|
|
480
|
-
azureAttributes: z
|
|
481
|
-
.lazy(() => marshalInstancePoolAzureAttributesSchema)
|
|
482
|
-
.optional(),
|
|
483
|
-
gcpAttributes: z
|
|
484
|
-
.lazy(() => marshalInstancePoolGcpAttributesSchema)
|
|
485
|
-
.optional(),
|
|
486
|
-
nodeTypeFlexibility: z
|
|
487
|
-
.lazy(() => marshalNodeTypeFlexibilitySchema)
|
|
488
|
-
.optional(),
|
|
489
|
-
remoteDiskThroughput: z.number().optional(),
|
|
490
|
-
totalInitialRemoteDiskSize: z.number().optional(),
|
|
491
|
-
})
|
|
492
|
-
.transform(d => ({
|
|
493
|
-
instance_pool_id: d.instancePoolId,
|
|
494
|
-
instance_pool_name: d.instancePoolName,
|
|
495
|
-
min_idle_instances: d.minIdleInstances,
|
|
496
|
-
max_capacity: d.maxCapacity,
|
|
497
|
-
aws_attributes: d.awsAttributes,
|
|
498
|
-
node_type_id: d.nodeTypeId,
|
|
499
|
-
custom_tags: d.customTags,
|
|
500
|
-
idle_instance_autotermination_minutes: d.idleInstanceAutoterminationMinutes,
|
|
501
|
-
enable_elastic_disk: d.enableElasticDisk,
|
|
502
|
-
disk_spec: d.diskSpec,
|
|
503
|
-
preloaded_docker_images: d.preloadedDockerImages,
|
|
504
|
-
preloaded_spark_versions: d.preloadedSparkVersions,
|
|
505
|
-
azure_attributes: d.azureAttributes,
|
|
506
|
-
gcp_attributes: d.gcpAttributes,
|
|
507
|
-
node_type_flexibility: d.nodeTypeFlexibility,
|
|
508
|
-
remote_disk_throughput: d.remoteDiskThroughput,
|
|
509
|
-
total_initial_remote_disk_size: d.totalInitialRemoteDiskSize,
|
|
510
|
-
}));
|
|
511
|
-
export const marshalInstancePoolAwsAttributesSchema = z
|
|
512
|
-
.object({
|
|
513
|
-
availability: z.string().optional(),
|
|
514
|
-
zoneId: z.string().optional(),
|
|
515
|
-
spotBidPricePercent: z.number().optional(),
|
|
516
|
-
instanceProfileArn: z.string().optional(),
|
|
517
|
-
})
|
|
518
|
-
.transform(d => ({
|
|
519
|
-
availability: d.availability,
|
|
520
|
-
zone_id: d.zoneId,
|
|
521
|
-
spot_bid_price_percent: d.spotBidPricePercent,
|
|
522
|
-
instance_profile_arn: d.instanceProfileArn,
|
|
523
|
-
}));
|
|
524
|
-
export const marshalInstancePoolAzureAttributesSchema = z
|
|
525
|
-
.object({
|
|
526
|
-
availability: z.string().optional(),
|
|
527
|
-
spotBidMaxPrice: z.number().optional(),
|
|
528
|
-
capacityReservationGroup: z.string().optional(),
|
|
529
|
-
})
|
|
530
|
-
.transform(d => ({
|
|
531
|
-
availability: d.availability,
|
|
532
|
-
spot_bid_max_price: d.spotBidMaxPrice,
|
|
533
|
-
capacity_reservation_group: d.capacityReservationGroup,
|
|
534
|
-
}));
|
|
535
|
-
export const marshalInstancePoolGcpAttributesSchema = z
|
|
536
|
-
.object({
|
|
537
|
-
gcpAvailability: z.string().optional(),
|
|
538
|
-
localSsdCount: z.number().optional(),
|
|
539
|
-
zoneId: z.string().optional(),
|
|
540
|
-
})
|
|
541
|
-
.transform(d => ({
|
|
542
|
-
gcp_availability: d.gcpAvailability,
|
|
543
|
-
local_ssd_count: d.localSsdCount,
|
|
544
|
-
zone_id: d.zoneId,
|
|
545
|
-
}));
|
|
546
|
-
export const marshalNodeTypeFlexibilitySchema = z
|
|
547
|
-
.object({
|
|
548
|
-
alternateNodeTypeIds: z.array(z.string()).optional(),
|
|
549
|
-
})
|
|
550
|
-
.transform(d => ({
|
|
551
|
-
alternate_node_type_ids: d.alternateNodeTypeIds,
|
|
377
|
+
const marshalInstancePoolGcpAttributesSchema = z.object({
|
|
378
|
+
gcpAvailability: z.string().optional(),
|
|
379
|
+
localSsdCount: z.number().optional(),
|
|
380
|
+
zoneId: z.string().optional()
|
|
381
|
+
}).transform((d) => ({
|
|
382
|
+
gcp_availability: d.gcpAvailability,
|
|
383
|
+
local_ssd_count: d.localSsdCount,
|
|
384
|
+
zone_id: d.zoneId
|
|
552
385
|
}));
|
|
386
|
+
const marshalNodeTypeFlexibilitySchema = z.object({ alternateNodeTypeIds: z.array(z.string()).optional() }).transform((d) => ({ alternate_node_type_ids: d.alternateNodeTypeIds }));
|
|
387
|
+
|
|
388
|
+
//#endregion
|
|
389
|
+
export { AwsAvailability, AzureAvailability, AzureDiskVolumeType, EbsVolumeType, GcpAvailability, InstancePoolState, marshalCreateInstancePoolRequestSchema, marshalDeleteInstancePoolRequestSchema, marshalDiskSpecSchema, marshalDiskTypeSchema, marshalDockerBasicAuthSchema, marshalDockerImageSchema, marshalEditInstancePoolRequestSchema, marshalInstancePoolAwsAttributesSchema, marshalInstancePoolAzureAttributesSchema, marshalInstancePoolGcpAttributesSchema, marshalNodeTypeFlexibilitySchema, unmarshalCreateInstancePoolResponseSchema, unmarshalDeleteInstancePoolResponseSchema, unmarshalDiskSpecSchema, unmarshalDiskTypeSchema, unmarshalDockerBasicAuthSchema, unmarshalDockerImageSchema, unmarshalEditInstancePoolResponseSchema, unmarshalGetInstancePoolResponseSchema, unmarshalInstancePoolAndStatsSchema, unmarshalInstancePoolAwsAttributesSchema, unmarshalInstancePoolAzureAttributesSchema, unmarshalInstancePoolGcpAttributesSchema, unmarshalInstancePoolStatsSchema, unmarshalInstancePoolStatusSchema, unmarshalListInstancePoolsResponseSchema, unmarshalNodeTypeFlexibilitySchema, unmarshalPendingInstanceErrorSchema };
|
|
553
390
|
//# sourceMappingURL=model.js.map
|