Class: AWSCDK::Elasticache::CfnUserProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elasticache/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(engine:, user_id:, user_name:, access_string: nil, authentication_mode: nil, no_password_required: nil, passwords: nil, tags: nil) ⇒ CfnUserProps

Returns a new instance of CfnUserProps.

Parameters:

  • engine (String)

    The current supported values are valkey and redis.

  • user_id (String)

    The ID of the user.

  • user_name (String)

    The username of the user.

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

    Access permissions string used for this user.

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

    Specifies the authentication mode to use. Below is an example of the possible JSON values:.

  • no_password_required (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates a password is not required for this user.

  • passwords (Array<String>, nil) (defaults to: nil)

    Passwords used for this user.

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

    The list of tags.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'elasticache/cfn_user_props.rb', line 17

def initialize(engine:, user_id:, user_name:, access_string: nil, authentication_mode: nil, no_password_required: nil, passwords: nil, tags: nil)
  @engine = engine
  Jsii::Type.check_type(@engine, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "engine")
  @user_id = user_id
  Jsii::Type.check_type(@user_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userId")
  @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?
  @no_password_required = no_password_required
  Jsii::Type.check_type(@no_password_required, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "noPasswordRequired") unless @no_password_required.nil?
  @passwords = passwords
  Jsii::Type.check_type(@passwords, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "passwords") unless @passwords.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.



55
56
57
# File 'elasticache/cfn_user_props.rb', line 55

def access_string
  @access_string
end

#authentication_modeObject? (readonly)

Specifies the authentication mode to use. Below is an example of the possible JSON values:.

{ Passwords: ["*****", "******"] // If Type is password.
}


65
66
67
# File 'elasticache/cfn_user_props.rb', line 65

def authentication_mode
  @authentication_mode
end

#engineString (readonly)

The current supported values are valkey and redis.



40
41
42
# File 'elasticache/cfn_user_props.rb', line 40

def engine
  @engine
end

#no_password_requiredBoolean, ... (readonly)

Indicates a password is not required for this user.



70
71
72
# File 'elasticache/cfn_user_props.rb', line 70

def no_password_required
  @no_password_required
end

#passwordsArray<String>? (readonly)

Passwords used for this user.

You can create up to two passwords for each user.



77
78
79
# File 'elasticache/cfn_user_props.rb', line 77

def passwords
  @passwords
end

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

The list of tags.



82
83
84
# File 'elasticache/cfn_user_props.rb', line 82

def tags
  @tags
end

#user_idString (readonly)

The ID of the user.



45
46
47
# File 'elasticache/cfn_user_props.rb', line 45

def user_id
  @user_id
end

#user_nameString (readonly)

The username of the user.



50
51
52
# File 'elasticache/cfn_user_props.rb', line 50

def user_name
  @user_name
end

Class Method Details

.jsii_propertiesObject



84
85
86
87
88
89
90
91
92
93
94
95
# File 'elasticache/cfn_user_props.rb', line 84

def self.jsii_properties
  {
    :engine => "engine",
    :user_id => "userId",
    :user_name => "userName",
    :access_string => "accessString",
    :authentication_mode => "authenticationMode",
    :no_password_required => "noPasswordRequired",
    :passwords => "passwords",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'elasticache/cfn_user_props.rb', line 97

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