Show / Hide Table of Contents

Class OperatingSystemType

The OS type of a particular image.

Inheritance
System.Object
OperatingSystemType
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public sealed class OperatingSystemType : Enum
Syntax (vb)
Public NotInheritable Class OperatingSystemType
    Inherits

     Enum
Remarks

ExampleMetadata: lit=test/example.images.lit.ts infused

Examples
// Pick the right Amazon Linux edition. All arguments shown are optional
// and will default to these values when omitted.
IMachineImage amznLinux = MachineImage.LatestAmazonLinux(new AmazonLinuxImageProps {
    Generation = AmazonLinuxGeneration.AMAZON_LINUX,
    Edition = AmazonLinuxEdition.STANDARD,
    Virtualization = AmazonLinuxVirt.HVM,
    Storage = AmazonLinuxStorage.GENERAL_PURPOSE,
    CpuType = AmazonLinuxCpuType.X86_64
});

// Pick a Windows edition to use
IMachineImage windows = MachineImage.LatestWindows(WindowsVersion.WINDOWS_SERVER_2019_ENGLISH_FULL_BASE);

// Read AMI id from SSM parameter store
IMachineImage ssm = MachineImage.FromSsmParameter("/my/ami", new SsmParameterImageOptions { Os = OperatingSystemType.LINUX });

// Look up the most recent image matching a set of AMI filters.
// In this case, look up the NAT instance AMI, by using a wildcard
// in the 'name' field:
IMachineImage natAmi = MachineImage.Lookup(new LookupMachineImageProps {
    Name = "amzn-ami-vpc-nat-*",
    Owners = new [] { "amazon" }
});

// For other custom (Linux) images, instantiate a `GenericLinuxImage` with
// a map giving the AMI to in for each region:
IMachineImage linux = MachineImage.GenericLinux(new Dictionary<string, string> {
    { "us-east-1", "ami-97785bed" },
    { "eu-west-1", "ami-12345678" }
});

// For other custom (Windows) images, instantiate a `GenericWindowsImage` with
// a map giving the AMI to in for each region:
IMachineImage genericWindows = MachineImage.GenericWindows(new Dictionary<string, string> {
    { "us-east-1", "ami-97785bed" },
    { "eu-west-1", "ami-12345678" }
});

Synopsis

Fields

LINUX
UNKNOWN

Used when the type of the operating system is not known (for example, for imported Auto-Scaling Groups).

value__
WINDOWS

Fields

LINUX

public const OperatingSystemType LINUX
Field Value
Type Description
OperatingSystemType

UNKNOWN

Used when the type of the operating system is not known (for example, for imported Auto-Scaling Groups).

public const OperatingSystemType UNKNOWN
Field Value
Type Description
OperatingSystemType

value__

public int value__
Field Value
Type Description
System.Int32

WINDOWS

public const OperatingSystemType WINDOWS
Field Value
Type Description
OperatingSystemType
Back to top Generated by DocFX