Class QueueProcessingServiceBase

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:48.794Z") @Stability(Stable) public abstract class QueueProcessingServiceBase extends Construct
The base class for QueueProcessingEc2Service and QueueProcessingFargateService services.
  • Constructor Details

    • QueueProcessingServiceBase

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

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

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

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

    • configureAutoscalingForService

      @Stability(Stable) protected void configureAutoscalingForService(@NotNull BaseService service)
      Configure autoscaling based off of CPU utilization as well as the number of messages visible in the SQS queue.

      Parameters:
      service - the ECS/Fargate service for which to apply the autoscaling rules to. 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.
    • grantPermissionsToService

      @Stability(Stable) protected void grantPermissionsToService(@NotNull BaseService service)
      Grant SQS permissions to an ECS service.

      Parameters:
      service - the ECS/Fargate service to which to grant SQS permissions. This parameter is required.
    • getCluster

      @Stability(Stable) @NotNull public ICluster getCluster()
      The cluster where your service will be deployed.
    • getDesiredCount

      @Stability(Deprecated) @Deprecated @NotNull public Number getDesiredCount()
      Deprecated.
      • Use minCapacity instead.
      (deprecated) The minimum number of tasks to run.

    • getEnvironment

      @Stability(Stable) @NotNull public Map<String,String> getEnvironment()
      Environment variables that will include the queue name.
    • getMaxCapacity

      @Stability(Stable) @NotNull public Number getMaxCapacity()
      The maximum number of instances for autoscaling to scale up to.
    • getMinCapacity

      @Stability(Stable) @NotNull public Number getMinCapacity()
      The minimum number of instances for autoscaling to scale down to.
    • getScalingSteps

      @Stability(Stable) @NotNull public List<ScalingInterval> getScalingSteps()
      The scaling interval for autoscaling based off an SQS Queue size.
    • getSqsQueue

      @Stability(Stable) @NotNull public IQueue getSqsQueue()
      The SQS queue that the service will process from.
    • getDeadLetterQueue

      @Stability(Stable) @Nullable public IQueue getDeadLetterQueue()
      The dead letter queue for the primary SQS queue.
    • getLogDriver

      @Stability(Stable) @Nullable public LogDriver getLogDriver()
      The AwsLogDriver to use for logging if logging is enabled.
    • getSecrets

      @Stability(Stable) @Nullable public Map<String,Secret> getSecrets()
      The secret environment variables.