Skip to main content

configuration_policies

Creates, updates, deletes or gets a configuration_policy resource or lists configuration_policies in a region

Overview

Nameconfiguration_policies
TypeResource
DescriptionThe AWS::SecurityHub::ConfigurationPolicy resource represents the Central Configuration Policy in your account.
Idaws.securityhub.configuration_policies

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the configuration policy.
namestringThe name of the configuration policy.
descriptionstringThe description of the configuration policy.
configuration_policyobjectAn object that defines how Security Hub is configured.
idstringThe universally unique identifier (UUID) of the configuration policy.
created_atstringThe date and time, in UTC and ISO 8601 format.
updated_atstringThe date and time, in UTC and ISO 8601 format.
service_enabledbooleanIndicates whether the service that the configuration policy applies to is enabled in the policy.
tagsobjectA key-value pair to associate with a resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTConfigurationPolicy, Name, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.securityhub.configuration_policies (
Name,
ConfigurationPolicy,
region
)
SELECT
'{{ Name }}',
'{{ ConfigurationPolicy }}',
'{{ region }}';

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