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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.controltower.enabled_controls
WHERE
Identifier = '{{ target_identifier }}|{{ control_identifier }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

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