@adobe/aio-cli-plugin-app-storage 1.2.0 → 1.3.0-pre.2026-02-20.sha-df98265c

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.
Files changed (37) hide show
  1. package/README.md +722 -1
  2. package/package.json +25 -5
  3. package/src/BaseCommand.js +11 -58
  4. package/src/DBBaseCommand.js +112 -0
  5. package/src/StateBaseCommand.js +87 -0
  6. package/src/commands/app/add/db.js +20 -0
  7. package/src/commands/app/db/collection/create.js +119 -0
  8. package/src/commands/app/db/collection/drop.js +90 -0
  9. package/src/commands/app/db/collection/list.js +100 -0
  10. package/src/commands/app/db/collection/rename.js +98 -0
  11. package/src/commands/app/db/collection/stats.js +94 -0
  12. package/src/commands/app/db/delete.js +89 -0
  13. package/src/commands/app/db/document/count.js +96 -0
  14. package/src/commands/app/db/document/delete.js +95 -0
  15. package/src/commands/app/db/document/find.js +133 -0
  16. package/src/commands/app/db/document/insert.js +147 -0
  17. package/src/commands/app/db/document/replace.js +122 -0
  18. package/src/commands/app/db/document/update.js +144 -0
  19. package/src/commands/app/db/index/create.js +170 -0
  20. package/src/commands/app/db/index/drop.js +87 -0
  21. package/src/commands/app/db/index/list.js +82 -0
  22. package/src/commands/app/db/org/stats.js +111 -0
  23. package/src/commands/app/db/ping.js +77 -0
  24. package/src/commands/app/db/provision.js +190 -0
  25. package/src/commands/app/db/stats.js +101 -0
  26. package/src/commands/app/db/status.js +159 -0
  27. package/src/commands/app/state/delete.js +3 -3
  28. package/src/commands/app/state/get.js +2 -2
  29. package/src/commands/app/state/list.js +3 -3
  30. package/src/commands/app/state/put.js +4 -4
  31. package/src/commands/app/state/stats.js +2 -2
  32. package/src/constants/db.js +32 -0
  33. package/src/constants/global.js +14 -0
  34. package/src/{constants.js → constants/state.js} +3 -0
  35. package/src/utils/inputValidation.js +74 -0
  36. package/src/utils/output.js +35 -0
  37. package/oclif.manifest.json +0 -316
package/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # aio-cli-plugin-app-storage
2
2
 
3
- The CLI Plugin to manage your App Builder State storage.
3
+ The CLI Plugin to manage your App Builder State storage and Database services.
4
4
 
5
5
  If you need to access State programmatically, check the
6
6
  [@adobe/aio-lib-state](https://github.com/adobe/aio-lib-state) library.
7
7
 
8
+ If you need to access Database programmatically, check the
9
+ [@adobe/aio-lib-db](https://github.com/adobe/aio-lib-db) library.
10
+
8
11
  ---
9
12
  <!-- toc -->
10
13
  * [aio-cli-plugin-app-storage](#aio-cli-plugin-app-storage)
@@ -19,17 +22,53 @@ $ aio plugins:install @adobe/aio-cli-plugin-app-storage
19
22
  $ # OR
20
23
  $ aio discover -i
21
24
  $ aio app state --help
25
+ $ aio app db --help
22
26
  ```
23
27
 
24
28
  # Commands
25
29
  <!-- commands -->
30
+ ## State Storage Commands
26
31
  * [`aio app state delete [KEYS]`](#aio-app-state-delete-keys)
27
32
  * [`aio app state get KEY`](#aio-app-state-get-key)
28
33
  * [`aio app state list`](#aio-app-state-list)
29
34
  * [`aio app state put KEY VALUE`](#aio-app-state-put-key-value)
30
35
  * [`aio app state stats`](#aio-app-state-stats)
36
+
37
+ ## Database Commands
38
+ ### Collection Management
39
+ * [`aio app db collection list`](#aio-app-db-collection-list)
40
+ * [`aio app db collection create COLLECTION`](#aio-app-db-collection-create-collection)
41
+ * [`aio app db collection drop COLLECTION`](#aio-app-db-collection-drop-collection)
42
+ * [`aio app db collection rename CURRENTNAME NEWNAME`](#aio-app-db-collection-rename-currentname-newname)
43
+ * [`aio app db collection stats COLLECTION`](#aio-app-db-collection-stats-collection)
44
+
45
+ ### Document Operations
46
+ * [`aio app db document insert COLLECTION DOCUMENTS`](#aio-app-db-document-insert-collection-documents)
47
+ * [`aio app db document delete COLLECTION FILTER`](#aio-app-db-document-delete-collection-filter)
48
+ * [`aio app db document find COLLECTION FILTER`](#aio-app-db-document-find-collection-filter)
49
+ * [`aio app db document update COLLECTION FILTER UPDATE`](#aio-app-db-document-update-collection-filter-update)
50
+ * [`aio app db document replace COLLECTION FILTER REPLACEMENT`](#aio-app-db-document-replace-collection-filter-replacement)
51
+ * [`aio app db document count COLLECTION`](#aio-app-db-document-count-collection)
52
+
53
+ ### Index Management
54
+ * [`aio app db index create COLLECTION`](#aio-app-db-index-create-collection)
55
+ * [`aio app db index drop COLLECTION INDEXNAME`](#aio-app-db-index-drop-collection-indexname)
56
+ * [`aio app db index list COLLECTION`](#aio-app-db-index-list-collection)
57
+
58
+ ### Database Management
59
+ * [`aio app db ping`](#aio-app-db-ping)
60
+ * [`aio app db provision`](#aio-app-db-provision)
61
+ * [`aio app db delete`](#aio-app-db-delete)
62
+ * [`aio app db status`](#aio-app-db-status)
63
+ * [`aio app db stats`](#aio-app-db-stats)
64
+ * [`aio app db org stats`](#aio-app-db-org-stats)
65
+ * `aio app db show collections` - Alias for [`aio app db collection list`](#aio-app-db-collection-list)
66
+
67
+ ## Other Commands
31
68
  * [`aio help [COMMAND]`](#aio-help-command)
32
69
 
70
+ # State Storage Commands
71
+
33
72
  ## `aio app state delete [KEYS]`
34
73
 
35
74
  Delete key-values
@@ -190,6 +229,688 @@ EXAMPLES
190
229
  $ aio app state stats --json
191
230
  ```
192
231
 
232
+ # Database Commands
233
+
234
+ ## A Note on Regions
235
+
236
+ > Note: All workspace databases have to be provisioned in a specific region, and all database commands must be executed in that same region. If set in the `app.config.yaml` application manifest, that region will be used. If not, it will first fall back to what is set in the --region flag, followed by the AIO_DB_REGION environment variable, and finally to the default `amer` region. See [Getting Started with Database Storage](https://developer.adobe.com/app-builder/docs/guides/app_builder_guides/storage/database) for more details.
237
+
238
+ ## Collection Management
239
+
240
+ > Note: The commands under `aio app db collection <command>` are also available as `aio app db col <command>` shorthand aliases.
241
+
242
+ ### `aio app db collection list`
243
+
244
+ Get the list of collections in your App Builder database
245
+
246
+ ```
247
+ USAGE
248
+ $ aio app db collection list [--json] [--region <value>] [-i]
249
+
250
+ FLAGS
251
+ -i, --info Show detailed collection information instead of just names
252
+
253
+ GLOBAL FLAGS
254
+ --json Format output as json.
255
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
256
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
257
+ <options: amer|emea|apac|aus>
258
+
259
+ DESCRIPTION
260
+ Get the list of collections in your App Builder database
261
+
262
+ ALIASES
263
+ $ aio app db col list
264
+ $ aio app db show collections
265
+
266
+ EXAMPLES
267
+ $ aio app db collection list
268
+
269
+ $ aio app db collection list --info
270
+
271
+ $ aio app db collection list --json
272
+
273
+ $ aio app db col list --info --json
274
+ ```
275
+
276
+ ### `aio app db collection create COLLECTION`
277
+
278
+ Create a new collection in the database
279
+
280
+ ```
281
+ USAGE
282
+ $ aio app db collection create COLLECTION [--json] [--region <value>] [-v <value>]
283
+
284
+ ARGUMENTS
285
+ COLLECTION The name of the collection to create
286
+
287
+ FLAGS
288
+ -v, --validator=<value> JSON schema validator for document validation (JSON string)
289
+
290
+ GLOBAL FLAGS
291
+ --json Format output as json.
292
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
293
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
294
+ <options: amer|emea|apac|aus>
295
+
296
+ DESCRIPTION
297
+ Create a new collection in the database
298
+
299
+ ALIASES
300
+ $ aio app db col create
301
+
302
+ EXAMPLES
303
+ $ aio app db collection create users
304
+
305
+ $ aio app db collection create inventory --validator '{"type": "object", "required": ["id", "quantity"]}' --json
306
+
307
+ $ aio app db col create products --json
308
+
309
+ $ aio app db col create products --validator '{"type": "object", "properties": {"name": {"type": "string"}, "price": {"type": "number", "minimum": 0}}, "required": ["name", "price"]}'
310
+ ```
311
+
312
+ ### `aio app db collection drop COLLECTION`
313
+
314
+ Drop a collection from the database
315
+
316
+ ```
317
+ USAGE
318
+ $ aio app db collection drop COLLECTION [--json] [--region <value>]
319
+
320
+ ARGUMENTS
321
+ COLLECTION The name of the collection to drop
322
+
323
+ GLOBAL FLAGS
324
+ --json Format output as json.
325
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
326
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
327
+ <options: amer|emea|apac|aus>
328
+
329
+ DESCRIPTION
330
+ Drop a collection from the database
331
+
332
+ ALIASES
333
+ $ aio app db col drop
334
+
335
+ EXAMPLES
336
+ $ aio app db collection drop users
337
+
338
+ $ aio app db collection drop products --json
339
+
340
+ $ aio app db col drop inventory
341
+ ```
342
+
343
+ ### `aio app db collection rename CURRENTNAME NEWNAME`
344
+
345
+ Rename a collection in the database
346
+
347
+ ```
348
+ USAGE
349
+ $ aio app db collection rename CURRENTNAME NEWNAME [--json] [--region <value>]
350
+
351
+ ARGUMENTS
352
+ CURRENTNAME The current name of the collection to rename
353
+ NEWNAME The new name for the collection
354
+
355
+ GLOBAL FLAGS
356
+ --json Format output as json.
357
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
358
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
359
+ <options: amer|emea|apac|aus>
360
+
361
+ DESCRIPTION
362
+ Rename a collection in the database
363
+
364
+ ALIASES
365
+ $ aio app db col rename
366
+
367
+ EXAMPLES
368
+ $ aio app db collection rename users customers
369
+
370
+ $ aio app db collection rename old_products new_products --json
371
+
372
+ $ aio app db col rename inventory stock
373
+ ```
374
+
375
+ ### `aio app db collection stats COLLECTION`
376
+
377
+ Get statistics for a collection in the database
378
+
379
+ ```
380
+ USAGE
381
+ $ aio app db collection stats COLLECTION [--json] [--region <value>]
382
+
383
+ ARGUMENTS
384
+ COLLECTION The name of the collection to get stats for
385
+
386
+ GLOBAL FLAGS
387
+ --json Format output as json.
388
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
389
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
390
+ <options: amer|emea|apac|aus>
391
+
392
+ DESCRIPTION
393
+ Get statistics for a collection in the database
394
+
395
+ ALIASES
396
+ $ aio app db col stats
397
+
398
+ EXAMPLES
399
+ $ aio app db collection stats users
400
+
401
+ $ aio app db collection stats products --json
402
+
403
+ $ aio app db col stats inventory
404
+ ```
405
+
406
+ ## Document Operations
407
+
408
+ > Note: The commands under `aio app db document <command>` are also available as `aio app db doc <command>` shorthand aliases.
409
+
410
+ ### `aio app db document insert COLLECTION DOCUMENTS`
411
+
412
+ Insert one or more documents into a collection
413
+
414
+ ```
415
+ USAGE
416
+ $ aio app db document insert COLLECTION DOCUMENTS [--json] [--region <value>] [-b]
417
+
418
+ ARGUMENTS
419
+ COLLECTION The name of the collection to insert documents into
420
+ DOCUMENTS JSON object or array of documents to insert
421
+
422
+ FLAGS
423
+ -b, --bypassDocumentValidation Bypass schema validation if present
424
+
425
+ GLOBAL FLAGS
426
+ --json Format output as json.
427
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
428
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
429
+ <options: amer|emea|apac|aus>
430
+
431
+ DESCRIPTION
432
+ Insert one or more documents into a collection
433
+
434
+ ALIASES
435
+ $ aio app db doc insert
436
+
437
+ EXAMPLES
438
+ $ aio app db document insert users '{"name": "John", "age": 30}'
439
+
440
+ $ aio app db document insert products '[{"id": 1, "name": "Product A"}, {"id": 2, "name": "Product B"}]' --json
441
+
442
+ $ aio app db document insert temp '{"data": "test"}' --bypassDocumentValidation
443
+
444
+ $ aio app db doc insert bulk '[{"field": "foo"}, {"field": "bar"}]' --bypassDocumentValidation --json
445
+ ```
446
+
447
+ ### `aio app db document delete COLLECTION FILTER`
448
+
449
+ Delete a single document from a collection
450
+
451
+ ```
452
+ USAGE
453
+ $ aio app db document delete COLLECTION FILTER [--json] [--region <value>]
454
+
455
+ ARGUMENTS
456
+ COLLECTION The name of the collection
457
+ FILTER The filter document (JSON string)
458
+
459
+ GLOBAL FLAGS
460
+ --json Format output as json.
461
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
462
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
463
+ <options: amer|emea|apac|aus>
464
+
465
+ DESCRIPTION
466
+ Delete a single document from a collection
467
+
468
+ ALIASES
469
+ $ aio app db doc delete
470
+
471
+ EXAMPLES
472
+ $ aio app db document delete users '{"name": "John"}'
473
+
474
+ $ aio app db document delete products '{"id": "123"}' --json
475
+
476
+ $ aio app db doc delete posts '{"status": "draft"}'
477
+ ```
478
+
479
+ ### `aio app db document find COLLECTION FILTER`
480
+
481
+ Find documents in a collection based on filter criteria.
482
+
483
+ ```
484
+ USAGE
485
+ $ aio app db document find COLLECTION FILTER [--json] [--region <value>] [-l <value>] [-s <value>] [-o <value>] [-p <value>]
486
+
487
+ ARGUMENTS
488
+ COLLECTION The name of the collection
489
+ FILTER Filter criteria for the documents to find (JSON string, e.g. '{"status": "active"}')
490
+
491
+ FLAGS
492
+ -l, --limit=<value> [default: 20] Limit the number of documents returned, max: 100
493
+ -o, --sort=<value> Sort specification as a JSON object (e.g. '{"field": 1}')
494
+ -p, --projection=<value> Projection specification as a JSON object (e.g. '{"field1": 1, "field2": 0}')
495
+ -s, --skip=<value> Skip the first N documents
496
+
497
+ GLOBAL FLAGS
498
+ --json Format output as json.
499
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
500
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
501
+ <options: amer|emea|apac|aus>
502
+
503
+ DESCRIPTION
504
+ Find documents in a collection based on filter criteria.
505
+
506
+ ALIASES
507
+ $ aio app db doc find
508
+
509
+ EXAMPLES
510
+ $ aio app db document find users '{}'
511
+
512
+ $ aio app db document find products '{"category": "Computer Accessories"}' --json
513
+
514
+ $ aio app db document find products '{"name": {"$regex": "Speakers$"}}' --sort '{"price": -1}' --limit 10 --skip 5 --projection '{"name": 1, "price": 1}'
515
+
516
+ $ aio app db doc find orders '{"status": "pending"}' --sort '{"orderDate": -1}'
517
+ ```
518
+
519
+ ### `aio app db document update COLLECTION FILTER UPDATE`
520
+
521
+ Update document(s) in a collection
522
+
523
+ ```
524
+ USAGE
525
+ $ aio app db document update COLLECTION FILTER UPDATE [--json] [--region <value>] [-u] [-m]
526
+
527
+ ARGUMENTS
528
+ COLLECTION The name of the collection
529
+ FILTER The filter document (JSON string)
530
+ UPDATE The update document (JSON string)
531
+
532
+ FLAGS
533
+ -m, --many Update all documents matching the filter. Without this option, only the first matching document is updated.
534
+ -u, --upsert If no document is found, create a new one
535
+
536
+ GLOBAL FLAGS
537
+ --json Format output as json.
538
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
539
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
540
+ <options: amer|emea|apac|aus>
541
+
542
+ DESCRIPTION
543
+ Update document(s) in a collection
544
+
545
+ ALIASES
546
+ $ aio app db doc update
547
+
548
+ EXAMPLES
549
+ $ aio app db document update users '{"name": "John"}' '{"$set": {"age": 31}}'
550
+
551
+ $ aio app db document update products '{"id": "123"}' '{"$inc": {"stock": -1}}' --json
552
+
553
+ $ aio app db document update posts '{"slug": "hello-world"}' '{"$set": {"status": "published"}}' --many
554
+
555
+ $ aio app db doc update users '{"email": "john@example.com"}' '{"$set": {"lastLogin": "2024-01-01"}}' --upsert
556
+ ```
557
+
558
+ ### `aio app db document replace COLLECTION FILTER REPLACEMENT`
559
+
560
+ Replace a single document in a collection
561
+
562
+ ```
563
+ USAGE
564
+ $ aio app db document replace COLLECTION FILTER REPLACEMENT [--json] [--region <value>] [-u]
565
+
566
+ ARGUMENTS
567
+ COLLECTION The name of the collection
568
+ FILTER The filter document (JSON string)
569
+ REPLACEMENT The replacement document (JSON string)
570
+
571
+ FLAGS
572
+ -u, --upsert If no document is found, create a new one
573
+
574
+ GLOBAL FLAGS
575
+ --json Format output as json.
576
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
577
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
578
+ <options: amer|emea|apac|aus>
579
+
580
+ DESCRIPTION
581
+ Replace a single document in a collection
582
+
583
+ ALIASES
584
+ $ aio app db doc replace
585
+
586
+ EXAMPLES
587
+ $ aio app db document replace users '{"name": "John"}' '{"name": "John Doe", "age": 30, "status": "active"}'
588
+
589
+ $ aio app db document replace products '{"id": "123"}' '{"id": "123", "name": "New Product", "price": 99.99}' --json
590
+
591
+ $ aio app db document replace posts '{"slug": "hello-world"}' '{"title": "Hello World", "content": "Updated content", "status": "published"}' --upsert
592
+
593
+ $ aio app db doc replace users '{"email": "john@example.com"}' '{"email": "john@example.com", "name": "John", "verified": true}' --upsert --json
594
+ ```
595
+
596
+ ### `aio app db document count COLLECTION`
597
+
598
+ Count documents in a collection
599
+
600
+ ```
601
+ USAGE
602
+ $ aio app db document count COLLECTION [QUERY] [--json] [--region <value>]
603
+
604
+ ARGUMENTS
605
+ COLLECTION The name of the collection
606
+ QUERY The query filter document (JSON string). If not provided, counts all documents.
607
+
608
+ GLOBAL FLAGS
609
+ --json Format output as json.
610
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
611
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
612
+ <options: amer|emea|apac|aus>
613
+
614
+ DESCRIPTION
615
+ Count documents in a collection
616
+
617
+ ALIASES
618
+ $ aio app db doc count
619
+
620
+ EXAMPLES
621
+ $ aio app db document countDocuments users
622
+
623
+ $ aio app db document countDocuments users '{"age": {"$gte": 21}}'
624
+
625
+ $ aio app db document countDocuments products '{"category": "electronics"}' --json
626
+
627
+ $ aio app db doc count orders '{"status": "shipped"}'
628
+ ```
629
+
630
+ ## Index Management
631
+
632
+ > Note: The commands under `aio app db index <command>` are also available as `aio app db idx <command>` shorthand aliases.
633
+
634
+ ### `aio app db index create COLLECTION`
635
+
636
+ Create a new index on a collection in the database
637
+
638
+ ```
639
+ USAGE
640
+ $ aio app db index create COLLECTION [--json] [--region <value>] [-s <value>] [-k <value>] [-n <value>] [-u]
641
+
642
+ ARGUMENTS
643
+ COLLECTION The name of the collection to create the index on
644
+
645
+ FLAGS
646
+ -n, --name=<value> A name that uniquely identifies the index
647
+ -u, --unique Creates a unique index so that the collection will not accept insertion or update of documents where the index key value matches an
648
+ existing value in the index
649
+
650
+ REQUIRES AT LEAST ONE OF THE INDEX DEFINITION FLAGS
651
+ -k, --key=<value>... Index key to use with default specification
652
+ -s, --spec=<value>... Index specification as a JSON object (e.g., '{"name":1, "age":-1}')
653
+
654
+ GLOBAL FLAGS
655
+ --json Format output as json.
656
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
657
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
658
+ <options: amer|emea|apac|aus>
659
+
660
+ DESCRIPTION
661
+ Create a new index on a collection in the database
662
+
663
+ ALIASES
664
+ $ aio app db idx create
665
+
666
+ EXAMPLES
667
+ $ aio app db index create users --spec '{"name":1, "age":-1}'
668
+
669
+ $ aio app db index create users -s '{"name":1, "age":-1}' --name "name_age_index"
670
+
671
+ $ aio app db index create students -s '{"name":1}' --key grade --unique
672
+
673
+ $ aio app db index create reviews -k sku -k rating
674
+
675
+ $ aio app db index create products -s '{"name":"text", "category":"text"}' --json
676
+
677
+ $ aio app db index create books -s '{"author":1}' -k year
678
+
679
+ $ aio app db idx create orders --spec '{"customerId":1}' --spec '{"orderDate":-1}' --name "customer_order_index" --unique
680
+ ```
681
+
682
+ ### `aio app db index drop COLLECTION INDEXNAME`
683
+
684
+ Drop an index from a collection in the database
685
+
686
+ ```
687
+ USAGE
688
+ $ aio app db index drop COLLECTION INDEXNAME [--json] [--region <value>]
689
+
690
+ ARGUMENTS
691
+ COLLECTION The name of the collection to drop the index from
692
+ INDEXNAME The name of the index to drop
693
+
694
+ GLOBAL FLAGS
695
+ --json Format output as json.
696
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
697
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
698
+ <options: amer|emea|apac|aus>
699
+
700
+ DESCRIPTION
701
+ Drop an index from a collection in the database
702
+
703
+ ALIASES
704
+ $ aio app db idx drop
705
+
706
+ EXAMPLES
707
+ $ aio app db index drop users name_age_index
708
+
709
+ $ aio app db index drop products category_1 --json
710
+
711
+ $ aio app db idx drop orders orderDate_index
712
+ ```
713
+
714
+ ### `aio app db index list COLLECTION`
715
+
716
+ Get the list of indexes from a collection in the database
717
+
718
+ ```
719
+ USAGE
720
+ $ aio app db index list COLLECTION [--json] [--region <value>]
721
+
722
+ ARGUMENTS
723
+ COLLECTION The name of the collection to retrieve indexes from
724
+
725
+ GLOBAL FLAGS
726
+ --json Format output as json.
727
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
728
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
729
+ <options: amer|emea|apac|aus>
730
+
731
+ DESCRIPTION
732
+ Get the list of indexes from a collection in the database
733
+
734
+ ALIASES
735
+ $ aio app db idx list
736
+
737
+ EXAMPLES
738
+ $ aio app db index list users
739
+
740
+ $ aio app db index list products --json
741
+
742
+ $ aio app db idx list orders
743
+ ```
744
+
745
+ ## Database Management
746
+
747
+ ### `aio app db ping`
748
+
749
+ Test connectivity to your App Builder database
750
+
751
+ ```
752
+ USAGE
753
+ $ aio app db ping [--json] [--region <value>]
754
+
755
+ GLOBAL FLAGS
756
+ --json Format output as json.
757
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
758
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
759
+ <options: amer|emea|apac|aus>
760
+
761
+ DESCRIPTION
762
+ Test connectivity to your App Builder database
763
+
764
+ EXAMPLES
765
+ $ aio app db ping
766
+
767
+ $ aio app db ping --json
768
+ ```
769
+
770
+ ### `aio app db provision`
771
+
772
+ Provision a new database for your App Builder application
773
+
774
+ ```
775
+ USAGE
776
+ $ aio app db provision [--json] [--region <value>] [-f]
777
+
778
+ FLAGS
779
+ -y, --yes Skip confirmation prompt and provision automatically
780
+
781
+ GLOBAL FLAGS
782
+ --json Format output as json.
783
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
784
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
785
+ <options: amer|emea|apac|aus>
786
+
787
+ DESCRIPTION
788
+ Provision a new database for your App Builder application
789
+
790
+ EXAMPLES
791
+ $ aio app db provision
792
+
793
+ $ aio app db provision --region amer
794
+
795
+ $ aio app db provision --json
796
+
797
+ $ aio app db provision --yes
798
+ ```
799
+
800
+ ### `aio app db delete`
801
+
802
+ Delete the database for your App Builder application (non-production only)
803
+
804
+ ```
805
+ USAGE
806
+ $ aio app db delete [--json] [--region <value>] [--force]
807
+
808
+ FLAGS
809
+ --force [use with caution!] force delete, skips confirmation safety prompt
810
+
811
+ GLOBAL FLAGS
812
+ --json Format output as json.
813
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
814
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
815
+ <options: amer|emea|apac|aus>
816
+
817
+ DESCRIPTION
818
+ Delete the database for your App Builder application (non-production only)
819
+
820
+ EXAMPLES
821
+ $ aio app db delete
822
+
823
+ $ aio app db delete --force
824
+
825
+ $ aio app db delete --json
826
+ ```
827
+
828
+ ### `aio app db status`
829
+
830
+ Check the provisioning status of your App Builder database
831
+
832
+ ```
833
+ USAGE
834
+ $ aio app db status [--json] [--region <value>] [--watch]
835
+
836
+ FLAGS
837
+ --watch Watch for status changes (press Ctrl+C to stop)
838
+
839
+ GLOBAL FLAGS
840
+ --json Format output as json.
841
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
842
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
843
+ <options: amer|emea|apac|aus>
844
+
845
+ DESCRIPTION
846
+ Check the provisioning status of your App Builder database
847
+
848
+ EXAMPLES
849
+ $ aio app db status
850
+
851
+ $ aio app db status --watch
852
+
853
+ $ aio app db status --json
854
+ ```
855
+
856
+ ### `aio app db stats`
857
+
858
+ Get statistics about your App Builder database
859
+
860
+ ```
861
+ USAGE
862
+ $ aio app db stats [--json] [--region <value>] [-s <value>]
863
+
864
+ FLAGS
865
+ -s, --scale=<value> [default: 1] Scale factor for size-related statistics (e.g. 1024 for KB, 1048576 for MB).
866
+
867
+ GLOBAL FLAGS
868
+ --json Format output as json.
869
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or `amer` if neither is set.
870
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
871
+ <options: amer|emea|apac|aus>
872
+
873
+ DESCRIPTION
874
+ Get statistics about your App Builder database
875
+
876
+ EXAMPLES
877
+ $ aio app db stats
878
+
879
+ $ aio app db stats --scale 1024
880
+
881
+ $ aio app db stats --json
882
+ ```
883
+
884
+ ### `aio app db org stats`
885
+
886
+ Get combined statistics about the App Builder databases in your organization
887
+
888
+ ```
889
+ USAGE
890
+ $ aio app db org stats [--json] [--region <value>] [-s <value>]
891
+
892
+ FLAGS
893
+ -s, --scale=<value> [default: 1] Scale factor for size-related statistics (e.g. 1024 for KB, 1048576 for MB).
894
+
895
+ GLOBAL FLAGS
896
+ --json Format output as json.
897
+ --region=<value> Database region. Defaults to 'AIO_DB_REGION' environment variable or 'amer' if neither is set.
898
+ Any database region set in 'app.config.yaml' takes precedence over all of these.
899
+ <options: amer|emea|apac|aus>
900
+
901
+ DESCRIPTION
902
+ Get combined statistics about the App Builder databases in your organization
903
+
904
+ EXAMPLES
905
+ $ aio app db org stats
906
+
907
+ $ aio app db org stats --scale 1024
908
+
909
+ $ aio app db org stats --json
910
+ ```
911
+
912
+ # Other Commands
913
+
193
914
  ## `aio help [COMMAND]`
194
915
 
195
916
  Display help for aio.