Class: AWSCDK::CE::CfnAnomalySubscriptionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CE::CfnAnomalySubscriptionProps
- Defined in:
- ce/cfn_anomaly_subscription_props.rb
Overview
Properties for defining a CfnAnomalySubscription.
Instance Attribute Summary collapse
-
#frequency ⇒ String
readonly
The frequency that anomaly notifications are sent.
-
#monitor_arn_list ⇒ Array<String, AWSCDK::Interfaces::AWSCE::IAnomalyMonitorRef>
readonly
A list of cost anomaly monitors.
-
#resource_tags ⇒ Array<AWSCDK::CE::CfnAnomalySubscription::ResourceTagProperty>?
readonly
Tags to assign to subscription.
-
#subscribers ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CE::CfnAnomalySubscription::SubscriberProperty>
readonly
A list of subscribers to notify.
-
#subscription_name ⇒ String
readonly
The name for the subscription.
-
#threshold ⇒ Numeric?
readonly
(deprecated).
-
#threshold_expression ⇒ String?
readonly
An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(frequency:, monitor_arn_list:, subscribers:, subscription_name:, resource_tags: nil, threshold: nil, threshold_expression: nil) ⇒ CfnAnomalySubscriptionProps
constructor
A new instance of CfnAnomalySubscriptionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(frequency:, monitor_arn_list:, subscribers:, subscription_name:, resource_tags: nil, threshold: nil, threshold_expression: nil) ⇒ CfnAnomalySubscriptionProps
Returns a new instance of CfnAnomalySubscriptionProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 16 def initialize(frequency:, monitor_arn_list:, subscribers:, subscription_name:, resource_tags: nil, threshold: nil, threshold_expression: nil) @frequency = frequency Jsii::Type.check_type(@frequency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "frequency") @monitor_arn_list = monitor_arn_list Jsii::Type.check_type(@monitor_arn_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2NlLklBbm9tYWx5TW9uaXRvclJlZiJ9XX19LCJraW5kIjoiYXJyYXkifX0=")), "monitorArnList") @subscribers = subscribers Jsii::Type.check_type(@subscribers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2UuQ2ZuQW5vbWFseVN1YnNjcmlwdGlvbi5TdWJzY3JpYmVyUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "subscribers") @subscription_name = subscription_name Jsii::Type.check_type(@subscription_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subscriptionName") @resource_tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CE::CfnAnomalySubscription::ResourceTagProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@resource_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jZS5DZm5Bbm9tYWx5U3Vic2NyaXB0aW9uLlJlc291cmNlVGFnUHJvcGVydHkifSwia2luZCI6ImFycmF5In19")), "resourceTags") unless @resource_tags.nil? @threshold = threshold Jsii::Type.check_type(@threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "threshold") unless @threshold.nil? @threshold_expression = threshold_expression Jsii::Type.check_type(@threshold_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "thresholdExpression") unless @threshold_expression.nil? end |
Instance Attribute Details
#frequency ⇒ String (readonly)
The frequency that anomaly notifications are sent.
Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic for anomaly notifications .
39 40 41 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 39 def frequency @frequency end |
#monitor_arn_list ⇒ Array<String, AWSCDK::Interfaces::AWSCE::IAnomalyMonitorRef> (readonly)
A list of cost anomaly monitors.
44 45 46 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 44 def monitor_arn_list @monitor_arn_list end |
#resource_tags ⇒ Array<AWSCDK::CE::CfnAnomalySubscription::ResourceTagProperty>? (readonly)
Tags to assign to subscription.
59 60 61 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 59 def @resource_tags end |
#subscribers ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CE::CfnAnomalySubscription::SubscriberProperty> (readonly)
A list of subscribers to notify.
49 50 51 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 49 def subscribers @subscribers end |
#subscription_name ⇒ String (readonly)
The name for the subscription.
54 55 56 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 54 def subscription_name @subscription_name end |
#threshold ⇒ Numeric? (readonly)
(deprecated).
An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact for more details) for an anomaly notification to be generated.
This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
One of Threshold or ThresholdExpression is required for AWS::CE::AnomalySubscription . You cannot specify both.
70 71 72 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 70 def threshold @threshold end |
#threshold_expression ⇒ String? (readonly)
An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE , corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types are AND and OR . The match option GREATER_THAN_OR_EQUAL is required. Values must be numbers between 0 and 10,000,000,000 in string format.
One of Threshold or ThresholdExpression is required for AWS::CE::AnomalySubscription . You cannot specify both.
For further information, see the Examples section of this page.
79 80 81 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 79 def threshold_expression @threshold_expression end |
Class Method Details
.jsii_properties ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 81 def self.jsii_properties { :frequency => "frequency", :monitor_arn_list => "monitorArnList", :subscribers => "subscribers", :subscription_name => "subscriptionName", :resource_tags => "resourceTags", :threshold => "threshold", :threshold_expression => "thresholdExpression", } end |
Instance Method Details
#to_jsii ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'ce/cfn_anomaly_subscription_props.rb', line 93 def to_jsii result = {} result.merge!({ "frequency" => @frequency, "monitorArnList" => @monitor_arn_list, "subscribers" => @subscribers, "subscriptionName" => @subscription_name, "resourceTags" => @resource_tags, "threshold" => @threshold, "thresholdExpression" => @threshold_expression, }) result.compact end |