Class: AWSCDK::MemoryDB::CfnUserProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
memory_db/cfn_user_props.rb

Overview

Properties for defining a CfnUser.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_name:, access_string: nil, authentication_mode: nil, tags: nil) ⇒ CfnUserProps

Returns a new instance of CfnUserProps.

Parameters:

  • user_name (String)

    The name of the user.

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

    Access permissions string used for this user.

  • authentication_mode (Object, nil) (defaults to: nil)

    Denotes whether the user requires a password to authenticate.

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

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



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

def initialize(user_name:, access_string: nil, authentication_mode: nil, tags: nil)
  @user_name = user_name
  Jsii::Type.check_type(@user_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userName")
  @access_string = access_string
  Jsii::Type.check_type(@access_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessString") unless @access_string.nil?
  @authentication_mode = authentication_mode
  Jsii::Type.check_type(@authentication_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "authenticationMode") unless @authentication_mode.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

#access_stringString? (readonly)

Access permissions string used for this user.



33
34
35
# File 'memory_db/cfn_user_props.rb', line 33

def access_string
  @access_string
end

#authentication_modeObject? (readonly)

Denotes whether the user requires a password to authenticate.

Example:

mynewdbuser: Type: AWS::MemoryDB::User Properties: AccessString: on ~* &* +@all AuthenticationMode: Passwords: '1234567890123456' Type: password UserName: mynewdbuser AuthenticationMode: { "Passwords": ["1234567890123456"], "Type": "Password" }



42
43
44
# File 'memory_db/cfn_user_props.rb', line 42

def authentication_mode
  @authentication_mode
end

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

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

For more information, see Tag .



49
50
51
# File 'memory_db/cfn_user_props.rb', line 49

def tags
  @tags
end

#user_nameString (readonly)

The name of the user.



28
29
30
# File 'memory_db/cfn_user_props.rb', line 28

def user_name
  @user_name
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
# File 'memory_db/cfn_user_props.rb', line 51

def self.jsii_properties
  {
    :user_name => "userName",
    :access_string => "accessString",
    :authentication_mode => "authenticationMode",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
# File 'memory_db/cfn_user_props.rb', line 60

def to_jsii
  result = {}
  result.merge!({
    "userName" => @user_name,
    "accessString" => @access_string,
    "authenticationMode" => @authentication_mode,
    "tags" => @tags,
  })
  result.compact
end