Skip to main content

configuration_policies

Creates, updates, deletes, gets or lists a configuration_policies resource.

Overview

Nameconfiguration_policies
TypeResource
Idaws.securityhub.configuration_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the configuration policy. (pattern: <code>.\S.</code>)
configuration_policyobjectAn object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).
created_atstring (date-time)The date and time, in UTC and ISO 8601 format, that the configuration policy was created.
descriptionstringThe description of the configuration policy. (pattern: <code>.\S.</code>)
idstringThe UUID of the configuration policy. (pattern: <code>.\S.</code>)
namestringThe name of the configuration policy. (pattern: <code>.\S.</code>)
updated_atstring (date-time)The date and time, in UTC and ISO 8601 format, that the configuration policy was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_configuration_policyselectidentifier, regionProvides information about a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.
list_configuration_policiesselectregionNextToken, MaxResultsLists the configuration policies that the Security Hub CSPM delegated administrator has created for your organization. Only the delegated administrator can invoke this operation from the home Region.
create_configuration_policyinsertregion, ConfigurationPolicyCreates a configuration policy with the defined configuration. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.
update_configuration_policyupdateidentifier, regionUpdates a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.
delete_configuration_policydeleteidentifier, regionDeletes a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region. For the deletion to succeed, you must first disassociate a configuration policy from target accounts, organizational units, or the root by invoking the StartConfigurationPolicyDisassociation operation.
start_configuration_policy_associationexecregion, ConfigurationPolicyIdentifier, TargetAssociates a target account, organizational unit, or the root with a specified configuration. The target can be associated with a configuration policy or self-managed behavior. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.
start_configuration_policy_disassociationexecregion, ConfigurationPolicyIdentifierDisassociates a target account, organizational unit, or the root from a specified configuration. When you disassociate a configuration from its target, the target inherits the configuration of the closest parent. If there’s no configuration to inherit, the target retains its settings but becomes a self-managed account. A target can be disassociated from a configuration policy or self-managed behavior. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
identifierstringThe Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.
regionstringAWS region (default: us-east-1)
MaxResultsintegerThe maximum number of results that's returned by ListConfigurationPolicies in each page of the response. When this parameter is used, ListConfigurationPolicies returns the specified number of results in a single page and a NextToken response element. You can see the remaining results of the initial request by sending another ListConfigurationPolicies request with the returned NextToken value. A valid range for MaxResults is between 1 and 100.
NextTokenstringThe NextToken value that's returned from a previous paginated ListConfigurationPolicies request where MaxResults was used but the results exceeded the value of that parameter. Pagination continues from the MaxResults was used but the results exceeded the value of that parameter. Pagination continues from the end of the previous response that returned the NextToken value. This value is null when there are no more results to return.

SELECT examples

Provides information about a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.

SELECT
arn,
configuration_policy,
created_at,
description,
id,
name,
updated_at
FROM aws.securityhub.configuration_policies
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a configuration policy with the defined configuration. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.

INSERT INTO aws.securityhub.configuration_policies (
Name,
Description,
ConfigurationPolicy,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ConfigurationPolicy }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
arn,
configuration_policy,
created_at,
description,
id,
name,
updated_at
;

UPDATE examples

Updates a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.

UPDATE aws.securityhub.configuration_policies
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
UpdatedReason = '{{ UpdatedReason }}',
ConfigurationPolicy = '{{ ConfigurationPolicy }}'
WHERE
identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
configuration_policy,
created_at,
description,
id,
name,
updated_at;

DELETE examples

Deletes a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region. For the deletion to succeed, you must first disassociate a configuration policy from target accounts, organizational units, or the root by invoking the StartConfigurationPolicyDisassociation operation.

DELETE FROM aws.securityhub.configuration_policies
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Associates a target account, organizational unit, or the root with a specified configuration. The target can be associated with a configuration policy or self-managed behavior. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.

EXEC aws.securityhub.configuration_policies.start_configuration_policy_association
@region='{{ region }}' --required
@@json=
'{
"ConfigurationPolicyIdentifier": "{{ ConfigurationPolicyIdentifier }}",
"Target": "{{ Target }}"
}'
;