Get-ZrItems
Reads multiple items from the connected Zaris store in a single bulk round trip, emitting one result object per key. Missing keys are reported as Exists = false rather than errors.
Syntax
Get-ZrItems [-Keys] <string[]>
[-ConnectionString <string>] [-StoreName <string>] [-Endpoints <string[]>] [-TimeoutSec <int>]
Description
Get-ZrItems fetches the values for a set of keys in one request and writes one object per key, each carrying the value, revision, version, and remaining TTL. It requires an active connection opened with Connect-ZrStore, or the independent -StoreName/-Endpoints parameters for a one-shot connection.
Keys may be piped in. Missing keys yield Exists = false with Success = true. A transport failure raises a terminating error. Press Ctrl+C to cancel safely.
Each returned object has StoreName, Key, Exists, Value, Revision, Version, TtlSec, Success, and Error.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-Keys | String[] | Yes | The keys identifying the items to read. Position 0. Accepts pipeline input (ValueFromPipeline and ValueFromPipelineByPropertyName). Must be non-null and non-empty. |
-ConnectionString | String | No | Connect via a Zaris connection string, e.g. zaris://host:7861/store; an alternative to -StoreName + -Endpoints for a one-shot connection. Ignored when a Connect-ZrStore session is active. |
-StoreName | String | No | Store to operate on for a one-shot (independent) connection instead of the active session. Requires -Endpoints; ignored when a Connect-ZrStore session is active. |
-Endpoints | String[] | No | One or more host:port endpoints for a one-shot connection. Ignored when a session is active. |
-TimeoutSec | Int32 | No | Connection timeout in seconds for a one-shot connection. Range 1–120. Default 5. |
Examples
Read three items in a single bulk request:
Get-ZrItems -Keys "user:1","user:2","user:3"
Pipe keys into the cmdlet:
"order:1001","order:1002","order:1003" | Get-ZrItems
Read keys held in a variable:
$keys = @("user:1","user:2","user:3")
Get-ZrItems -Keys $keys