configuration_policies
Creates, updates, deletes or gets a configuration_policy
resource or lists configuration_policies
in a region
Overview
Name | configuration_policies |
Type | Resource |
Description | The AWS::SecurityHub::ConfigurationPolicy resource represents the Central Configuration Policy in your account. |
Id | aws.securityhub.configuration_policies |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The Amazon Resource Name (ARN) of the configuration policy. |
name | string | The name of the configuration policy. |
description | string | The description of the configuration policy. |
configuration_policy | object | An object that defines how Security Hub is configured. |
id | string | The universally unique identifier (UUID) of the configuration policy. |
created_at | string | The date and time, in UTC and ISO 8601 format. |
updated_at | string | The date and time, in UTC and ISO 8601 format. |
service_enabled | boolean | Indicates whether the service that the configuration policy applies to is enabled in the policy. |
tags | object | A key-value pair to associate with a resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ConfigurationPolicy, Name, 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 configuration_policies
in a region.
SELECT
region,
arn,
name,
description,
configuration_policy,
id,
created_at,
updated_at,
service_enabled,
tags
FROM aws.securityhub.configuration_policies
WHERE region = 'us-east-1';
Gets all properties from an individual configuration_policy
.
SELECT
region,
arn,
name,
description,
configuration_policy,
id,
created_at,
updated_at,
service_enabled,
tags
FROM aws.securityhub.configuration_policies
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new configuration_policy
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.securityhub.configuration_policies (
Name,
ConfigurationPolicy,
region
)
SELECT
'{{ Name }}',
'{{ ConfigurationPolicy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.securityhub.configuration_policies (
Name,
Description,
ConfigurationPolicy,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ConfigurationPolicy }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: configuration_policy
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: ConfigurationPolicy
value:
SecurityHub:
EnabledStandardIdentifiers:
- '{{ EnabledStandardIdentifiers[0] }}'
ServiceEnabled: '{{ ServiceEnabled }}'
SecurityControlsConfiguration:
DisabledSecurityControlIdentifiers:
- '{{ DisabledSecurityControlIdentifiers[0] }}'
EnabledSecurityControlIdentifiers:
- '{{ EnabledSecurityControlIdentifiers[0] }}'
SecurityControlCustomParameters:
- Parameters: {}
SecurityControlId: '{{ SecurityControlId }}'
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.securityhub.configuration_policies
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the configuration_policies
resource, the following permissions are required:
Create
securityhub:CreateConfigurationPolicy,
securityhub:TagResource,
securityhub:ListTagsForResource
Read
securityhub:GetConfigurationPolicy,
securityhub:ListTagsForResource
Update
securityhub:UpdateConfigurationPolicy,
securityhub:TagResource,
securityhub:UntagResource,
securityhub:ListTagsForResource
Delete
securityhub:GetConfigurationPolicy,
securityhub:DeleteConfigurationPolicy
List
securityhub:ListConfigurationPolicies,
securityhub:ListTagsForResource