Class: AWSCDK::Cognito::StringAttributeProps
- Inherits:
-
StringAttributeConstraints
- Object
- StringAttributeConstraints
- AWSCDK::Cognito::StringAttributeProps
- Defined in:
- cognito/string_attribute_props.rb
Overview
Props for constructing a StringAttr.
Instance Attribute Summary collapse
-
#max_len ⇒ Numeric?
readonly
Maximum length of this attribute.
-
#min_len ⇒ Numeric?
readonly
Minimum length of this attribute.
-
#mutable ⇒ Boolean?
readonly
Specifies whether the value of the attribute can be changed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_len: nil, min_len: nil, mutable: nil) ⇒ StringAttributeProps
constructor
A new instance of StringAttributeProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_len: nil, min_len: nil, mutable: nil) ⇒ StringAttributeProps
Returns a new instance of StringAttributeProps.
11 12 13 14 15 16 17 18 |
# File 'cognito/string_attribute_props.rb', line 11 def initialize(max_len: nil, min_len: nil, mutable: nil) @max_len = max_len Jsii::Type.check_type(@max_len, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxLen") unless @max_len.nil? @min_len = min_len Jsii::Type.check_type(@min_len, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minLen") unless @min_len.nil? @mutable = mutable Jsii::Type.check_type(@mutable, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "mutable") unless @mutable.nil? end |
Instance Attribute Details
#max_len ⇒ Numeric? (readonly)
Note:
Default: 2048
Maximum length of this attribute.
24 25 26 |
# File 'cognito/string_attribute_props.rb', line 24 def max_len @max_len end |
#min_len ⇒ Numeric? (readonly)
Note:
Default: 0
Minimum length of this attribute.
29 30 31 |
# File 'cognito/string_attribute_props.rb', line 29 def min_len @min_len end |
#mutable ⇒ Boolean? (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.
38 39 40 |
# File 'cognito/string_attribute_props.rb', line 38 def mutable @mutable end |
Class Method Details
.jsii_properties ⇒ Object
40 41 42 43 44 45 46 |
# File 'cognito/string_attribute_props.rb', line 40 def self.jsii_properties { :max_len => "maxLen", :min_len => "minLen", :mutable => "mutable", } end |
Instance Method Details
#to_jsii ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'cognito/string_attribute_props.rb', line 48 def to_jsii result = {} result.merge!(super) result.merge!({ "maxLen" => @max_len, "minLen" => @min_len, "mutable" => @mutable, }) result.compact end |