Skip to main content

controls

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

Overview

Namecontrols
TypeResource
Idaws.auditmanager.controls

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
control_metadata_listarrayA list of metadata that the ListControls API returns for each control.
next_tokenstringThe pagination token that's used to fetch the next set of results. (pattern: <code>^[A-Za-z0-9+/=]*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_controlsselectcontrolType, regionnextToken, maxResults, controlCatalogIdReturns a list of controls from Audit Manager.
get_controlselectcontrol_id, regionGets information about a specified control.
create_controlinsertregion, name, controlMappingSourcesCreates a new custom control in Audit Manager.
update_controlupdatecontrol_id, region, name, controlMappingSourcesUpdates a custom control in Audit Manager.
update_assessment_controlupdateassessment_id, control_set_id, control_id, regionUpdates a control within an assessment in Audit Manager.
delete_controldeletecontrol_id, regionDeletes a custom control in Audit Manager. When you invoke this operation, the custom control is deleted from any frameworks or assessments that it’s currently part of. As a result, Audit Manager will stop collecting evidence for that custom control in all of your assessments. This includes assessments that you previously created before you deleted the custom control.

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
assessment_idstringThe unique identifier for the assessment.
controlTypestringA filter that narrows the list of controls to a specific type.
control_idstringThe unique identifier for the control.
control_set_idstringThe unique identifier for the control set.
regionstringAWS region (default: us-east-1)
controlCatalogIdstringA filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog. To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain, a control objective, or a common control. For information about how to find the ARNs for these resources, see ListDomains , ListObjectives , and ListCommonControls . You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently supported. If you want to filter by more than one ARN, we recommend that you run the ListControls operation separately for each ARN. Alternatively, specify UNCATEGORIZED to list controls that aren't mapped to a Control Catalog resource. For example, this operation might return a list of custom controls that don't belong to any control domain or control objective.
maxResultsintegerThe maximum number of results on a page or for an API request call.
nextTokenstringThe pagination token that's used to fetch the next set of results.

SELECT examples

Returns a list of controls from Audit Manager.

SELECT
control_metadata_list,
next_token
FROM aws.auditmanager.controls
WHERE controlType = '{{ controlType }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND controlCatalogId = '{{ controlCatalogId }}'
;

INSERT examples

Creates a new custom control in Audit Manager.

INSERT INTO aws.auditmanager.controls (
name,
description,
testingInformation,
actionPlanTitle,
actionPlanInstructions,
controlMappingSources,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ testingInformation }}',
'{{ actionPlanTitle }}',
'{{ actionPlanInstructions }}',
'{{ controlMappingSources }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
control
;

UPDATE examples

Updates a custom control in Audit Manager.

UPDATE aws.auditmanager.controls
SET
name = '{{ name }}',
description = '{{ description }}',
testingInformation = '{{ testingInformation }}',
actionPlanTitle = '{{ actionPlanTitle }}',
actionPlanInstructions = '{{ actionPlanInstructions }}',
controlMappingSources = '{{ controlMappingSources }}'
WHERE
control_id = '{{ control_id }}' --required
AND region = '{{ region }}' --required
AND name = '{{ name }}' --required
AND controlMappingSources = '{{ controlMappingSources }}' --required
RETURNING
control;

DELETE examples

Deletes a custom control in Audit Manager. When you invoke this operation, the custom control is deleted from any frameworks or assessments that it’s currently part of. As a result, Audit Manager will stop collecting evidence for that custom control in all of your assessments. This includes assessments that you previously created before you deleted the custom control.

DELETE FROM aws.auditmanager.controls
WHERE control_id = '{{ control_id }}' --required
AND region = '{{ region }}' --required
;