Class EcsDeploymentGroup

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.codedeploy.EcsDeploymentGroup
All Implemented Interfaces:
IResource, IEcsDeploymentGroup, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:40.480Z") @Stability(Stable) public class EcsDeploymentGroup extends Resource implements IEcsDeploymentGroup
A CodeDeploy deployment group that orchestrates ECS blue-green deployments.

Example:

 EcsApplication myApplication;
 Cluster cluster;
 FargateTaskDefinition taskDefinition;
 ITargetGroup blueTargetGroup;
 ITargetGroup greenTargetGroup;
 IApplicationListener listener;
 FargateService service = FargateService.Builder.create(this, "Service")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .deploymentController(DeploymentController.builder()
                 .type(DeploymentControllerType.CODE_DEPLOY)
                 .build())
         .build();
 EcsDeploymentGroup.Builder.create(this, "BlueGreenDG")
         .service(service)
         .blueGreenDeploymentConfig(EcsBlueGreenDeploymentConfig.builder()
                 .blueTargetGroup(blueTargetGroup)
                 .greenTargetGroup(greenTargetGroup)
                 .listener(listener)
                 .build())
         .deploymentConfig(EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES)
         .build();
 
  • Constructor Details

    • EcsDeploymentGroup

      protected EcsDeploymentGroup(software.amazon.jsii.JsiiObjectRef objRef)
    • EcsDeploymentGroup

      protected EcsDeploymentGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • EcsDeploymentGroup

      @Stability(Stable) public EcsDeploymentGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EcsDeploymentGroupProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromEcsDeploymentGroupAttributes

      @Stability(Stable) @NotNull public static IEcsDeploymentGroup fromEcsDeploymentGroupAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EcsDeploymentGroupAttributes attrs)
      Reference an ECS Deployment Group defined outside the CDK app.

      Account and region for the DeploymentGroup are taken from the application.

      Parameters:
      scope - the parent Construct for this new Construct. This parameter is required.
      id - the logical ID of this new Construct. This parameter is required.
      attrs - the properties of the referenced Deployment Group. This parameter is required.
      Returns:
      a Construct representing a reference to an existing Deployment Group
    • addAlarm

      @Stability(Stable) public void addAlarm(@NotNull IAlarm alarm)
      Associates an additional alarm with this Deployment Group.

      Parameters:
      alarm - the alarm to associate with this Deployment Group. This parameter is required.
    • getApplication

      @Stability(Stable) @NotNull public IEcsApplication getApplication()
      The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
      Specified by:
      getApplication in interface IEcsDeploymentGroup
    • getDeploymentConfig

      @Stability(Stable) @NotNull public IEcsDeploymentConfig getDeploymentConfig()
      The Deployment Configuration this Group uses.
      Specified by:
      getDeploymentConfig in interface IEcsDeploymentGroup
    • getDeploymentGroupArn

      @Stability(Stable) @NotNull public String getDeploymentGroupArn()
      The ARN of the Deployment Group.
      Specified by:
      getDeploymentGroupArn in interface IEcsDeploymentGroup
    • getDeploymentGroupName

      @Stability(Stable) @NotNull public String getDeploymentGroupName()
      The name of the Deployment Group.
      Specified by:
      getDeploymentGroupName in interface IEcsDeploymentGroup
    • getRole

      @Stability(Stable) @NotNull public IRole getRole()
      The service Role of this Deployment Group.