Skip to main content

account_audit_configurations

Creates, updates, deletes or gets an account_audit_configuration resource or lists account_audit_configurations in a region

Overview

Nameaccount_audit_configurations
TypeResource
DescriptionConfigures the Device Defender audit settings for this account. Settings include how audit notifications are sent and which audit checks are enabled or disabled.
Idaws.iot.account_audit_configurations

Fields

NameDatatypeDescription
account_idstringYour 12-digit account ID (used as the primary identifier for the CloudFormation resource).
audit_check_configurationsobjectSpecifies which audit checks are enabled and disabled for this account.
audit_notification_target_configurationsobjectInformation about the targets to which audit notifications are sent.
role_arnstringThe ARN of the role that grants permission to AWS IoT to access information about your devices, policies, certificates and other items as required when performing an audit.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAccountId, AuditCheckConfigurations, RoleArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all account_audit_configurations in a region.

SELECT
region,
account_id,
audit_check_configurations,
audit_notification_target_configurations,
role_arn
FROM aws.iot.account_audit_configurations
WHERE region = 'us-east-1';

Gets all properties from an individual account_audit_configuration.

SELECT
region,
account_id,
audit_check_configurations,
audit_notification_target_configurations,
role_arn
FROM aws.iot.account_audit_configurations
WHERE region = 'us-east-1' AND data__Identifier = '<AccountId>';

INSERT example

Use the following StackQL query and manifest file to create a new account_audit_configuration resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iot.account_audit_configurations (
AccountId,
AuditCheckConfigurations,
RoleArn,
region
)
SELECT
'{{ AccountId }}',
'{{ AuditCheckConfigurations }}',
'{{ RoleArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iot.account_audit_configurations
WHERE data__Identifier = '<AccountId>'
AND region = 'us-east-1';

Permissions

To operate on the account_audit_configurations resource, the following permissions are required:

Create

iot:UpdateAccountAuditConfiguration,
iot:DescribeAccountAuditConfiguration,
iam:PassRole

Read

iot:DescribeAccountAuditConfiguration

Update

iot:UpdateAccountAuditConfiguration,
iot:DescribeAccountAuditConfiguration,
iam:PassRole

Delete

iot:DescribeAccountAuditConfiguration,
iot:DeleteAccountAuditConfiguration

List

iot:DescribeAccountAuditConfiguration