Class: AWSCDK::Evidently::CfnSegmentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
evidently/cfn_segment_props.rb

Overview

Properties for defining a CfnSegment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description: nil, pattern: nil, tags: nil) ⇒ CfnSegmentProps

Returns a new instance of CfnSegmentProps.

Parameters:

  • name (String)

    A name for the segment.

  • description (String, nil) (defaults to: nil)

    An optional description for this segment.

  • pattern (String, nil) (defaults to: nil)

    The pattern to use for the segment.

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

    Assigns one or more tags (key-value pairs) to the feature.



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

def initialize(name:, description: nil, pattern: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @pattern = pattern
  Jsii::Type.check_type(@pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") unless @pattern.nil?
  @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

#descriptionString? (readonly)

An optional description for this segment.



33
34
35
# File 'evidently/cfn_segment_props.rb', line 33

def description
  @description
end

#nameString (readonly)

A name for the segment.



28
29
30
# File 'evidently/cfn_segment_props.rb', line 28

def name
  @name
end

#patternString? (readonly)

The pattern to use for the segment.

For more information about pattern syntax, see Segment rule pattern syntax .



40
41
42
# File 'evidently/cfn_segment_props.rb', line 40

def pattern
  @pattern
end

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

Assigns one or more tags (key-value pairs) to the feature.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.

You can associate as many as 50 tags with a feature.

For more information, see Tagging AWS resources .



53
54
55
# File 'evidently/cfn_segment_props.rb', line 53

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



55
56
57
58
59
60
61
62
# File 'evidently/cfn_segment_props.rb', line 55

def self.jsii_properties
  {
    :name => "name",
    :description => "description",
    :pattern => "pattern",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



64
65
66
67
68
69
70
71
72
73
# File 'evidently/cfn_segment_props.rb', line 64

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