PublishToTopic

class aws_cdk.aws_stepfunctions_tasks.PublishToTopic(topic, *, message, integration_pattern=None, message_per_subscription_type=None, subject=None)

Bases: object

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.

stability :stability: experimental

__init__(topic, *, message, integration_pattern=None, message_per_subscription_type=None, subject=None)
Parameters
  • topic (ITopic) –

  • props

  • message (TaskInput) – The text message to send to the topic.

  • integration_pattern (Optional[ServiceIntegrationPattern]) – The service integration pattern indicates different ways to call Publish to SNS. The valid value is either FIRE_AND_FORGET or WAIT_FOR_TASK_TOKEN. Default: FIRE_AND_FORGET

  • message_per_subscription_type (Optional[bool]) – If true, send a different message to every subscription type. If this is set to true, message must be a JSON object with a “default” key and a key for every subscription type (such as “sqs”, “email”, etc.) The values are strings representing the messages being sent to every subscription type.

  • subject (Optional[str]) – Message subject.

stability :stability: experimental

Return type

None

Methods

bind(_task)

Called when the task object is used in a workflow.

Parameters

_task (Task) –

stability :stability: experimental

Return type

StepFunctionsTaskConfig