Class: AWSCDK::EC2::CfnInstance::CreditSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_instance.rb

Overview

Specifies the credit option for CPU usage of a T instance.

CreditSpecification is a property of the AWS::EC2::Instance resource.

For more information, see Burstable performance instances in the Amazon EC2 User Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cpu_credits: nil) ⇒ CreditSpecificationProperty

Returns a new instance of CreditSpecificationProperty.

Parameters:

  • cpu_credits (String, nil) (defaults to: nil)

    The credit option for CPU usage of the instance.



1310
1311
1312
1313
# File 'ec2/cfn_instance.rb', line 1310

def initialize(cpu_credits: nil)
  @cpu_credits = cpu_credits
  Jsii::Type.check_type(@cpu_credits, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cpuCredits") unless @cpu_credits.nil?
end

Instance Attribute Details

#cpu_creditsString? (readonly)

The credit option for CPU usage of the instance.

Valid values: standard | unlimited

T3 instances with host tenancy do not support the unlimited CPU credit option.



1323
1324
1325
# File 'ec2/cfn_instance.rb', line 1323

def cpu_credits
  @cpu_credits
end

Class Method Details

.jsii_propertiesObject



1325
1326
1327
1328
1329
# File 'ec2/cfn_instance.rb', line 1325

def self.jsii_properties
  {
    :cpu_credits => "cpuCredits",
  }
end

Instance Method Details

#to_jsiiObject



1331
1332
1333
1334
1335
1336
1337
# File 'ec2/cfn_instance.rb', line 1331

def to_jsii
  result = {}
  result.merge!({
    "cpuCredits" => @cpu_credits,
  })
  result.compact
end