GCP plug-in structure
In this topic you can find information about configuring GCP event sources and GCP event conditions.
Configuring a GCP event source
A PubSub event source that receives GCP event types can be configured in the
following way:
- projectId
-
- Type: string
- minlength: 1
- maxlength: 1000
- Required
- serviceFile
-
- Type: string
- minlength: 1
- maxlength: 1000
- Required*
Note: If the serviceFile value is
not specified, it is taken from the local environment configuration. If it is
not configured in the local environment, it needs to be specified.
- privateKey
-
- Type: string
- minlength: 1
- maxlength: 2000
- clientEmail
-
- Type: string
- minlength: 1
- maxlength: 1000
- subscriptionId
-
- Type: string
- minlength: 1
- maxlength: 1000
- Required
Example
The following is an example of a generic type event source configured to receive GCP
event types:
$eventsource
EVENT_SOURCE /GCP1
DESCRIPTION "GCP testing"
PLUGIN GCPEvents
TYPE PubSub
CONFIGURATION {
"projectId": "projectIdvalue",
"serviceFile": "/home/username/Documents/Project/example.txt",
"subscriptionId": "subscriptionIdvalue",
}
ENDGCP event condition
GCPEvent type event conditions can be configured in workflows specifying
the following required properties:
- NameRestriction: If you want to start the event condition name with the prefix "in", ensure that the name is enclosed within double quotes.
- Type
- Event source
Note: When defining event conditions, all the relative
fields are case insensitive
You can also specify any number of
properties that filter the events received from the event source:- Message
- Type: string
- Operator:
EQ("=")orNE("!=") - minlength: 1
- maxlength: 1000
- Wildcard allowed: true
- Multiple filters: false
- Single predicate: true
- Case sensitive: false
- Attributes
- Type: map
- Operator:
KEY_VALUE("keyvalue") - minlength: 1
- maxlength: 1000
- Wildcard allowed: true
- Multiple filters: false
- Single predicate: false
- Case sensitive: false
- messageId
- Filtering allowed
- timestamp
- Filtering allowed
- orderingKey
- Type: string
- Operator:
EQ("=")orNE("!=") - minlength: 1
- maxlength: 1000
- Wildcard allowed: true
- Multiple filters: false
- Single predicate: true
- Case sensitive: false
Example
The following is an example of a workflow with two
GCP event conditions:
$jobstream
WORKFLOW /WS_AGT_1#/WF_EVT_TRIGGER_GCP
DESCRIPTION "Event driven workflow"
TRIGGER TRIGGER_GCP DESCRIPTION "Sample event trigger" TIMEOUT PT1M CORRELATIONS message CONDITIONS
NAME EC TYPE "GCPEvents/PubSubEvent" SOURCE /GCP1 FILTERS message = message
NAME EC_ATTR TYPE "GCPEvents/PubSubEvent" SOURCE /GCP1 FILTERS attributes keyvalue {attributeKey,attributeValue}
ENDTRIGGER
:
END