InstanceTagSet
- class aws_cdk.aws_codedeploy.InstanceTagSet(*instance_tag_groups)
Bases:
object
Represents a set of instance tag groups.
An instance will match a set if it matches all of the groups in the set - in other words, sets follow ‘and’ semantics. You can have a maximum of 3 tag groups inside a set.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_autoscaling as autoscaling import aws_cdk.aws_cloudwatch as cloudwatch # application: codedeploy.ServerApplication # asg: autoscaling.AutoScalingGroup # alarm: cloudwatch.Alarm deployment_group = codedeploy.ServerDeploymentGroup(self, "CodeDeployDeploymentGroup", application=application, deployment_group_name="MyDeploymentGroup", auto_scaling_groups=[asg], # adds User Data that installs the CodeDeploy agent on your auto-scaling groups hosts # default: true install_agent=True, # adds EC2 instances matching tags ec2_instance_tags=codedeploy.InstanceTagSet({ # any instance with tags satisfying # key1=v1 or key1=v2 or key2 (any value) or value v3 (any key) # will match this group "key1": ["v1", "v2"], "key2": [], "": ["v3"] }), # adds on-premise instances matching tags on_premise_instance_tags=codedeploy.InstanceTagSet({ "key1": ["v1", "v2"] }, { "key2": ["v3"] }), # CloudWatch alarms alarms=[alarm], # whether to ignore failure to fetch the status of alarms from CloudWatch # default: false ignore_poll_alarms_failure=False, # whether to skip the step of checking CloudWatch alarms during the deployment process # default: false ignore_alarm_configuration=False, # auto-rollback configuration auto_rollback=codedeploy.AutoRollbackConfig( failed_deployment=True, # default: true stopped_deployment=True, # default: false deployment_in_alarm=True ) )
- Parameters:
instance_tag_groups (
Mapping
[str
,List
[str
]]) –
Attributes
- instance_tag_groups