Skip to content

ListSchemaVersions

Source: src/AWS/Schemas/ListSchemaVersions.ts

Runtime binding for schemas:ListSchemaVersions.

Lists the published versions of the bound Schema so a function can enumerate the history of an event contract (e.g. to detect that a new version was published, or to pin consumers to a version range). The registry and schema names are injected from the binding. Provide the implementation with Effect.provide(AWS.Schemas.ListSchemaVersionsHttp).

// init — bind the operation to the schema
const listSchemaVersions = yield* AWS.Schemas.ListSchemaVersions(schema);
// runtime
const { SchemaVersions } = yield* listSchemaVersions();
const versions = (SchemaVersions ?? []).map((v) => v.SchemaVersion);