security_controls
Creates, updates, deletes or gets a security_control
resource or lists security_controls
in a region
Overview
Name | security_controls |
Type | Resource |
Description | A security control in Security Hub describes a security best practice related to a specific resource. |
Id | aws.securityhub.security_controls |
Fields
Name | Datatype | Description |
---|---|---|
security_control_id | string | The 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_arn | string | The 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_reason | string | The 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. |
parameters | object | An object that identifies the name of a control parameter, its current value, and whether it has been customized. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Parameters, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.securityhub.security_controls (
Parameters,
region
)
SELECT
'{{ Parameters }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.securityhub.security_controls (
SecurityControlId,
SecurityControlArn,
LastUpdateReason,
Parameters,
region
)
SELECT
'{{ SecurityControlId }}',
'{{ SecurityControlArn }}',
'{{ LastUpdateReason }}',
'{{ Parameters }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: security_control
props:
- name: SecurityControlId
value: '{{ SecurityControlId }}'
- name: SecurityControlArn
value: null
- name: LastUpdateReason
value: '{{ LastUpdateReason }}'
- name: Parameters
value: {}
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