Interface ScheduledEc2TaskProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, ScheduledTaskBaseProps
All Known Implementing Classes:
ScheduledEc2TaskProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:48.804Z") @Stability(Stable) public interface ScheduledEc2TaskProps extends software.amazon.jsii.JsiiSerializable, ScheduledTaskBaseProps
The properties for the ScheduledEc2Task task.

Example:

 // Instantiate an Amazon EC2 Task to run at a scheduled interval
 Cluster cluster;
 ScheduledEc2Task ecsScheduledTask = ScheduledEc2Task.Builder.create(this, "ScheduledTask")
         .cluster(cluster)
         .scheduledEc2TaskImageOptions(ScheduledEc2TaskImageOptions.builder()
                 .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
                 .memoryLimitMiB(256)
                 .environment(Map.of("name", "TRIGGER", "value", "CloudWatch Events"))
                 .build())
         .schedule(Schedule.expression("rate(1 minute)"))
         .enabled(true)
         .ruleName("sample-scheduled-task-rule")
         .build();
 
  • Method Details

    • getScheduledEc2TaskDefinitionOptions

      @Stability(Stable) @Nullable default ScheduledEc2TaskDefinitionOptions getScheduledEc2TaskDefinitionOptions()
      The properties to define if using an existing TaskDefinition in this construct.

      ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.

      Default: none

    • getScheduledEc2TaskImageOptions

      @Stability(Stable) @Nullable default ScheduledEc2TaskImageOptions getScheduledEc2TaskImageOptions()
      The properties to define if the construct is to create a TaskDefinition.

      ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.

      Default: none

    • builder

      @Stability(Stable) static ScheduledEc2TaskProps.Builder builder()
      Returns:
      a ScheduledEc2TaskProps.Builder of ScheduledEc2TaskProps