Class: AWSCDK::Budgets::CfnBudgetsActionProps

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

Overview

Properties for defining a CfnBudgetsAction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_threshold:, action_type:, budget_name:, definition:, execution_role_arn:, notification_type:, subscribers:, approval_model: nil, resource_tags: nil) ⇒ CfnBudgetsActionProps

Returns a new instance of CfnBudgetsActionProps.

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'budgets/cfn_budgets_action_props.rb', line 18

def initialize(action_threshold:, action_type:, budget_name:, definition:, execution_role_arn:, notification_type:, subscribers:, approval_model: nil, resource_tags: nil)
  @action_threshold = action_threshold.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudgetsAction::ActionThresholdProperty.new(**action_threshold.transform_keys(&:to_sym)) : action_threshold
  Jsii::Type.check_type(@action_threshold, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldHNBY3Rpb24uQWN0aW9uVGhyZXNob2xkUHJvcGVydHkifV19fQ==")), "actionThreshold")
  @action_type = action_type
  Jsii::Type.check_type(@action_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionType")
  @budget_name = budget_name
  Jsii::Type.check_type(@budget_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "budgetName")
  @definition = definition.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudgetsAction::DefinitionProperty.new(**definition.transform_keys(&:to_sym)) : definition
  Jsii::Type.check_type(@definition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldHNBY3Rpb24uRGVmaW5pdGlvblByb3BlcnR5In1dfX0=")), "definition")
  @execution_role_arn = execution_role_arn
  Jsii::Type.check_type(@execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRoleArn")
  @notification_type = notification_type
  Jsii::Type.check_type(@notification_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationType")
  @subscribers = subscribers
  Jsii::Type.check_type(@subscribers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYnVkZ2V0cy5DZm5CdWRnZXRzQWN0aW9uLlN1YnNjcmliZXJQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "subscribers")
  @approval_model = approval_model
  Jsii::Type.check_type(@approval_model, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "approvalModel") unless @approval_model.nil?
  @resource_tags = resource_tags.is_a?(Array) ? resource_tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Budgets::CfnBudgetsAction::ResourceTagProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : resource_tags
  Jsii::Type.check_type(@resource_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19idWRnZXRzLkNmbkJ1ZGdldHNBY3Rpb24uUmVzb3VyY2VUYWdQcm9wZXJ0eSJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourceTags") unless @resource_tags.nil?
end

Instance Attribute Details

#action_thresholdAWSCDK::IResolvable, AWSCDK::Budgets::CfnBudgetsAction::ActionThresholdProperty (readonly)

The trigger threshold of the action.



43
44
45
# File 'budgets/cfn_budgets_action_props.rb', line 43

def action_threshold
  @action_threshold
end

#action_typeString (readonly)

The type of action.

This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.



50
51
52
# File 'budgets/cfn_budgets_action_props.rb', line 50

def action_type
  @action_type
end

#approval_modelString? (readonly)

This specifies if the action needs manual or automatic approval.



84
85
86
# File 'budgets/cfn_budgets_action_props.rb', line 84

def approval_model
  @approval_model
end

#budget_nameString (readonly)

A string that represents the budget name.

":" and "" characters aren't allowed.



57
58
59
# File 'budgets/cfn_budgets_action_props.rb', line 57

def budget_name
  @budget_name
end

#definitionAWSCDK::IResolvable, AWSCDK::Budgets::CfnBudgetsAction::DefinitionProperty (readonly)

Specifies all of the type-specific parameters.



62
63
64
# File 'budgets/cfn_budgets_action_props.rb', line 62

def definition
  @definition
end

#execution_role_arnString (readonly)

The role passed for action execution and reversion.

Roles and actions must be in the same account.



69
70
71
# File 'budgets/cfn_budgets_action_props.rb', line 69

def execution_role_arn
  @execution_role_arn
end

#notification_typeString (readonly)

The type of a notification.



74
75
76
# File 'budgets/cfn_budgets_action_props.rb', line 74

def notification_type
  @notification_type
end

#resource_tagsArray<AWSCDK::Budgets::CfnBudgetsAction::ResourceTagProperty>? (readonly)

An optional list of tags to associate with the specified budget action.

Each tag consists of a key and a value, and each key must be unique for the resource.



91
92
93
# File 'budgets/cfn_budgets_action_props.rb', line 91

def resource_tags
  @resource_tags
end

Class Method Details

.jsii_propertiesObject



93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'budgets/cfn_budgets_action_props.rb', line 93

def self.jsii_properties
  {
    :action_threshold => "actionThreshold",
    :action_type => "actionType",
    :budget_name => "budgetName",
    :definition => "definition",
    :execution_role_arn => "executionRoleArn",
    :notification_type => "notificationType",
    :subscribers => "subscribers",
    :approval_model => "approvalModel",
    :resource_tags => "resourceTags",
  }
end

Instance Method Details

#to_jsiiObject



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'budgets/cfn_budgets_action_props.rb', line 107

def to_jsii
  result = {}
  result.merge!({
    "actionThreshold" => @action_threshold,
    "actionType" => @action_type,
    "budgetName" => @budget_name,
    "definition" => @definition,
    "executionRoleArn" => @execution_role_arn,
    "notificationType" => @notification_type,
    "subscribers" => @subscribers,
    "approvalModel" => @approval_model,
    "resourceTags" => @resource_tags,
  })
  result.compact
end