CodePipeline CDK: What class implements INotificationRuleTarget?

0

We are trying to establish a pipeline notification rule to SNS topic to Microsoft Teams channel (via Lambda function). This has already been accomplished multiple times with manual configuration, but now we want to implement it with automation with CDK.

https://docs.aws.amazon.com/cdk/api/v1/dotnet/api/Amazon.CDK.AWS.CodePipeline.Pipeline.html#Amazon_CDK_AWS_CodePipeline_Pipeline_NotifyOnExecutionStateChange_System_String_Amazon_CDK_AWS_CodeStarNotifications_INotificationRuleTarget_Amazon_CDK_AWS_CodeStarNotifications_INotificationRuleOptions_

The NotifyOnExecutionStateChange() wants an INotificationRuleTarget, but I cannot find anything that implements that interface.

https://docs.aws.amazon.com/cdk/api/v1/dotnet/api/Amazon.CDK.AWS.CodeStarNotifications.html

The CodeStarNotifications library does not appear to have a corresponding class to that interface.

What's the class to use?

icelava
demandé il y a 2 ans433 vues
1 réponse
0
Réponse acceptée

It is the SNS.Topic class itself that implements INotificationRuleTarget.

https://docs.aws.amazon.com/cdk/api/v2/dotnet/api/Amazon.CDK.AWS.SNS.Topic.html

icelava
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions