- 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.
UpdateAlertCommand
Make changes to an existing alert.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LookoutMetricsClient, UpdateAlertCommand } from "@aws-sdk/client-lookoutmetrics"; // ES Modules import
// const { LookoutMetricsClient, UpdateAlertCommand } = require("@aws-sdk/client-lookoutmetrics"); // CommonJS import
const client = new LookoutMetricsClient(config);
const input = { // UpdateAlertRequest
AlertArn: "STRING_VALUE", // required
AlertDescription: "STRING_VALUE",
AlertSensitivityThreshold: Number("int"),
Action: { // Action
SNSConfiguration: { // SNSConfiguration
RoleArn: "STRING_VALUE", // required
SnsTopicArn: "STRING_VALUE", // required
SnsFormat: "LONG_TEXT" || "SHORT_TEXT" || "JSON",
},
LambdaConfiguration: { // LambdaConfiguration
RoleArn: "STRING_VALUE", // required
LambdaArn: "STRING_VALUE", // required
},
},
AlertFilters: { // AlertFilters
MetricList: [ // MetricNameList
"STRING_VALUE",
],
DimensionFilterList: [ // DimensionFilterList
{ // DimensionFilter
DimensionName: "STRING_VALUE",
DimensionValueList: [ // DimensionValueList
"STRING_VALUE",
],
},
],
},
};
const command = new UpdateAlertCommand(input);
const response = await client.send(command);
// { // UpdateAlertResponse
// AlertArn: "STRING_VALUE",
// };
UpdateAlertCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AlertArn Required | string | undefined | The ARN of the alert to update. |
Action | Action | undefined | Action that will be triggered when there is an alert. |
AlertDescription | string | undefined | A description of the alert. |
AlertFilters | AlertFilters | undefined | The configuration of the alert filters, containing MetricList and DimensionFilterList. |
AlertSensitivityThreshold | number | undefined | An integer from 0 to 100 specifying the alert sensitivity threshold. |
UpdateAlertCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AlertArn | string | undefined | The ARN of the updated alert. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient permissions to perform this action. |
InternalServerException | server | The request processing has failed because of an unknown error, exception, or failure. |
ResourceNotFoundException | client | The specified resource cannot be found. Check the ARN of the resource and try again. |
TooManyRequestsException | client | The request was denied due to too many requests being submitted at the same time. |
ValidationException | client | The input fails to satisfy the constraints specified by the AWS service. Check your input values and try again. |
LookoutMetricsServiceException | Base exception class for all service exceptions from LookoutMetrics service. |