Class InstanceTagSet
Represents a set of instance tag groups.
Inheritance
System.Object
InstanceTagSet
Namespace: Amazon.CDK.AWS.CodeDeploy
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class InstanceTagSet : DeputyBase
Syntax (vb)
Public Class InstanceTagSet
Inherits DeputyBase
Remarks
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
Examples
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.CloudWatch;
ServerApplication application;
AutoScalingGroup asg;
Alarm alarm;
var deploymentGroup = new ServerDeploymentGroup(this, "CodeDeployDeploymentGroup", new ServerDeploymentGroupProps {
Application = application,
DeploymentGroupName = "MyDeploymentGroup",
AutoScalingGroups = new [] { 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(new Dictionary<string, string[]> {
// any instance with tags satisfying
// key1=v1 or key1=v2 or key2 (any value) or value v3 (any key)
// will match this group
{ "key1", new [] { "v1", "v2" } },
{ "key2", new [] { } },
{ "", new [] { "v3" } }
}),
// adds on-premise instances matching tags
OnPremiseInstanceTags = new InstanceTagSet(new Dictionary<string, string[]> {
{ "key1", new [] { "v1", "v2" } }
}, new Dictionary<string, string[]> {
{ "key2", new [] { "v3" } }
}),
// CloudWatch alarms
Alarms = new [] { alarm },
// whether to ignore failure to fetch the status of alarms from CloudWatch
// default: false
IgnorePollAlarmsFailure = false,
// whether to skip the step of checking CloudWatch alarms during the deployment process
// default: false
IgnoreAlarmConfiguration = false,
// auto-rollback configuration
AutoRollback = new AutoRollbackConfig {
FailedDeployment = true, // default: true
StoppedDeployment = true, // default: false
DeploymentInAlarm = true
}
});
Synopsis
Constructors
InstanceTagSet(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
InstanceTagSet(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
InstanceTagSet(IDictionary<String, String[]>[]) |
Properties
InstanceTagGroups |
Constructors
InstanceTagSet(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected InstanceTagSet(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
InstanceTagSet(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected InstanceTagSet(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
InstanceTagSet(IDictionary<String, String[]>[])
public InstanceTagSet(params IDictionary<string, string[]>[] instanceTagGroups)
Parameters
- instanceTagGroups System.Collections.Generic.IDictionary<System.String, System.String[]>[]
Properties
InstanceTagGroups
public virtual IDictionary<string, string[]>[] InstanceTagGroups { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String[]>[]