Skip to main content

enabled_controls

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

Overview

Nameenabled_controls
TypeResource
Idaws.controltower.enabled_controls

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the enabled control. (pattern: <code>arn:aws[0-9a-zA-Z_-:/]+</code>)
control_identifierstringThe control identifier of the enabled control. For information on how to find the controlIdentifier, see the overview page. (pattern: <code>arn:aws[0-9a-zA-Z_-:/]+</code>)
drift_status_summaryobjectThe drift status of the enabled control.
parametersarrayArray of EnabledControlParameter objects.
parent_identifierstringThe ARN of the parent enabled control from which this control inherits its configuration, if applicable. (pattern: <code>arn:aws[0-9a-zA-Z_-:/]+</code>)
status_summaryobjectThe deployment summary of an EnabledControl or EnabledBaseline resource.
target_identifierstringThe ARN of the organizational unit. For information on how to find the targetIdentifier, see the overview page. (pattern: <code>arn:aws[0-9a-zA-Z_-:/]+</code>)
target_regionsarrayTarget Amazon Web Services Regions for the enabled control.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_enabled_controlselectregionRetrieves details about an enabled control. For usage examples, see the Controls Reference Guide .
list_enabled_controlsselectregionLists the controls enabled by Amazon Web Services Control Tower on the specified organizational unit and the accounts it contains. For usage examples, see the Controls Reference Guide .
update_enabled_controlupdateregion, parameters, enabledControlIdentifierUpdates the configuration of an already enabled control. If the enabled control shows an EnablementStatus of SUCCEEDED, supply parameters that are different from the currently configured parameters. Otherwise, Amazon Web Services Control Tower will not accept the request. If the enabled control shows an EnablementStatus of FAILED, Amazon Web Services Control Tower updates the control to match any valid parameters that you supply. If the DriftSummary status for the control shows as DRIFTED, you cannot call this API. Instead, you can update the control by calling the ResetEnabledControl API. Alternatively, you can call DisableControl and then call EnableControl again. Also, you can run an extending governance operation to repair drift. For usage examples, see the Controls Reference Guide .
reset_enabled_controlexecregion, enabledControlIdentifierResets an enabled control. Does not work for controls implemented with SCPs.

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)

SELECT examples

Retrieves details about an enabled control. For usage examples, see the Controls Reference Guide .

SELECT
arn,
control_identifier,
drift_status_summary,
parameters,
parent_identifier,
status_summary,
target_identifier,
target_regions
FROM aws.controltower.enabled_controls
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Updates the configuration of an already enabled control. If the enabled control shows an EnablementStatus of SUCCEEDED, supply parameters that are different from the currently configured parameters. Otherwise, Amazon Web Services Control Tower will not accept the request. If the enabled control shows an EnablementStatus of FAILED, Amazon Web Services Control Tower updates the control to match any valid parameters that you supply. If the DriftSummary status for the control shows as DRIFTED, you cannot call this API. Instead, you can update the control by calling the ResetEnabledControl API. Alternatively, you can call DisableControl and then call EnableControl again. Also, you can run an extending governance operation to repair drift. For usage examples, see the Controls Reference Guide .

UPDATE aws.controltower.enabled_controls
SET
parameters = '{{ parameters }}',
enabledControlIdentifier = '{{ enabledControlIdentifier }}'
WHERE
region = '{{ region }}' --required
AND parameters = '{{ parameters }}' --required
AND enabledControlIdentifier = '{{ enabledControlIdentifier }}' --required
RETURNING
operation_identifier;

Lifecycle Methods

Resets an enabled control. Does not work for controls implemented with SCPs.

EXEC aws.controltower.enabled_controls.reset_enabled_control
@region='{{ region }}' --required
@@json=
'{
"enabledControlIdentifier": "{{ enabledControlIdentifier }}"
}'
;