Show / Hide Table of Contents

Class EcsDeploymentGroup

A CodeDeploy deployment group that orchestrates ECS blue-green deployments.

Inheritance
object
Resource
EcsDeploymentGroup
Implements
IEcsDeploymentGroup
IResource
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EcsDeploymentGroup : Resource, IEcsDeploymentGroup, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class EcsDeploymentGroup Inherits Resource Implements IEcsDeploymentGroup, IResource, IConstruct, IDependable, IEnvironmentAware
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(Construct, string, IEcsDeploymentGroupProps)

A CodeDeploy deployment group that orchestrates ECS blue-green deployments.

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.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

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(Construct, string, IEcsDeploymentGroupProps)

A CodeDeploy deployment group that orchestrates ECS blue-green deployments.

public EcsDeploymentGroup(Construct scope, string id, IEcsDeploymentGroupProps props)
Parameters
scope Construct
id string
props IEcsDeploymentGroupProps
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
             });

Properties

Application

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

public virtual IEcsApplication Application { get; }
Property Value

IEcsApplication

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

DeploymentConfig

The Deployment Configuration this Group uses.

public virtual IEcsDeploymentConfig DeploymentConfig { get; }
Property Value

IEcsDeploymentConfig

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

DeploymentGroupArn

The ARN of the Deployment Group.

public virtual string DeploymentGroupArn { get; }
Property Value

string

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

DeploymentGroupName

The name of the Deployment Group.

public virtual string DeploymentGroupName { get; }
Property Value

string

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

Role

The service Role of this Deployment Group.

public virtual IRole Role { get; }
Property Value

IRole

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

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.

Remarks

Resource: AWS::CodeDeploy::DeploymentGroup

ExampleMetadata: infused

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 Construct

the parent Construct for this new Construct.

id string

the logical ID of this new Construct.

attrs IEcsDeploymentGroupAttributes

the properties of the referenced Deployment Group.

Returns

IEcsDeploymentGroup

a Construct representing a reference to an existing Deployment Group

Remarks

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

Implements

IEcsDeploymentGroup
IResource
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX