CreateMonitorCommand

Creates a predictor monitor resource for an existing auto predictor. Predictor monitoring allows you to see how your predictor's performance changes over time. For more information, see Predictor Monitoring .

Example Syntax

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

import { ForecastClient, CreateMonitorCommand } from "@aws-sdk/client-forecast"; // ES Modules import
// const { ForecastClient, CreateMonitorCommand } = require("@aws-sdk/client-forecast"); // CommonJS import
const client = new ForecastClient(config);
const input = { // CreateMonitorRequest
  MonitorName: "STRING_VALUE", // required
  ResourceArn: "STRING_VALUE", // required
  Tags: [ // Tags
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new CreateMonitorCommand(input);
const response = await client.send(command);
// { // CreateMonitorResponse
//   MonitorArn: "STRING_VALUE",
// };

CreateMonitorCommand Input

See CreateMonitorCommandInput for more details

Parameter
Type
Description
MonitorName
Required
string | undefined

The name of the monitor resource.

ResourceArn
Required
string | undefined

The Amazon Resource Name (ARN) of the predictor to monitor.

Tags
Tag[] | undefined

A list of tags  to apply to the monitor resource.

CreateMonitorCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
MonitorArn
string | undefined

The Amazon Resource Name (ARN) of the monitor resource.

Throws

Name
Fault
Details
InvalidInputException
client

We can't process the request because it includes an invalid value or a value that exceeds the valid range.

LimitExceededException
client

The limit on the number of resources per account has been exceeded.

ResourceAlreadyExistsException
client

There is already a resource with this name. Try again with a different name.

ResourceInUseException
client

The specified resource is in use.

ResourceNotFoundException
client

We can't find a resource with that Amazon Resource Name (ARN). Check the ARN and try again.

ForecastServiceException
Base exception class for all service exceptions from Forecast service.