Class InstanceRequireImdsv2Aspect
Aspect that applies IMDS configuration on EC2 Instance constructs.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class InstanceRequireImdsv2Aspect : DeputyBase, IAspect
Syntax (vb)
Public Class InstanceRequireImdsv2Aspect
Inherits DeputyBase
Implements IAspect
Remarks
This aspect configures IMDS on an EC2 instance by creating a Launch Template with the IMDS configuration and associating that Launch Template with the instance. If an Instance is already associated with a Launch Template, a warning will (optionally) be added to the construct node and it will be skipped.
To cover Instances already associated with Launch Templates, use LaunchTemplateImdsAspect
.
ExampleMetadata: infused
Examples
var aspect = new InstanceRequireImdsv2Aspect();
Aspects.Of(this).Add(aspect);
Synopsis
Constructors
InstanceRequireImdsv2Aspect(IInstanceRequireImdsv2AspectProps) | |
InstanceRequireImdsv2Aspect(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
InstanceRequireImdsv2Aspect(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
SuppressWarnings |
Methods
Visit(IConstruct) | All aspects can visit an IConstruct. |
Warn(IConstruct, String) | Adds a warning annotation to a node, unless |
Constructors
InstanceRequireImdsv2Aspect(IInstanceRequireImdsv2AspectProps)
public InstanceRequireImdsv2Aspect(IInstanceRequireImdsv2AspectProps props = null)
Parameters
InstanceRequireImdsv2Aspect(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected InstanceRequireImdsv2Aspect(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
InstanceRequireImdsv2Aspect(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected InstanceRequireImdsv2Aspect(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
SuppressWarnings
protected virtual bool SuppressWarnings { get; }
Property Value
System.Boolean
Methods
Visit(IConstruct)
All aspects can visit an IConstruct.
public virtual void Visit(IConstruct node)
Parameters
- node Constructs.IConstruct
Warn(IConstruct, String)
Adds a warning annotation to a node, unless suppressWarnings
is true.
protected virtual void Warn(IConstruct node, string message)
Parameters
- node Constructs.IConstruct
- message System.String