Class: AWSCDK::Budgets::CfnBudget::BudgetDataProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
budgets/cfn_budget.rb

Overview

Represents the output of the CreateBudget operation.

The content consists of the detailed metadata and data file information, and the current status of the budget object.

This is the Amazon Resource Name (ARN) pattern for a budget:

arn:aws:budgets::AccountId:budget/budgetName

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(budget_type:, time_unit:, auto_adjust_data: nil, billing_view_arn: nil, budget_limit: nil, budget_name: nil, cost_filters: nil, cost_types: nil, filter_expression: nil, metrics: nil, planned_budget_limits: nil, time_period: nil) ⇒ BudgetDataProperty

Returns a new instance of BudgetDataProperty.

Parameters:



587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'budgets/cfn_budget.rb', line 587

def initialize(budget_type:, time_unit:, auto_adjust_data: nil, billing_view_arn: nil, budget_limit: nil, budget_name: nil, cost_filters: nil, cost_types: nil, filter_expression: nil, metrics: nil, planned_budget_limits: nil, time_period: nil)
  @budget_type = budget_type
  Jsii::Type.check_type(@budget_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "budgetType")
  @time_unit = time_unit
  Jsii::Type.check_type(@time_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeUnit")
  @auto_adjust_data = auto_adjust_data.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudget::AutoAdjustDataProperty.new(**auto_adjust_data.transform_keys(&:to_sym)) : auto_adjust_data
  Jsii::Type.check_type(@auto_adjust_data, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldC5BdXRvQWRqdXN0RGF0YVByb3BlcnR5In1dfX0=")), "autoAdjustData") unless @auto_adjust_data.nil?
  @billing_view_arn = billing_view_arn
  Jsii::Type.check_type(@billing_view_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "billingViewArn") unless @billing_view_arn.nil?
  @budget_limit = budget_limit.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudget::SpendProperty.new(**budget_limit.transform_keys(&:to_sym)) : budget_limit
  Jsii::Type.check_type(@budget_limit, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldC5TcGVuZFByb3BlcnR5In1dfX0=")), "budgetLimit") unless @budget_limit.nil?
  @budget_name = budget_name
  Jsii::Type.check_type(@budget_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "budgetName") unless @budget_name.nil?
  @cost_filters = cost_filters
  Jsii::Type.check_type(@cost_filters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "costFilters") unless @cost_filters.nil?
  @cost_types = cost_types.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudget::CostTypesProperty.new(**cost_types.transform_keys(&:to_sym)) : cost_types
  Jsii::Type.check_type(@cost_types, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldC5Db3N0VHlwZXNQcm9wZXJ0eSJ9XX19")), "costTypes") unless @cost_types.nil?
  @filter_expression = filter_expression.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudget::ExpressionProperty.new(**filter_expression.transform_keys(&:to_sym)) : filter_expression
  Jsii::Type.check_type(@filter_expression, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldC5FeHByZXNzaW9uUHJvcGVydHkifV19fQ==")), "filterExpression") unless @filter_expression.nil?
  @metrics = metrics
  Jsii::Type.check_type(@metrics, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "metrics") unless @metrics.nil?
  @planned_budget_limits = planned_budget_limits
  Jsii::Type.check_type(@planned_budget_limits, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "plannedBudgetLimits") unless @planned_budget_limits.nil?
  @time_period = time_period.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudget::TimePeriodProperty.new(**time_period.transform_keys(&:to_sym)) : time_period
  Jsii::Type.check_type(@time_period, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldC5UaW1lUGVyaW9kUHJvcGVydHkifV19fQ==")), "timePeriod") unless @time_period.nil?
end

Instance Attribute Details

#auto_adjust_dataAWSCDK::IResolvable, ... (readonly)

Determine the budget amount for an auto-adjusting budget.



630
631
632
# File 'budgets/cfn_budget.rb', line 630

def auto_adjust_data
  @auto_adjust_data
end

#billing_view_arnString? (readonly)



633
634
635
# File 'budgets/cfn_budget.rb', line 633

def billing_view_arn
  @billing_view_arn
end

#budget_limitAWSCDK::IResolvable, ... (readonly)

The total amount of cost, usage, RI utilization, RI coverage, Savings Plans utilization, or Savings Plans coverage that you want to track with your budget.

BudgetLimit is required for cost or usage budgets, but optional for RI or Savings Plans utilization or coverage budgets. RI and Savings Plans utilization or coverage budgets default to 100 . This is the only valid value for RI or Savings Plans utilization or coverage budgets. You can't use BudgetLimit with PlannedBudgetLimits for CreateBudget and UpdateBudget actions.



640
641
642
# File 'budgets/cfn_budget.rb', line 640

def budget_limit
  @budget_limit
end

#budget_nameString? (readonly)

The name of a budget.

The value must be unique within an account. BudgetName can't include : and \ characters. If you don't include value for BudgetName in the template, Billing and Cost Management assigns your budget a randomly generated name.



647
648
649
# File 'budgets/cfn_budget.rb', line 647

def budget_name
  @budget_name
end

#budget_typeString (readonly)

Specifies whether this budget tracks costs, usage, RI utilization, RI coverage, Savings Plans utilization, or Savings Plans coverage.



618
619
620
# File 'budgets/cfn_budget.rb', line 618

def budget_type
  @budget_type
end

#cost_filtersObject? (readonly)

The cost filters, such as Region , Service , LinkedAccount , Tag , or CostCategory , that are applied to a budget.

AWS Budgets supports the following services as a Service filter for RI budgets:

  • Amazon EC2
  • Amazon Redshift
  • Amazon Relational Database Service
  • Amazon ElastiCache
  • Amazon OpenSearch Service


660
661
662
# File 'budgets/cfn_budget.rb', line 660

def cost_filters
  @cost_filters
end

#cost_typesAWSCDK::IResolvable, ... (readonly)

The types of costs that are included in this COST budget.

USAGE , RI_UTILIZATION , RI_COVERAGE , SAVINGS_PLANS_UTILIZATION , and SAVINGS_PLANS_COVERAGE budgets do not have CostTypes .



667
668
669
# File 'budgets/cfn_budget.rb', line 667

def cost_types
  @cost_types
end

#filter_expressionAWSCDK::IResolvable, ... (readonly)



670
671
672
# File 'budgets/cfn_budget.rb', line 670

def filter_expression
  @filter_expression
end

#metricsArray<String>? (readonly)



673
674
675
# File 'budgets/cfn_budget.rb', line 673

def metrics
  @metrics
end

#planned_budget_limitsObject? (readonly)

A map containing multiple BudgetLimit , including current or future limits.

PlannedBudgetLimits is available for cost or usage budget and supports both monthly and quarterly TimeUnit .

For monthly budgets, provide 12 months of PlannedBudgetLimits values. This must start from the current month and include the next 11 months. The key is the start of the month, UTC in epoch seconds.

For quarterly budgets, provide four quarters of PlannedBudgetLimits value entries in standard calendar quarter increments. This must start from the current quarter and include the next three quarters. The key is the start of the quarter, UTC in epoch seconds.

If the planned budget expires before 12 months for monthly or four quarters for quarterly, provide the PlannedBudgetLimits values only for the remaining periods.

If the budget begins at a date in the future, provide PlannedBudgetLimits values from the start date of the budget.

After all of the BudgetLimit values in PlannedBudgetLimits are used, the budget continues to use the last limit as the BudgetLimit . At that point, the planned budget provides the same experience as a fixed budget.

DescribeBudget and DescribeBudgets response along with PlannedBudgetLimits also contain BudgetLimit representing the current month or quarter limit present in PlannedBudgetLimits . This only applies to budgets that are created with PlannedBudgetLimits . Budgets that are created without PlannedBudgetLimits only contain BudgetLimit . They don't contain PlannedBudgetLimits .



692
693
694
# File 'budgets/cfn_budget.rb', line 692

def planned_budget_limits
  @planned_budget_limits
end

#time_periodAWSCDK::IResolvable, ... (readonly)

The period of time that is covered by a budget.

The period has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.

The start date for a budget. If you created your budget and didn't specify a start date, the start date defaults to the start of the chosen time period (MONTHLY, QUARTERLY, or ANNUALLY). For example, if you create your budget on January 24, 2019, choose MONTHLY , and don't set a start date, the start date defaults to 01/01/19 00:00 UTC . The defaults are the same for the Billing and Cost Management console and the API.

You can change your start date with the UpdateBudget operation.

After the end date, AWS deletes the budget and all associated notifications and subscribers.



705
706
707
# File 'budgets/cfn_budget.rb', line 705

def time_period
  @time_period
end

#time_unitString (readonly)

The length of time until a budget resets the actual and forecasted spend.

DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets.



625
626
627
# File 'budgets/cfn_budget.rb', line 625

def time_unit
  @time_unit
end

Class Method Details

.jsii_propertiesObject



707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'budgets/cfn_budget.rb', line 707

def self.jsii_properties
  {
    :budget_type => "budgetType",
    :time_unit => "timeUnit",
    :auto_adjust_data => "autoAdjustData",
    :billing_view_arn => "billingViewArn",
    :budget_limit => "budgetLimit",
    :budget_name => "budgetName",
    :cost_filters => "costFilters",
    :cost_types => "costTypes",
    :filter_expression => "filterExpression",
    :metrics => "metrics",
    :planned_budget_limits => "plannedBudgetLimits",
    :time_period => "timePeriod",
  }
end

Instance Method Details

#to_jsiiObject



724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'budgets/cfn_budget.rb', line 724

def to_jsii
  result = {}
  result.merge!({
    "budgetType" => @budget_type,
    "timeUnit" => @time_unit,
    "autoAdjustData" => @auto_adjust_data,
    "billingViewArn" => @billing_view_arn,
    "budgetLimit" => @budget_limit,
    "budgetName" => @budget_name,
    "costFilters" => @cost_filters,
    "costTypes" => @cost_types,
    "filterExpression" => @filter_expression,
    "metrics" => @metrics,
    "plannedBudgetLimits" => @planned_budget_limits,
    "timePeriod" => @time_period,
  })
  result.compact
end