aws-cdk-lib.aws_ec2.GenericWindowsImage

class GenericWindowsImage

LanguageType name
.NETAmazon.CDK.AWS.EC2.GenericWindowsImage
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#GenericWindowsImage
Javasoftware.amazon.awscdk.services.ec2.GenericWindowsImage
Pythonaws_cdk.aws_ec2.GenericWindowsImage
TypeScript (source)aws-cdk-lib » aws_ec2 » GenericWindowsImage

Implements IMachineImage

Construct a Windows machine image from an AMI map.

Allows you to create a generic Windows EC2 , manually specify an AMI map.

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 genericWindowsImage = new ec2.GenericWindowsImage({
  amiMapKey: 'amiMap',
}, /* all optional props */ {
  userData: userData,
});

Initializer

new GenericWindowsImage(amiMap: { [string]: string }, props?: GenericWindowsImageProps)

Parameters

  • amiMap { [string]: string }
  • props GenericWindowsImageProps

Methods

NameDescription
getImage(scope)Return the image to use in the given context.

getImage(scope)

public getImage(scope: Construct): MachineImageConfig

Parameters

  • scope Construct

Returns

  • MachineImageConfig

Return the image to use in the given context.