You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CognitoIdentityProvider::Types::CreateUserPoolRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb

Overview

Note:

When making an API call, you may pass CreateUserPoolRequest data as a hash:

{
  pool_name: "UserPoolNameType", # required
  policies: {
    password_policy: {
      minimum_length: 1,
      require_uppercase: false,
      require_lowercase: false,
      require_numbers: false,
      require_symbols: false,
    },
  },
  lambda_config: {
    pre_sign_up: "ArnType",
    custom_message: "ArnType",
    post_confirmation: "ArnType",
    pre_authentication: "ArnType",
    post_authentication: "ArnType",
    define_auth_challenge: "ArnType",
    create_auth_challenge: "ArnType",
    verify_auth_challenge_response: "ArnType",
  },
  auto_verified_attributes: ["phone_number"], # accepts phone_number, email
  alias_attributes: ["phone_number"], # accepts phone_number, email, preferred_username
  username_attributes: ["phone_number"], # accepts phone_number, email
  sms_verification_message: "SmsVerificationMessageType",
  email_verification_message: "EmailVerificationMessageType",
  email_verification_subject: "EmailVerificationSubjectType",
  verification_message_template: {
    sms_message: "SmsVerificationMessageType",
    email_message: "EmailVerificationMessageType",
    email_subject: "EmailVerificationSubjectType",
    email_message_by_link: "EmailVerificationMessageByLinkType",
    email_subject_by_link: "EmailVerificationSubjectByLinkType",
    default_email_option: "CONFIRM_WITH_LINK", # accepts CONFIRM_WITH_LINK, CONFIRM_WITH_CODE
  },
  sms_authentication_message: "SmsVerificationMessageType",
  mfa_configuration: "OFF", # accepts OFF, ON, OPTIONAL
  device_configuration: {
    challenge_required_on_new_device: false,
    device_only_remembered_on_user_prompt: false,
  },
  email_configuration: {
    source_arn: "ArnType",
    reply_to_email_address: "EmailAddressType",
  },
  sms_configuration: {
    sns_caller_arn: "ArnType", # required
    external_id: "StringType",
  },
  user_pool_tags: {
    "StringType" => "StringType",
  },
  admin_create_user_config: {
    allow_admin_create_user_only: false,
    unused_account_validity_days: 1,
    invite_message_template: {
      sms_message: "SmsVerificationMessageType",
      email_message: "EmailVerificationMessageType",
      email_subject: "EmailVerificationSubjectType",
    },
  },
  schema: [
    {
      name: "CustomAttributeNameType",
      attribute_data_type: "String", # accepts String, Number, DateTime, Boolean
      developer_only_attribute: false,
      mutable: false,
      required: false,
      number_attribute_constraints: {
        min_value: "StringType",
        max_value: "StringType",
      },
      string_attribute_constraints: {
        min_length: "StringType",
        max_length: "StringType",
      },
    },
  ],
}

Represents the request to create a user pool.

Instance Attribute Summary collapse

Instance Attribute Details

#admin_create_user_configTypes::AdminCreateUserConfigType

The configuration for AdminCreateUser requests.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#alias_attributesArray<String>

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

Returns:

  • (Array<String>)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#auto_verified_attributesArray<String>

The attributes to be auto-verified. Possible values: email, phone_number.

Returns:

  • (Array<String>)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#device_configurationTypes::DeviceConfigurationType

The device configuration.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#email_configurationTypes::EmailConfigurationType

The email configuration.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#email_verification_messageString

A string representing the email verification message.

Returns:

  • (String)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#email_verification_subjectString

A string representing the email verification subject.

Returns:

  • (String)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#lambda_configTypes::LambdaConfigType

The Lambda trigger configuration information for the new user pool.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#mfa_configurationString

Specifies MFA configuration details.

Returns:

  • (String)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#policiesTypes::UserPoolPolicyType

The policies associated with the new user pool.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#pool_nameString

A string used to name the user pool.

Returns:

  • (String)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#schemaArray<Types::SchemaAttributeType>

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

Returns:



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#sms_authentication_messageString

A string representing the SMS authentication message.

Returns:

  • (String)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#sms_configurationTypes::SmsConfigurationType

The SMS configuration.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#sms_verification_messageString

A string representing the SMS verification message.

Returns:

  • (String)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#user_pool_tagsHash<String,String>

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

Returns:

  • (Hash<String,String>)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#username_attributesArray<String>

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

Returns:

  • (Array<String>)


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end

#verification_message_templateTypes::VerificationMessageTemplateType

The template for the verification message that the user sees when the app requests permission to access the user's information.



2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'gems/aws-sdk-cognitoidentityprovider/lib/aws-sdk-cognitoidentityprovider/types.rb', line 2212

class CreateUserPoolRequest < Struct.new(
  :pool_name,
  :policies,
  :lambda_config,
  :auto_verified_attributes,
  :alias_attributes,
  :username_attributes,
  :sms_verification_message,
  :email_verification_message,
  :email_verification_subject,
  :verification_message_template,
  :sms_authentication_message,
  :mfa_configuration,
  :device_configuration,
  :email_configuration,
  :sms_configuration,
  :user_pool_tags,
  :admin_create_user_config,
  :schema)
  include Aws::Structure
end