Class CfnDeploymentGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.codedeploy.CfnDeploymentGroup
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.110.0 (build 336b265)",
date="2025-04-17T00:47:01.230Z")
@Stability(Stable)
public class CfnDeploymentGroup
extends CfnResource
implements IInspectable, ITaggable
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 theAWS::CodeDeploy::BlueGreen
hook. See Perform Amazon ECS blue/green deployments through CodeDeploy using AWS CloudFormation for more information.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.codedeploy.*; CfnDeploymentGroup cfnDeploymentGroup = CfnDeploymentGroup.Builder.create(this, "MyCfnDeploymentGroup") .applicationName("applicationName") .serviceRoleArn("serviceRoleArn") // the properties below are optional .alarmConfiguration(AlarmConfigurationProperty.builder() .alarms(List.of(AlarmProperty.builder() .name("name") .build())) .enabled(false) .ignorePollAlarmFailure(false) .build()) .autoRollbackConfiguration(AutoRollbackConfigurationProperty.builder() .enabled(false) .events(List.of("events")) .build()) .autoScalingGroups(List.of("autoScalingGroups")) .blueGreenDeploymentConfiguration(BlueGreenDeploymentConfigurationProperty.builder() .deploymentReadyOption(DeploymentReadyOptionProperty.builder() .actionOnTimeout("actionOnTimeout") .waitTimeInMinutes(123) .build()) .greenFleetProvisioningOption(GreenFleetProvisioningOptionProperty.builder() .action("action") .build()) .terminateBlueInstancesOnDeploymentSuccess(BlueInstanceTerminationOptionProperty.builder() .action("action") .terminationWaitTimeInMinutes(123) .build()) .build()) .deployment(DeploymentProperty.builder() .revision(RevisionLocationProperty.builder() .gitHubLocation(GitHubLocationProperty.builder() .commitId("commitId") .repository("repository") .build()) .revisionType("revisionType") .s3Location(S3LocationProperty.builder() .bucket("bucket") .key("key") // the properties below are optional .bundleType("bundleType") .eTag("eTag") .version("version") .build()) .build()) // the properties below are optional .description("description") .ignoreApplicationStopFailures(false) .build()) .deploymentConfigName("deploymentConfigName") .deploymentGroupName("deploymentGroupName") .deploymentStyle(DeploymentStyleProperty.builder() .deploymentOption("deploymentOption") .deploymentType("deploymentType") .build()) .ec2TagFilters(List.of(EC2TagFilterProperty.builder() .key("key") .type("type") .value("value") .build())) .ec2TagSet(EC2TagSetProperty.builder() .ec2TagSetList(List.of(EC2TagSetListObjectProperty.builder() .ec2TagGroup(List.of(EC2TagFilterProperty.builder() .key("key") .type("type") .value("value") .build())) .build())) .build()) .ecsServices(List.of(ECSServiceProperty.builder() .clusterName("clusterName") .serviceName("serviceName") .build())) .loadBalancerInfo(LoadBalancerInfoProperty.builder() .elbInfoList(List.of(ELBInfoProperty.builder() .name("name") .build())) .targetGroupInfoList(List.of(TargetGroupInfoProperty.builder() .name("name") .build())) .targetGroupPairInfoList(List.of(TargetGroupPairInfoProperty.builder() .prodTrafficRoute(TrafficRouteProperty.builder() .listenerArns(List.of("listenerArns")) .build()) .targetGroups(List.of(TargetGroupInfoProperty.builder() .name("name") .build())) .testTrafficRoute(TrafficRouteProperty.builder() .listenerArns(List.of("listenerArns")) .build()) .build())) .build()) .onPremisesInstanceTagFilters(List.of(TagFilterProperty.builder() .key("key") .type("type") .value("value") .build())) .onPremisesTagSet(OnPremisesTagSetProperty.builder() .onPremisesTagSetList(List.of(OnPremisesTagSetListObjectProperty.builder() .onPremisesTagGroup(List.of(TagFilterProperty.builder() .key("key") .type("type") .value("value") .build())) .build())) .build()) .outdatedInstancesStrategy("outdatedInstancesStrategy") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .terminationHookEnabled(false) .triggerConfigurations(List.of(TriggerConfigProperty.builder() .triggerEvents(List.of("triggerEvents")) .triggerName("triggerName") .triggerTargetArn("triggerTargetArn") .build())) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
TheAlarmConfiguration
property type configures CloudWatch alarms for an AWS CodeDeploy deployment group.static interface
TheAlarm
property type specifies a CloudWatch alarm to use for an AWS CodeDeploy deployment group.static interface
TheAutoRollbackConfiguration
property type configures automatic rollback for an AWS CodeDeploy deployment group when a deployment is not completed successfully.static interface
Information about blue/green deployment options for a deployment group.static interface
Information about whether instances in the original environment are terminated when a blue/green deployment is successful.static final class
A fluent builder forCfnDeploymentGroup
.static interface
Deployment
is a property of the DeploymentGroup resource that specifies an AWS CodeDeploy application revision to be deployed to instances in the deployment group.static interface
Information about how traffic is rerouted to instances in a replacement environment in a blue/green deployment.static interface
Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.static interface
Information about an Amazon EC2 tag filter.static interface
TheEC2TagSet
property type specifies information about groups of tags applied to Amazon EC2 instances.static interface
TheEC2TagSet
property type specifies information about groups of tags applied to Amazon EC2 instances.static interface
Contains the service and cluster names used to identify an Amazon ECS deployment's target.static interface
TheELBInfo
property type specifies information about the Elastic Load Balancing load balancer used for an CodeDeploy deployment group.static interface
GitHubLocation
is a property of the CodeDeploy DeploymentGroup Revision property that specifies the location of an application revision that is stored in GitHub.static interface
Information about the instances that belong to the replacement environment in a blue/green deployment.static interface
TheLoadBalancerInfo
property type specifies information about the load balancer or target group used for an AWS CodeDeploy deployment group.static interface
TheOnPremisesTagSetListObject
property type specifies lists of on-premises instance tag groups.static interface
TheOnPremisesTagSet
property type specifies a list containing other lists of on-premises instance tag groups.static interface
RevisionLocation
is a property that defines the location of the CodeDeploy application revision to deploy.static interface
S3Location
is a property of the CodeDeploy DeploymentGroup Revision property that specifies the location of an application revision that is stored in Amazon Simple Storage Service ( Amazon S3 ).static interface
TagFilter
is a property type of the AWS::CodeDeploy::DeploymentGroup resource that specifies which on-premises instances to associate with the deployment group.static interface
TheTargetGroupInfo
property type specifies information about a target group in Elastic Load Balancing to use in a deployment.static interface
Information about two target groups and how traffic is routed during an Amazon ECS deployment.static interface
Information about a listener.static interface
Information about notification triggers for the deployment group.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnDeploymentGroup
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnDeploymentGroup
(software.amazon.jsii.JsiiObjectRef objRef) CfnDeploymentGroup
(software.constructs.Construct scope, String id, CfnDeploymentGroupProps props) -
Method Summary
Modifier and TypeMethodDescriptionInformation about the Amazon CloudWatch alarms that are associated with the deployment group.The name of an existing CodeDeploy application to associate this deployment group with.Information about the automatic rollback configuration that is associated with the deployment group.A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created.Information about blue/green deployment options for a deployment group.The application revision to deploy to this deployment group.A deployment configuration name or a predefined configuration name.A name for the deployment group.Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer.The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.Information about groups of tags applied to Amazon EC2 instances.The target Amazon ECS services in the deployment group.Information about the load balancer to use in a deployment.The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.Information about groups of tags applied to on-premises instances.Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.getTags()
Tag Manager which manages the tags for this resource.The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.Information about triggers associated with the deployment group.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAlarmConfiguration
(IResolvable value) Information about the Amazon CloudWatch alarms that are associated with the deployment group.void
Information about the Amazon CloudWatch alarms that are associated with the deployment group.void
setApplicationName
(String value) The name of an existing CodeDeploy application to associate this deployment group with.void
Information about the automatic rollback configuration that is associated with the deployment group.void
Information about the automatic rollback configuration that is associated with the deployment group.void
setAutoScalingGroups
(List<String> value) A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created.void
Information about blue/green deployment options for a deployment group.void
setBlueGreenDeploymentConfiguration
(CfnDeploymentGroup.BlueGreenDeploymentConfigurationProperty value) Information about blue/green deployment options for a deployment group.void
setDeployment
(IResolvable value) The application revision to deploy to this deployment group.void
The application revision to deploy to this deployment group.void
setDeploymentConfigName
(String value) A deployment configuration name or a predefined configuration name.void
setDeploymentGroupName
(String value) A name for the deployment group.void
setDeploymentStyle
(IResolvable value) Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer.void
Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer.void
setEc2TagFilters
(List<Object> value) The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.void
setEc2TagFilters
(IResolvable value) The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.void
setEc2TagSet
(IResolvable value) Information about groups of tags applied to Amazon EC2 instances.void
Information about groups of tags applied to Amazon EC2 instances.void
setEcsServices
(List<Object> value) The target Amazon ECS services in the deployment group.void
setEcsServices
(IResolvable value) The target Amazon ECS services in the deployment group.void
setLoadBalancerInfo
(IResolvable value) Information about the load balancer to use in a deployment.void
Information about the load balancer to use in a deployment.void
The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.void
The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.void
setOnPremisesTagSet
(IResolvable value) Information about groups of tags applied to on-premises instances.void
Information about groups of tags applied to on-premises instances.void
Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.void
setServiceRoleArn
(String value) A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.void
setTagsRaw
(List<CfnTag> value) The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.void
setTerminationHookEnabled
(Boolean value) Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.void
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.void
setTriggerConfigurations
(List<Object> value) Information about triggers associated with the deployment group.void
Information about triggers associated with the deployment group.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDeploymentGroup
protected CfnDeploymentGroup(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDeploymentGroup
protected CfnDeploymentGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDeploymentGroup
@Stability(Stable) public CfnDeploymentGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDeploymentGroupProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getApplicationName
The name of an existing CodeDeploy application to associate this deployment group with. -
setApplicationName
The name of an existing CodeDeploy application to associate this deployment group with. -
getServiceRoleArn
A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf. -
setServiceRoleArn
A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf. -
getAlarmConfiguration
Information about the Amazon CloudWatch alarms that are associated with the deployment group. -
setAlarmConfiguration
Information about the Amazon CloudWatch alarms that are associated with the deployment group. -
setAlarmConfiguration
@Stability(Stable) public void setAlarmConfiguration(@Nullable CfnDeploymentGroup.AlarmConfigurationProperty value) Information about the Amazon CloudWatch alarms that are associated with the deployment group. -
getAutoRollbackConfiguration
Information about the automatic rollback configuration that is associated with the deployment group. -
setAutoRollbackConfiguration
Information about the automatic rollback configuration that is associated with the deployment group. -
setAutoRollbackConfiguration
@Stability(Stable) public void setAutoRollbackConfiguration(@Nullable CfnDeploymentGroup.AutoRollbackConfigurationProperty value) Information about the automatic rollback configuration that is associated with the deployment group. -
getAutoScalingGroups
A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created. -
setAutoScalingGroups
A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created. -
getBlueGreenDeploymentConfiguration
Information about blue/green deployment options for a deployment group. -
setBlueGreenDeploymentConfiguration
Information about blue/green deployment options for a deployment group. -
setBlueGreenDeploymentConfiguration
@Stability(Stable) public void setBlueGreenDeploymentConfiguration(@Nullable CfnDeploymentGroup.BlueGreenDeploymentConfigurationProperty value) Information about blue/green deployment options for a deployment group. -
getDeployment
The application revision to deploy to this deployment group. -
setDeployment
The application revision to deploy to this deployment group. -
setDeployment
The application revision to deploy to this deployment group. -
getDeploymentConfigName
A deployment configuration name or a predefined configuration name. -
setDeploymentConfigName
A deployment configuration name or a predefined configuration name. -
getDeploymentGroupName
A name for the deployment group. -
setDeploymentGroupName
A name for the deployment group. -
getDeploymentStyle
Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer. -
setDeploymentStyle
Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer. -
setDeploymentStyle
@Stability(Stable) public void setDeploymentStyle(@Nullable CfnDeploymentGroup.DeploymentStyleProperty value) Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer. -
getEc2TagFilters
The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. -
setEc2TagFilters
The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. -
setEc2TagFilters
The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. -
getEc2TagSet
Information about groups of tags applied to Amazon EC2 instances. -
setEc2TagSet
Information about groups of tags applied to Amazon EC2 instances. -
setEc2TagSet
Information about groups of tags applied to Amazon EC2 instances. -
getEcsServices
The target Amazon ECS services in the deployment group. -
setEcsServices
The target Amazon ECS services in the deployment group. -
setEcsServices
The target Amazon ECS services in the deployment group. -
getLoadBalancerInfo
Information about the load balancer to use in a deployment. -
setLoadBalancerInfo
Information about the load balancer to use in a deployment. -
setLoadBalancerInfo
@Stability(Stable) public void setLoadBalancerInfo(@Nullable CfnDeploymentGroup.LoadBalancerInfoProperty value) Information about the load balancer to use in a deployment. -
getOnPremisesInstanceTagFilters
The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. -
setOnPremisesInstanceTagFilters
The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. -
setOnPremisesInstanceTagFilters
The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. -
getOnPremisesTagSet
Information about groups of tags applied to on-premises instances. -
setOnPremisesTagSet
Information about groups of tags applied to on-premises instances. -
setOnPremisesTagSet
@Stability(Stable) public void setOnPremisesTagSet(@Nullable CfnDeploymentGroup.OnPremisesTagSetProperty value) Information about groups of tags applied to on-premises instances. -
getOutdatedInstancesStrategy
Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. -
setOutdatedInstancesStrategy
Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. -
getTagsRaw
The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. -
setTagsRaw
The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. -
getTerminationHookEnabled
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. -
setTerminationHookEnabled
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. -
setTerminationHookEnabled
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group. -
getTriggerConfigurations
Information about triggers associated with the deployment group. -
setTriggerConfigurations
Information about triggers associated with the deployment group. -
setTriggerConfigurations
Information about triggers associated with the deployment group.
-