@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:36:59.461Z")
public class InstanceTagSet
extends software.amazon.jsii.JsiiObject
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.
Example:
import software.amazon.awscdk.services.autoscaling.*; import software.amazon.awscdk.services.cloudwatch.*; ServerApplication application; AutoScalingGroup asg; Alarm alarm; ServerDeploymentGroup deploymentGroup = ServerDeploymentGroup.Builder.create(this, "CodeDeployDeploymentGroup") .application(application) .deploymentGroupName("MyDeploymentGroup") .autoScalingGroups(List.of(asg)) // adds User Data that installs the CodeDeploy agent on your auto-scaling groups hosts // default: true .installAgent(true) // adds EC2 instances matching tags .ec2InstanceTags(new InstanceTagSet(Map.of( // any instance with tags satisfying // key1=v1 or key1=v2 or key2 (any value) or value v3 (any key) // will match this group "key1", List.of("v1", "v2"), "key2", List.of(), "", List.of("v3")))) // adds on-premise instances matching tags .onPremiseInstanceTags(new InstanceTagSet(Map.of( "key1", List.of("v1", "v2")), Map.of( "key2", List.of("v3")))) // CloudWatch alarms .alarms(List.of(alarm)) // whether to ignore failure to fetch the status of alarms from CloudWatch // default: false .ignorePollAlarmsFailure(false) // auto-rollback configuration .autoRollback(AutoRollbackConfig.builder() .failedDeployment(true) // default: true .stoppedDeployment(true) // default: false .deploymentInAlarm(true) .build()) .build();
Modifier | Constructor and Description |
---|---|
|
InstanceTagSet(java.util.Map<java.lang.String,java.util.List<java.lang.String>>... instanceTagGroups) |
protected |
InstanceTagSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InstanceTagSet(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.util.Map<java.lang.String,java.util.List<java.lang.String>>> |
getInstanceTagGroups() |
protected InstanceTagSet(software.amazon.jsii.JsiiObjectRef objRef)
protected InstanceTagSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public InstanceTagSet(java.util.Map<java.lang.String,java.util.List<java.lang.String>>... instanceTagGroups)
instanceTagGroups
- This parameter is required.