@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:50.934Z")
public interface QueueProcessingServiceBaseProps
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ec2.*; import software.amazon.awscdk.services.ecs.*; import software.amazon.awscdk.services.ecs.patterns.*; import software.amazon.awscdk.services.sqs.*; import software.amazon.awscdk.core.*; Cluster cluster; ContainerImage containerImage; LogDriver logDriver; Queue queue; Secret secret; Vpc vpc; QueueProcessingServiceBaseProps queueProcessingServiceBaseProps = QueueProcessingServiceBaseProps.builder() .image(containerImage) // the properties below are optional .capacityProviderStrategies(List.of(CapacityProviderStrategy.builder() .capacityProvider("capacityProvider") // the properties below are optional .base(123) .weight(123) .build())) .circuitBreaker(DeploymentCircuitBreaker.builder() .rollback(false) .build()) .cluster(cluster) .command(List.of("command")) .deploymentController(DeploymentController.builder() .type(DeploymentControllerType.ECS) .build()) .desiredTaskCount(123) .enableECSManagedTags(false) .enableLogging(false) .environment(Map.of( "environmentKey", "environment")) .family("family") .logDriver(logDriver) .maxHealthyPercent(123) .maxReceiveCount(123) .maxScalingCapacity(123) .minHealthyPercent(123) .minScalingCapacity(123) .propagateTags(PropagatedTagSource.SERVICE) .queue(queue) .retentionPeriod(Duration.minutes(30)) .scalingSteps(List.of(ScalingInterval.builder() .change(123) // the properties below are optional .lower(123) .upper(123) .build())) .secrets(Map.of( "secretsKey", secret)) .serviceName("serviceName") .visibilityTimeout(Duration.minutes(30)) .vpc(vpc) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
QueueProcessingServiceBaseProps.Builder
A builder for
QueueProcessingServiceBaseProps |
static class |
QueueProcessingServiceBaseProps.Jsii$Proxy
An implementation for
QueueProcessingServiceBaseProps |
Modifier and Type | Method and Description |
---|---|
static QueueProcessingServiceBaseProps.Builder |
builder() |
default java.util.List<CapacityProviderStrategy> |
getCapacityProviderStrategies()
A list of Capacity Provider strategies used to place a service.
|
default DeploymentCircuitBreaker |
getCircuitBreaker()
Whether to enable the deployment circuit breaker.
|
default ICluster |
getCluster()
The name of the cluster that hosts the service.
|
default java.util.List<java.lang.String> |
getCommand()
The command that is passed to the container.
|
default DeploymentController |
getDeploymentController()
Specifies which deployment controller to use for the service.
|
default java.lang.Number |
getDesiredTaskCount()
Deprecated.
- Use `minScalingCapacity` or a literal object instead.
|
default java.lang.Boolean |
getEnableECSManagedTags()
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
|
default java.lang.Boolean |
getEnableLogging()
Flag to indicate whether to enable logging.
|
default java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
The environment variables to pass to the container.
|
default java.lang.String |
getFamily()
The name of a family that the task definition is registered to.
|
ContainerImage |
getImage()
The image used to start a container.
|
default LogDriver |
getLogDriver()
The log driver to use.
|
default java.lang.Number |
getMaxHealthyPercent()
The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
default java.lang.Number |
getMaxReceiveCount()
The maximum number of times that a message can be received by consumers.
|
default java.lang.Number |
getMaxScalingCapacity()
Maximum capacity to scale to.
|
default java.lang.Number |
getMinHealthyPercent()
The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
|
default java.lang.Number |
getMinScalingCapacity()
Minimum capacity to scale to.
|
default PropagatedTagSource |
getPropagateTags()
Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
|
default IQueue |
getQueue()
A queue for which to process items from.
|
default Duration |
getRetentionPeriod()
The number of seconds that Dead Letter Queue retains a message.
|
default java.util.List<ScalingInterval> |
getScalingSteps()
The intervals for scaling based on the SQS queue's ApproximateNumberOfMessagesVisible metric.
|
default java.util.Map<java.lang.String,Secret> |
getSecrets()
The secret to expose to the container as an environment variable.
|
default java.lang.String |
getServiceName()
The name of the service.
|
default Duration |
getVisibilityTimeout()
Timeout of processing a single message.
|
default IVpc |
getVpc()
The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
|
ContainerImage getImage()
default java.util.List<CapacityProviderStrategy> getCapacityProviderStrategies()
Default: - undefined
default DeploymentCircuitBreaker getCircuitBreaker()
If this property is defined, circuit breaker will be implicitly enabled.
Default: - disabled
default ICluster getCluster()
If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
Default: - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
default java.util.List<java.lang.String> getCommand()
If you provide a shell command as a single string, you have to quote command-line arguments.
Default: - CMD value built into container image.
default DeploymentController getDeploymentController()
For more information, see Amazon ECS Deployment Types
Default: - Rolling update (ECS)
@Deprecated default java.lang.Number getDesiredTaskCount()
Default: - If the feature flag, ECS_REMOVE_DEFAULT_DESIRED_COUNT is false, the default is 1; if true, the minScalingCapacity is 1 for all new services and uses the existing services desired count when updating an existing service.
default java.lang.Boolean getEnableECSManagedTags()
For more information, see Tagging Your Amazon ECS Resources
Default: false
default java.lang.Boolean getEnableLogging()
Default: true
default java.util.Map<java.lang.String,java.lang.String> getEnvironment()
The variable QUEUE_NAME
with value queue.queueName
will
always be passed.
Default: 'QUEUE_NAME: queue.queueName'
default java.lang.String getFamily()
A family groups multiple versions of a task definition.
Default: - Automatically generated name.
default LogDriver getLogDriver()
Default: - AwsLogDriver if enableLogging is true
default java.lang.Number getMaxHealthyPercent()
Default: - default from underlying service.
default java.lang.Number getMaxReceiveCount()
When this value is exceeded for a message the message will be automatically sent to the Dead Letter Queue.
Default: 3
default java.lang.Number getMaxScalingCapacity()
Default: - If the feature flag, ECS_REMOVE_DEFAULT_DESIRED_COUNT is false, the default is (desiredTaskCount * 2); if true, the default is 2.
default java.lang.Number getMinHealthyPercent()
Default: - default from underlying service.
default java.lang.Number getMinScalingCapacity()
Default: - If the feature flag, ECS_REMOVE_DEFAULT_DESIRED_COUNT is false, the default is the desiredTaskCount; if true, the default is 1.
default PropagatedTagSource getPropagateTags()
Tags can only be propagated to the tasks within the service during service creation.
Default: - none
default IQueue getQueue()
If specified and this is a FIFO queue, the queue name must end in the string '.fifo'. See CreateQueue
Default: 'SQSQueue with CloudFormation-generated name'
default Duration getRetentionPeriod()
Default: Duration.days(14)
default java.util.List<ScalingInterval> getScalingSteps()
Maps a range of metric values to a particular scaling behavior. See Simple and Step Scaling Policies for Amazon EC2 Auto Scaling
Default: [{ upper: 0, change: -1 },{ lower: 100, change: +1 },{ lower: 500, change: +5 }]
default java.util.Map<java.lang.String,Secret> getSecrets()
Default: - No secret environment variables.
default java.lang.String getServiceName()
Default: - CloudFormation-generated name.
default Duration getVisibilityTimeout()
After dequeuing, the processor has this much time to handle the message and delete it from the queue before it becomes visible again for dequeueing by another processor. Values must be between 0 and (12 hours).
Default: Duration.seconds(30)
default IVpc getVpc()
If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Default: - uses the VPC defined in the cluster or creates a new VPC.
static QueueProcessingServiceBaseProps.Builder builder()