Skip to main content

security_controls

Creates, updates, deletes or gets a security_control resource or lists security_controls in a region

Overview

Namesecurity_controls
TypeResource
DescriptionA security control in Security Hub describes a security best practice related to a specific resource.
Idaws.securityhub.security_controls

Fields

NameDatatypeDescription
security_control_idstringThe unique identifier of a security control across standards. Values for this field typically consist of an AWS service name and a number, such as APIGateway.3.
security_control_arnstringThe Amazon Resource Name (ARN) for a security control across standards, such as `arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1`. This parameter doesn't mention a specific standard.
last_update_reasonstringThe most recent reason for updating the customizable properties of a security control. This differs from the UpdateReason field of the BatchUpdateStandardsControlAssociations API, which tracks the reason for updating the enablement status of a control. This field accepts alphanumeric characters in addition to white spaces, dashes, and underscores.
parametersobjectAn object that identifies the name of a control parameter, its current value, and whether it has been customized.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTParameters, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all security_controls in a region.

SELECT
region,
security_control_id,
security_control_arn,
last_update_reason,
parameters
FROM aws.securityhub.security_controls
WHERE region = 'us-east-1';

Gets all properties from an individual security_control.

SELECT
region,
security_control_id,
security_control_arn,
last_update_reason,
parameters
FROM aws.securityhub.security_controls
WHERE region = 'us-east-1' AND data__Identifier = '<SecurityControlId>';

INSERT example

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

/*+ create */
INSERT INTO aws.securityhub.security_controls (
Parameters,
region
)
SELECT
'{{ Parameters }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.securityhub.security_controls
WHERE data__Identifier = '<SecurityControlId>'
AND region = 'us-east-1';

Permissions

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

Create

securityhub:BatchGetSecurityControls,
securityhub:DescribeStandardsControls,
securityhub:UpdateSecurityControl,
securityhub:UpdateStandardsControl

Read

securityhub:BatchGetSecurityControls,
securityhub:DescribeStandardsControls

Update

securityhub:BatchGetSecurityControls,
securityhub:DescribeStandardsControls,
securityhub:UpdateSecurityControl,
securityhub:UpdateStandardsControl

Delete

securityhub:BatchGetSecurityControls,
securityhub:DescribeStandardsControls,
securityhub:UpdateSecurityControl,
securityhub:UpdateStandardsControl

List

securityhub:BatchGetSecurityControls,
securityhub:DescribeStandardsControls,
securityhub:ListSecurityControlDefinitions