How to deactivate AWS Glue trigger using CDK?

0

I have created a glue trigger using cdk. My question is how can I deactivate this trigger using CDK. Here is my code -

const myTrigger = new CfnTrigger(this,`my-trigger-dev`, {
            name: `trigger_name`,
            schedule: "cron(0 16 * * ? *)",
            type: "SCHEDULED",
            startOnCreation: (props.scheduler === true) ? true : false,
            actions: [
            {
                jobName: `My-Test-Job`
            }
            ],
            workflowName: 'MyTestWorkflow,
        })

Please help me with your valuable feedback. Thank you.

1 個回答
0

Hello.

"startOnCreation" is a setting to automatically start when creating a trigger.
Changing this setting to "false" for an existing trigger will not disable the trigger.

So, how about stopping it from the AWS CLI or management console?
https://docs.aws.amazon.com/glue/latest/dg/activate-triggers.html

profile picture
專家
已回答 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南