scheduled_audits
Creates, updates, deletes, gets or lists a scheduled_audits resource.
Overview
| Name | scheduled_audits |
| Type | Resource |
| Id | aws.iot.scheduled_audits |
Fields
The following fields are returned by SELECT queries:
- describe_scheduled_audit
- list_scheduled_audits
| Name | Datatype | Description |
|---|---|---|
day_of_month | string | The 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_week | string | The 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) |
frequency | string | How 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_arn | string | The ARN of the scheduled audit. |
scheduled_audit_name | string | The name of the scheduled audit. (pattern: <code>[a-zA-Z0-9_-]+</code>) |
target_check_names | array | 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.) |
| Name | Datatype | Description |
|---|---|---|
day_of_month | string | The day of the month on which the scheduled audit is run (if the frequency is "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. (pattern: <code>^([1-9]|[12][0-9]|3[01])$|^LAST$</code>) |
day_of_week | string | The day of the week on which the scheduled audit is run (if the frequency is "WEEKLY" or "BIWEEKLY"). (SUN, MON, TUE, WED, THU, FRI, SAT) |
frequency | string | How often the scheduled audit occurs. (DAILY, WEEKLY, BIWEEKLY, MONTHLY) |
scheduled_audit_arn | string | The ARN of the scheduled audit. |
scheduled_audit_name | string | The name of the scheduled audit. (pattern: <code>[a-zA-Z0-9_-]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_scheduled_audit | select | scheduled_audit_name, region | Gets information about a scheduled audit. Requires permission to access the DescribeScheduledAudit action. | |
list_scheduled_audits | select | region | nextToken, maxResults | Lists all of your scheduled audits. Requires permission to access the ListScheduledAudits action. |
create_scheduled_audit | insert | scheduled_audit_name, region, frequency, targetCheckNames | Creates a scheduled audit that is run at a specified time interval. Requires permission to access the CreateScheduledAudit action. | |
update_scheduled_audit | update | scheduled_audit_name, region | Updates a scheduled audit, including which checks are performed and how often the audit takes place. Requires permission to access the UpdateScheduledAudit action. | |
delete_scheduled_audit | delete | scheduled_audit_name, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
scheduled_audit_name | string | The name of the scheduled audit you want to delete. |
maxResults | integer | The maximum number of results to return at one time. The default is 25. |
nextToken | string | The token for the next set of results. |
SELECT examples
- describe_scheduled_audit
- list_scheduled_audits
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
;
Lists all of your scheduled audits. Requires permission to access the ListScheduledAudits action.
SELECT
day_of_month,
day_of_week,
frequency,
scheduled_audit_arn,
scheduled_audit_name
FROM aws.iot.scheduled_audits
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_scheduled_audit
- Manifest
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
;
# Description fields are for documentation purposes
- name: scheduled_audits
props:
- name: scheduled_audit_name
value: "{{ scheduled_audit_name }}"
description: Required parameter for the scheduled_audits resource.
- name: region
value: "{{ region }}"
description: Required parameter for the scheduled_audits resource.
- name: frequency
value: "{{ frequency }}"
valid_values: ['DAILY', 'WEEKLY', 'BIWEEKLY', 'MONTHLY']
- name: dayOfMonth
value: "{{ dayOfMonth }}"
- name: dayOfWeek
value: "{{ dayOfWeek }}"
valid_values: ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
- name: targetCheckNames
value:
- "{{ targetCheckNames }}"
- name: tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_scheduled_audit
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
- delete_scheduled_audit
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
;