CfnDeploymentGroup¶
-
class
aws_cdk.aws_codedeploy.
CfnDeploymentGroup
(scope, id, *, 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:
aws_cdk.core.CfnResource
A CloudFormation
AWS::CodeDeploy::DeploymentGroup
.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 . .. epigraph: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 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html>`_ for more information.
- CloudformationResource
AWS::CodeDeploy::DeploymentGroup
- Link
- 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 = codedeploy.CfnDeploymentGroup(self, "MyCfnDeploymentGroup", 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" )] )
Create a new
AWS::CodeDeploy::DeploymentGroup
.- Parameters
scope (
Construct
) –scope in which this resource is defined.
id (
str
) –scoped id of the resource.
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
,None
]) – Information about the Amazon CloudWatch alarms that are associated with the deployment group.auto_rollback_configuration (
Union
[IResolvable
,AutoRollbackConfigurationProperty
,None
]) – Information about the automatic rollback configuration that is associated with the deployment group. If you specify this property, don’t specify theDeployment
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
,None
]) – Information about blue/green deployment options for a deployment group.deployment (
Union
[IResolvable
,DeploymentProperty
,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 theAutoRollbackConfiguration
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
,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 theAutoScalingGroups
,LoadBalancerInfo
, orDeployment
properties. .. epigraph:: For blue/green deployments, AWS CloudFormation supports deployments on Lambda compute platforms only. You can perform Amazon ECS blue/green deployments usingAWS::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
]],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 specifyEC2TagFilters
orEc2TagSet
, but not both.ec2_tag_set (
Union
[IResolvable
,EC2TagSetProperty
,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 asec2TagFilter
.ecs_services (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ECSServiceProperty
]],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
,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
]],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 specifyOnPremisesInstanceTagFilters
orOnPremisesInstanceTagSet
, but not both.on_premises_tag_set (
Union
[IResolvable
,OnPremisesTagSetProperty
,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 specifyOnPremisesInstanceTagFilters
orOnPremisesInstanceTagSet
, 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 toUPDATE
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 toIGNORE
, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.tags (
Optional
[Sequence
[CfnTag
]]) – 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
]],None
]) – Information about triggers associated with the deployment group. Duplicates are not allowed
Methods
-
add_deletion_override
(path)¶ Syntactic sugar for
addOverride(path, undefined)
.- Parameters
path (
str
) – The path of the value to delete.- Return type
None
-
add_depends_on
(target)¶ Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters
target (
CfnResource
) –- Return type
None
-
add_metadata
(key, value)¶ Add a value to the CloudFormation Resource Metadata.
- Parameters
key (
str
) –value (
Any
) –
- See
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- Return type
None
-
add_override
(path, value)¶ Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type
None
-
add_property_deletion_override
(property_path)¶ Adds an override that deletes the value of a property from the resource definition.
- Parameters
property_path (
str
) – The path to the property.- Return type
None
-
add_property_override
(property_path, value)¶ Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type
None
-
apply_removal_policy
(policy=None, *, apply_to_update_replace_policy=None, default=None)¶ Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Parameters
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.
- Return type
None
-
get_att
(attribute_name)¶ Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters
attribute_name (
str
) – The name of the attribute.- Return type
-
get_metadata
(key)¶ Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters
key (
str
) –- See
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- Return type
Any
-
inspect
(inspector)¶ Examines the CloudFormation resource and discloses attributes.
- Parameters
inspector (
TreeInspector
) –tree inspector to collect and process attributes.
- Return type
None
-
override_logical_id
(new_logical_id)¶ Overrides the auto-generated logical ID with a specific ID.
- Parameters
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type
None
-
to_string
()¶ Returns a string representation of this construct.
- Return type
str
- Returns
a string representation of this resource
Attributes
-
CFN_RESOURCE_TYPE_NAME
= 'AWS::CodeDeploy::DeploymentGroup'¶
-
alarm_configuration
¶ Information about the Amazon CloudWatch alarms that are associated with the deployment group.
-
application_name
¶ The name of an existing CodeDeploy application to associate this deployment group with.
-
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.
-
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.
-
blue_green_deployment_configuration
¶ Information about blue/green deployment options for a deployment group.
-
cfn_options
¶ Options for this resource, such as condition, update policy etc.
- Return type
-
cfn_resource_type
¶ AWS resource type.
- Return type
str
-
creation_stack
¶ return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- Return type
List
[str
]
-
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.
-
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 .
-
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.
-
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
, orDeployment
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.
-
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
orEc2TagSet
, but not both.
-
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
.
-
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
- 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 .
-
logical_id
¶ The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Return type
str
- Returns
the logical ID as a stringified token. This value will only get resolved during synthesis.
-
node
¶ The construct tree node associated with this construct.
- Return type
-
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
orOnPremisesInstanceTagSet
, but not both.
-
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
orOnPremisesInstanceTagSet
, but not both.
-
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.
-
ref
¶ Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.- Return type
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>`_ .
-
stack
¶ The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- Return type
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
¶ Information about triggers associated with the deployment group.
Duplicates are not allowed
Static Methods
-
classmethod
is_cfn_element
(x)¶ Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters
x (
Any
) –- Return type
bool
- Returns
The construct as a stack element or undefined if it is not a stack element.
-
classmethod
is_cfn_resource
(construct)¶ Check whether the given construct is a CfnResource.
- Parameters
construct (
IConstruct
) –- Return type
bool
-
classmethod
is_construct
(x)¶ Return whether the given object is a Construct.
- Parameters
x (
Any
) –- Return type
bool
AlarmConfigurationProperty¶
-
class
CfnDeploymentGroup.
AlarmConfigurationProperty
(*, alarms=None, enabled=None, ignore_poll_alarm_failure=None)¶ Bases:
object
The
AlarmConfiguration
property type configures CloudWatch alarms for an AWS CodeDeploy deployment group.AlarmConfiguration
is a property of the DeploymentGroup resource.- Parameters
alarms (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,AlarmProperty
]],None
]) – A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.enabled (
Union
[bool
,IResolvable
,None
]) – Indicates whether the alarm configuration is enabled.ignore_poll_alarm_failure (
Union
[bool
,IResolvable
,None
]) – Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch . The default value isfalse
. -true
: The deployment proceeds even if alarm status information can’t be retrieved from CloudWatch . -false
: The deployment stops if alarm status information can’t be retrieved from CloudWatch .
- Link
- 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 alarm_configuration_property = codedeploy.CfnDeploymentGroup.AlarmConfigurationProperty( alarms=[codedeploy.CfnDeploymentGroup.AlarmProperty( name="name" )], enabled=False, ignore_poll_alarm_failure=False )
Attributes
-
alarms
¶ A list of alarms configured for the deployment group.
A maximum of 10 alarms can be added to a deployment group.
-
enabled
¶ Indicates whether the alarm configuration is enabled.
-
ignore_poll_alarm_failure
¶ Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch .
The default value is
false
.true
: The deployment proceeds even if alarm status information can’t be retrieved from CloudWatch .false
: The deployment stops if alarm status information can’t be retrieved from CloudWatch .
AlarmProperty¶
-
class
CfnDeploymentGroup.
AlarmProperty
(*, name=None)¶ Bases:
object
The
Alarm
property type specifies a CloudWatch alarm to use for an AWS CodeDeploy deployment group.The
Alarm
property of the CodeDeploy DeploymentGroup AlarmConfiguration property contains a list ofAlarm
property types.- Parameters
name (
Optional
[str
]) – The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.- Link
- 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 alarm_property = codedeploy.CfnDeploymentGroup.AlarmProperty( name="name" )
Attributes
-
name
¶ The name of the alarm.
Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.
AutoRollbackConfigurationProperty¶
-
class
CfnDeploymentGroup.
AutoRollbackConfigurationProperty
(*, enabled=None, events=None)¶ Bases:
object
The
AutoRollbackConfiguration
property type configures automatic rollback for an AWS CodeDeploy deployment group when a deployment is not completed successfully.For more information, see Automatic Rollbacks in the AWS CodeDeploy User Guide .
AutoRollbackConfiguration
is a property of the DeploymentGroup resource.- Parameters
enabled (
Union
[bool
,IResolvable
,None
]) – Indicates whether a defined automatic rollback configuration is currently enabled.events (
Optional
[Sequence
[str
]]) – The event type or types that trigger a rollback. Valid values areDEPLOYMENT_FAILURE
,DEPLOYMENT_STOP_ON_ALARM
, orDEPLOYMENT_STOP_ON_REQUEST
.
- Link
- 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 auto_rollback_configuration_property = codedeploy.CfnDeploymentGroup.AutoRollbackConfigurationProperty( enabled=False, events=["events"] )
Attributes
-
enabled
¶ Indicates whether a defined automatic rollback configuration is currently enabled.
-
events
¶ The event type or types that trigger a rollback.
Valid values are
DEPLOYMENT_FAILURE
,DEPLOYMENT_STOP_ON_ALARM
, orDEPLOYMENT_STOP_ON_REQUEST
.
BlueGreenDeploymentConfigurationProperty¶
-
class
CfnDeploymentGroup.
BlueGreenDeploymentConfigurationProperty
(*, deployment_ready_option=None, green_fleet_provisioning_option=None, terminate_blue_instances_on_deployment_success=None)¶ Bases:
object
Information about blue/green deployment options for a deployment group.
- Parameters
deployment_ready_option (
Union
[IResolvable
,DeploymentReadyOptionProperty
,None
]) – Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.green_fleet_provisioning_option (
Union
[IResolvable
,GreenFleetProvisioningOptionProperty
,None
]) – Information about how instances are provisioned for a replacement environment in a blue/green deployment.terminate_blue_instances_on_deployment_success (
Union
[IResolvable
,BlueInstanceTerminationOptionProperty
,None
]) – Information about whether to terminate instances in the original fleet during a blue/green deployment.
- Link
- 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 blue_green_deployment_configuration_property = 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 ) )
Attributes
-
deployment_ready_option
¶ Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
- Link
- Return type
Union
[IResolvable
,DeploymentReadyOptionProperty
,None
]
-
green_fleet_provisioning_option
¶ Information about how instances are provisioned for a replacement environment in a blue/green deployment.
- Link
- Return type
Union
[IResolvable
,GreenFleetProvisioningOptionProperty
,None
]
-
terminate_blue_instances_on_deployment_success
¶ Information about whether to terminate instances in the original fleet during a blue/green deployment.
- Link
- Return type
Union
[IResolvable
,BlueInstanceTerminationOptionProperty
,None
]
BlueInstanceTerminationOptionProperty¶
-
class
CfnDeploymentGroup.
BlueInstanceTerminationOptionProperty
(*, action=None, termination_wait_time_in_minutes=None)¶ Bases:
object
Information about whether instances in the original environment are terminated when a blue/green deployment is successful.
BlueInstanceTerminationOption
does not apply to Lambda deployments.- Parameters
action (
Optional
[str
]) – The action to take on instances in the original environment after a successful blue/green deployment. -TERMINATE
: Instances are terminated after a specified wait time. -KEEP_ALIVE
: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.termination_wait_time_in_minutes (
Union
[int
,float
,None
]) – For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set. The maximum setting is 2880 minutes (2 days).
- Link
- 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 blue_instance_termination_option_property = codedeploy.CfnDeploymentGroup.BlueInstanceTerminationOptionProperty( action="action", termination_wait_time_in_minutes=123 )
Attributes
-
action
¶ The action to take on instances in the original environment after a successful blue/green deployment.
TERMINATE
: Instances are terminated after a specified wait time.KEEP_ALIVE
: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.
-
termination_wait_time_in_minutes
¶ For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.
For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.
The maximum setting is 2880 minutes (2 days).
- Link
- Return type
Union
[int
,float
,None
]
DeploymentProperty¶
-
class
CfnDeploymentGroup.
DeploymentProperty
(*, revision, description=None, ignore_application_stop_failures=None)¶ Bases:
object
Deployment
is a property of the DeploymentGroup resource that specifies an AWS CodeDeploy application revision to be deployed to instances in the deployment group. If you specify an application revision, your target revision is deployed as soon as the provisioning process is complete.- Parameters
revision (
Union
[IResolvable
,RevisionLocationProperty
]) – Information about the location of stored application artifacts and the service from which to retrieve them.description (
Optional
[str
]) – A comment about the deployment.ignore_application_stop_failures (
Union
[bool
,IResolvable
,None
]) – If true, then if anApplicationStop
,BeforeBlockTraffic
, orAfterBlockTraffic
deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, ifApplicationStop
fails, the deployment continues with DownloadBundle. IfBeforeBlockTraffic
fails, the deployment continues withBlockTraffic
. IfAfterBlockTraffic
fails, the deployment continues withApplicationStop
. If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted. During a deployment, the AWS CodeDeploy agent runs the scripts specified forApplicationStop
,BeforeBlockTraffic
, andAfterBlockTraffic
in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail. If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and useignoreApplicationStopFailures
to specify that theApplicationStop
,BeforeBlockTraffic
, andAfterBlockTraffic
failures should be ignored.
- Link
- 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 deployment_property = 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 )
Attributes
-
description
¶ A comment about the deployment.
-
ignore_application_stop_failures
¶ If true, then if an
ApplicationStop
,BeforeBlockTraffic
, orAfterBlockTraffic
deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event.For example, if
ApplicationStop
fails, the deployment continues with DownloadBundle. IfBeforeBlockTraffic
fails, the deployment continues withBlockTraffic
. IfAfterBlockTraffic
fails, the deployment continues withApplicationStop
.If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.
During a deployment, the AWS CodeDeploy agent runs the scripts specified for
ApplicationStop
,BeforeBlockTraffic
, andAfterBlockTraffic
in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use
ignoreApplicationStopFailures
to specify that theApplicationStop
,BeforeBlockTraffic
, andAfterBlockTraffic
failures should be ignored.
-
revision
¶ Information about the location of stored application artifacts and the service from which to retrieve them.
DeploymentReadyOptionProperty¶
-
class
CfnDeploymentGroup.
DeploymentReadyOptionProperty
(*, action_on_timeout=None, wait_time_in_minutes=None)¶ Bases:
object
Information about how traffic is rerouted to instances in a replacement environment in a blue/green deployment.
- Parameters
action_on_timeout (
Optional
[str
]) – Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment. - CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment. - STOP_DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using ContinueDeployment . If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.wait_time_in_minutes (
Union
[int
,float
,None
]) – The number of minutes to wait before the status of a blue/green deployment is changed to Stopped if rerouting is not started manually. Applies only to theSTOP_DEPLOYMENT
option foractionOnTimeout
.
- Link
- 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 deployment_ready_option_property = codedeploy.CfnDeploymentGroup.DeploymentReadyOptionProperty( action_on_timeout="actionOnTimeout", wait_time_in_minutes=123 )
Attributes
-
action_on_timeout
¶ Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.
STOP_DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using ContinueDeployment . If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.
-
wait_time_in_minutes
¶ The number of minutes to wait before the status of a blue/green deployment is changed to Stopped if rerouting is not started manually.
Applies only to the
STOP_DEPLOYMENT
option foractionOnTimeout
.
DeploymentStyleProperty¶
-
class
CfnDeploymentGroup.
DeploymentStyleProperty
(*, deployment_option=None, deployment_type=None)¶ Bases:
object
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.
- Parameters
deployment_option (
Optional
[str
]) – Indicates whether to route deployment traffic behind a load balancer. .. epigraph:: An Amazon EC2 Application Load Balancer or Network Load Balancer is required for an Amazon ECS deployment.deployment_type (
Optional
[str
]) – Indicates whether to run an in-place or blue/green deployment.
- Link
- 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 deployment_style_property = codedeploy.CfnDeploymentGroup.DeploymentStyleProperty( deployment_option="deploymentOption", deployment_type="deploymentType" )
Attributes
-
deployment_option
¶ Indicates whether to route deployment traffic behind a load balancer.
An Amazon EC2 Application Load Balancer or Network Load Balancer is required for an Amazon ECS deployment.
-
deployment_type
¶ Indicates whether to run an in-place or blue/green deployment.
EC2TagFilterProperty¶
-
class
CfnDeploymentGroup.
EC2TagFilterProperty
(*, key=None, type=None, value=None)¶ Bases:
object
Information about an Amazon EC2 tag filter.
For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see Tagging Instances for Deployment Groups in AWS CodeDeploy in the AWS CodeDeploy User Guide .
- Parameters
key (
Optional
[str
]) – The tag filter key.type (
Optional
[str
]) – The tag filter type:. -KEY_ONLY
: Key only. -VALUE_ONLY
: Value only. -KEY_AND_VALUE
: Key and value.value (
Optional
[str
]) – The tag filter value.
- Link
- 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 e_c2_tag_filter_property = codedeploy.CfnDeploymentGroup.EC2TagFilterProperty( key="key", type="type", value="value" )
Attributes
-
key
¶ The tag filter key.
-
type
¶ .
KEY_ONLY
: Key only.VALUE_ONLY
: Value only.KEY_AND_VALUE
: Key and value.
- Link
- Type
The tag filter type
- Return type
Optional
[str
]
-
value
¶ The tag filter value.
EC2TagSetListObjectProperty¶
-
class
CfnDeploymentGroup.
EC2TagSetListObjectProperty
(*, ec2_tag_group=None)¶ Bases:
object
The
EC2TagSet
property type specifies 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 template as EC2TagFilters.
For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see Tagging Instances for Deployment Groups in AWS CodeDeploy in the AWS CodeDeploy User Guide .
EC2TagSet
is a property of the DeploymentGroup resource type.- Parameters
ec2_tag_group (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,EC2TagFilterProperty
]],None
]) – A list that contains other lists of Amazon EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.- Link
- 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 e_c2_tag_set_list_object_property = codedeploy.CfnDeploymentGroup.EC2TagSetListObjectProperty( ec2_tag_group=[codedeploy.CfnDeploymentGroup.EC2TagFilterProperty( key="key", type="type", value="value" )] )
Attributes
-
ec2_tag_group
¶ A list that contains other lists of Amazon EC2 instance tag groups.
For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
EC2TagSetProperty¶
-
class
CfnDeploymentGroup.
EC2TagSetProperty
(*, ec2_tag_set_list=None)¶ Bases:
object
The
EC2TagSet
property type specifies information about groups of tags applied to Amazon EC2 instances.The deployment group includes only Amazon EC2 instances identified by all the tag groups.
EC2TagSet
cannot be used in the same template asEC2TagFilter
.For information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see Tagging Instances for Deployment Groups in AWS CodeDeploy .
- Parameters
ec2_tag_set_list (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,EC2TagSetListObjectProperty
]],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.- Link
- 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 e_c2_tag_set_property = codedeploy.CfnDeploymentGroup.EC2TagSetProperty( ec2_tag_set_list=[codedeploy.CfnDeploymentGroup.EC2TagSetListObjectProperty( ec2_tag_group=[codedeploy.CfnDeploymentGroup.EC2TagFilterProperty( key="key", type="type", value="value" )] )] )
Attributes
-
ec2_tag_set_list
¶ 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.
ECSServiceProperty¶
-
class
CfnDeploymentGroup.
ECSServiceProperty
(*, cluster_name, service_name)¶ Bases:
object
Contains the service and cluster names used to identify an Amazon ECS deployment’s target.
- Parameters
cluster_name (
str
) – The name of the cluster that the Amazon ECS service is associated with.service_name (
str
) – The name of the target Amazon ECS service.
- Link
- 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 e_cSService_property = codedeploy.CfnDeploymentGroup.ECSServiceProperty( cluster_name="clusterName", service_name="serviceName" )
Attributes
-
cluster_name
¶ The name of the cluster that the Amazon ECS service is associated with.
-
service_name
¶ The name of the target Amazon ECS service.
ELBInfoProperty¶
-
class
CfnDeploymentGroup.
ELBInfoProperty
(*, name=None)¶ Bases:
object
The
ELBInfo
property type specifies information about the Elastic Load Balancing load balancer used for an CodeDeploy deployment group.If you specify the
ELBInfo
property, theDeploymentStyle.DeploymentOption
property must be set toWITH_TRAFFIC_CONTROL
for AWS CodeDeploy to route your traffic using the specified load balancers.ELBInfo
is a property of the AWS CodeDeploy DeploymentGroup LoadBalancerInfo property type.- Parameters
name (
Optional
[str
]) – For blue/green deployments, the name of the load balancer that is used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment is complete. .. epigraph:: AWS CloudFormation supports blue/green deployments on AWS Lambda compute platforms only.- Link
- 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 e_lBInfo_property = codedeploy.CfnDeploymentGroup.ELBInfoProperty( name="name" )
Attributes
-
name
¶ For blue/green deployments, the name of the load balancer that is used to route traffic from original instances to replacement instances in a blue/green deployment.
For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment is complete. .. epigraph:
AWS CloudFormation supports blue/green deployments on AWS Lambda compute platforms only.
GitHubLocationProperty¶
-
class
CfnDeploymentGroup.
GitHubLocationProperty
(*, commit_id, repository)¶ Bases:
object
GitHubLocation
is a property of the CodeDeploy DeploymentGroup Revision property that specifies the location of an application revision that is stored in GitHub.- Parameters
commit_id (
str
) – The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.repository (
str
) – The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision. Specify the value asaccount/repository
.
- Link
- 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 git_hub_location_property = codedeploy.CfnDeploymentGroup.GitHubLocationProperty( commit_id="commitId", repository="repository" )
Attributes
-
commit_id
¶ The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
-
repository
¶ The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.
Specify the value as
account/repository
.
GreenFleetProvisioningOptionProperty¶
-
class
CfnDeploymentGroup.
GreenFleetProvisioningOptionProperty
(*, action=None)¶ Bases:
object
Information about the instances that belong to the replacement environment in a blue/green deployment.
- Parameters
action (
Optional
[str
]) – The method used to add instances to a replacement environment. -DISCOVER_EXISTING
: Use instances that already exist or will be created manually. -COPY_AUTO_SCALING_GROUP
: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.- Link
- 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 green_fleet_provisioning_option_property = codedeploy.CfnDeploymentGroup.GreenFleetProvisioningOptionProperty( action="action" )
Attributes
-
action
¶ The method used to add instances to a replacement environment.
DISCOVER_EXISTING
: Use instances that already exist or will be created manually.COPY_AUTO_SCALING_GROUP
: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.
LoadBalancerInfoProperty¶
-
class
CfnDeploymentGroup.
LoadBalancerInfoProperty
(*, elb_info_list=None, target_group_info_list=None, target_group_pair_info_list=None)¶ Bases:
object
The
LoadBalancerInfo
property type specifies information about the load balancer or target group used for an AWS CodeDeploy deployment group.For more information, see Integrating CodeDeploy with Elastic Load Balancing in the AWS CodeDeploy User Guide .
For AWS CloudFormation to use the properties specified in
LoadBalancerInfo
, theDeploymentStyle.DeploymentOption
property must be set toWITH_TRAFFIC_CONTROL
. IfDeploymentStyle.DeploymentOption
is not set toWITH_TRAFFIC_CONTROL
, AWS CloudFormation ignores any settings specified inLoadBalancerInfo
. .. epigraph:AWS CloudFormation supports blue/green deployments on the AWS Lambda compute platform only.
LoadBalancerInfo
is a property of the DeploymentGroup resource.- Parameters
elb_info_list (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ELBInfoProperty
]],None
]) – An array that contains information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers. .. epigraph:: Adding more than one load balancer to the array is not supported.target_group_info_list (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,TargetGroupInfoProperty
]],None
]) – An array that contains information about the target group to use for load balancing in a deployment. In Elastic Load Balancing , target groups are used with Application Load Balancers . .. epigraph:: Adding more than one target group to the array is not supported.target_group_pair_info_list (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,TargetGroupPairInfoProperty
]],None
]) – The target group pair information. This is an array ofTargeGroupPairInfo
objects with a maximum size of one.
- Link
- 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 load_balancer_info_property = 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"] ) )] )
Attributes
-
elb_info_list
¶ An array that contains information about the load balancer to use for load balancing in a deployment.
In Elastic Load Balancing, load balancers are used with Classic Load Balancers. .. epigraph:
Adding more than one load balancer to the array is not supported.
-
target_group_info_list
¶ An array that contains information about the target group to use for load balancing in a deployment.
In Elastic Load Balancing , target groups are used with Application Load Balancers . .. epigraph:
Adding more than one target group to the array is not supported.
-
target_group_pair_info_list
¶ The target group pair information.
This is an array of
TargeGroupPairInfo
objects with a maximum size of one.
OnPremisesTagSetListObjectProperty¶
-
class
CfnDeploymentGroup.
OnPremisesTagSetListObjectProperty
(*, on_premises_tag_group=None)¶ Bases:
object
The
OnPremisesTagSetListObject
property type specifies lists of on-premises instance tag groups.In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
OnPremisesTagSetListObject
is a property of the CodeDeploy DeploymentGroup OnPremisesTagSet property type.- Parameters
on_premises_tag_group (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,TagFilterProperty
]],None
]) – Information about groups of on-premises instance tags.- Link
- 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 on_premises_tag_set_list_object_property = codedeploy.CfnDeploymentGroup.OnPremisesTagSetListObjectProperty( on_premises_tag_group=[codedeploy.CfnDeploymentGroup.TagFilterProperty( key="key", type="type", value="value" )] )
Attributes
-
on_premises_tag_group
¶ Information about groups of on-premises instance tags.
OnPremisesTagSetProperty¶
-
class
CfnDeploymentGroup.
OnPremisesTagSetProperty
(*, on_premises_tag_set_list=None)¶ Bases:
object
The
OnPremisesTagSet
property type specifies a list containing other lists of on-premises instance tag groups.In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see Tagging Instances for Deployment Groups in AWS CodeDeploy in the AWS CodeDeploy User Guide .
OnPremisesTagSet
is a property of the DeploymentGroup resource.- Parameters
on_premises_tag_set_list (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,OnPremisesTagSetListObjectProperty
]],None
]) – A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list. Duplicates are not allowed.- Link
- 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 on_premises_tag_set_property = codedeploy.CfnDeploymentGroup.OnPremisesTagSetProperty( on_premises_tag_set_list=[codedeploy.CfnDeploymentGroup.OnPremisesTagSetListObjectProperty( on_premises_tag_group=[codedeploy.CfnDeploymentGroup.TagFilterProperty( key="key", type="type", value="value" )] )] )
Attributes
-
on_premises_tag_set_list
¶ A list that contains other lists of on-premises instance tag groups.
For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
Duplicates are not allowed.
RevisionLocationProperty¶
-
class
CfnDeploymentGroup.
RevisionLocationProperty
(*, git_hub_location=None, revision_type=None, s3_location=None)¶ Bases:
object
RevisionLocation
is a property that defines the location of the CodeDeploy application revision to deploy.- Parameters
git_hub_location (
Union
[IResolvable
,GitHubLocationProperty
,None
]) – Information about the location of application artifacts stored in GitHub.revision_type (
Optional
[str
]) – The type of application revision:. - S3: An application revision stored in Amazon S3. - GitHub: An application revision stored in GitHub (EC2/On-premises deployments only). - String: A YAML-formatted or JSON-formatted string ( AWS Lambda deployments only). - AppSpecContent: AnAppSpecContent
object that contains the contents of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.s3_location (
Union
[IResolvable
,S3LocationProperty
,None
]) – Information about the location of a revision stored in Amazon S3.
- Link
- 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 revision_location_property = 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" ) )
Attributes
-
git_hub_location
¶ Information about the location of application artifacts stored in GitHub.
-
revision_type
¶ .
S3: An application revision stored in Amazon S3.
GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
String: A YAML-formatted or JSON-formatted string ( AWS Lambda deployments only).
AppSpecContent: An
AppSpecContent
object that contains the contents of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
- Link
- Type
The type of application revision
- Return type
Optional
[str
]
-
s3_location
¶ Information about the location of a revision stored in Amazon S3.
S3LocationProperty¶
-
class
CfnDeploymentGroup.
S3LocationProperty
(*, bucket, key, bundle_type=None, e_tag=None, version=None)¶ Bases:
object
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 ).- Parameters
bucket (
str
) – The name of the Amazon S3 bucket where the application revision is stored.key (
str
) – The name of the Amazon S3 object that represents the bundled artifacts for the application revision.bundle_type (
Optional
[str
]) – The file type of the application revision. Must be one of the following:. - JSON - tar: A tar archive file. - tgz: A compressed tar archive file. - YAML - zip: A zip archive file.e_tag (
Optional
[str
]) – The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision. If the ETag is not specified as an input parameter, ETag validation of the object is skipped.version (
Optional
[str
]) – A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision. If the version is not specified, the system uses the most recent version by default.
- Link
- 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 s3_location_property = codedeploy.CfnDeploymentGroup.S3LocationProperty( bucket="bucket", key="key", # the properties below are optional bundle_type="bundleType", e_tag="eTag", version="version" )
Attributes
-
bucket
¶ The name of the Amazon S3 bucket where the application revision is stored.
-
bundle_type
¶ .
JSON
tar: A tar archive file.
tgz: A compressed tar archive file.
YAML
zip: A zip archive file.
- Link
- Type
The file type of the application revision. Must be one of the following
- Return type
Optional
[str
]
-
e_tag
¶ The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.
If the ETag is not specified as an input parameter, ETag validation of the object is skipped.
-
key
¶ The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
-
version
¶ A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.
If the version is not specified, the system uses the most recent version by default.
TagFilterProperty¶
-
class
CfnDeploymentGroup.
TagFilterProperty
(*, key=None, type=None, value=None)¶ Bases:
object
TagFilter
is a property type of the AWS::CodeDeploy::DeploymentGroup resource that specifies which on-premises instances to associate with the deployment group. To register on-premise instances with AWS CodeDeploy , see Configure Existing On-Premises Instances by Using AWS CodeDeploy in the AWS CodeDeploy User Guide .For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see Tagging Instances for Deployment Groups in AWS CodeDeploy in the AWS CodeDeploy User Guide .
- Parameters
key (
Optional
[str
]) – The on-premises instance tag filter key.type (
Optional
[str
]) – The on-premises instance tag filter type:. - KEY_ONLY: Key only. - VALUE_ONLY: Value only. - KEY_AND_VALUE: Key and value.value (
Optional
[str
]) – The on-premises instance tag filter value.
- Link
- 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 tag_filter_property = codedeploy.CfnDeploymentGroup.TagFilterProperty( key="key", type="type", value="value" )
Attributes
-
key
¶ The on-premises instance tag filter key.
-
type
¶ .
KEY_ONLY: Key only.
VALUE_ONLY: Value only.
KEY_AND_VALUE: Key and value.
- Link
- Type
The on-premises instance tag filter type
- Return type
Optional
[str
]
-
value
¶ The on-premises instance tag filter value.
TargetGroupInfoProperty¶
-
class
CfnDeploymentGroup.
TargetGroupInfoProperty
(*, name=None)¶ Bases:
object
The
TargetGroupInfo
property type specifies information about a target group in Elastic Load Balancing to use in a deployment.Instances are registered as targets in a target group, and traffic is routed to the target group. For more information, see TargetGroupInfo in the AWS CodeDeploy API Reference
If you specify the
TargetGroupInfo
property, theDeploymentStyle.DeploymentOption
property must be set toWITH_TRAFFIC_CONTROL
for CodeDeploy to route your traffic using the specified target groups.TargetGroupInfo
is a property of the LoadBalancerInfo property type.- Parameters
name (
Optional
[str
]) – For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes. No duplicates allowed. .. epigraph:: AWS CloudFormation supports blue/green deployments on AWS Lambda compute platforms only. This value cannot exceed 32 characters, so you should use theName
property of the target group, or theTargetGroupName
attribute with theFn::GetAtt
intrinsic function, as shown in the following example. Don’t use the group’s Amazon Resource Name (ARN) orTargetGroupFullName
attribute.- Link
- 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 target_group_info_property = codedeploy.CfnDeploymentGroup.TargetGroupInfoProperty( name="name" )
Attributes
-
name
¶ For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with.
For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes. No duplicates allowed. .. epigraph:
AWS CloudFormation supports blue/green deployments on AWS Lambda compute platforms only.
This value cannot exceed 32 characters, so you should use the
Name
property of the target group, or theTargetGroupName
attribute with theFn::GetAtt
intrinsic function, as shown in the following example. Don’t use the group’s Amazon Resource Name (ARN) orTargetGroupFullName
attribute.
TargetGroupPairInfoProperty¶
-
class
CfnDeploymentGroup.
TargetGroupPairInfoProperty
(*, prod_traffic_route=None, target_groups=None, test_traffic_route=None)¶ Bases:
object
Information about two target groups and how traffic is routed during an Amazon ECS deployment.
An optional test traffic route can be specified.
- Parameters
prod_traffic_route (
Union
[IResolvable
,TrafficRouteProperty
,None
]) – The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.target_groups (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,TargetGroupInfoProperty
]],None
]) – One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.test_traffic_route (
Union
[IResolvable
,TrafficRouteProperty
,None
]) – An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.
- Link
- 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 target_group_pair_info_property = 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"] ) )
Attributes
-
prod_traffic_route
¶ The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
-
target_groups
¶ One pair of target groups.
One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.
-
test_traffic_route
¶ An optional path used by a load balancer to route test traffic after an Amazon ECS deployment.
Validation can occur while test traffic is served during a deployment.
TrafficRouteProperty¶
-
class
CfnDeploymentGroup.
TrafficRouteProperty
(*, listener_arns=None)¶ Bases:
object
Information about a listener.
The listener contains the path used to route traffic that is received from the load balancer to a target group.
- Parameters
listener_arns (
Optional
[Sequence
[str
]]) – The Amazon Resource Name (ARN) of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.- Link
- 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 traffic_route_property = codedeploy.CfnDeploymentGroup.TrafficRouteProperty( listener_arns=["listenerArns"] )
Attributes
-
listener_arns
¶ The Amazon Resource Name (ARN) of one listener.
The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.
TriggerConfigProperty¶
-
class
CfnDeploymentGroup.
TriggerConfigProperty
(*, trigger_events=None, trigger_name=None, trigger_target_arn=None)¶ Bases:
object
Information about notification triggers for the deployment group.
- Parameters
trigger_events (
Optional
[Sequence
[str
]]) – The event type or types that trigger notifications.trigger_name (
Optional
[str
]) – The name of the notification trigger.trigger_target_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.
- Link
- 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 trigger_config_property = codedeploy.CfnDeploymentGroup.TriggerConfigProperty( trigger_events=["triggerEvents"], trigger_name="triggerName", trigger_target_arn="triggerTargetArn" )
Attributes
-
trigger_events
¶ The event type or types that trigger notifications.
-
trigger_name
¶ The name of the notification trigger.
-
trigger_target_arn
¶ The Amazon Resource Name (ARN) of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.