SqsSendMessageProps

class aws_cdk.aws_scheduler_targets_alpha.SqsSendMessageProps(*, dead_letter_queue=None, input=None, max_event_age=None, retry_attempts=None, role=None, message_group_id=None)

Bases: ScheduleTargetBaseProps

(experimental) Properties for a SQS Queue Target.

Parameters:
  • dead_letter_queue (Optional[IQueue]) – (experimental) The SQS queue to be used as deadLetterQueue. The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. Default: - no dead-letter queue

  • input (Optional[ScheduleTargetInput]) – (experimental) Input passed to the target. Default: - no input.

  • max_event_age (Optional[Duration]) – (experimental) The maximum age of a request that Scheduler sends to a target for processing. Minimum value of 60. Maximum value of 86400. Default: Duration.hours(24)

  • retry_attempts (Union[int, float, None]) – (experimental) The maximum number of times to retry when the target returns an error. Minimum value of 0. Maximum value of 185. Default: 185

  • role (Optional[IRole]) – (experimental) An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf. If none provided templates target will automatically create an IAM role with all the minimum necessary permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets will grant minimal required permissions. Universal target automatically create an IAM role if you do not specify your own IAM role. However, in comparison with templated targets, for universal targets you must grant the required IAM permissions yourself. Default: - created by target

  • message_group_id (Optional[str]) – (experimental) The FIFO message group ID to use as the target. This must be specified when the target is a FIFO queue. If you specify a FIFO queue as a target, the queue must have content-based deduplication enabled. A length of messageGroupId must be between 1 and 128. Default: - no message group ID

Stability:

experimental

ExampleMetadata:

infused

Example:

payload = "test"
message_group_id = "id"
queue = sqs.Queue(self, "MyQueue",
    fifo=True,
    content_based_deduplication=True
)

target = targets.SqsSendMessage(queue,
    input=ScheduleTargetInput.from_text(payload),
    message_group_id=message_group_id
)

Schedule(self, "Schedule",
    schedule=ScheduleExpression.rate(Duration.minutes(1)),
    target=target
)

Attributes

dead_letter_queue

(experimental) The SQS queue to be used as deadLetterQueue.

The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.

Default:
  • no dead-letter queue

Stability:

experimental

input

(experimental) Input passed to the target.

Default:
  • no input.

Stability:

experimental

max_event_age

(experimental) The maximum age of a request that Scheduler sends to a target for processing.

Minimum value of 60. Maximum value of 86400.

Default:

Duration.hours(24)

Stability:

experimental

message_group_id

(experimental) The FIFO message group ID to use as the target.

This must be specified when the target is a FIFO queue. If you specify a FIFO queue as a target, the queue must have content-based deduplication enabled.

A length of messageGroupId must be between 1 and 128.

Default:
  • no message group ID

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-sqsparameters.html#cfn-scheduler-schedule-sqsparameters-messagegroupid

Stability:

experimental

retry_attempts

(experimental) The maximum number of times to retry when the target returns an error.

Minimum value of 0. Maximum value of 185.

Default:

185

Stability:

experimental

role

(experimental) An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.

If none provided templates target will automatically create an IAM role with all the minimum necessary permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets will grant minimal required permissions.

Universal target automatically create an IAM role if you do not specify your own IAM role. However, in comparison with templated targets, for universal targets you must grant the required IAM permissions yourself.

Default:
  • created by target

Stability:

experimental