@townco/fly 0.1.74 → 0.1.75

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.
@@ -0,0 +1,557 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client } from "./client.gen";
3
+ /**
4
+ * List Apps
5
+ *
6
+ * List all apps with the ability to filter by organization slug.
7
+ *
8
+ */
9
+ export const appsList = (options) => (options.client ?? client).get({
10
+ url: "/apps",
11
+ ...options,
12
+ });
13
+ /**
14
+ * Create App
15
+ *
16
+ * Create an app with the specified details in the request body.
17
+ *
18
+ */
19
+ export const appsCreate = (options) => (options.client ?? client).post({
20
+ url: "/apps",
21
+ ...options,
22
+ headers: {
23
+ "Content-Type": "application/json",
24
+ ...options.headers,
25
+ },
26
+ });
27
+ /**
28
+ * Destroy App
29
+ *
30
+ * Delete an app by its name.
31
+ *
32
+ */
33
+ export const appsDelete = (options) => (options.client ?? client).delete({ url: "/apps/{app_name}", ...options });
34
+ /**
35
+ * Get App
36
+ *
37
+ * Retrieve details about a specific app by its name.
38
+ *
39
+ */
40
+ export const appsShow = (options) => (options.client ?? client).get({
41
+ url: "/apps/{app_name}",
42
+ ...options,
43
+ });
44
+ /**
45
+ * Create App deploy token
46
+ */
47
+ export const appCreateDeployToken = (options) => (options.client ?? client).post({
48
+ url: "/apps/{app_name}/deploy_token",
49
+ ...options,
50
+ headers: {
51
+ "Content-Type": "application/json",
52
+ ...options.headers,
53
+ },
54
+ });
55
+ /**
56
+ * List IP assignments for app
57
+ */
58
+ export const appIpAssignmentsList = (options) => (options?.client ?? client).get({ url: "/apps/{app_name}/ip_assignments", ...options });
59
+ /**
60
+ * Assign new IP address to app
61
+ */
62
+ export const appIpAssignmentsCreate = (options) => (options.client ?? client).post({
63
+ url: "/apps/{app_name}/ip_assignments",
64
+ ...options,
65
+ headers: {
66
+ "Content-Type": "application/json",
67
+ ...options.headers,
68
+ },
69
+ });
70
+ /**
71
+ * Remove IP assignment from app
72
+ */
73
+ export const appIpAssignmentsDelete = (options) => (options?.client ?? client).delete({ url: "/apps/{app_name}/ip_assignments/{ip}", ...options });
74
+ /**
75
+ * List Machines
76
+ *
77
+ * List all Machines associated with a specific app, with optional filters for including deleted Machines and filtering by region.
78
+ *
79
+ */
80
+ export const machinesList = (options) => (options.client ?? client).get({
81
+ url: "/apps/{app_name}/machines",
82
+ ...options,
83
+ });
84
+ /**
85
+ * Create Machine
86
+ *
87
+ * Create a Machine within a specific app using the details provided in the request body.
88
+ *
89
+ * **Important**: This request can fail, and you’re responsible for handling that failure. If you ask for a large Machine, or a Machine in a region we happen to be at capacity for, you might need to retry the request, or to fall back to another region. If you’re working directly with the Machines API, you’re taking some responsibility for your own orchestration!
90
+ *
91
+ */
92
+ export const machinesCreate = (options) => (options.client ?? client).post({
93
+ url: "/apps/{app_name}/machines",
94
+ ...options,
95
+ headers: {
96
+ "Content-Type": "application/json",
97
+ ...options.headers,
98
+ },
99
+ });
100
+ /**
101
+ * Destroy Machine
102
+ *
103
+ * Delete a specific Machine within an app by Machine ID, with an optional force parameter to force kill the Machine if it's running.
104
+ *
105
+ */
106
+ export const machinesDelete = (options) => (options.client ?? client).delete({ url: "/apps/{app_name}/machines/{machine_id}", ...options });
107
+ /**
108
+ * Get Machine
109
+ *
110
+ * Get details of a specific Machine within an app by the Machine ID.
111
+ *
112
+ */
113
+ export const machinesShow = (options) => (options.client ?? client).get({
114
+ url: "/apps/{app_name}/machines/{machine_id}",
115
+ ...options,
116
+ });
117
+ /**
118
+ * Update Machine
119
+ *
120
+ * Update a Machine's configuration using the details provided in the request body.
121
+ *
122
+ */
123
+ export const machinesUpdate = (options) => (options.client ?? client).post({
124
+ url: "/apps/{app_name}/machines/{machine_id}",
125
+ ...options,
126
+ headers: {
127
+ "Content-Type": "application/json",
128
+ ...options.headers,
129
+ },
130
+ });
131
+ /**
132
+ * Cordon Machine
133
+ *
134
+ * “Cordoning” a Machine refers to disabling its services, so the Fly Proxy won’t route requests to it. In flyctl this is used by blue/green deployments; one set of Machines is started up with services disabled, and when they are all healthy, the services are enabled on the new Machines and disabled on the old ones.
135
+ *
136
+ */
137
+ export const machinesCordon = (options) => (options.client ?? client).post({ url: "/apps/{app_name}/machines/{machine_id}/cordon", ...options });
138
+ /**
139
+ * List Events
140
+ *
141
+ * List all events associated with a specific Machine within an app.
142
+ *
143
+ */
144
+ export const machinesListEvents = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/machines/{machine_id}/events", ...options });
145
+ /**
146
+ * Execute Command
147
+ *
148
+ * Execute a command on a specific Machine and return the raw command output bytes.
149
+ *
150
+ */
151
+ export const machinesExec = (options) => (options.client ?? client).post({
152
+ url: "/apps/{app_name}/machines/{machine_id}/exec",
153
+ ...options,
154
+ headers: {
155
+ "Content-Type": "application/json",
156
+ ...options.headers,
157
+ },
158
+ });
159
+ /**
160
+ * Release Lease
161
+ *
162
+ * Release the lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine.
163
+ *
164
+ */
165
+ export const machinesReleaseLease = (options) => (options.client ?? client).delete({ url: "/apps/{app_name}/machines/{machine_id}/lease", ...options });
166
+ /**
167
+ * Get Lease
168
+ *
169
+ * Retrieve the current lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine.
170
+ *
171
+ */
172
+ export const machinesShowLease = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/machines/{machine_id}/lease", ...options });
173
+ /**
174
+ * Create Lease
175
+ *
176
+ * Create a lease for a specific Machine within an app using the details provided in the request body. Machine leases can be used to obtain an exclusive lock on modifying a Machine.
177
+ *
178
+ */
179
+ export const machinesCreateLease = (options) => (options.client ?? client).post({
180
+ url: "/apps/{app_name}/machines/{machine_id}/lease",
181
+ ...options,
182
+ headers: {
183
+ "Content-Type": "application/json",
184
+ ...options.headers,
185
+ },
186
+ });
187
+ /**
188
+ * Reclaim Machine Memory
189
+ *
190
+ * Trigger the balloon device to reclaim memory from a machine
191
+ */
192
+ export const machinesReclaimMemory = (options) => (options.client ?? client).post({
193
+ url: "/apps/{app_name}/machines/{machine_id}/memory/reclaim",
194
+ ...options,
195
+ headers: {
196
+ "Content-Type": "application/json",
197
+ ...options.headers,
198
+ },
199
+ });
200
+ /**
201
+ * Get Metadata
202
+ *
203
+ * Retrieve metadata for a specific Machine within an app.
204
+ *
205
+ */
206
+ export const machinesShowMetadata = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/machines/{machine_id}/metadata", ...options });
207
+ /**
208
+ * Patch Metadata (set/remove multiple keys)
209
+ *
210
+ * Update multiple metadata keys at once. Null values and empty strings remove keys.
211
+ */
212
+ export const machinesPatchMetadata = (options) => (options.client ?? client).patch({ url: "/apps/{app_name}/machines/{machine_id}/metadata", ...options });
213
+ /**
214
+ * Delete Metadata
215
+ *
216
+ * Delete metadata for a specific Machine within an app by providing a metadata key.
217
+ *
218
+ */
219
+ export const machinesDeleteMetadata = (options) => (options.client ?? client).delete({
220
+ url: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
221
+ ...options,
222
+ });
223
+ /**
224
+ * Update Metadata
225
+ *
226
+ * Update metadata for a specific machine within an app by providing a metadata key.
227
+ *
228
+ */
229
+ export const machinesUpdateMetadata = (options) => (options.client ?? client).post({
230
+ url: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
231
+ ...options,
232
+ });
233
+ /**
234
+ * List Processes
235
+ *
236
+ * List all processes running on a specific Machine within an app, with optional sorting parameters.
237
+ *
238
+ */
239
+ export const machinesListProcesses = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/machines/{machine_id}/ps", ...options });
240
+ /**
241
+ * Restart Machine
242
+ *
243
+ * Restart a specific Machine within an app, with an optional timeout parameter.
244
+ *
245
+ */
246
+ export const machinesRestart = (options) => (options.client ?? client).post({ url: "/apps/{app_name}/machines/{machine_id}/restart", ...options });
247
+ /**
248
+ * Signal Machine
249
+ *
250
+ * Send a signal to a specific Machine within an app using the details provided in the request body.
251
+ *
252
+ */
253
+ export const machinesSignal = (options) => (options.client ?? client).post({
254
+ url: "/apps/{app_name}/machines/{machine_id}/signal",
255
+ ...options,
256
+ headers: {
257
+ "Content-Type": "application/json",
258
+ ...options.headers,
259
+ },
260
+ });
261
+ /**
262
+ * Start Machine
263
+ *
264
+ * Start a specific Machine within an app.
265
+ *
266
+ */
267
+ export const machinesStart = (options) => (options.client ?? client).post({ url: "/apps/{app_name}/machines/{machine_id}/start", ...options });
268
+ /**
269
+ * Stop Machine
270
+ *
271
+ * Stop a specific Machine within an app, with an optional request body to specify signal and timeout.
272
+ *
273
+ */
274
+ export const machinesStop = (options) => (options.client ?? client).post({
275
+ url: "/apps/{app_name}/machines/{machine_id}/stop",
276
+ ...options,
277
+ headers: {
278
+ "Content-Type": "application/json",
279
+ ...options.headers,
280
+ },
281
+ });
282
+ /**
283
+ * Suspend Machine
284
+ *
285
+ * Suspend a specific Machine within an app. The next start operation will attempt (but is not guaranteed) to resume the Machine from a snapshot taken at suspension time, rather than performing a cold boot.
286
+ *
287
+ */
288
+ export const machinesSuspend = (options) => (options.client ?? client).post({ url: "/apps/{app_name}/machines/{machine_id}/suspend", ...options });
289
+ /**
290
+ * Uncordon Machine
291
+ *
292
+ * “Cordoning” a Machine refers to disabling its services, so the Fly Proxy won’t route requests to it. In flyctl this is used by blue/green deployments; one set of Machines is started up with services disabled, and when they are all healthy, the services are enabled on the new Machines and disabled on the old ones.
293
+ *
294
+ */
295
+ export const machinesUncordon = (options) => (options.client ?? client).post({ url: "/apps/{app_name}/machines/{machine_id}/uncordon", ...options });
296
+ /**
297
+ * List Versions
298
+ *
299
+ * List all versions of the configuration for a specific Machine within an app.
300
+ *
301
+ */
302
+ export const machinesListVersions = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/machines/{machine_id}/versions", ...options });
303
+ /**
304
+ * Wait for State
305
+ *
306
+ * Wait for a Machine to reach a specific state. Specify the desired state with the state parameter. See the [Machine states table](https://fly.io/docs/machines/working-with-machines/#machine-states) for a list of possible states. The default for this parameter is `started`.
307
+ *
308
+ * This request will block for up to 60 seconds. Set a shorter timeout with the timeout parameter.
309
+ *
310
+ */
311
+ export const machinesWait = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/machines/{machine_id}/wait", ...options });
312
+ /**
313
+ * List secret keys belonging to an app
314
+ */
315
+ export const secretkeysList = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/secretkeys", ...options });
316
+ /**
317
+ * Delete an app's secret key
318
+ */
319
+ export const secretkeyDelete = (options) => (options.client ?? client).delete({ url: "/apps/{app_name}/secretkeys/{secret_name}", ...options });
320
+ /**
321
+ * Get an app's secret key
322
+ */
323
+ export const secretkeyGet = (options) => (options.client ?? client).get({
324
+ url: "/apps/{app_name}/secretkeys/{secret_name}",
325
+ ...options,
326
+ });
327
+ /**
328
+ * Create or update a secret key
329
+ */
330
+ export const secretkeySet = (options) => (options.client ?? client).post({
331
+ url: "/apps/{app_name}/secretkeys/{secret_name}",
332
+ ...options,
333
+ headers: {
334
+ "Content-Type": "application/json",
335
+ ...options.headers,
336
+ },
337
+ });
338
+ /**
339
+ * Decrypt with a secret key
340
+ */
341
+ export const secretkeyDecrypt = (options) => (options.client ?? client).post({
342
+ url: "/apps/{app_name}/secretkeys/{secret_name}/decrypt",
343
+ ...options,
344
+ headers: {
345
+ "Content-Type": "application/json",
346
+ ...options.headers,
347
+ },
348
+ });
349
+ /**
350
+ * Encrypt with a secret key
351
+ */
352
+ export const secretkeyEncrypt = (options) => (options.client ?? client).post({
353
+ url: "/apps/{app_name}/secretkeys/{secret_name}/encrypt",
354
+ ...options,
355
+ headers: {
356
+ "Content-Type": "application/json",
357
+ ...options.headers,
358
+ },
359
+ });
360
+ /**
361
+ * Generate a random secret key
362
+ */
363
+ export const secretkeyGenerate = (options) => (options.client ?? client).post({
364
+ url: "/apps/{app_name}/secretkeys/{secret_name}/generate",
365
+ ...options,
366
+ headers: {
367
+ "Content-Type": "application/json",
368
+ ...options.headers,
369
+ },
370
+ });
371
+ /**
372
+ * Sign with a secret key
373
+ */
374
+ export const secretkeySign = (options) => (options.client ?? client).post({
375
+ url: "/apps/{app_name}/secretkeys/{secret_name}/sign",
376
+ ...options,
377
+ headers: {
378
+ "Content-Type": "application/json",
379
+ ...options.headers,
380
+ },
381
+ });
382
+ /**
383
+ * Verify with a secret key
384
+ */
385
+ export const secretkeyVerify = (options) => (options.client ?? client).post({
386
+ url: "/apps/{app_name}/secretkeys/{secret_name}/verify",
387
+ ...options,
388
+ headers: {
389
+ "Content-Type": "application/json",
390
+ ...options.headers,
391
+ },
392
+ });
393
+ /**
394
+ * List app secrets belonging to an app
395
+ */
396
+ export const secretsList = (options) => (options.client ?? client).get({
397
+ url: "/apps/{app_name}/secrets",
398
+ ...options,
399
+ });
400
+ /**
401
+ * Update app secrets belonging to an app
402
+ */
403
+ export const secretsUpdate = (options) => (options.client ?? client).post({
404
+ url: "/apps/{app_name}/secrets",
405
+ ...options,
406
+ headers: {
407
+ "Content-Type": "application/json",
408
+ ...options.headers,
409
+ },
410
+ });
411
+ /**
412
+ * Delete an app secret
413
+ */
414
+ export const secretDelete = (options) => (options.client ?? client).delete({ url: "/apps/{app_name}/secrets/{secret_name}", ...options });
415
+ /**
416
+ * Get an app secret
417
+ */
418
+ export const secretGet = (options) => (options.client ?? client).get({
419
+ url: "/apps/{app_name}/secrets/{secret_name}",
420
+ ...options,
421
+ });
422
+ /**
423
+ * Create or update Secret
424
+ */
425
+ export const secretCreate = (options) => (options.client ?? client).post({
426
+ url: "/apps/{app_name}/secrets/{secret_name}",
427
+ ...options,
428
+ headers: {
429
+ "Content-Type": "application/json",
430
+ ...options.headers,
431
+ },
432
+ });
433
+ /**
434
+ * List Volumes
435
+ *
436
+ * List all volumes associated with a specific app.
437
+ *
438
+ */
439
+ export const volumesList = (options) => (options.client ?? client).get({
440
+ url: "/apps/{app_name}/volumes",
441
+ ...options,
442
+ });
443
+ /**
444
+ * Create Volume
445
+ *
446
+ * Create a volume for a specific app using the details provided in the request body.
447
+ *
448
+ */
449
+ export const volumesCreate = (options) => (options.client ?? client).post({
450
+ url: "/apps/{app_name}/volumes",
451
+ ...options,
452
+ headers: {
453
+ "Content-Type": "application/json",
454
+ ...options.headers,
455
+ },
456
+ });
457
+ /**
458
+ * Destroy Volume
459
+ *
460
+ * Delete a specific volume within an app by volume ID.
461
+ *
462
+ */
463
+ export const volumeDelete = (options) => (options.client ?? client).delete({ url: "/apps/{app_name}/volumes/{volume_id}", ...options });
464
+ /**
465
+ * Get Volume
466
+ *
467
+ * Retrieve details about a specific volume by its ID within an app.
468
+ *
469
+ */
470
+ export const volumesGetById = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/volumes/{volume_id}", ...options });
471
+ /**
472
+ * Update Volume
473
+ *
474
+ * Update a volume's configuration using the details provided in the request body.
475
+ *
476
+ */
477
+ export const volumesUpdate = (options) => (options.client ?? client).put({
478
+ url: "/apps/{app_name}/volumes/{volume_id}",
479
+ ...options,
480
+ headers: {
481
+ "Content-Type": "application/json",
482
+ ...options.headers,
483
+ },
484
+ });
485
+ /**
486
+ * Extend Volume
487
+ *
488
+ * Extend a volume's size within an app using the details provided in the request body.
489
+ *
490
+ */
491
+ export const volumesExtend = (options) => (options.client ?? client).put({
492
+ url: "/apps/{app_name}/volumes/{volume_id}/extend",
493
+ ...options,
494
+ headers: {
495
+ "Content-Type": "application/json",
496
+ ...options.headers,
497
+ },
498
+ });
499
+ /**
500
+ * List Snapshots
501
+ *
502
+ * List all snapshots for a specific volume within an app.
503
+ *
504
+ */
505
+ export const volumesListSnapshots = (options) => (options.client ?? client).get({ url: "/apps/{app_name}/volumes/{volume_id}/snapshots", ...options });
506
+ /**
507
+ * Create Snapshot
508
+ *
509
+ * Create a snapshot for a specific volume within an app.
510
+ *
511
+ */
512
+ export const createVolumeSnapshot = (options) => (options.client ?? client).post({ url: "/apps/{app_name}/volumes/{volume_id}/snapshots", ...options });
513
+ /**
514
+ * Get Placements
515
+ *
516
+ * Simulates placing the specified number of machines into regions, depending on available capacity and limits.
517
+ */
518
+ export const platformPlacementsPost = (options) => (options.client ?? client).post({
519
+ url: "/platform/placements",
520
+ ...options,
521
+ headers: {
522
+ "Content-Type": "application/json",
523
+ ...options.headers,
524
+ },
525
+ });
526
+ /**
527
+ * Get Regions
528
+ *
529
+ * List all regions on the platform with their current Machine capacity.
530
+ */
531
+ export const platformRegionsGet = (options) => (options?.client ?? client).get({ url: "/platform/regions", ...options });
532
+ /**
533
+ * Request a Petsem token for accessing KMS
534
+ *
535
+ * This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete [Machines API docs](https://fly.io/docs/machines/api/apps-resource/) for details about using the Apps resource.
536
+ */
537
+ export const tokensRequestKms = (options) => (options?.client ?? client).post({ url: "/tokens/kms", ...options });
538
+ /**
539
+ * Request an OIDC token
540
+ *
541
+ * Request an Open ID Connect token for your machine. Customize the audience claim with the `aud` parameter. This returns a JWT token. Learn more about [using OpenID Connect](/docs/reference/openid-connect/) on Fly.io.
542
+ *
543
+ */
544
+ export const tokensRequestOidc = (options) => (options.client ?? client).post({
545
+ url: "/tokens/oidc",
546
+ ...options,
547
+ headers: {
548
+ "Content-Type": "application/json",
549
+ ...options.headers,
550
+ },
551
+ });
552
+ /**
553
+ * Get Current Token Information
554
+ *
555
+ * Get information about the current macaroon token(s), including organizations, apps, and whether each token is from a user or machine
556
+ */
557
+ export const currentTokenShow = (options) => (options?.client ?? client).get({ url: "/v1/tokens/current", ...options });