class GenericSSMParameterImage
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EC2.GenericSSMParameterImage |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#GenericSSMParameterImage |
![]() | software.amazon.awscdk.services.ec2.GenericSSMParameterImage |
![]() | aws_cdk.aws_ec2.GenericSSMParameterImage |
![]() | aws-cdk-lib » aws_ec2 » GenericSSMParameterImage |
Implements
IMachine
Select the image based on a given SSM parameter at deployment time of the CloudFormation Stack.
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 { aws_ec2 as ec2 } from 'aws-cdk-lib';
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. |
getImage(scope)
public getImage(scope: Construct): MachineImageConfig
Parameters
- scope
Construct
Returns
Return the image to use in the given context.