Class: AWSCDK::Evidently::CfnSegmentProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnSegmentProps
- Defined in:
- evidently/cfn_segment_props.rb
Overview
Properties for defining a CfnSegment.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
An optional description for this segment.
-
#name ⇒ String
readonly
A name for the segment.
-
#pattern ⇒ String?
readonly
The pattern to use for the segment.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Assigns one or more tags (key-value pairs) to the feature.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, description: nil, pattern: nil, tags: nil) ⇒ CfnSegmentProps
constructor
A new instance of CfnSegmentProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, description: nil, pattern: nil, tags: nil) ⇒ CfnSegmentProps
Returns a new instance of CfnSegmentProps.
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 = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
An optional description for this segment.
33 34 35 |
# File 'evidently/cfn_segment_props.rb', line 33 def description @description end |
#name ⇒ String (readonly)
A name for the segment.
28 29 30 |
# File 'evidently/cfn_segment_props.rb', line 28 def name @name end |
#pattern ⇒ String? (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 |
#tags ⇒ Array<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 end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |