PutActionsCommand

Adds one or more actions to an Actions dataset. For more information see Importing actions individually .

Example Syntax

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

import { PersonalizeEventsClient, PutActionsCommand } from "@aws-sdk/client-personalize-events"; // ES Modules import
// const { PersonalizeEventsClient, PutActionsCommand } = require("@aws-sdk/client-personalize-events"); // CommonJS import
const client = new PersonalizeEventsClient(config);
const input = { // PutActionsRequest
  datasetArn: "STRING_VALUE", // required
  actions: [ // ActionList // required
    { // Action
      actionId: "STRING_VALUE", // required
      properties: "STRING_VALUE",
    },
  ],
};
const command = new PutActionsCommand(input);
const response = await client.send(command);
// {};

PutActionsCommand Input

See PutActionsCommandInput for more details

Parameter
Type
Description
actions
Required
Action[] | undefined

A list of action data.

datasetArn
Required
string | undefined

The Amazon Resource Name (ARN) of the Actions dataset you are adding the action or actions to.

PutActionsCommand Output

See PutActionsCommandOutput 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.