Class EcsDeploymentConfig
A custom Deployment Configuration for an ECS Deployment Group.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EcsDeploymentConfig : BaseDeploymentConfig, IResource, IEcsDeploymentConfig, IBaseDeploymentConfig
Syntax (vb)
Public Class EcsDeploymentConfig
Inherits BaseDeploymentConfig
Implements IResource, IEcsDeploymentConfig, IBaseDeploymentConfig
Remarks
Resource: AWS::CodeDeploy::DeploymentConfig
ExampleMetadata: infused
Examples
FargateService service;
ITargetGroup blueTargetGroup;
ITargetGroup greenTargetGroup;
IApplicationListener listener;
IApplicationListener testListener;
new EcsDeploymentGroup(this, "BlueGreenDG", new EcsDeploymentGroupProps {
AutoRollback = new AutoRollbackConfig {
// CodeDeploy will automatically roll back if the 8-hour approval period times out and the deployment stops
StoppedDeployment = true
},
Service = service,
BlueGreenDeploymentConfig = new EcsBlueGreenDeploymentConfig {
// The deployment will wait for approval for up to 8 hours before stopping the deployment
DeploymentApprovalWaitTime = Duration.Hours(8),
BlueTargetGroup = blueTargetGroup,
GreenTargetGroup = greenTargetGroup,
Listener = listener,
TestListener = testListener
},
DeploymentConfig = EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES
});
Synopsis
Constructors
EcsDeploymentConfig(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
EcsDeploymentConfig(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
EcsDeploymentConfig(Construct, String, IEcsDeploymentConfigProps) |
Properties
ALL_AT_ONCE | CodeDeploy predefined deployment configuration that shifts all traffic to the updated ECS task set at once. |
CANARY_10PERCENT_15MINUTES | CodeDeploy predefined deployment configuration that shifts 10 percent of traffic in the first increment. |
CANARY_10PERCENT_5MINUTES | CodeDeploy predefined deployment configuration that shifts 10 percent of traffic in the first increment. |
LINEAR_10PERCENT_EVERY_1MINUTES | CodeDeploy predefined deployment configuration that shifts 10 percent of traffic every minute until all traffic is shifted. |
LINEAR_10PERCENT_EVERY_3MINUTES | CodeDeploy predefined deployment configuration that shifts 10 percent of traffic every three minutes until all traffic is shifted. |
Methods
FromEcsDeploymentConfigName(Construct, String, String) | Import a custom Deployment Configuration for an ECS Deployment Group defined outside the CDK. |
Constructors
EcsDeploymentConfig(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EcsDeploymentConfig(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
EcsDeploymentConfig(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EcsDeploymentConfig(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
EcsDeploymentConfig(Construct, String, IEcsDeploymentConfigProps)
public EcsDeploymentConfig(Construct scope, string id, IEcsDeploymentConfigProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IEcsDeploymentConfigProps
Properties
ALL_AT_ONCE
CodeDeploy predefined deployment configuration that shifts all traffic to the updated ECS task set at once.
public static IEcsDeploymentConfig ALL_AT_ONCE { get; }
Property Value
CANARY_10PERCENT_15MINUTES
CodeDeploy predefined deployment configuration that shifts 10 percent of traffic in the first increment.
public static IEcsDeploymentConfig CANARY_10PERCENT_15MINUTES { get; }
Property Value
Remarks
The remaining 90 percent is deployed 15 minutes later.
CANARY_10PERCENT_5MINUTES
CodeDeploy predefined deployment configuration that shifts 10 percent of traffic in the first increment.
public static IEcsDeploymentConfig CANARY_10PERCENT_5MINUTES { get; }
Property Value
Remarks
The remaining 90 percent is deployed five minutes later.
LINEAR_10PERCENT_EVERY_1MINUTES
CodeDeploy predefined deployment configuration that shifts 10 percent of traffic every minute until all traffic is shifted.
public static IEcsDeploymentConfig LINEAR_10PERCENT_EVERY_1MINUTES { get; }
Property Value
LINEAR_10PERCENT_EVERY_3MINUTES
CodeDeploy predefined deployment configuration that shifts 10 percent of traffic every three minutes until all traffic is shifted.
public static IEcsDeploymentConfig LINEAR_10PERCENT_EVERY_3MINUTES { get; }
Property Value
Methods
FromEcsDeploymentConfigName(Construct, String, String)
Import a custom Deployment Configuration for an ECS Deployment Group defined outside the CDK.
public static IEcsDeploymentConfig FromEcsDeploymentConfigName(Construct scope, string id, string ecsDeploymentConfigName)
Parameters
- scope Constructs.Construct
the parent Construct for this new Construct.
- id System.String
the logical ID of this new Construct.
- ecsDeploymentConfigName System.String
the name of the referenced custom Deployment Configuration.
Returns
a Construct representing a reference to an existing custom Deployment Configuration