CpuOptionsProperty Struct
Specifies the CPU options for the instance.
When you specify CPU options, you must specify both the number of CPU cores and threads per core.
Modifying the CPU options for an instance results in instance replacement .
For more information, see Optimize CPU options in the Amazon Elastic Compute Cloud User Guide .
Example
ts
// 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';
const cpuOptionsProperty: ec2.CfnInstance.CpuOptionsProperty = {
coreCount: 123,
threadsPerCore: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cpu_options_property = ec2.CfnInstance.CpuOptionsProperty(
core_count=123,
threads_per_core=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CpuOptionsProperty cpuOptionsProperty = CpuOptionsProperty.builder()
.coreCount(123)
.threadsPerCore(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cpuOptionsProperty = new CpuOptionsProperty {
CoreCount = 123,
ThreadsPerCore = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cpuOptionsProperty := &CpuOptionsProperty{
CoreCount: jsii.Number(123),
ThreadsPerCore: jsii.Number(123),
}
Properties
coreCountoptionalnumbercore_countoptionalint | floatcoreCountoptionalNumberCoreCountoptionaldoubleCoreCountoptional*float64#The number of CPU cores for the instance.
threadsPerCoreoptionalnumberthreads_per_coreoptionalint | floatthreadsPerCoreoptionalNumberThreadsPerCoreoptionaldoubleThreadsPerCoreoptional*float64#The number of threads per CPU core.