UpdateScheduledAuditCommand

Updates a scheduled audit, including which checks are performed and how often the audit takes place.

Requires permission to access the UpdateScheduledAudit  action.

Example Syntax

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

import { IoTClient, UpdateScheduledAuditCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, UpdateScheduledAuditCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // UpdateScheduledAuditRequest
  frequency: "DAILY" || "WEEKLY" || "BIWEEKLY" || "MONTHLY",
  dayOfMonth: "STRING_VALUE",
  dayOfWeek: "SUN" || "MON" || "TUE" || "WED" || "THU" || "FRI" || "SAT",
  targetCheckNames: [ // TargetAuditCheckNames
    "STRING_VALUE",
  ],
  scheduledAuditName: "STRING_VALUE", // required
};
const command = new UpdateScheduledAuditCommand(input);
const response = await client.send(command);
// { // UpdateScheduledAuditResponse
//   scheduledAuditArn: "STRING_VALUE",
// };

UpdateScheduledAuditCommand Input

Parameter
Type
Description
scheduledAuditName
Required
string | undefined

The name of the scheduled audit. (Max. 128 chars)

dayOfMonth
string | undefined

The day of the month on which the scheduled audit takes place. This can be 1 through 31 or LAST. This field is required if the frequency parameter is set to MONTHLY. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.

dayOfWeek
DayOfWeek | undefined

The day of the week on which the scheduled audit takes place. This can be one of SUN, MON, TUE, WED, THU, FRI, or SAT. This field is required if the "frequency" parameter is set to WEEKLY or BIWEEKLY.

frequency
AuditFrequency | undefined

How often the scheduled audit takes place, either DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system.

targetCheckNames
string[] | undefined

Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)

UpdateScheduledAuditCommand Output

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

The ARN of the scheduled audit.

Throws

Name
Fault
Details
InternalFailureException
server

An unexpected error has occurred.

InvalidRequestException
client

The request is not valid.

ResourceNotFoundException
client

The specified resource does not exist.

ThrottlingException
client

The rate exceeds the limit.

IoTServiceException
Base exception class for all service exceptions from IoT service.