Skip to main content

Manage Momento Cache with the CLI

Preview

The momento preview pool and momento preview database command groups are in preview. Their names, arguments, and output may change before general availability.

Use the Momento CLI for common Capacity Pool and Database lifecycle operations. The commands target one region through the endpoint identifier in your selected profile.

Install and configure

Install the CLI using the instructions in the Momento CLI repository.

In the Momento console, create or retrieve an API key and copy the endpoint identifier for the region you want to manage. The console is the authority for endpoint identifiers. If the endpoint identifier is not visible, contact your Momento representative for private-preview access rather than constructing a hostname from a static list.

Save the API key and endpoint identifier in a named profile:

momento configure --profile cache-preview

The examples below pass --profile cache-preview. You may instead use the default profile, or pass --api-key and --endpoint directly; avoid exposing secrets in shell history.

Choose a management surface

WorkflowCLI (preview)Console (private preview)
Create a Cluster or Flex PoolYesYes
List Pools across regionsOne selected regionAggregates configured regions
Inspect Pool statusget-statusOverview with configuration and diagnostics
Update a PoolYesYes
Read Pool metricsNot availablePoint-in-time Metrics tab
Create, list, and delete DatabasesYesYes, within a Pool
Describe one DatabaseNot availablePool-scoped row; no standalone page
Copy the RESP endpointNot availableDatabases tab
Delete a non-empty PoolRejectedRejected

Use the CLI for the common management path. Use the console when you need an aggregated regional view, diagnostics, point-in-time metrics, or the RESP endpoint. The HTTP API references document the lower-level surface, including Database Describe and the metrics scrape that the CLI does not expose.

Capacity Pool commands

Create a Capacity Pool

Create a Cluster (explicit) Pool by specifying the instance type, shard count, one fixed replica count, and availability-zone IDs:

momento preview pool create-pool \
--profile cache-preview \
--name orders-cluster \
--instance-type r7g.xlarge \
--shard-count 3 \
--replicas-per-shard 1 \
--zones use1-az1,use1-az2

Create a Flex (managed) Pool by specifying capacity and replication bounds:

momento preview pool create-pool \
--profile cache-preview \
--name orders-flex \
--capacity-gib 32..128 \
--replicas-per-shard 1..2 \
--zones use1-az1,use1-az2

--zones accepts one or more AZ IDs as separate values or a comma-delimited list. These are IDs such as use1-az1, not account-specific names such as us-east-1a. Create prints the Pool name, lifecycle status, and provisioning configuration.

Inspect and list Capacity Pools

Read one Pool's lifecycle status:

momento preview pool get-status \
--profile cache-preview \
--name orders-flex

List every Pool in the profile's selected region:

momento preview pool list-pools --profile cache-preview

get-status prints only the name and status. list-pools also prints provisioning and active diagnostics. The CLI does not aggregate regions; select another endpoint/profile to inspect another region.

Update a Capacity Pool

Every update supplies the Pool's existing implementation mode. The mode is not a request to convert the Pool.

Raise a Flex Pool's capacity ceiling:

momento preview pool update-pool \
--profile cache-preview \
--name orders-flex \
--mode managed \
--capacity-gib 32..256

Change the shard count and replicas for a Cluster Pool:

momento preview pool update-pool \
--profile cache-preview \
--name orders-cluster \
--mode explicit \
--shard-count 4 \
--replicas-per-shard 2

An update requires at least one changed field. You can also replace the zone set with --zones. Cluster-only fields are rejected with --mode managed; --capacity-gib is rejected with --mode explicit. See Manage Capacity Pools for scaling guards and diagnostics.

Delete a Capacity Pool

Delete every Database pinned to the Pool first, then run:

momento preview pool delete-pool \
--profile cache-preview \
--name orders-flex

The service rejects deletion while a Database remains. Accepted deletion is asynchronous and the Pool enters deleting before it is removed.

Database commands

Create a Database

The target Pool must be active:

momento preview database create-database \
--profile cache-preview \
--database-name orders \
--pool-name orders-flex

The CLI prints the Database name and backing Pool.

List Databases

momento preview database list-databases --profile cache-preview

The command lists the Database name and Pool for every Database in the selected region. The CLI does not provide a command to describe one Database.

Delete a Database

momento preview database delete-database \
--profile cache-preview \
--database-name orders

Deletion is synchronous in the control plane; underlying resource reclamation follows asynchronously.