Skip to content
v2.278.0

CreditSpecificationProperty Struct ​

Specifies the credit option for CPU usage of a T2, T3, or T3a instance.

CreditSpecification is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .

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 creditSpecificationProperty: ec2.CfnLaunchTemplate.CreditSpecificationProperty = {
  cpuCredits: 'cpuCredits',
};
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

credit_specification_property = ec2.CfnLaunchTemplate.CreditSpecificationProperty(
    cpu_credits="cpuCredits"
)
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.*;

CreditSpecificationProperty creditSpecificationProperty = CreditSpecificationProperty.builder()
        .cpuCredits("cpuCredits")
        .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 creditSpecificationProperty = new CreditSpecificationProperty {
    CpuCredits = "cpuCredits"
};
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"

creditSpecificationProperty := &CreditSpecificationProperty{
	CpuCredits: jsii.String("cpuCredits"),
}

Properties ​

cpuCreditsoptionalstringcpu_creditsoptionalstrcpuCreditsoptionalStringCpuCreditsoptionalstringCpuCreditsoptional*string #
The credit option for CPU usage of a T instance.

Valid values: standard | unlimited