Skip to main content

enabled_controls

Creates, updates, deletes or gets an enabled_control resource or lists enabled_controls in a region

Overview

Nameenabled_controls
TypeResource
DescriptionEnables a control on a specified target.
Idawscc.controltower.enabled_controls

Fields

NameDatatypeDescription
control_identifierstringArn of the control.
target_identifierstringArn for Organizational unit to which the control needs to be applied
parametersarrayParameters to configure the enabled control behavior.
tagsarrayA set of tags to assign to the enabled control.
regionstringAWS region.

For more information, see AWS::ControlTower::EnabledControl.

Methods

NameResourceAccessible byRequired Params
create_resourceenabled_controlsINSERTTargetIdentifier, ControlIdentifier, region
delete_resourceenabled_controlsDELETEIdentifier, region
update_resourceenabled_controlsUPDATEIdentifier, PatchDocument, region
list_resourcesenabled_controls_list_onlySELECTregion
get_resourceenabled_controlsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual enabled_control.

SELECT
region,
control_identifier,
target_identifier,
parameters,
tags
FROM awscc.controltower.enabled_controls
WHERE
region = 'us-east-1' AND
Identifier = '{{ target_identifier }}|{{ control_identifier }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.controltower.enabled_controls (
ControlIdentifier,
TargetIdentifier,
region
)
SELECT
'{{ control_identifier }}',
'{{ target_identifier }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a enabled_control resource, using stack-deploy.

/*+ update */
UPDATE awscc.controltower.enabled_controls
SET PatchDocument = string('{{ {
"Parameters": parameters,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ target_identifier }}|{{ control_identifier }}';

DELETE example

/*+ delete */
DELETE FROM awscc.controltower.enabled_controls
WHERE
Identifier = '{{ target_identifier }}|{{ control_identifier }}' AND
region = 'us-east-1';

Permissions

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

controltower:ListEnabledControls,
controltower:GetEnabledControl,
controltower:GetControlOperation,
controltower:EnableControl,
controltower:TagResource,
organizations:UpdatePolicy,
organizations:CreatePolicy,
organizations:AttachPolicy,
organizations:DetachPolicy,
organizations:ListPoliciesForTarget,
organizations:ListTargetsForPolicy,
organizations:DescribePolicy,
controltower:ListTagsForResource