A function in Cognite Functions.

interface CogniteFunction {
    cpu?: number;
    createdTime: Date;
    description?: string;
    envVars?: Record<string, string>;
    error?: FunctionBuildError;
    externalId?: string;
    fileId: number;
    functionPath?: string;
    id: number;
    lastCalled?: Date;
    memory?: number;
    metadata?: Metadata;
    name: string;
    owner?: string;
    runtime?: FunctionRuntime;
    runtimeVersion?: string;
    secrets?: Record<string, string>;
    status: FunctionStatus;
}

Hierarchy (view full)

Properties

cpu?: number

Number of CPU cores per function.

createdTime: Date

The time the function was created in CDF.

description?: string

Description of the function.

envVars?: Record<string, string>

Environment variables for the function.

Error that occurred during function build.

externalId?: string

External ID of the function.

fileId: number

File ID of the function source code.

functionPath?: string

Relative path from the root folder to the file containing the handle function.

id: number

A server-generated ID for the function.

lastCalled?: Date

The last time the function was called. Not present if the function has never been called.

memory?: number

Memory per function measured in GB.

metadata?: Metadata

Custom metadata for the function.

name: string

Name of the function.

owner?: string

Owner of the function. Typically used to know who created it.

runtime?: FunctionRuntime

The runtime of the function.

runtimeVersion?: string

The complete specification of the function runtime with major, minor and patch version numbers.

secrets?: Record<string, string>

Secrets are returned scrambled if set.

Status of the function.