Class CfnDeploymentGroup
A CloudFormation AWS::CodeDeploy::DeploymentGroup
.
Inherited Members
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.AWS.CodeDeploy.dll
Syntax (csharp)
public class CfnDeploymentGroup : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnDeploymentGroup
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::CodeDeploy::DeploymentGroup
resource creates an AWS CodeDeploy deployment group that specifies which instances your application revisions are deployed to, along with other deployment options. For more information, see CreateDeploymentGroup in the CodeDeploy API Reference .
Amazon ECS blue/green deployments through CodeDeploy do not use the AWS::CodeDeploy::DeploymentGroup
resource. To perform Amazon ECS blue/green deployments, use the AWS::CodeDeploy::BlueGreen
hook. See Perform Amazon ECS blue/green deployments through CodeDeploy using AWS CloudFormation for more information.
CloudformationResource: AWS::CodeDeploy::DeploymentGroup
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 cfnDeploymentGroup = new CfnDeploymentGroup(this, "MyCfnDeploymentGroup", 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"
} },
TriggerConfigurations = new [] { new TriggerConfigProperty {
TriggerEvents = new [] { "triggerEvents" },
TriggerName = "triggerName",
TriggerTargetArn = "triggerTargetArn"
} }
});
Synopsis
Constructors
CfnDeploymentGroup(Construct, String, ICfnDeploymentGroupProps) | Create a new |
CfnDeploymentGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDeploymentGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
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. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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 |
|
ServiceRoleArn | A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf. |
Tags |
|
TriggerConfigurations | Information about triggers associated with the deployment group. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDeploymentGroup(Construct, String, ICfnDeploymentGroupProps)
Create a new AWS::CodeDeploy::DeploymentGroup
.
public CfnDeploymentGroup(Construct scope, string id, ICfnDeploymentGroupProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnDeploymentGroupProps
- resource properties.
CfnDeploymentGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDeploymentGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDeploymentGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDeploymentGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AlarmConfiguration
Information about the Amazon CloudWatch alarms that are associated with the deployment group.
public virtual object AlarmConfiguration { get; set; }
Property Value
System.Object
Remarks
ApplicationName
The name of an existing CodeDeploy application to associate this deployment group with.
public virtual string ApplicationName { get; set; }
Property Value
System.String
Remarks
AutoRollbackConfiguration
Information about the automatic rollback configuration that is associated with the deployment group.
public virtual 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 virtual string[] AutoScalingGroups { get; set; }
Property Value
System.String[]
Remarks
BlueGreenDeploymentConfiguration
Information about blue/green deployment options for a deployment group.
public virtual object BlueGreenDeploymentConfiguration { get; set; }
Property Value
System.Object
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Deployment
The application revision to deploy to this deployment group.
public virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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
AWS::CodeDeploy::DeploymentGroup.OutdatedInstancesStrategy
.
public virtual string OutdatedInstancesStrategy { get; set; }
Property Value
System.String
Remarks
ServiceRoleArn
A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.
public virtual 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
AWS::CodeDeploy::DeploymentGroup.Tags
.
public virtual TagManager Tags { get; }
Property Value
Remarks
TriggerConfigurations
Information about triggers associated with the deployment group.
public virtual object TriggerConfigurations { get; set; }
Property Value
System.Object
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>