Class: AWSCDK::Budgets::CfnBudget::SpendProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Budgets::CfnBudget::SpendProperty
- Defined in:
- budgets/cfn_budget.rb
Overview
The amount of cost or usage that's measured for a budget.
Cost example: A Spend for 3 USD of costs has the following parameters:
- An
Amountof3 - A
UnitofUSD
Usage example: A Spend for 3 GB of S3 usage has the following parameters:
- An
Amountof3 - A
UnitofGB
Instance Attribute Summary collapse
-
#amount ⇒ Numeric
readonly
The cost or usage amount that's associated with a budget forecast, actual spend, or budget threshold.
-
#unit ⇒ String
readonly
The unit of measurement that's used for the budget forecast, actual spend, or budget threshold.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(amount:, unit:) ⇒ SpendProperty
constructor
A new instance of SpendProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(amount:, unit:) ⇒ SpendProperty
Returns a new instance of SpendProperty.
1314 1315 1316 1317 1318 1319 |
# File 'budgets/cfn_budget.rb', line 1314 def initialize(amount:, unit:) @amount = amount Jsii::Type.check_type(@amount, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "amount") @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") end |
Instance Attribute Details
#amount ⇒ Numeric (readonly)
The cost or usage amount that's associated with a budget forecast, actual spend, or budget threshold.
1325 1326 1327 |
# File 'budgets/cfn_budget.rb', line 1325 def amount @amount end |
#unit ⇒ String (readonly)
The unit of measurement that's used for the budget forecast, actual spend, or budget threshold.
1330 1331 1332 |
# File 'budgets/cfn_budget.rb', line 1330 def unit @unit end |
Class Method Details
.jsii_properties ⇒ Object
1332 1333 1334 1335 1336 1337 |
# File 'budgets/cfn_budget.rb', line 1332 def self.jsii_properties { :amount => "amount", :unit => "unit", } end |
Instance Method Details
#to_jsii ⇒ Object
1339 1340 1341 1342 1343 1344 1345 1346 |
# File 'budgets/cfn_budget.rb', line 1339 def to_jsii result = {} result.merge!({ "amount" => @amount, "unit" => @unit, }) result.compact end |