class PublishToTopic
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.Tasks.PublishToTopic |
Java | software.amazon.awscdk.services.stepfunctions.tasks.PublishToTopic |
Python | aws_cdk.aws_stepfunctions_tasks.PublishToTopic |
TypeScript (source) | @aws-cdk/aws-stepfunctions-tasks » PublishToTopic |
⚠️ Deprecated: Use SnsPublish
Implements
IStep
A Step Functions Task to publish messages to SNS topic.
A Function can be used directly as a Resource, but this class mirrors integration with other AWS services via a specific class instance.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sns from '@aws-cdk/aws-sns';
import * as stepfunctions from '@aws-cdk/aws-stepfunctions';
import * as stepfunctions_tasks from '@aws-cdk/aws-stepfunctions-tasks';
declare const taskInput: stepfunctions.TaskInput;
declare const topic: sns.Topic;
const publishToTopic = new stepfunctions_tasks.PublishToTopic(topic, {
message: taskInput,
// the properties below are optional
integrationPattern: stepfunctions.ServiceIntegrationPattern.FIRE_AND_FORGET,
messagePerSubscriptionType: false,
subject: 'subject',
});
Initializer
new PublishToTopic(topic: ITopic, props: PublishToTopicProps)
⚠️ Deprecated: Use SnsPublish
Parameters
- topic
ITopic
- props
Publish
To Topic Props
Methods
Name | Description |
---|---|
bind(_task) | Called when the task object is used in a workflow. |
bind(_task)
public bind(_task: Task): StepFunctionsTaskConfig
⚠️ Deprecated: Use SnsPublish
Parameters
- _task
Task
Returns
Called when the task object is used in a workflow.