?
InfraResource
TypeOne dedicated retrieval resource: its phase, the sources on it, its footprint and memory, and its billing.
One dedicated retrieval resource. phase tracks where it is in its lifecycle, offering is the size it runs at, and attachedSources is how many corpora sit on it (destroy is refused while any do). footprint and memory are what it holds against what the size allows; billing is the hours and dollars actually charged. A transition fills progress.
InfraResource.ts
interface InfraResource { id: string name: string kind: 'retrieval' offering: InfraOffering | null phase: InfraPhase attachedSources: number health: InfraHealth | null footprint: { chunks: number; estimatedDiskBytes: number; usableDiskBytes: number } | null memory: { residentBytes: number; limitBytes: number } | null billing: { activeHours: number; hibernatedHours: number; billedDollars: number } progress: OperationProgress | null }
Fields
phase
InfraPhase
Where the resource is in its lifecycle.
offering
InfraOffering | null
The size it runs at.
attachedSources
number
Corpora placed on it. Destroy is refused while this is above zero.
footprint
object | null
What the sources take against what the size can hold.
billing
object
Hours and dollars actually charged, from the ledger.
progress
OperationProgress | null
A live readout while a transition is under way; null when it is simply serving.
Check a resource
const { resource } = await admin.infra.get({ id }); console.log(resource.phase, resource.attachedSources, resource.billing.billedDollars);