Class CfnDeploymentGroup

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:48.953Z") @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 the AWS::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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getApplicationName

      @Stability(Stable) @NotNull public String getApplicationName()
      The name of an existing CodeDeploy application to associate this deployment group with.
    • setApplicationName

      @Stability(Stable) public void setApplicationName(@NotNull String value)
      The name of an existing CodeDeploy application to associate this deployment group with.
    • getServiceRoleArn

      @Stability(Stable) @NotNull public String getServiceRoleArn()
      A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.
    • setServiceRoleArn

      @Stability(Stable) public void setServiceRoleArn(@NotNull String value)
      A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.
    • getAlarmConfiguration

      @Stability(Stable) @Nullable public Object getAlarmConfiguration()
      Information about the Amazon CloudWatch alarms that are associated with the deployment group.
    • setAlarmConfiguration

      @Stability(Stable) public void setAlarmConfiguration(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getAutoRollbackConfiguration()
      Information about the automatic rollback configuration that is associated with the deployment group.
    • setAutoRollbackConfiguration

      @Stability(Stable) public void setAutoRollbackConfiguration(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public List<String> getAutoScalingGroups()
      A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created.
    • setAutoScalingGroups

      @Stability(Stable) public void setAutoScalingGroups(@Nullable List<String> value)
      A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created.
    • getBlueGreenDeploymentConfiguration

      @Stability(Stable) @Nullable public Object getBlueGreenDeploymentConfiguration()
      Information about blue/green deployment options for a deployment group.
    • setBlueGreenDeploymentConfiguration

      @Stability(Stable) public void setBlueGreenDeploymentConfiguration(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getDeployment()
      The application revision to deploy to this deployment group.
    • setDeployment

      @Stability(Stable) public void setDeployment(@Nullable IResolvable value)
      The application revision to deploy to this deployment group.
    • setDeployment

      @Stability(Stable) public void setDeployment(@Nullable CfnDeploymentGroup.DeploymentProperty value)
      The application revision to deploy to this deployment group.
    • getDeploymentConfigName

      @Stability(Stable) @Nullable public String getDeploymentConfigName()
      A deployment configuration name or a predefined configuration name.
    • setDeploymentConfigName

      @Stability(Stable) public void setDeploymentConfigName(@Nullable String value)
      A deployment configuration name or a predefined configuration name.
    • getDeploymentGroupName

      @Stability(Stable) @Nullable public String getDeploymentGroupName()
      A name for the deployment group.
    • setDeploymentGroupName

      @Stability(Stable) public void setDeploymentGroupName(@Nullable String value)
      A name for the deployment group.
    • getDeploymentStyle

      @Stability(Stable) @Nullable public Object getDeploymentStyle()
      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 IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getEc2TagFilters()
      The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.
    • setEc2TagFilters

      @Stability(Stable) public void setEc2TagFilters(@Nullable IResolvable value)
      The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.
    • setEc2TagFilters

      @Stability(Stable) public void setEc2TagFilters(@Nullable List<Object> value)
      The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.
    • getEc2TagSet

      @Stability(Stable) @Nullable public Object getEc2TagSet()
      Information about groups of tags applied to Amazon EC2 instances.
    • setEc2TagSet

      @Stability(Stable) public void setEc2TagSet(@Nullable IResolvable value)
      Information about groups of tags applied to Amazon EC2 instances.
    • setEc2TagSet

      @Stability(Stable) public void setEc2TagSet(@Nullable CfnDeploymentGroup.EC2TagSetProperty value)
      Information about groups of tags applied to Amazon EC2 instances.
    • getEcsServices

      @Stability(Stable) @Nullable public Object getEcsServices()
      The target Amazon ECS services in the deployment group.
    • setEcsServices

      @Stability(Stable) public void setEcsServices(@Nullable IResolvable value)
      The target Amazon ECS services in the deployment group.
    • setEcsServices

      @Stability(Stable) public void setEcsServices(@Nullable List<Object> value)
      The target Amazon ECS services in the deployment group.
    • getLoadBalancerInfo

      @Stability(Stable) @Nullable public Object getLoadBalancerInfo()
      Information about the load balancer to use in a deployment.
    • setLoadBalancerInfo

      @Stability(Stable) public void setLoadBalancerInfo(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getOnPremisesInstanceTagFilters()
      The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.
    • setOnPremisesInstanceTagFilters

      @Stability(Stable) public void setOnPremisesInstanceTagFilters(@Nullable IResolvable value)
      The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.
    • setOnPremisesInstanceTagFilters

      @Stability(Stable) public void setOnPremisesInstanceTagFilters(@Nullable List<Object> value)
      The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.
    • getOnPremisesTagSet

      @Stability(Stable) @Nullable public Object getOnPremisesTagSet()
      Information about groups of tags applied to on-premises instances.
    • setOnPremisesTagSet

      @Stability(Stable) public void setOnPremisesTagSet(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public String getOutdatedInstancesStrategy()
      Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.
    • setOutdatedInstancesStrategy

      @Stability(Stable) public void setOutdatedInstancesStrategy(@Nullable String value)
      Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.
    • getTerminationHookEnabled

      @Stability(Stable) @Nullable public Object getTerminationHookEnabled()
      Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.
    • setTerminationHookEnabled

      @Stability(Stable) public void setTerminationHookEnabled(@Nullable Boolean value)
      Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.
    • setTerminationHookEnabled

      @Stability(Stable) public void setTerminationHookEnabled(@Nullable IResolvable value)
      Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.
    • getTriggerConfigurations

      @Stability(Stable) @Nullable public Object getTriggerConfigurations()
      Information about triggers associated with the deployment group.
    • setTriggerConfigurations

      @Stability(Stable) public void setTriggerConfigurations(@Nullable IResolvable value)
      Information about triggers associated with the deployment group.
    • setTriggerConfigurations

      @Stability(Stable) public void setTriggerConfigurations(@Nullable List<Object> value)
      Information about triggers associated with the deployment group.