Class EcsDeploymentGroup
A CodeDeploy deployment group that orchestrates ECS blue-green deployments.
Inherited Members
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EcsDeploymentGroup : Resource, IEcsDeploymentGroup, IResource
Syntax (vb)
Public Class EcsDeploymentGroup
Inherits Resource
Implements IEcsDeploymentGroup, IResource
Remarks
Resource: AWS::CodeDeploy::DeploymentGroup
ExampleMetadata: infused
Examples
EcsApplication myApplication;
Cluster cluster;
FargateTaskDefinition taskDefinition;
ITargetGroup blueTargetGroup;
ITargetGroup greenTargetGroup;
IApplicationListener listener;
var service = new FargateService(this, "Service", new FargateServiceProps {
Cluster = cluster,
TaskDefinition = taskDefinition,
DeploymentController = new DeploymentController {
Type = DeploymentControllerType.CODE_DEPLOY
}
});
new EcsDeploymentGroup(this, "BlueGreenDG", new EcsDeploymentGroupProps {
Service = service,
BlueGreenDeploymentConfig = new EcsBlueGreenDeploymentConfig {
BlueTargetGroup = blueTargetGroup,
GreenTargetGroup = greenTargetGroup,
Listener = listener
},
DeploymentConfig = EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES
});
Synopsis
Constructors
EcsDeploymentGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
EcsDeploymentGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
EcsDeploymentGroup(Construct, String, IEcsDeploymentGroupProps) |
Properties
Application | The reference to the CodeDeploy ECS Application that this Deployment Group belongs to. |
DeploymentConfig | The Deployment Configuration this Group uses. |
DeploymentGroupArn | The ARN of the Deployment Group. |
DeploymentGroupName | The name of the Deployment Group. |
Role | The service Role of this Deployment Group. |
Methods
AddAlarm(IAlarm) | Associates an additional alarm with this Deployment Group. |
FromEcsDeploymentGroupAttributes(Construct, String, IEcsDeploymentGroupAttributes) | Reference an ECS Deployment Group defined outside the CDK app. |
Constructors
EcsDeploymentGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EcsDeploymentGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
EcsDeploymentGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EcsDeploymentGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
EcsDeploymentGroup(Construct, String, IEcsDeploymentGroupProps)
public EcsDeploymentGroup(Construct scope, string id, IEcsDeploymentGroupProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IEcsDeploymentGroupProps
Properties
Application
The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.
public virtual IEcsApplication Application { get; }
Property Value
DeploymentConfig
The Deployment Configuration this Group uses.
public virtual IEcsDeploymentConfig DeploymentConfig { get; }
Property Value
DeploymentGroupArn
The ARN of the Deployment Group.
public virtual string DeploymentGroupArn { get; }
Property Value
System.String
DeploymentGroupName
The name of the Deployment Group.
public virtual string DeploymentGroupName { get; }
Property Value
System.String
Role
Methods
AddAlarm(IAlarm)
Associates an additional alarm with this Deployment Group.
public virtual void AddAlarm(IAlarm alarm)
Parameters
- alarm IAlarm
the alarm to associate with this Deployment Group.
FromEcsDeploymentGroupAttributes(Construct, String, IEcsDeploymentGroupAttributes)
Reference an ECS Deployment Group defined outside the CDK app.
public static IEcsDeploymentGroup FromEcsDeploymentGroupAttributes(Construct scope, string id, IEcsDeploymentGroupAttributes attrs)
Parameters
- scope Constructs.Construct
the parent Construct for this new Construct.
- id System.String
the logical ID of this new Construct.
- attrs IEcsDeploymentGroupAttributes
the properties of the referenced Deployment Group.
Returns
a Construct representing a reference to an existing Deployment Group
Remarks
Account and region for the DeploymentGroup are taken from the application.