Class: AWSCDK::FraudDetector::CfnLabelProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
fraud_detector/cfn_label_props.rb

Overview

Properties for defining a CfnLabel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description: nil, tags: nil) ⇒ CfnLabelProps

Returns a new instance of CfnLabelProps.

Parameters:

  • name (String)

    The label name.

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

    The label description.

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

    An array of key-value pairs to apply to this resource.



12
13
14
15
16
17
18
19
# File 'fraud_detector/cfn_label_props.rb', line 12

def initialize(name:, description: 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?
  @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)

The label description.



32
33
34
# File 'fraud_detector/cfn_label_props.rb', line 32

def description
  @description
end

#nameString (readonly)

The label name.

Pattern: ^[0-9a-z_-]+$



27
28
29
# File 'fraud_detector/cfn_label_props.rb', line 27

def name
  @name
end

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

An array of key-value pairs to apply to this resource.

For more information, see Tag .



39
40
41
# File 'fraud_detector/cfn_label_props.rb', line 39

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



41
42
43
44
45
46
47
# File 'fraud_detector/cfn_label_props.rb', line 41

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

Instance Method Details

#to_jsiiObject



49
50
51
52
53
54
55
56
57
# File 'fraud_detector/cfn_label_props.rb', line 49

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