Semaphore Configuration
The unified upsert
method is used to update the semaphore configuration. When passed data with an id
property,
it will update or create a semaphore with this id. Otherwise a semaphore with a new id will be created.
The semaphore configuration object describes and sets the settings and is effective immediately for all events processed after an update.
Note that the options are equivalent to the individual semaphore settings in the semaphore settings section of the console.
Semaphore Configuration Object Details
Property | Description | Type | Possible Values |
---|---|---|---|
id | The ID of the semaphore. | string | |
title | A descriptive title for the semaphore. | string | |
isActive | Enables or disables processing. | boolean | |
maxValue | The maximum value the semaphore can reach. | number | |
maxValueScope | Maximum value scope. | enum | - 'channel': Each channel can reach the maxValue individually. |
- 'total': The maxValue is applicable across all channels. | |||
owner | The owner of the semaphore (read-only). | string | |
created | The creation time of the semaphore (read-only). | string | |
updated | The update time of the semaphore (read-only). | string | |
callback | HTTP Callback configuration. | object | |
callback.protocol | The request protocol for the callback endpoint. | string | |
callback.address | The URL address of the callback endpoint. | string | |
callback.isActive | Enables or disables the HTTP callback. | boolean | |
callback.method | The HTTP method to use for the callback endpoint. | string | |
callback.onDeliveryError | Defines the behavior in case of delivery error. | enum | - 'suspendProcessing': Stop processing while keeping ingress on. |
- 'drop': Drop the message and continue processing. | |||
websockets | Websockets options. | object | |
websockets.isActive | Enables or disables websockets usage. | boolean | |
websockets.allowContinuedSessions | Allows websockets clients to restore session in case of reconnect. | boolean | |
websockets.onClientDropped | Defines the behavior in case the client connection is dropped. | enum | - 'redriveToHttps': Redrive the message to the HTTP callback. |
- 'drop': Drop the message. | |||
- 'suspendProcessing': Stop processing. | |||
mapping | Mapping options. | object | |
mapping.isActive | Enables or disables mapping. | boolean | |
mapping.maxExecutionTime | Maximum execution time for the mapping callback handler in seconds. | number | |
mapping.canOverrideRouting | Enables or disables the ability of the callback handler to return alternative routing options. | boolean | |
mapping.handler | The mapping handler code. | string | |
mapping.language | The mapping language. | string | |
mapping.inputData | Sample input data for the mapping. | string |
Sample Semaphore Configuration
Loading...