Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idaws.auditmanager.accounts

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
register_accountinsertregionEnables Audit Manager for the specified Amazon Web Services account.
deregister_accountdeleteregionDeregisters an account in Audit Manager. Before you deregister, you can use the UpdateSettings API operation to set your preferred data retention policy. By default, Audit Manager retains your data. If you want to delete your data, you can use the DeregistrationPolicy attribute to request the deletion of your data. For more information about data retention, see Data Protection in the Audit Manager User Guide.

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)

INSERT examples

Enables Audit Manager for the specified Amazon Web Services account.

INSERT INTO aws.auditmanager.accounts (
kmsKey,
delegatedAdminAccount,
region
)
SELECT
'{{ kmsKey }}',
'{{ delegatedAdminAccount }}',
'{{ region }}'
RETURNING
status
;

DELETE examples

Deregisters an account in Audit Manager. Before you deregister, you can use the UpdateSettings API operation to set your preferred data retention policy. By default, Audit Manager retains your data. If you want to delete your data, you can use the DeregistrationPolicy attribute to request the deletion of your data. For more information about data retention, see Data Protection in the Audit Manager User Guide.

DELETE FROM aws.auditmanager.accounts
WHERE region = '{{ region }}' --required
;