Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliMetricProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliMetricProperty
- Defined in:
- application_signals/cfn_service_level_objective.rb
Overview
Use this structure to specify the metric to be used for the SLO.
Instance Attribute Summary collapse
- #composite_sli_config ⇒ AWSCDK::IResolvable, ... readonly
-
#dependency_config ⇒ AWSCDK::IResolvable, ...
readonly
Identifies the dependency using the
DependencyKeyAttributesandDependencyOperationName. -
#key_attributes ⇒ AWSCDK::IResolvable, ...
readonly
If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to.
-
#metric_data_queries ⇒ AWSCDK::IResolvable, ...
readonly
If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
-
#metric_name ⇒ String?
readonly
The name of the metric for non-Application Signals services.
-
#metric_source ⇒ AWSCDK::IResolvable, ...
readonly
Configuration for identifying the source of metrics for non-Application Signals services.
-
#metric_type ⇒ String?
readonly
If the SLO is to monitor either the
LATENCYorAVAILABILITYmetric that Application Signals collects, use this field to specify which of those metrics is used. -
#operation_name ⇒ String?
readonly
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
-
#period_seconds ⇒ Numeric?
readonly
The number of seconds to use as the period for SLO evaluation.
-
#statistic ⇒ String?
readonly
The statistic to use for comparison to the threshold.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(composite_sli_config: nil, dependency_config: nil, key_attributes: nil, metric_data_queries: nil, metric_name: nil, metric_source: nil, metric_type: nil, operation_name: nil, period_seconds: nil, statistic: nil) ⇒ SliMetricProperty
constructor
A new instance of SliMetricProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(composite_sli_config: nil, dependency_config: nil, key_attributes: nil, metric_data_queries: nil, metric_name: nil, metric_source: nil, metric_type: nil, operation_name: nil, period_seconds: nil, statistic: nil) ⇒ SliMetricProperty
Returns a new instance of SliMetricProperty.
1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 |
# File 'application_signals/cfn_service_level_objective.rb', line 1728 def initialize(composite_sli_config: nil, dependency_config: nil, key_attributes: nil, metric_data_queries: nil, metric_name: nil, metric_source: nil, metric_type: nil, operation_name: nil, period_seconds: nil, statistic: nil) @composite_sli_config = composite_sli_config.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::CompositeSliConfigProperty.new(**composite_sli_config.transform_keys(&:to_sym)) : composite_sli_config Jsii::Type.check_type(@composite_sli_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLkNvbXBvc2l0ZVNsaUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "compositeSliConfig") unless @composite_sli_config.nil? @dependency_config = dependency_config.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::DependencyConfigProperty.new(**dependency_config.transform_keys(&:to_sym)) : dependency_config Jsii::Type.check_type(@dependency_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLkRlcGVuZGVuY3lDb25maWdQcm9wZXJ0eSJ9XX19")), "dependencyConfig") unless @dependency_config.nil? @key_attributes = key_attributes Jsii::Type.check_type(@key_attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "keyAttributes") unless @key_attributes.nil? @metric_data_queries = metric_data_queries Jsii::Type.check_type(@metric_data_queries, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25zaWduYWxzLkNmblNlcnZpY2VMZXZlbE9iamVjdGl2ZS5NZXRyaWNEYXRhUXVlcnlQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "metricDataQueries") unless @metric_data_queries.nil? @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") unless @metric_name.nil? @metric_source = metric_source.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricSourceProperty.new(**metric_source.transform_keys(&:to_sym)) : metric_source Jsii::Type.check_type(@metric_source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLk1ldHJpY1NvdXJjZVByb3BlcnR5In1dfX0=")), "metricSource") unless @metric_source.nil? @metric_type = metric_type Jsii::Type.check_type(@metric_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricType") unless @metric_type.nil? @operation_name = operation_name Jsii::Type.check_type(@operation_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operationName") unless @operation_name.nil? @period_seconds = period_seconds Jsii::Type.check_type(@period_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "periodSeconds") unless @period_seconds.nil? @statistic = statistic Jsii::Type.check_type(@statistic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statistic") unless @statistic.nil? end |
Instance Attribute Details
#composite_sli_config ⇒ AWSCDK::IResolvable, ... (readonly)
1753 1754 1755 |
# File 'application_signals/cfn_service_level_objective.rb', line 1753 def composite_sli_config @composite_sli_config end |
#dependency_config ⇒ AWSCDK::IResolvable, ... (readonly)
Identifies the dependency using the DependencyKeyAttributes and DependencyOperationName .
1758 1759 1760 |
# File 'application_signals/cfn_service_level_objective.rb', line 1758 def dependency_config @dependency_config end |
#key_attributes ⇒ AWSCDK::IResolvable, ... (readonly)
If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to.
To do so, you must specify at least the Type , Name , and Environment attributes.
This is a string-to-string map. It can include the following fields.
Typedesignates the type of object this is.ResourceTypespecifies the type of the resource. This field is used only when the value of theTypefield isResourceorAWS::Resource.Namespecifies the name of the object. This is used only if the value of theTypefield isService,RemoteService, orAWS::Service.Identifieridentifies the resource objects of this resource. This is used only if the value of theTypefield isResourceorAWS::Resource.Environmentspecifies the location where this object is hosted, or what it belongs to.
1773 1774 1775 |
# File 'application_signals/cfn_service_level_objective.rb', line 1773 def key_attributes @key_attributes end |
#metric_data_queries ⇒ AWSCDK::IResolvable, ... (readonly)
If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
1778 1779 1780 |
# File 'application_signals/cfn_service_level_objective.rb', line 1778 def metric_data_queries @metric_data_queries end |
#metric_name ⇒ String? (readonly)
The name of the metric for non-Application Signals services.
1783 1784 1785 |
# File 'application_signals/cfn_service_level_objective.rb', line 1783 def metric_name @metric_name end |
#metric_source ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration for identifying the source of metrics for non-Application Signals services.
1788 1789 1790 |
# File 'application_signals/cfn_service_level_objective.rb', line 1788 def metric_source @metric_source end |
#metric_type ⇒ String? (readonly)
If the SLO is to monitor either the LATENCY or AVAILABILITY metric that Application Signals collects, use this field to specify which of those metrics is used.
1793 1794 1795 |
# File 'application_signals/cfn_service_level_objective.rb', line 1793 def metric_type @metric_type end |
#operation_name ⇒ String? (readonly)
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
1798 1799 1800 |
# File 'application_signals/cfn_service_level_objective.rb', line 1798 def operation_name @operation_name end |
#period_seconds ⇒ Numeric? (readonly)
The number of seconds to use as the period for SLO evaluation.
Your application's performance is compared to the SLI during each period. For each period, the application is determined to have either achieved or not achieved the necessary performance.
1805 1806 1807 |
# File 'application_signals/cfn_service_level_objective.rb', line 1805 def period_seconds @period_seconds end |
#statistic ⇒ String? (readonly)
The statistic to use for comparison to the threshold.
It can be any CloudWatch statistic or extended statistic. For more information about statistics, see CloudWatch statistics definitions .
1812 1813 1814 |
# File 'application_signals/cfn_service_level_objective.rb', line 1812 def statistic @statistic end |
Class Method Details
.jsii_properties ⇒ Object
1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 |
# File 'application_signals/cfn_service_level_objective.rb', line 1814 def self.jsii_properties { :composite_sli_config => "compositeSliConfig", :dependency_config => "dependencyConfig", :key_attributes => "keyAttributes", :metric_data_queries => "metricDataQueries", :metric_name => "metricName", :metric_source => "metricSource", :metric_type => "metricType", :operation_name => "operationName", :period_seconds => "periodSeconds", :statistic => "statistic", } end |
Instance Method Details
#to_jsii ⇒ Object
1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 |
# File 'application_signals/cfn_service_level_objective.rb', line 1829 def to_jsii result = {} result.merge!({ "compositeSliConfig" => @composite_sli_config, "dependencyConfig" => @dependency_config, "keyAttributes" => @key_attributes, "metricDataQueries" => @metric_data_queries, "metricName" => @metric_name, "metricSource" => @metric_source, "metricType" => @metric_type, "operationName" => @operation_name, "periodSeconds" => @period_seconds, "statistic" => @statistic, }) result.compact end |