Class: AWSCDK::CE::CfnAnomalyMonitorProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CE::CfnAnomalyMonitorProps
- Defined in:
- ce/cfn_anomaly_monitor_props.rb
Overview
Properties for defining a CfnAnomalyMonitor.
Instance Attribute Summary collapse
-
#monitor_dimension ⇒ String?
readonly
For customer managed monitors, do not specify this field.
-
#monitor_name ⇒ String
readonly
The name of the monitor.
-
#monitor_specification ⇒ String?
readonly
The array of
MonitorSpecificationin JSON array format. -
#monitor_type ⇒ String
readonly
The type of the monitor.
-
#resource_tags ⇒ Array<AWSCDK::CE::CfnAnomalyMonitor::ResourceTagProperty>?
readonly
Tags to assign to monitor.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(monitor_name:, monitor_type:, monitor_dimension: nil, monitor_specification: nil, resource_tags: nil) ⇒ CfnAnomalyMonitorProps
constructor
A new instance of CfnAnomalyMonitorProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(monitor_name:, monitor_type:, monitor_dimension: nil, monitor_specification: nil, resource_tags: nil) ⇒ CfnAnomalyMonitorProps
Returns a new instance of CfnAnomalyMonitorProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 14 def initialize(monitor_name:, monitor_type:, monitor_dimension: nil, monitor_specification: nil, resource_tags: nil) @monitor_name = monitor_name Jsii::Type.check_type(@monitor_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "monitorName") @monitor_type = monitor_type Jsii::Type.check_type(@monitor_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "monitorType") @monitor_dimension = monitor_dimension Jsii::Type.check_type(@monitor_dimension, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "monitorDimension") unless @monitor_dimension.nil? @monitor_specification = monitor_specification Jsii::Type.check_type(@monitor_specification, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "monitorSpecification") unless @monitor_specification.nil? @resource_tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CE::CfnAnomalyMonitor::ResourceTagProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@resource_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jZS5DZm5Bbm9tYWx5TW9uaXRvci5SZXNvdXJjZVRhZ1Byb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "resourceTags") unless @resource_tags.nil? end |
Instance Attribute Details
#monitor_dimension ⇒ String? (readonly)
For customer managed monitors, do not specify this field.
For AWS managed monitors, this field controls which cost dimension is automatically analyzed by the monitor. For TAG and COST_CATEGORY dimensions, you must also specify MonitorSpecification to configure the specific tag or cost category key to analyze.
49 50 51 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 49 def monitor_dimension @monitor_dimension end |
#monitor_name ⇒ String (readonly)
The name of the monitor.
31 32 33 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 31 def monitor_name @monitor_name end |
#monitor_specification ⇒ String? (readonly)
The array of MonitorSpecification in JSON array format.
For instance, you can use MonitorSpecification to specify a tag, Cost Category, or linked account for your custom anomaly monitor. For further information, see the Examples section of this page.
56 57 58 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 56 def monitor_specification @monitor_specification end |
#monitor_type ⇒ String (readonly)
The type of the monitor.
Set this to DIMENSIONAL for an AWS managed monitor. AWS managed monitors automatically track up to the top 5,000 values by cost within a dimension of your choosing. Each dimension value is evaluated independently. If you start incurring cost in a new value of your chosen dimension, it will automatically be analyzed by an AWS managed monitor.
Set this to CUSTOM for a customer managed monitor. Customer managed monitors let you select specific dimension values that get monitored in aggregate.
For more information about monitor types, see Monitor types in the Billing and Cost Management User Guide .
42 43 44 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 42 def monitor_type @monitor_type end |
#resource_tags ⇒ Array<AWSCDK::CE::CfnAnomalyMonitor::ResourceTagProperty>? (readonly)
Tags to assign to monitor.
61 62 63 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 61 def @resource_tags end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 63 def self.jsii_properties { :monitor_name => "monitorName", :monitor_type => "monitorType", :monitor_dimension => "monitorDimension", :monitor_specification => "monitorSpecification", :resource_tags => "resourceTags", } end |
Instance Method Details
#to_jsii ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 |
# File 'ce/cfn_anomaly_monitor_props.rb', line 73 def to_jsii result = {} result.merge!({ "monitorName" => @monitor_name, "monitorType" => @monitor_type, "monitorDimension" => @monitor_dimension, "monitorSpecification" => @monitor_specification, "resourceTags" => @resource_tags, }) result.compact end |