Class: AWSCDK::APS::CfnRuleGroupsNamespaceProps

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

Overview

Properties for defining a CfnRuleGroupsNamespace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, name:, workspace:, tags: nil) ⇒ CfnRuleGroupsNamespaceProps

Returns a new instance of CfnRuleGroupsNamespaceProps.

Parameters:

  • data (String)

    The rules file used in the namespace.

  • name (String)

    The name of the rule groups namespace.

  • workspace (String)

    The ID of the workspace to add the rule groups namespace.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The list of tag keys and values that are associated with the rule groups namespace.



13
14
15
16
17
18
19
20
21
22
# File 'aps/cfn_rule_groups_namespace_props.rb', line 13

def initialize(data:, name:, workspace:, tags: nil)
  @data = data
  Jsii::Type.check_type(@data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "data")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @workspace = workspace
  Jsii::Type.check_type(@workspace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "workspace")
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#dataString (readonly)

The rules file used in the namespace.

For more details about the rules file, see Creating a rules file in the Amazon Managed Service for Prometheus User Guide .



30
31
32
# File 'aps/cfn_rule_groups_namespace_props.rb', line 30

def data
  @data
end

#nameString (readonly)

The name of the rule groups namespace.



35
36
37
# File 'aps/cfn_rule_groups_namespace_props.rb', line 35

def name
  @name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The list of tag keys and values that are associated with the rule groups namespace.



45
46
47
# File 'aps/cfn_rule_groups_namespace_props.rb', line 45

def tags
  @tags
end

#workspaceString (readonly)

The ID of the workspace to add the rule groups namespace.



40
41
42
# File 'aps/cfn_rule_groups_namespace_props.rb', line 40

def workspace
  @workspace
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'aps/cfn_rule_groups_namespace_props.rb', line 47

def self.jsii_properties
  {
    :data => "data",
    :name => "name",
    :workspace => "workspace",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'aps/cfn_rule_groups_namespace_props.rb', line 56

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