Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async delete(item) {
switch (item.rule.type) {
case 'scheduled': {
const name = `${process.env.stackName}-custom-${item.name}`;
await Events.deleteTarget(this.targetId, name);
await Events.deleteEvent(name);
break;
}
case 'kinesis': {
await this.deleteKinesisEventSources(item);
break;
}
case 'sns': {
if (item.state === 'ENABLED') {
await this.deleteSnsTrigger(item);
}
break;
}
case 'sqs':
default:
break;