Class GenericSSMParameterImage
Select the image based on a given SSM parameter at deployment time of the CloudFormation Stack.
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GenericSSMParameterImage : DeputyBase, IMachineImage
Syntax (vb)
Public Class GenericSSMParameterImage
Inherits DeputyBase
Implements IMachineImage
Remarks
This Machine Image automatically updates to the latest version on every deployment. Be aware this will cause your instances to be replaced when a new version of the image becomes available. Do not store stateful information on the instance if you are using this image.
The AMI ID is selected using the values published to the SSM parameter store.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
UserData userData;
var genericSSMParameterImage = new GenericSSMParameterImage("parameterName", OperatingSystemType.LINUX, userData);
Synopsis
Constructors
GenericSSMParameterImage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
GenericSSMParameterImage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
GenericSSMParameterImage(String, OperatingSystemType, UserData) |
Properties
ParameterName | Name of the SSM parameter we're looking up. |
Methods
GetImage(Construct) | Return the image to use in the given context. |
Constructors
GenericSSMParameterImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected GenericSSMParameterImage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
GenericSSMParameterImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected GenericSSMParameterImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
GenericSSMParameterImage(String, OperatingSystemType, UserData)
public GenericSSMParameterImage(string parameterName, OperatingSystemType os, UserData userData = null)
Parameters
- parameterName System.String
- os OperatingSystemType
- userData UserData
Properties
ParameterName
Name of the SSM parameter we're looking up.
public virtual string ParameterName { get; }
Property Value
System.String
Methods
GetImage(Construct)
Return the image to use in the given context.
public virtual IMachineImageConfig GetImage(Construct scope)
Parameters
- scope Constructs.Construct
Returns