Class QueueProcessingServiceBase
The base class for QueueProcessingEc2Service and QueueProcessingFargateService services.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.AWS.ECS.Patterns.dll
Syntax (csharp)
public abstract class QueueProcessingServiceBase : Construct, IConstruct, IDependable
Syntax (vb)
Public MustInherit Class QueueProcessingServiceBase
Inherits Construct
Implements IConstruct, IDependable
Synopsis
Constructors
QueueProcessingServiceBase(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
QueueProcessingServiceBase(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
QueueProcessingServiceBase(Construct, String, IQueueProcessingServiceBaseProps) | Constructs a new instance of the QueueProcessingServiceBase class. |
Properties
Cluster | The cluster where your service will be deployed. |
DeadLetterQueue | The dead letter queue for the primary SQS queue. |
DesiredCount | (deprecated) The minimum number of tasks to run. |
Environment | Environment variables that will include the queue name. |
LogDriver | The AwsLogDriver to use for logging if logging is enabled. |
MaxCapacity | The maximum number of instances for autoscaling to scale up to. |
MinCapacity | The minimum number of instances for autoscaling to scale down to. |
ScalingSteps | The scaling interval for autoscaling based off an SQS Queue size. |
Secrets | The secret environment variables. |
SqsQueue | The SQS queue that the service will process from. |
Methods
ConfigureAutoscalingForService(BaseService) | Configure autoscaling based off of CPU utilization as well as the number of messages visible in the SQS queue. |
GetDefaultCluster(Construct, IVpc) | Returns the default cluster. |
GrantPermissionsToService(BaseService) | Grant SQS permissions to an ECS service. |
Constructors
QueueProcessingServiceBase(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected QueueProcessingServiceBase(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
QueueProcessingServiceBase(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected QueueProcessingServiceBase(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
QueueProcessingServiceBase(Construct, String, IQueueProcessingServiceBaseProps)
Constructs a new instance of the QueueProcessingServiceBase class.
protected QueueProcessingServiceBase(Construct scope, string id, IQueueProcessingServiceBaseProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IQueueProcessingServiceBaseProps
Properties
Cluster
The cluster where your service will be deployed.
public virtual ICluster Cluster { get; }
Property Value
DeadLetterQueue
The dead letter queue for the primary SQS queue.
public virtual IQueue DeadLetterQueue { get; }
Property Value
DesiredCount
(deprecated) The minimum number of tasks to run.
public virtual double DesiredCount { get; }
Property Value
System.Double
Remarks
Stability: Deprecated
Environment
Environment variables that will include the queue name.
public virtual IDictionary<string, string> Environment { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
LogDriver
The AwsLogDriver to use for logging if logging is enabled.
public virtual LogDriver LogDriver { get; }
Property Value
MaxCapacity
The maximum number of instances for autoscaling to scale up to.
public virtual double MaxCapacity { get; }
Property Value
System.Double
MinCapacity
The minimum number of instances for autoscaling to scale down to.
public virtual double MinCapacity { get; }
Property Value
System.Double
ScalingSteps
The scaling interval for autoscaling based off an SQS Queue size.
public virtual IScalingInterval[] ScalingSteps { get; }
Property Value
Secrets
The secret environment variables.
public virtual IDictionary<string, Secret> Secrets { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, Secret>
SqsQueue
The SQS queue that the service will process from.
public virtual IQueue SqsQueue { get; }
Property Value
Methods
ConfigureAutoscalingForService(BaseService)
Configure autoscaling based off of CPU utilization as well as the number of messages visible in the SQS queue.
protected virtual void ConfigureAutoscalingForService(BaseService service)
Parameters
- service BaseService
the ECS/Fargate service for which to apply the autoscaling rules to.
GetDefaultCluster(Construct, IVpc)
Returns the default cluster.
protected virtual Cluster GetDefaultCluster(Construct scope, IVpc vpc = null)
Parameters
- scope Constructs.Construct
- vpc IVpc
Returns
GrantPermissionsToService(BaseService)
Grant SQS permissions to an ECS service.
protected virtual void GrantPermissionsToService(BaseService service)
Parameters
- service BaseService
the ECS/Fargate service to which to grant SQS permissions.