Show / Hide Table of Contents

Class InstanceType

Instance type for EC2 instances.

Inheritance
object
InstanceType
OptimalInstanceType
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class InstanceType : DeputyBase
Syntax (vb)
Public Class InstanceType Inherits DeputyBase
Remarks

This class takes a literal string, good if you already know the identifier of the type you want.

ExampleMetadata: infused

Examples
Vpc vpc;


             var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                 MasterUser = new Login {
                     Username = "myuser"
                 },
                 InstanceType = InstanceType.Of(InstanceClass.MEMORY5, InstanceSize.LARGE),
                 VpcSubnets = new SubnetSelection {
                     SubnetType = SubnetType.PUBLIC
                 },
                 Vpc = vpc,
                 CaCertificate = CaCertificate.RDS_CA_RSA4096_G1
             });

Synopsis

Constructors

InstanceType(string)

Instance type for EC2 instances.

Properties

Architecture

The instance's CPU architecture.

Methods

IsBurstable()

Return whether this instance type is a burstable instance type.

Of(InstanceClass, InstanceSize)

Instance type for EC2 instances.

SameInstanceClassAs(InstanceType)

Instance type for EC2 instances.

ToString()

Return the instance type as a dotted string.

Constructors

InstanceType(string)

Instance type for EC2 instances.

public InstanceType(string instanceTypeIdentifier)
Parameters
instanceTypeIdentifier string
Remarks

This class takes a literal string, good if you already know the identifier of the type you want.

ExampleMetadata: infused

Examples
Vpc vpc;


             var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                 MasterUser = new Login {
                     Username = "myuser"
                 },
                 InstanceType = InstanceType.Of(InstanceClass.MEMORY5, InstanceSize.LARGE),
                 VpcSubnets = new SubnetSelection {
                     SubnetType = SubnetType.PUBLIC
                 },
                 Vpc = vpc,
                 CaCertificate = CaCertificate.RDS_CA_RSA4096_G1
             });

Properties

Architecture

The instance's CPU architecture.

public virtual InstanceArchitecture Architecture { get; }
Property Value

InstanceArchitecture

Remarks

This class takes a literal string, good if you already know the identifier of the type you want.

ExampleMetadata: infused

Methods

IsBurstable()

Return whether this instance type is a burstable instance type.

public virtual bool IsBurstable()
Returns

bool

Remarks

This class takes a literal string, good if you already know the identifier of the type you want.

ExampleMetadata: infused

Of(InstanceClass, InstanceSize)

Instance type for EC2 instances.

public static InstanceType Of(InstanceClass instanceClass, InstanceSize instanceSize)
Parameters
instanceClass InstanceClass
instanceSize InstanceSize
Returns

InstanceType

Remarks

This class takes a combination of a class and size.

Be aware that not all combinations of class and size are available, and not all classes are available in all regions.

SameInstanceClassAs(InstanceType)

Instance type for EC2 instances.

public virtual bool SameInstanceClassAs(InstanceType other)
Parameters
other InstanceType
Returns

bool

Remarks

This class takes a literal string, good if you already know the identifier of the type you want.

ExampleMetadata: infused

Examples
Vpc vpc;


             var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                 MasterUser = new Login {
                     Username = "myuser"
                 },
                 InstanceType = InstanceType.Of(InstanceClass.MEMORY5, InstanceSize.LARGE),
                 VpcSubnets = new SubnetSelection {
                     SubnetType = SubnetType.PUBLIC
                 },
                 Vpc = vpc,
                 CaCertificate = CaCertificate.RDS_CA_RSA4096_G1
             });

ToString()

Return the instance type as a dotted string.

public override string ToString()
Returns

string

Remarks

This class takes a literal string, good if you already know the identifier of the type you want.

ExampleMetadata: infused

Back to top Generated by DocFX