Skip to content
v2.275.0

UniversalTargetProps Struct ​

Properties for a Universal Target.

Example ​

ts
new Schedule(this, 'Schedule', {
  schedule: ScheduleExpression.cron({
    minute: '0',
    hour: '0',
  }),
  target: new targets.Universal({
    service: 'rds',
    action: 'stopDBCluster',
    input: ScheduleTargetInput.fromObject({
      DbClusterIdentifier: 'my-db',
    }),
  }),
});

Properties ​

actionstringactionstractionStringActionstringAction*stringrequired#
The API action to call. Must be camelCase.

You cannot use read-only API actions such as common GET operations.

deadLetterQueueoptionalIQueuedead_letter_queueoptionalIQueuedeadLetterQueueoptionalIQueueDeadLetterQueueoptionalIQueueDeadLetterQueueoptionalIQueue#
The SQS queue to be used as deadLetterQueue.

Default: no dead-letter queue

notes

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.

inputoptionalScheduleTargetInputinputoptionalScheduleTargetInputinputoptionalScheduleTargetInputInputoptionalScheduleTargetInputInputoptionalScheduleTargetInput#
Input passed to the target.

Default: no input.

maxEventAgeoptionalDurationmax_event_ageoptionalDurationmaxEventAgeoptionalDurationMaxEventAgeoptionalDurationMaxEventAgeoptionalDuration= Duration.hours(24)#
The maximum age of a request that Scheduler sends to a target for processing.

Minimum value of 60. Maximum value of 86400.

policyStatementsoptionalPolicyStatement[]policy_statementsoptionaltyping.List[PolicyStatement]policyStatementsoptionalList<PolicyStatement>PolicyStatementsoptionalPolicyStatement[]PolicyStatementsoptional*[]PolicyStatement#
The IAM policy statements needed to invoke the target. These statements are attached to the Scheduler's role.

Default: Policy with service:action action only.

Note that the default may not be the correct actions as not all AWS services follows the same IAM action pattern, or there may be more actions needed to invoke the target.

retryAttemptsoptionalnumberretry_attemptsoptionalint | floatretryAttemptsoptionalNumberRetryAttemptsoptionaldoubleRetryAttemptsoptional*float64= 185#
The maximum number of times to retry when the target returns an error.

Minimum value of 0. Maximum value of 185.

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

Default: created by target

notes

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.

servicestringservicestrserviceStringServicestringService*stringrequired#
The AWS service to call.

This must be in lowercase.