AWS SQS plug-in structure
In this topic you can find information about configuring AWS SQS event sources and AWS SQS event conditions.
Configuring a AWS SQS event source
An event source that receives AWS SQS event type can be configured in the following
way:
- AccessKeyID
-
- Type: string
- Required*
- minlength: 1
- maxlength: 1000
- Secret
-
- Type: string
- Required*
- minlength: 1
- maxlength: 1000
- isPassword
- roleArn
-
- Type: string
- Required*
- minlength: 1
- maxlength: 1000
- roleSessionName
-
- Type: string
- Required*
- minlength: 1
- maxlength: 1000
Note: You do not need to specify the
accessKeyID, secret,
roleArn and roleSessionName values
if the event manager container or pod is configured with an AWS command
line interface, or if HCL Universal Orchestrator is
running on an Amazon EKS
cluster.
- Region
-
- Type: string
- minlength: 1
- maxlength: 1000
- Default: if the region is not specified, the default value is taken from what is configured in the local environment. If no region is configured in the local environment, the default region is us-east-1
- QueueURL
-
- Type: string
- Required
- minlength: 1
- maxlength: 1000
- maxMessages
-
- Type: nonnegativeinteger
- minlength: 1
- maxlength: 1000
- Default: if no value is specified, the maximum amount of messages that can be received is 10
- pollInterval
-
- Type: nonnegativeinteger
- minlength: 1
- maxlength: 1000
- Default: if no value is specified, the interval between message polling instances is 1 second
Example
The following is an example of a generic type event source configured to receive AWS
SQS event type:
$eventsource
EVENT_SOURCE /AWSEvents1
DESCRIPTION "AWSEvents testing"
PLUGIN AWSEvents
TYPE SQS
CONFIGURATION {
"accessKeyID": "accessKeyIDvalue",
"secret": "secretvalue",
"queueURL": "queueURLvalue",
"maxMessages": "1000",
"pollinMS": "30"
}
ENDAWS SQS event condition
AWS SQS 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
- Message attributes
- Type: map
- Operator:
KEY_VALUE("keyvalue") - minlength: 1
- maxlength: 1000
- Wildcard allowed: true
- Multiple filters: false
- Single predicate: false
- Case sensitive: false
- Message ID
- Filtering allowed
Example
The following is an example of a workflow with two
AWS SQS event conditions:
$jobstream
WORKFLOW /WS_AGT_1#/WF_EVT_TRIGGER_AWS
TRIGGER TRIGGER_AWS DESCRIPTION "Sample event trigger AWS" TIMEOUT PT3M CONDITIONS
NAME EC TYPE "AWSEvents/SqsEvent" SOURCE /AWS1 FILTERS messageAttributes keyvalue {keyAttr,valAttr}
NAME EC_2 TYPE "AWSEvents/SqsEvent" SOURCE /AWS1 FILTERS message = "test message"
ENDTRIGGER
:
END