- Implements: aws-cdk-lib.aws_codedeploy.IServerDeploymentGroup
import { ServerBlueGreenDeploymentGroup } from '@otocolobus/aws-cdk-serverbluegreendeploymentgroup'
new ServerBlueGreenDeploymentGroup(scope: Stack, id: string, props: ServerBlueGreenDeploymentGroupProps)
Name | Type | Description |
---|---|---|
scope |
aws-cdk-lib.Stack |
No description. |
id |
string |
No description. |
props |
ServerBlueGreenDeploymentGroupProps |
No description. |
- Type: aws-cdk-lib.Stack
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
- Type: aws-cdk-lib.RemovalPolicy
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
import { ServerBlueGreenDeploymentGroup } from '@otocolobus/aws-cdk-serverbluegreendeploymentgroup'
ServerBlueGreenDeploymentGroup.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { ServerBlueGreenDeploymentGroup } from '@otocolobus/aws-cdk-serverbluegreendeploymentgroup'
ServerBlueGreenDeploymentGroup.isOwnedResource(construct: IConstruct)
Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { ServerBlueGreenDeploymentGroup } from '@otocolobus/aws-cdk-serverbluegreendeploymentgroup'
ServerBlueGreenDeploymentGroup.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: constructs.IConstruct
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
application |
aws-cdk-lib.aws_codedeploy.IServerApplication |
No description. |
deploymentConfig |
aws-cdk-lib.aws_codedeploy.IServerDeploymentConfig |
No description. |
deploymentGroupArn |
string |
No description. |
deploymentGroupName |
string |
No description. |
autoScalingGroups |
aws-cdk-lib.aws_autoscaling.IAutoScalingGroup[] |
No description. |
role |
aws-cdk-lib.aws_iam.IRole |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly application: IServerApplication;
- Type: aws-cdk-lib.aws_codedeploy.IServerApplication
public readonly deploymentConfig: IServerDeploymentConfig;
- Type: aws-cdk-lib.aws_codedeploy.IServerDeploymentConfig
public readonly deploymentGroupArn: string;
- Type: string
public readonly deploymentGroupName: string;
- Type: string
public readonly autoScalingGroups: IAutoScalingGroup[];
- Type: aws-cdk-lib.aws_autoscaling.IAutoScalingGroup[]
public readonly role: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
import { ServerBlueGreenDeploymentGroupProps } from '@otocolobus/aws-cdk-serverbluegreendeploymentgroup'
const serverBlueGreenDeploymentGroupProps: ServerBlueGreenDeploymentGroupProps = { ... }
Name | Type | Description |
---|---|---|
alarms |
aws-cdk-lib.aws_cloudwatch.IAlarm[] |
The CloudWatch alarms associated with this Deployment Group. |
application |
aws-cdk-lib.aws_codedeploy.IServerApplication |
The CodeDeploy EC2/on-premise Application this Deployment Group belongs to. |
autoRollback |
aws-cdk-lib.aws_codedeploy.AutoRollbackConfig |
The auto-rollback configuration for this Deployment Group. |
autoScalingGroups |
aws-cdk-lib.aws_autoscaling.IAutoScalingGroup[] |
The auto-scaling groups belonging to this Deployment Group. |
deploymentConfig |
aws-cdk-lib.aws_codedeploy.IServerDeploymentConfig |
The EC2/on-premise Deployment Configuration to use for this Deployment Group. |
deploymentGroupName |
string |
The physical, human-readable name of the CodeDeploy Deployment Group. |
ec2InstanceTags |
aws-cdk-lib.aws_codedeploy.InstanceTagSet |
All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group. |
ignoreAlarmConfiguration |
boolean |
Whether to skip the step of checking CloudWatch alarms during the deployment process. |
ignorePollAlarmsFailure |
boolean |
Whether to continue a deployment even if fetching the alarm status from CloudWatch failed. |
installAgent |
boolean |
If you've provided any auto-scaling groups with the #autoScalingGroups property, you can set this property to add User Data that installs the CodeDeploy agent on the instances. |
loadBalancer |
aws-cdk-lib.aws_codedeploy.LoadBalancer |
The load balancer to place in front of this Deployment Group. |
loadBalancers |
aws-cdk-lib.aws_codedeploy.LoadBalancer[] |
CodeDeploy supports the deployment to multiple load balancers. |
onPremiseInstanceTags |
aws-cdk-lib.aws_codedeploy.InstanceTagSet |
All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group. |
role |
aws-cdk-lib.aws_iam.IRole |
The service Role of this Deployment Group. |
terminationHook |
boolean |
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. |
greenFleetProvisionOption |
string |
How to provision the green fleet. |
manualTrafficRoutingTimeout |
aws-cdk-lib.Duration |
How long to wait for the manual traffic rerouting to complete. |
originalInstancePolicy |
string |
The action to take on instances in the original environment after a successful blue/green deployment. |
terminateOriginalInstancesTimeout |
aws-cdk-lib.Duration |
How long to wait before terminating the original instances. |
trafficRoutingConfig |
string |
How to reroute traffic to the green fleet. |
public readonly alarms: IAlarm[];
- Type: aws-cdk-lib.aws_cloudwatch.IAlarm[]
- 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.
https://docs.aws.amazon.com/codedeploy/latest/userguide/monitoring-create-alarms.html
public readonly application: IServerApplication;
- Type: aws-cdk-lib.aws_codedeploy.IServerApplication
- Default: A new Application will be created.
The CodeDeploy EC2/on-premise Application this Deployment Group belongs to.
public readonly autoRollback: AutoRollbackConfig;
- Type: aws-cdk-lib.aws_codedeploy.AutoRollbackConfig
- Default: default AutoRollbackConfig.
The auto-rollback configuration for this Deployment Group.
public readonly autoScalingGroups: IAutoScalingGroup[];
- Type: aws-cdk-lib.aws_autoscaling.IAutoScalingGroup[]
- Default: []
The auto-scaling groups belonging to this Deployment Group.
Auto-scaling groups can also be added after the Deployment Group is created
using the #addAutoScalingGroup
method.
[disable-awslint:ref-via-interface] is needed because we update userdata for ASGs to install the codedeploy agent.
public readonly deploymentConfig: IServerDeploymentConfig;
- Type: aws-cdk-lib.aws_codedeploy.IServerDeploymentConfig
- Default: ServerDeploymentConfig#OneAtATime
The EC2/on-premise Deployment Configuration to use for this Deployment Group.
public readonly deploymentGroupName: string;
- Type: string
- Default: An auto-generated name will be used.
The physical, human-readable name of the CodeDeploy Deployment Group.
public readonly ec2InstanceTags: InstanceTagSet;
- Type: aws-cdk-lib.aws_codedeploy.InstanceTagSet
- Default: No additional EC2 instances will be added to the Deployment Group.
All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.
public readonly ignoreAlarmConfiguration: boolean;
- Type: boolean
- Default: false
Whether to skip the step of checking CloudWatch alarms during the deployment process.
public readonly ignorePollAlarmsFailure: boolean;
- Type: boolean
- Default: false
Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.
public readonly installAgent: boolean;
- Type: boolean
- Default: true
If you've provided any auto-scaling groups with the #autoScalingGroups
property, you can set this property to add User Data that installs the CodeDeploy agent on the instances.
https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install.html
- Deprecated: - Use
loadBalancers
instead.
public readonly loadBalancer: LoadBalancer;
- Type: aws-cdk-lib.aws_codedeploy.LoadBalancer
- Default: Deployment Group will not have a load balancer defined.
The load balancer to place in front of this Deployment Group.
Can be created from either a classic Elastic Load Balancer, or an Application Load Balancer / Network Load Balancer Target Group.
public readonly loadBalancers: LoadBalancer[];
- Type: aws-cdk-lib.aws_codedeploy.LoadBalancer[]
- Default: Deployment Group will not have load balancers defined.
CodeDeploy supports the deployment to multiple load balancers.
Specify either multiple Classic Load Balancers, or Application Load Balancers / Network Load Balancers Target Groups.
public readonly onPremiseInstanceTags: InstanceTagSet;
- Type: aws-cdk-lib.aws_codedeploy.InstanceTagSet
- Default: No additional on-premise instances will be added to the Deployment Group.
All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.
public readonly role: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
- Default: A new Role will be created.
The service Role of this Deployment Group.
public readonly terminationHook: boolean;
- Type: boolean
- Default: false
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.
public readonly greenFleetProvisionOption: string;
- Type: string
- Default: COPY_AUTO_SCALING_GROUP
How to provision the green fleet.
public readonly manualTrafficRoutingTimeout: Duration;
- Type: aws-cdk-lib.Duration
- Default: if
trafficRoutingConfig
isMANUALLY
, this is required - otherwise, this is ignored.
How long to wait for the manual traffic rerouting to complete.
public readonly originalInstancePolicy: string;
- Type: string
- Default: TERMINATE
The action to take on instances in the original environment after a successful blue/green deployment.
public readonly terminateOriginalInstancesTimeout: Duration;
- Type: aws-cdk-lib.Duration
- Default: if
originalInstancePolicy
isTERMINATE
, this is required - otherwise, this is ignored.
How long to wait before terminating the original instances.
public readonly trafficRoutingConfig: string;
- Type: string
- Default: AUTOMATICALLY
How to reroute traffic to the green fleet.