CfnDeploymentGroupProps

class aws_cdk.aws_codedeploy.CfnDeploymentGroupProps(*, application_name, service_role_arn, alarm_configuration=None, auto_rollback_configuration=None, auto_scaling_groups=None, blue_green_deployment_configuration=None, deployment=None, deployment_config_name=None, deployment_group_name=None, deployment_style=None, ec2_tag_filters=None, ec2_tag_set=None, ecs_services=None, load_balancer_info=None, on_premises_instance_tag_filters=None, on_premises_tag_set=None, outdated_instances_strategy=None, tags=None, trigger_configurations=None)

Bases: object

Properties for defining a CfnDeploymentGroup.

Parameters
  • application_name (str) – The name of an existing CodeDeploy application to associate this deployment group with.

  • service_role_arn (str) – A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf. For more information, see Create a Service Role for AWS CodeDeploy in the AWS CodeDeploy User Guide . .. epigraph:: 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 .

  • alarm_configuration (Union[IResolvable, AlarmConfigurationProperty, Dict[str, Any], None]) – Information about the Amazon CloudWatch alarms that are associated with the deployment group.

  • auto_rollback_configuration (Union[IResolvable, AutoRollbackConfigurationProperty, Dict[str, Any], None]) – Information about the automatic rollback configuration that is associated with the deployment group. If you specify this property, don’t specify the Deployment property.

  • auto_scaling_groups (Optional[Sequence[str]]) – A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created. Duplicates are not allowed.

  • blue_green_deployment_configuration (Union[IResolvable, BlueGreenDeploymentConfigurationProperty, Dict[str, Any], None]) – Information about blue/green deployment options for a deployment group.

  • deployment (Union[IResolvable, DeploymentProperty, Dict[str, Any], None]) – The application revision to deploy to this deployment group. 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.

  • deployment_config_name (Optional[str]) – A deployment configuration name or a predefined configuration name. 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 .

  • deployment_group_name (Optional[str]) – A name for the deployment group. 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 . .. epigraph:: 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.

  • deployment_style (Union[IResolvable, DeploymentStyleProperty, Dict[str, Any], None]) – Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer. If you specify this property with a blue/green deployment type, don’t specify the AutoScalingGroups , LoadBalancerInfo , or Deployment properties. .. epigraph:: 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.

  • ec2_tag_filters (Union[IResolvable, Sequence[Union[IResolvable, EC2TagFilterProperty, Dict[str, Any]]], None]) – The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. 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.

  • ec2_tag_set (Union[IResolvable, EC2TagSetProperty, Dict[str, Any], None]) – Information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilter .

  • ecs_services (Union[IResolvable, Sequence[Union[IResolvable, ECSServiceProperty, Dict[str, Any]]], None]) – The target Amazon ECS services in the deployment group. 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> .

  • load_balancer_info (Union[IResolvable, LoadBalancerInfoProperty, Dict[str, Any], None]) – Information about the load balancer to use in a deployment. For more information, see Integrating CodeDeploy with Elastic Load Balancing in the AWS CodeDeploy User Guide .

  • on_premises_instance_tag_filters (Union[IResolvable, Sequence[Union[IResolvable, TagFilterProperty, Dict[str, Any]]], None]) – The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. 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.

  • on_premises_tag_set (Union[IResolvable, OnPremisesTagSetProperty, Dict[str, Any], None]) – Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all the tag groups. You can specify OnPremisesInstanceTagFilters or OnPremisesInstanceTagSet , but not both.

  • outdated_instances_strategy (Optional[str]) – Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. 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.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.

  • trigger_configurations (Union[IResolvable, Sequence[Union[IResolvable, TriggerConfigProperty, Dict[str, Any]]], None]) – Information about triggers associated with the deployment group. Duplicates are not allowed

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_codedeploy as codedeploy

cfn_deployment_group_props = codedeploy.CfnDeploymentGroupProps(
    application_name="applicationName",
    service_role_arn="serviceRoleArn",

    # the properties below are optional
    alarm_configuration=codedeploy.CfnDeploymentGroup.AlarmConfigurationProperty(
        alarms=[codedeploy.CfnDeploymentGroup.AlarmProperty(
            name="name"
        )],
        enabled=False,
        ignore_poll_alarm_failure=False
    ),
    auto_rollback_configuration=codedeploy.CfnDeploymentGroup.AutoRollbackConfigurationProperty(
        enabled=False,
        events=["events"]
    ),
    auto_scaling_groups=["autoScalingGroups"],
    blue_green_deployment_configuration=codedeploy.CfnDeploymentGroup.BlueGreenDeploymentConfigurationProperty(
        deployment_ready_option=codedeploy.CfnDeploymentGroup.DeploymentReadyOptionProperty(
            action_on_timeout="actionOnTimeout",
            wait_time_in_minutes=123
        ),
        green_fleet_provisioning_option=codedeploy.CfnDeploymentGroup.GreenFleetProvisioningOptionProperty(
            action="action"
        ),
        terminate_blue_instances_on_deployment_success=codedeploy.CfnDeploymentGroup.BlueInstanceTerminationOptionProperty(
            action="action",
            termination_wait_time_in_minutes=123
        )
    ),
    deployment=codedeploy.CfnDeploymentGroup.DeploymentProperty(
        revision=codedeploy.CfnDeploymentGroup.RevisionLocationProperty(
            git_hub_location=codedeploy.CfnDeploymentGroup.GitHubLocationProperty(
                commit_id="commitId",
                repository="repository"
            ),
            revision_type="revisionType",
            s3_location=codedeploy.CfnDeploymentGroup.S3LocationProperty(
                bucket="bucket",
                key="key",

                # the properties below are optional
                bundle_type="bundleType",
                e_tag="eTag",
                version="version"
            )
        ),

        # the properties below are optional
        description="description",
        ignore_application_stop_failures=False
    ),
    deployment_config_name="deploymentConfigName",
    deployment_group_name="deploymentGroupName",
    deployment_style=codedeploy.CfnDeploymentGroup.DeploymentStyleProperty(
        deployment_option="deploymentOption",
        deployment_type="deploymentType"
    ),
    ec2_tag_filters=[codedeploy.CfnDeploymentGroup.EC2TagFilterProperty(
        key="key",
        type="type",
        value="value"
    )],
    ec2_tag_set=codedeploy.CfnDeploymentGroup.EC2TagSetProperty(
        ec2_tag_set_list=[codedeploy.CfnDeploymentGroup.EC2TagSetListObjectProperty(
            ec2_tag_group=[codedeploy.CfnDeploymentGroup.EC2TagFilterProperty(
                key="key",
                type="type",
                value="value"
            )]
        )]
    ),
    ecs_services=[codedeploy.CfnDeploymentGroup.ECSServiceProperty(
        cluster_name="clusterName",
        service_name="serviceName"
    )],
    load_balancer_info=codedeploy.CfnDeploymentGroup.LoadBalancerInfoProperty(
        elb_info_list=[codedeploy.CfnDeploymentGroup.ELBInfoProperty(
            name="name"
        )],
        target_group_info_list=[codedeploy.CfnDeploymentGroup.TargetGroupInfoProperty(
            name="name"
        )],
        target_group_pair_info_list=[codedeploy.CfnDeploymentGroup.TargetGroupPairInfoProperty(
            prod_traffic_route=codedeploy.CfnDeploymentGroup.TrafficRouteProperty(
                listener_arns=["listenerArns"]
            ),
            target_groups=[codedeploy.CfnDeploymentGroup.TargetGroupInfoProperty(
                name="name"
            )],
            test_traffic_route=codedeploy.CfnDeploymentGroup.TrafficRouteProperty(
                listener_arns=["listenerArns"]
            )
        )]
    ),
    on_premises_instance_tag_filters=[codedeploy.CfnDeploymentGroup.TagFilterProperty(
        key="key",
        type="type",
        value="value"
    )],
    on_premises_tag_set=codedeploy.CfnDeploymentGroup.OnPremisesTagSetProperty(
        on_premises_tag_set_list=[codedeploy.CfnDeploymentGroup.OnPremisesTagSetListObjectProperty(
            on_premises_tag_group=[codedeploy.CfnDeploymentGroup.TagFilterProperty(
                key="key",
                type="type",
                value="value"
            )]
        )]
    ),
    outdated_instances_strategy="outdatedInstancesStrategy",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    trigger_configurations=[codedeploy.CfnDeploymentGroup.TriggerConfigProperty(
        trigger_events=["triggerEvents"],
        trigger_name="triggerName",
        trigger_target_arn="triggerTargetArn"
    )]
)

Attributes

alarm_configuration

Information about the Amazon CloudWatch alarms that are associated with the deployment group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-alarmconfiguration

Return type

Union[IResolvable, AlarmConfigurationProperty, None]

application_name

The name of an existing CodeDeploy application to associate this deployment group with.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-applicationname

Return type

str

auto_rollback_configuration

Information about the automatic rollback configuration that is associated with the deployment group.

If you specify this property, don’t specify the Deployment property.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration

Return type

Union[IResolvable, AutoRollbackConfigurationProperty, None]

auto_scaling_groups

A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created.

Duplicates are not allowed.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-autoscalinggroups

Return type

Optional[List[str]]

blue_green_deployment_configuration

Information about blue/green deployment options for a deployment group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration

Return type

Union[IResolvable, BlueGreenDeploymentConfigurationProperty, None]

deployment

The application revision to deploy to this deployment group.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-deployment

Return type

Union[IResolvable, DeploymentProperty, None]

deployment_config_name

A deployment configuration name or a predefined configuration name.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-deploymentconfigname

Return type

Optional[str]

deployment_group_name

A name for the deployment group.

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 . .. epigraph:

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.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-deploymentgroupname

Return type

Optional[str]

deployment_style

Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer.

If you specify this property with a blue/green deployment type, don’t specify the AutoScalingGroups , LoadBalancerInfo , or Deployment properties. .. epigraph:

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 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html>`_ for more information.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-deploymentstyle

Return type

Union[IResolvable, DeploymentStyleProperty, None]

ec2_tag_filters

The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-ec2tagfilters

Return type

Union[IResolvable, List[Union[IResolvable, EC2TagFilterProperty]], None]

ec2_tag_set

Information about groups of tags applied to Amazon EC2 instances.

The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilter .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-ec2tagset

Return type

Union[IResolvable, EC2TagSetProperty, None]

ecs_services

The target Amazon ECS services in the deployment group.

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> .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-ecsservices

Return type

Union[IResolvable, List[Union[IResolvable, ECSServiceProperty]], None]

load_balancer_info

Information about the load balancer to use in a deployment.

For more information, see Integrating CodeDeploy with Elastic Load Balancing in the AWS CodeDeploy User Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-loadbalancerinfo

Return type

Union[IResolvable, LoadBalancerInfoProperty, None]

on_premises_instance_tag_filters

The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-onpremisesinstancetagfilters

Return type

Union[IResolvable, List[Union[IResolvable, TagFilterProperty]], None]

on_premises_tag_set

Information about groups of tags applied to on-premises instances.

The deployment group includes only on-premises instances identified by all the tag groups.

You can specify OnPremisesInstanceTagFilters or OnPremisesInstanceTagSet , but not both.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-onpremisestagset

Return type

Union[IResolvable, OnPremisesTagSetProperty, None]

outdated_instances_strategy

Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-outdatedinstancesstrategy

Return type

Optional[str]

service_role_arn

A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf.

For more information, see Create a Service Role for AWS CodeDeploy in the AWS CodeDeploy User Guide . .. epigraph:

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 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html>`_ .
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-servicerolearn

Return type

str

tags

The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.

Each tag consists of a key and an optional value, both of which you define.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-tags

Return type

Optional[List[CfnTag]]

trigger_configurations

Information about triggers associated with the deployment group.

Duplicates are not allowed

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-triggerconfigurations

Return type

Union[IResolvable, List[Union[IResolvable, TriggerConfigProperty]], None]