Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
application_signals/cfn_service_level_objective.rb

Overview

This structure defines the metric used for a service level indicator, including the metric name, namespace, and dimensions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dimensions: nil, metric_name: nil, namespace: nil) ⇒ MetricProperty

Returns a new instance of MetricProperty.

Parameters:



1212
1213
1214
1215
1216
1217
1218
1219
# File 'application_signals/cfn_service_level_objective.rb', line 1212

def initialize(dimensions: nil, metric_name: nil, namespace: nil)
  @dimensions = dimensions
  Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25zaWduYWxzLkNmblNlcnZpY2VMZXZlbE9iamVjdGl2ZS5EaW1lbnNpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "dimensions") unless @dimensions.nil?
  @metric_name = metric_name
  Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") unless @metric_name.nil?
  @namespace = namespace
  Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil?
end

Instance Attribute Details

#dimensionsAWSCDK::IResolvable, ... (readonly)

An array of one or more dimensions to use to define the metric that you want to use.

For more information, see Dimensions .



1227
1228
1229
# File 'application_signals/cfn_service_level_objective.rb', line 1227

def dimensions
  @dimensions
end

#metric_nameString? (readonly)

The name of the metric to use.



1232
1233
1234
# File 'application_signals/cfn_service_level_objective.rb', line 1232

def metric_name
  @metric_name
end

#namespaceString? (readonly)

The namespace of the metric.

For more information, see Namespaces .



1239
1240
1241
# File 'application_signals/cfn_service_level_objective.rb', line 1239

def namespace
  @namespace
end

Class Method Details

.jsii_propertiesObject



1241
1242
1243
1244
1245
1246
1247
# File 'application_signals/cfn_service_level_objective.rb', line 1241

def self.jsii_properties
  {
    :dimensions => "dimensions",
    :metric_name => "metricName",
    :namespace => "namespace",
  }
end

Instance Method Details

#to_jsiiObject



1249
1250
1251
1252
1253
1254
1255
1256
1257
# File 'application_signals/cfn_service_level_objective.rb', line 1249

def to_jsii
  result = {}
  result.merge!({
    "dimensions" => @dimensions,
    "metricName" => @metric_name,
    "namespace" => @namespace,
  })
  result.compact
end