Class CfnDeploymentGroupProps
Properties for defining a CfnDeploymentGroup
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDeploymentGroupProps : Object, ICfnDeploymentGroupProps
Syntax (vb)
Public Class CfnDeploymentGroupProps
Inherits Object
Implements ICfnDeploymentGroupProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeDeploy;
var cfnDeploymentGroupProps = new CfnDeploymentGroupProps {
ApplicationName = "applicationName",
ServiceRoleArn = "serviceRoleArn",
// the properties below are optional
AlarmConfiguration = new AlarmConfigurationProperty {
Alarms = new [] { new AlarmProperty {
Name = "name"
} },
Enabled = false,
IgnorePollAlarmFailure = false
},
AutoRollbackConfiguration = new AutoRollbackConfigurationProperty {
Enabled = false,
Events = new [] { "events" }
},
AutoScalingGroups = new [] { "autoScalingGroups" },
BlueGreenDeploymentConfiguration = new BlueGreenDeploymentConfigurationProperty {
DeploymentReadyOption = new DeploymentReadyOptionProperty {
ActionOnTimeout = "actionOnTimeout",
WaitTimeInMinutes = 123
},
GreenFleetProvisioningOption = new GreenFleetProvisioningOptionProperty {
Action = "action"
},
TerminateBlueInstancesOnDeploymentSuccess = new BlueInstanceTerminationOptionProperty {
Action = "action",
TerminationWaitTimeInMinutes = 123
}
},
Deployment = new DeploymentProperty {
Revision = new RevisionLocationProperty {
GitHubLocation = new GitHubLocationProperty {
CommitId = "commitId",
Repository = "repository"
},
RevisionType = "revisionType",
S3Location = new S3LocationProperty {
Bucket = "bucket",
Key = "key",
// the properties below are optional
BundleType = "bundleType",
ETag = "eTag",
Version = "version"
}
},
// the properties below are optional
Description = "description",
IgnoreApplicationStopFailures = false
},
DeploymentConfigName = "deploymentConfigName",
DeploymentGroupName = "deploymentGroupName",
DeploymentStyle = new DeploymentStyleProperty {
DeploymentOption = "deploymentOption",
DeploymentType = "deploymentType"
},
Ec2TagFilters = new [] { new EC2TagFilterProperty {
Key = "key",
Type = "type",
Value = "value"
} },
Ec2TagSet = new EC2TagSetProperty {
Ec2TagSetList = new [] { new EC2TagSetListObjectProperty {
Ec2TagGroup = new [] { new EC2TagFilterProperty {
Key = "key",
Type = "type",
Value = "value"
} }
} }
},
EcsServices = new [] { new ECSServiceProperty {
ClusterName = "clusterName",
ServiceName = "serviceName"
} },
LoadBalancerInfo = new LoadBalancerInfoProperty {
ElbInfoList = new [] { new ELBInfoProperty {
Name = "name"
} },
TargetGroupInfoList = new [] { new TargetGroupInfoProperty {
Name = "name"
} },
TargetGroupPairInfoList = new [] { new TargetGroupPairInfoProperty {
ProdTrafficRoute = new TrafficRouteProperty {
ListenerArns = new [] { "listenerArns" }
},
TargetGroups = new [] { new TargetGroupInfoProperty {
Name = "name"
} },
TestTrafficRoute = new TrafficRouteProperty {
ListenerArns = new [] { "listenerArns" }
}
} }
},
OnPremisesInstanceTagFilters = new [] { new TagFilterProperty {
Key = "key",
Type = "type",
Value = "value"
} },
OnPremisesTagSet = new OnPremisesTagSetProperty {
OnPremisesTagSetList = new [] { new OnPremisesTagSetListObjectProperty {
OnPremisesTagGroup = new [] { new TagFilterProperty {
Key = "key",
Type = "type",
Value = "value"
} }
} }
},
OutdatedInstancesStrategy = "outdatedInstancesStrategy",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TerminationHookEnabled = false,
TriggerConfigurations = new [] { new TriggerConfigProperty {
TriggerEvents = new [] { "triggerEvents" },
TriggerName = "triggerName",
TriggerTargetArn = "triggerTargetArn"
} }
};
Synopsis
Constructors
CfnDeploymentGroupProps() |
Properties
AlarmConfiguration | Information about the Amazon CloudWatch alarms that are associated with the deployment group. |
ApplicationName | The name of an existing CodeDeploy application to associate this deployment group with. |
AutoRollbackConfiguration | Information about the automatic rollback configuration that is associated with the deployment group. |
AutoScalingGroups | A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created. |
BlueGreenDeploymentConfiguration | Information about blue/green deployment options for a deployment group. |
Deployment | The application revision to deploy to this deployment group. |
DeploymentConfigName | A deployment configuration name or a predefined configuration name. |
DeploymentGroupName | A name for the deployment group. |
DeploymentStyle | Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer. |
Ec2TagFilters | The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. |
Ec2TagSet | Information about groups of tags applied to Amazon EC2 instances. |
EcsServices | The target Amazon ECS services in the deployment group. |
LoadBalancerInfo | Information about the load balancer to use in a deployment. |
OnPremisesInstanceTagFilters | The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. |
OnPremisesTagSet | Information about groups of tags applied to on-premises instances. |
OutdatedInstancesStrategy | Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. |
ServiceRoleArn | A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf. |
Tags | The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. |
TerminationHookEnabled | Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. |
TriggerConfigurations | Information about triggers associated with the deployment group. |
Constructors
CfnDeploymentGroupProps()
public CfnDeploymentGroupProps()
Properties
AlarmConfiguration
Information about the Amazon CloudWatch alarms that are associated with the deployment group.
public object AlarmConfiguration { get; set; }
Property Value
System.Object
Remarks
ApplicationName
The name of an existing CodeDeploy application to associate this deployment group with.
public string ApplicationName { get; set; }
Property Value
System.String
Remarks
AutoRollbackConfiguration
Information about the automatic rollback configuration that is associated with the deployment group.
public object AutoRollbackConfiguration { get; set; }
Property Value
System.Object
Remarks
If you specify this property, don't specify the Deployment
property.
AutoScalingGroups
A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created.
public string[] AutoScalingGroups { get; set; }
Property Value
System.String[]
Remarks
BlueGreenDeploymentConfiguration
Information about blue/green deployment options for a deployment group.
public object BlueGreenDeploymentConfiguration { get; set; }
Property Value
System.Object
Remarks
Deployment
The application revision to deploy to this deployment group.
public object Deployment { get; set; }
Property Value
System.Object
Remarks
If you specify this property, your target application revision is deployed as soon as the provisioning process is complete. If you specify this property, don't specify the AutoRollbackConfiguration
property.
DeploymentConfigName
A deployment configuration name or a predefined configuration name.
public string DeploymentConfigName { get; set; }
Property Value
System.String
Remarks
With predefined configurations, you can deploy application revisions to one instance at a time ( CodeDeployDefault.OneAtATime
), half of the instances at a time ( CodeDeployDefault.HalfAtATime
), or all the instances at once ( CodeDeployDefault.AllAtOnce
). For more information and valid values, see Working with Deployment Configurations in the AWS CodeDeploy User Guide .
DeploymentGroupName
A name for the deployment group.
public string DeploymentGroupName { get; set; }
Property Value
System.String
Remarks
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the deployment group name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
DeploymentStyle
Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer.
public object DeploymentStyle { get; set; }
Property Value
System.Object
Remarks
If you specify this property with a blue/green deployment type, don't specify the AutoScalingGroups
, LoadBalancerInfo
, or Deployment
properties.
For blue/green deployments, AWS CloudFormation supports deployments on Lambda compute platforms only. You can perform Amazon ECS blue/green deployments using AWS::CodeDeploy::BlueGreen
hook. See Perform Amazon ECS blue/green deployments through CodeDeploy using AWS CloudFormation for more information.
Ec2TagFilters
The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.
public object Ec2TagFilters { get; set; }
Property Value
System.Object
Remarks
CodeDeploy includes all Amazon EC2 instances identified by any of the tags you specify in this deployment group. Duplicates are not allowed.
You can specify EC2TagFilters
or Ec2TagSet
, but not both.
Ec2TagSet
Information about groups of tags applied to Amazon EC2 instances.
public object Ec2TagSet { get; set; }
Property Value
System.Object
Remarks
The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilter
.
EcsServices
The target Amazon ECS services in the deployment group.
public object EcsServices { get; set; }
Property Value
System.Object
Remarks
This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename>
.
LoadBalancerInfo
Information about the load balancer to use in a deployment.
public object LoadBalancerInfo { get; set; }
Property Value
System.Object
Remarks
For more information, see Integrating CodeDeploy with Elastic Load Balancing in the AWS CodeDeploy User Guide .
OnPremisesInstanceTagFilters
The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.
public object OnPremisesInstanceTagFilters { get; set; }
Property Value
System.Object
Remarks
CodeDeploy includes all on-premises instances identified by any of the tags you specify in this deployment group. To register on-premises instances with CodeDeploy , see Working with On-Premises Instances for CodeDeploy in the AWS CodeDeploy User Guide . Duplicates are not allowed.
You can specify OnPremisesInstanceTagFilters
or OnPremisesInstanceTagSet
, but not both.
OnPremisesTagSet
Information about groups of tags applied to on-premises instances.
public object OnPremisesTagSet { get; set; }
Property Value
System.Object
Remarks
The deployment group includes only on-premises instances identified by all the tag groups.
You can specify OnPremisesInstanceTagFilters
or OnPremisesInstanceTagSet
, but not both.
OutdatedInstancesStrategy
Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.
public string OutdatedInstancesStrategy { get; set; }
Property Value
System.String
Remarks
If this option is set to UPDATE
or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.
If this option is set to IGNORE
, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
ServiceRoleArn
A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.
public string ServiceRoleArn { get; set; }
Property Value
System.String
Remarks
For more information, see Create a Service Role for AWS CodeDeploy in the AWS CodeDeploy User Guide .
In some cases, you might need to add a dependency on the service role's policy. For more information, see IAM role policy in DependsOn Attribute .
Tags
The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
Each tag consists of a key and an optional value, both of which you define.
TerminationHookEnabled
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.
public object TerminationHookEnabled { get; set; }
Property Value
System.Object
Remarks
For more information about the termination hook, see How Amazon EC2 Auto Scaling works with CodeDeploy in the AWS CodeDeploy User Guide .
TriggerConfigurations
Information about triggers associated with the deployment group.
public object TriggerConfigurations { get; set; }
Property Value
System.Object