Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content
OmniKit is an internally built Amazon system for building APIs and ABIs that work across programming languages, process boundaries, and machines. In the Vega SDK, every interface described in the Vega Native API reference is declared in OmniKit IDL, a language-neutral interface definition language. The reference shows each method in IDL notation, so reading it means reading that notation. This topic explains the notation and what each type becomes in the C++ you compile against. For additional information on what OmniKit is and how your app resolves a component, see OmniKit.

How to read a method signature

Each method appears as a return type, a name, and a parameter list. This entry is from IMessagingModule:
It returns a handle to an IMessageFilterSubscription. The first parameter is an array of handles to IMessageFilter, the second a single handle to IMessageListener. Neither can be null, because both are spelled * rather than ?. Three suffixes carry most of the meaning: They compose: IMessageFilter*[] is an array of non-nullable interface handles, and MyStruct?[] an array of nullable struct pointers.

Primitive types

The set of primitives is closed. No more will be added, so new capability arrives as interfaces, structs, enums, and errors instead. These names are IDL keywords and can’t used as an identifier.

Strings

A string is always UTF-8 and always NUL-terminated. There’s no character type. A string parameter arrives as a read-only string view. A string you own is a separate type. A nullable string is spelled string?.

Interfaces

An interface is a collection of methods, and the primary unit of an OmniKit API. Interfaces work much as Java interfaces do.
An interface with no methods is legal, and occasionally useful as a marker.

Parameter directions

Each parameter has a direction. If none is written, it’s in.
An out or inout parameter must be a pointer or an array. void method(out i32 value) isn’t legal. The difference matters over IPC. For out, the callee sees an unspecified but valid value, so the initial content isn’t transferred. For inout, the initial content is preserved, and so copied to the callee.

Lifetime of parameter pointers

A pointer passed into an OmniKit method is valid only for the dynamic extent of that method. You can’t save it without taking ownership of what it points to.

Interface inheritance

Every interface except com.amazon.apmf.IStandard inherits from exactly one other interface. A derived interface includes all its base interface’s methods, and works anywhere the base works. Inheritance therefore forms a tree rooted at IStandard, so an IStandard* can refer to any interface.

Interface handles

An interface is never a value type. You use it through a handle, spelled IFoo* for non-nullable and IFoo? for nullable.

IStandard

IStandard is the root of the interface tree and declares exactly three methods: addRef, release, and tryQueryInterface. Interfaces are reference counted in native code. addRef adds a reference, release drops one, and an object’s resources are freed when its count reaches zero. In C++ you never call either. The smart pointers in the generated C++, which OmniKit calls the language projection, manage the count for you. In garbage-collected projections, IStandard has no addRef or release. The collector does that work instead.

QueryInterface

tryQueryInterface asks an object for a handle to another of its interfaces, given one you already hold. You don’t call it directly. The C++ projection wraps it in two type-safe forms on the smart pointer:
Each interface carries a hash computed over its methods, parameters, constants, and base interfaces. The call passes the hash the caller expects. If the object disagrees, the call fails, telling you the two sides were built against different versions of the same IDL file.

Structs

A struct is a value type with the same layout, alignment, and padding rules as a C struct written the same way.
sealed means the struct can’t change once published. Altering it changes the hash of every interface that uses it, directly or indirectly. A struct passed by value as an in parameter may contain only primitives, or fixed-size arrays of primitives. Anything richer must be passed by pointer.

Data objects

Because structs are sealed, OmniKit offers data objects for data that needs to grow. They’re declared with interface struct.
The IDL compiler interprets each data object as an accessor interface with the same package and name, inheriting IDataObject. The fields become methods.
A data object that extends another produces an accessor interface that extends the first one’s. GeographicLocation2 therefore carries latitude() and longitude() as well as altitude(). In the reference, a data object appears as an interface with one accessor per field, plus every accessor it inherits.

Enums

An enum is a sealed value type over a bounded set, with an integer base type. Every value is stated explicitly, and both names and values must be unique.
A base type must be an integer, so sealed enum MyEnum : string isn’t legal. Enums are sealed for the same reason structs are: a change alters the hash of every interface that uses them.

Data pointers

A pointer to any data type is spelled T* when non-nullable and T? when nullable. Data pointers are owning value types that behave like std::unique_ptr. There’s no shared pointer for data: interfaces have shared ownership, data has unique ownership, and aliasing is forbidden. Data therefore forms trees, while objects can form arbitrary graphs. Pointers can chain, so void myMethod(i32**** foo) is legal.

Arrays

Arrays are spelled T[] for any type T, including another array. IMyInterface*[], i8[][], and MyStruct?[] are all legal.

Fixed-length arrays

A fixed-length array has a single size and never heap-allocates. Its size in bytes is the element count times the element size.
That struct occupies 64 bytes. Fixed-length arrays are rare, intended for counts known for all time.

Errors

Every OmniKit method can fail. Failures are reported out of band, so no error parameter or return value appears in the IDL.

Error hierarchy

Error types have reverse-DNS names and are declared in IDL. Every type except com.amazon.apmf.BaseError inherits from exactly one other, so errors form a hierarchy:
All of those names are in com.amazon.apmf. Errors refine without limit, so code catching SecurityError also catches anything derived from it. Those are the core types. The com.amazon.apmf reference lists the full set, including NoSuchComponentError and NoSuchInterfaceError, which a failed component or interface lookup raises. Each error carries a type and a message. Only the type is contractual. The message and any other attachment is best-effort, meant for diagnostics.

Catching errors in C++

The C++ projection represents errors as exception classes that behave like any other C++ exception.
IError::getTypes() returns the type list from most specific to least. BaseError is omitted as redundant, so an error thrown as MySecurityError reports two entries:

Error translation

OmniKit translates language-level exceptions into OmniKit errors. A std::range_error becomes OutOfBoundsError, and anything unrecognized becomes ForeignError. Prefer throwing OmniKit errors directly over relying on translation.

IDL to C++ types

Generated types live in the apmf::iface:: namespace, followed by the package path. com.amazon.apmf.FileSystemError becomes apmf::iface::com::amazon::apmf::FileSystemError.

Build integration

Declare the packages you consume, and the build generates their C++ projection.
This produces a normal CMake library target called name. Link it into whatever target produces your binary, and set compiler flags and include paths on it as usual. Generated files land under ${CMAKE_CURRENT_BINARY_DIR}/_apmf_ during the build. There’s no separate tool to run, and nothing to check in. To build a library that can provide an in-process component, use kepler_add_library, which applies the defaults OmniKit requires.

IDL file discovery

One package maps to exactly one IDL file. Multiple IDL files claiming the same package are never merged. The build searches its include path and uses the first matching file it finds.

OmniKit types in public headers

If your library’s headers expose types generated from IDL, OmniKit becomes part of your library’s public interface. Consumers must then generate the same glue, with code generation options matching yours exactly. ABI stability is guaranteed at the OmniKit ABI layer, not for arbitrary C++ types.
Last modified on November 16, 2026