Class InstanceType
Instance type for EC2 instances.
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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
InstanceType(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
InstanceType(String) |
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) | |
ToString() | Return the instance type as a dotted string. |
Constructors
InstanceType(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected InstanceType(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
InstanceType(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected InstanceType(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
InstanceType(String)
public InstanceType(string instanceTypeIdentifier)
Parameters
- instanceTypeIdentifier System.String
Properties
Architecture
The instance's CPU architecture.
public virtual InstanceArchitecture Architecture { get; }
Property Value
Methods
IsBurstable()
Return whether this instance type is a burstable instance type.
public virtual bool IsBurstable()
Returns
System.Boolean
Of(InstanceClass, InstanceSize)
Instance type for EC2 instances.
public static InstanceType Of(InstanceClass instanceClass, InstanceSize instanceSize)
Parameters
- instanceClass InstanceClass
- instanceSize InstanceSize
Returns
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)
public virtual bool SameInstanceClassAs(InstanceType other)
Parameters
- other InstanceType
Returns
System.Boolean
ToString()
Return the instance type as a dotted string.
public override string ToString()
Returns
System.String