Skip to content
v2.277.0

AdminCreateUserConfigProperty Struct ​

The settings for administrator creation of users in a user pool.

Contains settings for allowing user sign-up, customizing invitation messages to new users, and the amount of time before temporary passwords expire.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const adminCreateUserConfigProperty: cognito.CfnUserPool.AdminCreateUserConfigProperty = {
  allowAdminCreateUserOnly: false,
  inviteMessageTemplate: {
    emailMessage: 'emailMessage',
    emailSubject: 'emailSubject',
    smsMessage: 'smsMessage',
  },
  unusedAccountValidityDays: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cognito as cognito

admin_create_user_config_property = cognito.CfnUserPool.AdminCreateUserConfigProperty(
    allow_admin_create_user_only=False,
    invite_message_template=cognito.CfnUserPool.InviteMessageTemplateProperty(
        email_message="emailMessage",
        email_subject="emailSubject",
        sms_message="smsMessage"
    ),
    unused_account_validity_days=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cognito.*;

AdminCreateUserConfigProperty adminCreateUserConfigProperty = AdminCreateUserConfigProperty.builder()
        .allowAdminCreateUserOnly(false)
        .inviteMessageTemplate(InviteMessageTemplateProperty.builder()
                .emailMessage("emailMessage")
                .emailSubject("emailSubject")
                .smsMessage("smsMessage")
                .build())
        .unusedAccountValidityDays(123)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cognito;

var adminCreateUserConfigProperty = new AdminCreateUserConfigProperty {
    AllowAdminCreateUserOnly = false,
    InviteMessageTemplate = new InviteMessageTemplateProperty {
        EmailMessage = "emailMessage",
        EmailSubject = "emailSubject",
        SmsMessage = "smsMessage"
    },
    UnusedAccountValidityDays = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

adminCreateUserConfigProperty := &AdminCreateUserConfigProperty{
	AllowAdminCreateUserOnly: jsii.Boolean(false),
	InviteMessageTemplate: &InviteMessageTemplateProperty{
		EmailMessage: jsii.String("emailMessage"),
		EmailSubject: jsii.String("emailSubject"),
		SmsMessage: jsii.String("smsMessage"),
	},
	UnusedAccountValidityDays: jsii.Number(123),
}

Properties ​

allowAdminCreateUserOnlyoptionalboolean | IResolvableallow_admin_create_user_onlyoptionaltyping.Union[bool, IResolvable]allowAdminCreateUserOnlyoptionalBooleanAllowAdminCreateUserOnlyoptionalboolAllowAdminCreateUserOnlyoptionalinterface{} #
The setting for allowing self-service sign-up.

When true , only administrators can create new user profiles. When false , users can register themselves and create a new user profile with the SignUp operation.

inviteMessageTemplateoptionalIResolvable | CfnUserPool.InviteMessageTemplatePropertyinvite_message_templateoptionaltyping.Union[IResolvable, InviteMessageTemplateProperty]inviteMessageTemplateoptionalIResolvableInviteMessageTemplateoptionalIResolvableInviteMessageTemplateoptionalinterface{} #
The template for the welcome message to new users.
notes

This template must include the {####} temporary password placeholder if you are creating users with passwords. If your users don't have passwords, you can omit the placeholder.

See also Customizing User Invitation Messages .

unusedAccountValidityDaysoptionalnumberunused_account_validity_daysoptionalint | floatunusedAccountValidityDaysoptionalNumberUnusedAccountValidityDaysoptionaldoubleUnusedAccountValidityDaysoptional*float64 #
This parameter is no longer in use.
notes

The password expiration limit in days for administrator-created users. When this time expires, the user can't sign in with their temporary password. To reset the account after that time limit, you must call AdminCreateUser again, specifying RESEND for the MessageAction parameter.

The default value for this parameter is 7.