Class: AWSCDK::Budgets::CfnBudgetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Budgets::CfnBudgetProps
- Defined in:
- budgets/cfn_budget_props.rb
Overview
Properties for defining a CfnBudget.
Instance Attribute Summary collapse
-
#budget ⇒ AWSCDK::IResolvable, AWSCDK::Budgets::CfnBudget::BudgetDataProperty
readonly
The budget object that you want to create.
-
#notifications_with_subscribers ⇒ AWSCDK::IResolvable, ...
readonly
A notification that you want to associate with a budget.
-
#resource_tags ⇒ AWSCDK::IResolvable, ...
readonly
An optional list of tags to associate with the specified budget.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(budget:, notifications_with_subscribers: nil, resource_tags: nil) ⇒ CfnBudgetProps
constructor
A new instance of CfnBudgetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(budget:, notifications_with_subscribers: nil, resource_tags: nil) ⇒ CfnBudgetProps
Returns a new instance of CfnBudgetProps.
12 13 14 15 16 17 18 19 |
# File 'budgets/cfn_budget_props.rb', line 12 def initialize(budget:, notifications_with_subscribers: nil, resource_tags: nil) @budget = budget.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudget::BudgetDataProperty.new(**budget.transform_keys(&:to_sym)) : budget Jsii::Type.check_type(@budget, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldC5CdWRnZXREYXRhUHJvcGVydHkifV19fQ==")), "budget") @notifications_with_subscribers = notifications_with_subscribers Jsii::Type.check_type(@notifications_with_subscribers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYnVkZ2V0cy5DZm5CdWRnZXQuTm90aWZpY2F0aW9uV2l0aFN1YnNjcmliZXJzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "notificationsWithSubscribers") unless @notifications_with_subscribers.nil? @resource_tags = Jsii::Type.check_type(@resource_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYnVkZ2V0cy5DZm5CdWRnZXQuUmVzb3VyY2VUYWdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "resourceTags") unless @resource_tags.nil? end |
Instance Attribute Details
#budget ⇒ AWSCDK::IResolvable, AWSCDK::Budgets::CfnBudget::BudgetDataProperty (readonly)
The budget object that you want to create.
25 26 27 |
# File 'budgets/cfn_budget_props.rb', line 25 def budget @budget end |
#notifications_with_subscribers ⇒ AWSCDK::IResolvable, ... (readonly)
A notification that you want to associate with a budget.
A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.
32 33 34 |
# File 'budgets/cfn_budget_props.rb', line 32 def notifications_with_subscribers @notifications_with_subscribers end |
#resource_tags ⇒ AWSCDK::IResolvable, ... (readonly)
An optional list of tags to associate with the specified budget.
Each tag consists of a key and a value, and each key must be unique for the resource.
39 40 41 |
# File 'budgets/cfn_budget_props.rb', line 39 def @resource_tags end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'budgets/cfn_budget_props.rb', line 41 def self.jsii_properties { :budget => "budget", :notifications_with_subscribers => "notificationsWithSubscribers", :resource_tags => "resourceTags", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'budgets/cfn_budget_props.rb', line 49 def to_jsii result = {} result.merge!({ "budget" => @budget, "notificationsWithSubscribers" => @notifications_with_subscribers, "resourceTags" => @resource_tags, }) result.compact end |