hubs
Creates, updates, deletes or gets a hub
resource or lists hubs
in a region
Overview
Name | hubs |
Type | Resource |
Description | The AWS::SecurityHub::Hub resource represents the implementation of the AWS Security Hub service in your account. One hub resource is created for each Region in which you enable Security Hub. |
Id | aws.securityhub.hubs |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | An ARN is automatically created for the customer. |
enable_default_standards | boolean | Whether to enable the security standards that Security Hub has designated as automatically enabled. |
control_finding_generator | string | This field, used when enabling Security Hub, specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. |
auto_enable_controls | boolean | Whether to automatically enable new controls when they are added to standards that are enabled |
tags | object | A key-value pair to associate with a resource. |
subscribed_at | string | The date and time when Security Hub was enabled in the account. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | 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 hubs
in a region.
SELECT
region,
arn,
enable_default_standards,
control_finding_generator,
auto_enable_controls,
tags,
subscribed_at
FROM aws.securityhub.hubs
WHERE region = 'us-east-1';
Gets all properties from an individual hub
.
SELECT
region,
arn,
enable_default_standards,
control_finding_generator,
auto_enable_controls,
tags,
subscribed_at
FROM aws.securityhub.hubs
WHERE region = 'us-east-1' AND data__Identifier = '<ARN>';
INSERT
example
Use the following StackQL query and manifest file to create a new hub
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.securityhub.hubs (
EnableDefaultStandards,
ControlFindingGenerator,
AutoEnableControls,
Tags,
region
)
SELECT
'{{ EnableDefaultStandards }}',
'{{ ControlFindingGenerator }}',
'{{ AutoEnableControls }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.securityhub.hubs (
EnableDefaultStandards,
ControlFindingGenerator,
AutoEnableControls,
Tags,
region
)
SELECT
'{{ EnableDefaultStandards }}',
'{{ ControlFindingGenerator }}',
'{{ AutoEnableControls }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: hub
props:
- name: EnableDefaultStandards
value: '{{ EnableDefaultStandards }}'
- name: ControlFindingGenerator
value: '{{ ControlFindingGenerator }}'
- name: AutoEnableControls
value: '{{ AutoEnableControls }}'
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.securityhub.hubs
WHERE data__Identifier = '<ARN>'
AND region = 'us-east-1';
Permissions
To operate on the hubs
resource, the following permissions are required:
Create
securityhub:EnableSecurityHub,
securityhub:UpdateSecurityHubConfiguration,
securityhub:TagResource,
securityhub:ListTagsForResource
Read
securityhub:DescribeHub,
securityhub:ListTagsForResource
Update
securityhub:DescribeHub,
securityhub:UpdateSecurityHubConfiguration,
securityhub:TagResource,
securityhub:UntagResource,
securityhub:ListTagsForResource
Delete
securityhub:DisableSecurityHub
List
securityhub:DescribeHub,
securityhub:ListTagsForResource