PutUsersCommand

Adds one or more users to a Users dataset. For more information see Importing users individually .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { PersonalizeEventsClient, PutUsersCommand } from "@aws-sdk/client-personalize-events"; // ES Modules import
// const { PersonalizeEventsClient, PutUsersCommand } = require("@aws-sdk/client-personalize-events"); // CommonJS import
const client = new PersonalizeEventsClient(config);
const input = { // PutUsersRequest
  datasetArn: "STRING_VALUE", // required
  users: [ // UserList // required
    { // User
      userId: "STRING_VALUE", // required
      properties: "STRING_VALUE",
    },
  ],
};
const command = new PutUsersCommand(input);
const response = await client.send(command);
// {};

PutUsersCommand Input

See PutUsersCommandInput for more details

Parameter
Type
Description
datasetArn
Required
string | undefined

The Amazon Resource Name (ARN) of the Users dataset you are adding the user or users to.

users
Required
User[] | undefined

A list of user data.

PutUsersCommand Output

See PutUsersCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InvalidInputException
client

Provide a valid value for the field or parameter.

ResourceInUseException
client

The specified resource is in use.

ResourceNotFoundException
client

Could not find the specified resource.

PersonalizeEventsServiceException
Base exception class for all service exceptions from PersonalizeEvents service.