This is documentation for the next version of K6. For the latest stable release, go to the latest version.
putEvents
EventBridgeClient.putEvents
sends custom events to Amazon EventBridge so that they can be matched to rules.
Parameters
PutEventsInput
EventBridgeEntry
Returns
Example
import {
AWSConfig,
EventBridgeClient,
} from 'https://jslib.k6.io/aws/0.12.3/event-bridge.js';
const awsConfig = new AWSConfig({
region: __ENV.AWS_REGION,
accessKeyId: __ENV.AWS_ACCESS_KEY_ID,
secretAccessKey: __ENV.AWS_SECRET_ACCESS_KEY,
sessionToken: __ENV.AWS_SESSION_TOKEN,
});
const eventBridge = new EventBridgeClient(awsConfig);
const eventEntry = {
Source: 'my.source',
Detail: {
key: 'value',
},
DetailType: 'MyDetailType',
Resources: ['resource-arn'],
};
export default async function () {
await eventBridge.putEvents({
Entries: [eventEntry],
});
}