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(string, OperatingSystemType, UserData?) | Select the image based on a given SSM parameter at deployment time of the CloudFormation Stack. |
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(string, OperatingSystemType, UserData?)
Select the image based on a given SSM parameter at deployment time of the CloudFormation Stack.
public GenericSSMParameterImage(string parameterName, OperatingSystemType os, UserData? userData = null)
Parameters
- parameterName string
- os OperatingSystemType
- userData UserData
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);
Properties
ParameterName
Name of the SSM parameter we're looking up.
public virtual string ParameterName { get; }
Property Value
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
Methods
GetImage(Construct)
Return the image to use in the given context.
public virtual IMachineImageConfig GetImage(Construct scope)
Parameters
- scope Construct
Returns
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