Class: AWSCDK::APS::CfnWorkspace::LabelProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
aps/cfn_workspace.rb

Overview

A label is a name:value pair used to add context to ingested metrics.

This structure defines the name and value for one label that is used in a label set. You can set ingestion limits on time series that match defined label sets, to help prevent a workspace from being overwhelmed with unexpected spikes in time series ingestion.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ LabelProperty

Returns a new instance of LabelProperty.

Parameters:

  • name (String)

    The name for this label.

  • value (String)

    The value for this label.



656
657
658
659
660
661
# File 'aps/cfn_workspace.rb', line 656

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 for this label.



667
668
669
# File 'aps/cfn_workspace.rb', line 667

def name
  @name
end

#valueString (readonly)

The value for this label.



672
673
674
# File 'aps/cfn_workspace.rb', line 672

def value
  @value
end

Class Method Details

.jsii_propertiesObject



674
675
676
677
678
679
# File 'aps/cfn_workspace.rb', line 674

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

Instance Method Details

#to_jsiiObject



681
682
683
684
685
686
687
688
# File 'aps/cfn_workspace.rb', line 681

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