Class ScheduledTaskBase

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:14.826Z") @Stability(Stable) public abstract class ScheduledTaskBase extends software.constructs.Construct
The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
  • Nested Class Summary

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

    software.amazon.jsii.JsiiObject.InitializationMode

    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.constructs.Construct scope)
    Returns the default cluster.
    protected Cluster
    getDefaultCluster(software.constructs.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.
    Specifies whether to propagate the tags from the task definition to the task.
    In what subnets to place the task's ENIs.
    The metadata that you apply to the task to help you categorize and organize them.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, 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.constructs.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.constructs.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

    • getPropagateTags

      @Stability(Stable) @Nullable public PropagatedTagSource getPropagateTags()
      Specifies whether to propagate the tags from the task definition to the task.

      If no value is specified, the tags are not propagated.

      Default: - Tags will not be propagated

    • getTags

      @Stability(Stable) @Nullable public List<Tag> getTags()
      The metadata that you apply to the task to help you categorize and organize them.

      Each tag consists of a key and an optional value, both of which you define.

      Default: - No tags are applied to the task