Step 1: Creating a Plugin

Plugin Configuration as Code Resource

A Plugin is a resource that contains at least one Function. Plugins are configured using Configuration as Code. In order to create a new Plugin, you’ll need to add a new Plugin Configuration as Code resource. The schema reference of the resource can be found here .

A Plugin is a multi-file resource, so there are at least 2 resource files that need to be defined. The first is a _resource.json file that consists of the following properties:

Property Description
$id* The Configuration as Code ID of the Plugin.
$schema* The JSON schema of the resource configuration (accessed via URL).
globals The values to set on the global object for plugin invocations. For example, an API key.
memoryLimitMB The memory limit for the Plugin, in megabytes.
concurrency A hint to suggest the number of worker instances to create, between 1 and 50.

*indicates a required field.

In addition to the _resource.json file, a mod.ts file should be defined in the same directory. The mod.ts is where your Functions are defined in Typescript. Each mod.ts file can contain many Functions.

Feedback