- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateBatchPredictionJobCommand
Creates a batch prediction job.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { FraudDetectorClient, CreateBatchPredictionJobCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import
// const { FraudDetectorClient, CreateBatchPredictionJobCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import
const client = new FraudDetectorClient(config);
const input = { // CreateBatchPredictionJobRequest
jobId: "STRING_VALUE", // required
inputPath: "STRING_VALUE", // required
outputPath: "STRING_VALUE", // required
eventTypeName: "STRING_VALUE", // required
detectorName: "STRING_VALUE", // required
detectorVersion: "STRING_VALUE",
iamRoleArn: "STRING_VALUE", // required
tags: [ // tagList
{ // Tag
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
};
const command = new CreateBatchPredictionJobCommand(input);
const response = await client.send(command);
// {};
CreateBatchPredictionJobCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
detectorName Required | string | undefined | The name of the detector. |
eventTypeName Required | string | undefined | The name of the event type. |
iamRoleArn Required | string | undefined | The ARN of the IAM role to use for this job request. The IAM Role must have read permissions to your input S3 bucket and write permissions to your output S3 bucket. For more information about bucket permissions, see User policy examples in the Amazon S3 User Guide. |
inputPath Required | string | undefined | The Amazon S3 location of your training file. |
jobId Required | string | undefined | The ID of the batch prediction job. |
outputPath Required | string | undefined | The Amazon S3 location of your output file. |
detectorVersion | string | undefined | The detector version. |
tags | Tag[] | undefined | A collection of key and value pairs. |
CreateBatchPredictionJobCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as |
InternalServerException | server | An exception indicating an internal server error. |
ResourceNotFoundException | client | An exception indicating the specified resource was not found. |
ThrottlingException | client | An exception indicating a throttling error. |
ValidationException | client | An exception indicating a specified value is not allowed. |
FraudDetectorServiceException | Base exception class for all service exceptions from FraudDetector service. |