Class: AWSCDK::AppStream::CfnUserProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_stream/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(authentication_type:, user_name:, first_name: nil, last_name: nil, message_action: nil) ⇒ CfnUserProps

Returns a new instance of CfnUserProps.

Parameters:

  • authentication_type (String)

    The authentication type for the user.

  • user_name (String)

    The email address of the user.

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

    The first name, or given name, of the user.

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

    The last name, or surname, of the user.

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

    The action to take for the welcome email that is sent to a user after the user is created in the user pool.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'app_stream/cfn_user_props.rb', line 14

def initialize(authentication_type:, user_name:, first_name: nil, last_name: nil, message_action: nil)
  @authentication_type = authentication_type
  Jsii::Type.check_type(@authentication_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authenticationType")
  @user_name = user_name
  Jsii::Type.check_type(@user_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userName")
  @first_name = first_name
  Jsii::Type.check_type(@first_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "firstName") unless @first_name.nil?
  @last_name = last_name
  Jsii::Type.check_type(@last_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lastName") unless @last_name.nil?
  @message_action = message_action
  Jsii::Type.check_type(@message_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "messageAction") unless @message_action.nil?
end

Instance Attribute Details

#authentication_typeString (readonly)

The authentication type for the user.

You must specify USERPOOL.



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

def authentication_type
  @authentication_type
end

#first_nameString? (readonly)

The first name, or given name, of the user.



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

def first_name
  @first_name
end

#last_nameString? (readonly)

The last name, or surname, of the user.



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

def last_name
  @last_name
end

#message_actionString? (readonly)

The action to take for the welcome email that is sent to a user after the user is created in the user pool.

If you specify SUPPRESS, no email is sent. If you specify RESEND, do not specify the first name or last name of the user. If the value is null, the email is sent.

The temporary password in the welcome email is valid for only 7 days. If users don’t set their passwords within 7 days, you must send them a new welcome email.



59
60
61
# File 'app_stream/cfn_user_props.rb', line 59

def message_action
  @message_action
end

#user_nameString (readonly)

The email address of the user.

Users' email addresses are case-sensitive. During login, if they specify an email address that doesn't use the same capitalization as the email address specified when their user pool account was created, a "user does not exist" error message displays.



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

def user_name
  @user_name
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :authentication_type => "authenticationType",
    :user_name => "userName",
    :first_name => "firstName",
    :last_name => "lastName",
    :message_action => "messageAction",
  }
end

Instance Method Details

#to_jsiiObject



71
72
73
74
75
76
77
78
79
80
81
# File 'app_stream/cfn_user_props.rb', line 71

def to_jsii
  result = {}
  result.merge!({
    "authenticationType" => @authentication_type,
    "userName" => @user_name,
    "firstName" => @first_name,
    "lastName" => @last_name,
    "messageAction" => @message_action,
  })
  result.compact
end