AwsEventbridgeScheduler

Creates an AWS EventBridge Scheduler schedule.

Remarks

This component wraps aws.scheduler.Schedule and applies deterministic naming. The Pulumi resource name is derived from the project hash and stack name combined with the sanitised logical name. The AWS provider resource name is built explicitly from args.name through the naming-style prefix pattern.

Supported schedule expression types: rate(...), cron(...), and at(...). See the EventBridge Scheduler schedule types guide for full syntax details.

Naming:

  • Root type ${namespace}:aws:AwsEventbridgeScheduler has capability eventbridge-scheduler and SHARED identity args.name; target ${env}-${projectHash}-eventbridge-scheduler-${sanitiseNamePart(args.name)}.
  • Child aws:scheduler/schedule:Schedule has tuple [args.name], yielding ${env}-${projectHash}-${sanitiseNamePart(args.name)}.
  • Provider name uses args.name with stackAndPurpose, limited to 51 characters for AWS's 64-character limit.

Example

CODE
const schedule = new AwsEventbridgeScheduler({
  name: 'hourlySync',
  scheduleExpression: 'rate(1 hours)',
  flexibleTimeWindow: { mode: 'OFF' },
  target: {
    arn: myQueue.arn,
    roleArn: 'eventbridge-scheduler-role-name',
  },
  description: 'Triggers hourly data sync',
});

export const scheduleArn = schedule.arn;

Constructors

new AwsEventbridgeScheduler( args: AwsEventbridgeSchedulerArgs, options?: ComponentResourceOptions, ): AwsEventbridgeScheduler

Parameters

  • args (AwsEventbridgeSchedulerArgs) — Component inputs; args.name is the shared provider-purpose and logical-root identity.
  • options (ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsEventbridgeScheduler

Hierarchy

  • ComponentResource
  • AwsEventbridgeScheduler

Properties

arn: Output<string>

readonly

The ARN of the schedule.

schedule: Schedule

readonly

The underlying AWS EventBridge Scheduler schedule resource.

urn: Output<string>

readonly

Inherited from urn

The stable logical URN used to distinctly address a resource, both before and after deployments.

Methods

getData(): Promise<any>

protectedasync

Inherited from getData

Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.

Returns

  • Promise<any>

getProvider(moduleMember: string): ProviderResource | undefined

Inherited from getProvider

Returns the provider for the given module member, if one exists.

Parameters

  • moduleMember (string)

Returns

  • ProviderResource | undefined

initialize( args: Inputs, opts?: ComponentResourceOptions, name?: string, type?: string, ): Promise<any>

protectedasync

Inherited from initialize

Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.

Parameters

  • args (Inputs)
  • opts (ComponentResourceOptions, optional)
  • name (string, optional)
  • type (string, optional)

Returns

  • Promise<any>

registerOutputs( outputs?: Inputs | Promise<Inputs> | Output<Inputs>, ): void

protected

Inherited from registerOutputs

Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

Parameters

  • outputs (Inputs | Promise<Inputs> | Output<Inputs>, optional)

Returns

  • void

Static Methods

isInstance(obj: any): obj is ComponentResource<any>

static

Inherited from isInstance

Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

Parameters

  • obj (any)

Returns

  • obj is ComponentResource<any>