问题描述
我有一个 AWS Chime EnterpriseLWA 账户。我需要能够通过 AWS Chime 开发工具包在 AWS Chime 中创建用户。
我使用的是随 NPM 安装的 AWS Chime JavaScript SDK (@aws-sdk/client-chime)。 ListAccounts、SuspendUsers、InviteUsers 等所有函数都可以正常工作,但是当我尝试使用 createuser 函数时,它失败并抛出 BadRequestException,如下所示:
{ BadRequestException: Service received a bad request
at deserializeAws_restJson1createuserCommandError (E:\Projects\AWS\chime\node_modules\@aws-sdk\client-chime\dist\cjs\protocols\Aws_restJson1.js:9349:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'BadRequestException','$fault': 'client','$Metadata':
{ httpStatusCode: 400,requestId: '66d331ac-f32c-432f-8694-596c019385f1',extendedRequestId: undefined,cfId: undefined,attempts: 1,totalRetryDelay: 0 },Code: 'BadRequest' }
以下是我的代码。
const createuserCommand = new awsChime.createuserCommand({
AccountId: accountId,Email: userEmail,UserType: 'PrivateUser',Username: 'test user'
});
const createuserResponse = await client.send(createuserCommand);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)