aws-cdk-lib.aws_codedeploy.EcsDeploymentGroupProps

interface EcsDeploymentGroupProps

LanguageType name
.NETAmazon.CDK.AWS.CodeDeploy.EcsDeploymentGroupProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodedeploy#EcsDeploymentGroupProps
Javasoftware.amazon.awscdk.services.codedeploy.EcsDeploymentGroupProps
Pythonaws_cdk.aws_codedeploy.EcsDeploymentGroupProps
TypeScript (source)aws-cdk-lib » aws_codedeploy » EcsDeploymentGroupProps

Construction properties for EcsDeploymentGroup.

Example

declare const myApplication: codedeploy.EcsApplication;
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.FargateTaskDefinition;
declare const blueTargetGroup: elbv2.ITargetGroup;
declare const greenTargetGroup: elbv2.ITargetGroup;
declare const listener: elbv2.IApplicationListener;

const service = new ecs.FargateService(this, 'Service', {
  cluster,
  taskDefinition,
  deploymentController: {
    type: ecs.DeploymentControllerType.CODE_DEPLOY,
  },
});

new codedeploy.EcsDeploymentGroup(this, 'BlueGreenDG', {
  service,
  blueGreenDeploymentConfig: {
    blueTargetGroup,
    greenTargetGroup,
    listener,
  },
  deploymentConfig: codedeploy.EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES,
});

Properties

NameTypeDescription
blueGreenDeploymentConfigEcsBlueGreenDeploymentConfigThe configuration options for blue-green ECS deployments.
serviceIBaseServiceThe ECS service to deploy with this Deployment Group.
alarms?IAlarm[]The CloudWatch alarms associated with this Deployment Group.
application?IEcsApplicationThe reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
autoRollback?AutoRollbackConfigThe auto-rollback configuration for this Deployment Group.
deploymentConfig?IEcsDeploymentConfigThe Deployment Configuration this Deployment Group uses.
deploymentGroupName?stringThe physical, human-readable name of the CodeDeploy Deployment Group.
ignorePollAlarmsFailure?booleanWhether to continue a deployment even if fetching the alarm status from CloudWatch failed.
role?IRoleThe service Role of this Deployment Group.

blueGreenDeploymentConfig

Type: EcsBlueGreenDeploymentConfig

The configuration options for blue-green ECS deployments.


service

Type: IBaseService

The ECS service to deploy with this Deployment Group.


alarms?

Type: IAlarm[] (optional, default: [])

The CloudWatch alarms associated with this Deployment Group.

CodeDeploy will stop (and optionally roll back) a deployment if during it any of the alarms trigger.

Alarms can also be added after the Deployment Group is created using the #addAlarm method.

See also: https://docs.aws.amazon.com/codedeploy/latest/userguide/monitoring-create-alarms.html


application?

Type: IEcsApplication (optional, default: One will be created for you.)

The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.


autoRollback?

Type: AutoRollbackConfig (optional, default: default AutoRollbackConfig.)

The auto-rollback configuration for this Deployment Group.


deploymentConfig?

Type: IEcsDeploymentConfig (optional, default: EcsDeploymentConfig.ALL_AT_ONCE)

The Deployment Configuration this Deployment Group uses.


deploymentGroupName?

Type: string (optional, default: An auto-generated name will be used.)

The physical, human-readable name of the CodeDeploy Deployment Group.


ignorePollAlarmsFailure?

Type: boolean (optional, default: false)

Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.


role?

Type: IRole (optional, default: A new Role will be created.)

The service Role of this Deployment Group.