Class: AWSCDK::EC2::CfnLaunchTemplate::CreditSpecificationProperty

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

Overview

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

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

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 a T instance.



1099
1100
1101
1102
# File 'ec2/cfn_launch_template.rb', line 1099

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 a T instance.

Valid values: standard | unlimited



1110
1111
1112
# File 'ec2/cfn_launch_template.rb', line 1110

def cpu_credits
  @cpu_credits
end

Class Method Details

.jsii_propertiesObject



1112
1113
1114
1115
1116
# File 'ec2/cfn_launch_template.rb', line 1112

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

Instance Method Details

#to_jsiiObject



1118
1119
1120
1121
1122
1123
1124
# File 'ec2/cfn_launch_template.rb', line 1118

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