Show / Hide Table of Contents

Enum DeploymentStrategy

The deployment stratergy to use for ECS controller.

Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum DeploymentStrategy
Syntax (vb)
Public Enum DeploymentStrategy
Remarks

ExampleMetadata: infused

Examples
Cluster cluster;
            TaskDefinition taskDefinition;
            ApplicationTargetGroup blueTargetGroup;
            ApplicationTargetGroup greenTargetGroup;
            ApplicationListenerRule prodListenerRule;


            var service = new FargateService(this, "Service", new FargateServiceProps {
                Cluster = cluster,
                TaskDefinition = taskDefinition,
                DeploymentStrategy = DeploymentStrategy.LINEAR,
                LinearConfiguration = new TrafficShiftConfig {
                    StepPercent = 10,
                    StepBakeTime = Duration.Minutes(5)
                }
            });

            var target = service.LoadBalancerTarget(new LoadBalancerTargetOptions {
                ContainerName = "web",
                ContainerPort = 80,
                AlternateTarget = new AlternateTarget("AlternateTarget", new AlternateTargetProps {
                    AlternateTargetGroup = greenTargetGroup,
                    ProductionListener = ListenerRuleConfiguration.ApplicationListenerRule(prodListenerRule)
                })
            });

            target.AttachToApplicationTargetGroup(blueTargetGroup);

Synopsis

Fields

BLUE_GREEN

Blue/green deployment.

CANARY

Canary deployment with fixed traffic percentage testing.

LINEAR

Linear deployment with progressive traffic shifting.

ROLLING

Rolling update deployment.

Fields

Name Description
BLUE_GREEN

Blue/green deployment.

CANARY

Canary deployment with fixed traffic percentage testing.

LINEAR

Linear deployment with progressive traffic shifting.

ROLLING

Rolling update deployment.

Back to top Generated by DocFX