@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-17T17:31:20.208Z") @Stability(value=Stable) 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 |
|---|---|
protected |
InstanceTagSet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
InstanceTagSet(software.amazon.jsii.JsiiObjectRef objRef) |
|
InstanceTagSet(Map<String,List<String>>... instanceTagGroups) |
| Modifier and Type | Method and Description |
|---|---|
List<Map<String,List<String>>> |
getInstanceTagGroups() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetCopyright © 2022. All rights reserved.