1回答
- 新しい順
- 投票が多い順
- コメントが多い順
0
Hi there,
As of now the support of EventBatchingCondition property on a trigger is not yet available in CloudFormation, thus CfnTrigger
construct does not have such capability neither. You can track this open Github issue for latest update on this feature request. As of now, one workaround can be to use the CDK custom resource AwsCustomResource
construct to invoke UpdateTrigger
API to add EventBatchingCondition, once the trigger was created.
関連するコンテンツ
- AWS公式更新しました 1年前
Thank you for your answer! could you please share with me an example of how can I use AwsCustomResource to UpdateTrigger and add EventBatchingCondition ?
Hey there, I don't have any specific example for UpdateTrigger, the you can find some examples here that show the same idea to make API calls in custom resource.
Unfortunately, since UpdateTrigger requires you to provide an entirely hydrated TriggerUpdate object (see https://docs.aws.amazon.com/glue/latest/webapi/API_TriggerUpdate.html) which "updates the previous trigger definition by overwriting it completely", you would need some way to invoke GetTrigger first, and get its entire response that you could then modify to include your EventBatchingCondition definition. Unfortunately, if you try to do this with an AwsCustomResource in CDK, there's no good way to get the entire response, as getResponseField only returns a single field from the response, not an entire object.