Class ScheduledTaskBase

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.ecs.patterns.ScheduledTaskBase
All Implemented Interfaces:
software.amazon.awscdk.core.IConstruct, software.amazon.awscdk.core.IDependable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct
Direct Known Subclasses:
ScheduledEc2Task, ScheduledFargateTask

@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-31T18:44:20.496Z") @Stability(Stable) public abstract class ScheduledTaskBase extends software.amazon.awscdk.core.Construct
The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.constructs.Construct

    software.constructs.Construct.Builder

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct

    software.amazon.awscdk.core.IConstruct.Jsii$Default

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ScheduledTaskBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ScheduledTaskBase(software.amazon.jsii.JsiiObjectRef objRef)
     
    protected
    ScheduledTaskBase(software.constructs.Construct scope, String id, ScheduledTaskBaseProps props)
    Constructs a new instance of the ScheduledTaskBase class.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addTaskAsTarget(EcsTask ecsTaskTarget)
    Adds task as a target of the scheduled event rule.
    protected EcsTask
    Create an ECS task using the task definition provided and add it to the scheduled event rule.
    protected AwsLogDriver
    Create an AWS Log Driver with the provided streamPrefix.
    The name of the cluster that hosts the service.
    protected Cluster
    getDefaultCluster(software.amazon.awscdk.core.Construct scope)
    Returns the default cluster.
    protected Cluster
    getDefaultCluster(software.amazon.awscdk.core.Construct scope, IVpc vpc)
    Returns the default cluster.
    The desired number of instantiations of the task definition to keep running on the service.
    The CloudWatch Events rule for the service.
    In what subnets to place the task's ENIs.

    Methods inherited from class software.amazon.awscdk.core.Construct

    getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate

    Methods inherited from class software.constructs.Construct

    toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • ScheduledTaskBase

      protected ScheduledTaskBase(software.amazon.jsii.JsiiObjectRef objRef)
    • ScheduledTaskBase

      protected ScheduledTaskBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ScheduledTaskBase

      @Stability(Stable) protected ScheduledTaskBase(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ScheduledTaskBaseProps props)
      Constructs a new instance of the ScheduledTaskBase class.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • addTaskAsTarget

      @Stability(Stable) protected void addTaskAsTarget(@NotNull EcsTask ecsTaskTarget)
      Adds task as a target of the scheduled event rule.

      Parameters:
      ecsTaskTarget - the EcsTask to add to the event rule. This parameter is required.
    • addTaskDefinitionToEventTarget

      @Stability(Stable) @NotNull protected EcsTask addTaskDefinitionToEventTarget(@NotNull TaskDefinition taskDefinition)
      Create an ECS task using the task definition provided and add it to the scheduled event rule.

      Parameters:
      taskDefinition - the TaskDefinition to add to the event rule. This parameter is required.
    • createAWSLogDriver

      @Stability(Stable) @NotNull protected AwsLogDriver createAWSLogDriver(@NotNull String prefix)
      Create an AWS Log Driver with the provided streamPrefix.

      Parameters:
      prefix - the Cloudwatch logging prefix. This parameter is required.
    • getDefaultCluster

      @Stability(Stable) @NotNull protected Cluster getDefaultCluster(@NotNull software.amazon.awscdk.core.Construct scope, @Nullable IVpc vpc)
      Returns the default cluster.

      Parameters:
      scope - This parameter is required.
      vpc -
    • getDefaultCluster

      @Stability(Stable) @NotNull protected Cluster getDefaultCluster(@NotNull software.amazon.awscdk.core.Construct scope)
      Returns the default cluster.

      Parameters:
      scope - This parameter is required.
    • getCluster

      @Stability(Stable) @NotNull public ICluster getCluster()
      The name of the cluster that hosts the service.
    • getDesiredTaskCount

      @Stability(Stable) @NotNull public Number getDesiredTaskCount()
      The desired number of instantiations of the task definition to keep running on the service.

      The minimum value is 1

    • getEventRule

      @Stability(Stable) @NotNull public Rule getEventRule()
      The CloudWatch Events rule for the service.
    • getSubnetSelection

      @Stability(Stable) @NotNull public SubnetSelection getSubnetSelection()
      In what subnets to place the task's ENIs.

      (Only applicable in case the TaskDefinition is configured for AwsVpc networking)

      Default: Private subnets