Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::DimensionProperty

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

Overview

A dimension is a name/value pair that is part of the identity of a metric.

Because dimensions are part of the unique identifier for a metric, whenever you add a unique name/value pair to one of your metrics, you are creating a new variation of that metric. For example, many Amazon EC2 metrics publish InstanceId as a dimension name, and the actual instance ID as the value for that dimension.

You can assign up to 30 dimensions to a metric.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ DimensionProperty

Returns a new instance of DimensionProperty.

Parameters:

  • name (String)

    The name of the dimension.

  • value (String)

    The value of the dimension.



897
898
899
900
901
902
# File 'application_signals/cfn_service_level_objective.rb', line 897

def initialize(name:, value:)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#nameString (readonly)

The name of the dimension.

Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon ( : ). ASCII control characters are not supported as part of dimension names.



910
911
912
# File 'application_signals/cfn_service_level_objective.rb', line 910

def name
  @name
end

#valueString (readonly)

The value of the dimension.

Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.



917
918
919
# File 'application_signals/cfn_service_level_objective.rb', line 917

def value
  @value
end

Class Method Details

.jsii_propertiesObject



919
920
921
922
923
924
# File 'application_signals/cfn_service_level_objective.rb', line 919

def self.jsii_properties
  {
    :name => "name",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



926
927
928
929
930
931
932
933
# File 'application_signals/cfn_service_level_objective.rb', line 926

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "value" => @value,
  })
  result.compact
end