Skip to main content

scheduled_audits

Creates, updates, deletes, gets or lists a scheduled_audits resource.

Overview

Namescheduled_audits
TypeResource
Idaws.iot.scheduled_audits

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
day_of_monthstringThe day of the month on which the scheduled audit takes place. This is will be 1 through 31 or LAST. 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. (pattern: <code>^([1-9]|[12][0-9]|3[01])$|^LAST$</code>)
day_of_weekstringThe day of the week on which the scheduled audit takes place, either one of SUN, MON, TUE, WED, THU, FRI, or SAT. (SUN, MON, TUE, WED, THU, FRI, SAT)
frequencystringHow often the scheduled audit takes place, either one of DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system. (DAILY, WEEKLY, BIWEEKLY, MONTHLY)
scheduled_audit_arnstringThe ARN of the scheduled audit.
scheduled_audit_namestringThe name of the scheduled audit. (pattern: <code>[a-zA-Z0-9_-]+</code>)
target_check_namesarrayWhich 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.)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_scheduled_auditselectscheduled_audit_name, regionGets information about a scheduled audit. Requires permission to access the DescribeScheduledAudit action.
list_scheduled_auditsselectregionnextToken, maxResultsLists all of your scheduled audits. Requires permission to access the ListScheduledAudits action.
create_scheduled_auditinsertscheduled_audit_name, region, frequency, targetCheckNamesCreates a scheduled audit that is run at a specified time interval. Requires permission to access the CreateScheduledAudit action.
update_scheduled_auditupdatescheduled_audit_name, regionUpdates a scheduled audit, including which checks are performed and how often the audit takes place. Requires permission to access the UpdateScheduledAudit action.
delete_scheduled_auditdeletescheduled_audit_name, regionDeletes a scheduled audit. Requires permission to access the DeleteScheduledAudit action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
scheduled_audit_namestringThe name of the scheduled audit you want to delete.
maxResultsintegerThe maximum number of results to return at one time. The default is 25.
nextTokenstringThe token for the next set of results.

SELECT examples

Gets information about a scheduled audit. Requires permission to access the DescribeScheduledAudit action.

SELECT
day_of_month,
day_of_week,
frequency,
scheduled_audit_arn,
scheduled_audit_name,
target_check_names
FROM aws.iot.scheduled_audits
WHERE scheduled_audit_name = '{{ scheduled_audit_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a scheduled audit that is run at a specified time interval. Requires permission to access the CreateScheduledAudit action.

INSERT INTO aws.iot.scheduled_audits (
frequency,
dayOfMonth,
dayOfWeek,
targetCheckNames,
tags,
scheduled_audit_name,
region
)
SELECT
'{{ frequency }}' /* required */,
'{{ dayOfMonth }}',
'{{ dayOfWeek }}',
'{{ targetCheckNames }}' /* required */,
'{{ tags }}',
'{{ scheduled_audit_name }}',
'{{ region }}'
RETURNING
scheduled_audit_arn
;

UPDATE examples

Updates a scheduled audit, including which checks are performed and how often the audit takes place. Requires permission to access the UpdateScheduledAudit action.

UPDATE aws.iot.scheduled_audits
SET
frequency = '{{ frequency }}',
dayOfMonth = '{{ dayOfMonth }}',
dayOfWeek = '{{ dayOfWeek }}',
targetCheckNames = '{{ targetCheckNames }}'
WHERE
scheduled_audit_name = '{{ scheduled_audit_name }}' --required
AND region = '{{ region }}' --required
RETURNING
scheduled_audit_arn;

DELETE examples

Deletes a scheduled audit. Requires permission to access the DeleteScheduledAudit action.

DELETE FROM aws.iot.scheduled_audits
WHERE scheduled_audit_name = '{{ scheduled_audit_name }}' --required
AND region = '{{ region }}' --required
;