- 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.
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 |
---|
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 |
dayOfWeek | DayOfWeek | undefined | The day of the week on which the scheduled audit takes place. This can be one of |
frequency | AuditFrequency | undefined | How often the scheduled audit takes place, either |
targetCheckNames | string[] | undefined | Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use |
UpdateScheduledAuditCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
scheduledAuditArn | string | undefined | The ARN of the scheduled audit. |
Throws
Name | Fault | Details |
---|
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. |