class GenericSSMParameterImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.GenericSSMParameterImage |
Java | software.amazon.awscdk.services.ec2.GenericSSMParameterImage |
Python | aws_cdk.aws_ec2.GenericSSMParameterImage |
TypeScript (source) | @aws-cdk/aws-ec2 » GenericSSMParameterImage |
Implements
IMachine
Select the image based on a given SSM parameter.
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.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
declare const userData: ec2.UserData;
const genericSSMParameterImage = new ec2.GenericSSMParameterImage('parameterName', ec2.OperatingSystemType.LINUX, /* all optional props */ userData);
Initializer
new GenericSSMParameterImage(parameterName: string, os: OperatingSystemType, userData?: UserData)
Parameters
- parameterName
string
- os
Operating
System Type - userData
User
Data
Properties
Name | Type | Description |
---|---|---|
parameter | string | Name of the SSM parameter we're looking up. |
parameterName
Type:
string
Name of the SSM parameter we're looking up.
Methods
Name | Description |
---|---|
get | Return the image to use in the given context. |
Image(scope)
getpublic getImage(scope: Construct): MachineImageConfig
Parameters
- scope
Construct
Returns
Return the image to use in the given context.