Class: AWSCDK::Cognito::NumberAttributeProps

Inherits:
NumberAttributeConstraints
  • Object
show all
Defined in:
cognito/number_attribute_props.rb

Overview

Props for NumberAttr.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max: nil, min: nil, mutable: nil) ⇒ NumberAttributeProps

Returns a new instance of NumberAttributeProps.

Parameters:

  • max (Numeric, nil) (defaults to: nil)

    Maximum value of this attribute.

  • min (Numeric, nil) (defaults to: nil)

    Minimum value of this attribute.

  • mutable (Boolean, nil) (defaults to: nil)

    Specifies whether the value of the attribute can be changed.



11
12
13
14
15
16
17
18
# File 'cognito/number_attribute_props.rb', line 11

def initialize(max: nil, min: nil, mutable: nil)
  @max = max
  Jsii::Type.check_type(@max, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "max") unless @max.nil?
  @min = min
  Jsii::Type.check_type(@min, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "min") unless @min.nil?
  @mutable = mutable
  Jsii::Type.check_type(@mutable, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "mutable") unless @mutable.nil?
end

Instance Attribute Details

#maxNumeric? (readonly)

Note:

Default: - no maximum value

Maximum value of this attribute.

Returns:

  • (Numeric, nil)


24
25
26
# File 'cognito/number_attribute_props.rb', line 24

def max
  @max
end

#minNumeric? (readonly)

Note:

Default: - no minimum value

Minimum value of this attribute.

Returns:

  • (Numeric, nil)


29
30
31
# File 'cognito/number_attribute_props.rb', line 29

def min
  @min
end

#mutableBoolean? (readonly)

Note:

Default: false

Specifies whether the value of the attribute can be changed.

For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute.

Returns:

  • (Boolean, nil)


38
39
40
# File 'cognito/number_attribute_props.rb', line 38

def mutable
  @mutable
end

Class Method Details

.jsii_propertiesObject



40
41
42
43
44
45
46
# File 'cognito/number_attribute_props.rb', line 40

def self.jsii_properties
  {
    :max => "max",
    :min => "min",
    :mutable => "mutable",
  }
end

Instance Method Details

#to_jsiiObject



48
49
50
51
52
53
54
55
56
57
# File 'cognito/number_attribute_props.rb', line 48

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "max" => @max,
    "min" => @min,
    "mutable" => @mutable,
  })
  result.compact
end