Class: AWSCDK::CE::CfnAnomalyMonitorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ce/cfn_anomaly_monitor_props.rb

Overview

Properties for defining a CfnAnomalyMonitor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(monitor_name:, monitor_type:, monitor_dimension: nil, monitor_specification: nil, resource_tags: nil) ⇒ CfnAnomalyMonitorProps

Returns a new instance of CfnAnomalyMonitorProps.

Parameters:

  • monitor_name (String)

    The name of the monitor.

  • monitor_type (String)

    The type of the monitor.

  • monitor_dimension (String, nil) (defaults to: nil)

    For customer managed monitors, do not specify this field.

  • monitor_specification (String, nil) (defaults to: nil)

    The array of MonitorSpecification in JSON array format.

  • resource_tags (Array<AWSCDK::CE::CfnAnomalyMonitor::ResourceTagProperty>, nil) (defaults to: nil)

    Tags to assign to monitor.



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 = resource_tags.is_a?(Array) ? resource_tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CE::CfnAnomalyMonitor::ResourceTagProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : resource_tags
  Jsii::Type.check_type(@resource_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jZS5DZm5Bbm9tYWx5TW9uaXRvci5SZXNvdXJjZVRhZ1Byb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "resourceTags") unless @resource_tags.nil?
end

Instance Attribute Details

#monitor_dimensionString? (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_nameString (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_specificationString? (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_typeString (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_tagsArray<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
  @resource_tags
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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