Skip to main content

configurations

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

Overview

Nameconfigurations
TypeResource
Idaws.inspector2.configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ec_2_configurationobjectSpecifies how the Amazon EC2 automated scan mode is currently configured for your environment.
ecr_configurationobjectSpecifies how the ECR automated re-scan duration is currently configured for your environment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_configurationselectregionRetrieves setting configurations for Amazon Inspector scans. If you specify an accountId, this operation returns the scan configuration for that member account. You must be the delegated administrator for the specified member account. If you do not specify an accountId, this operation returns your own scan configuration.
update_configurationupdateregionUpdates the scan configuration for your Amazon Inspector account. If you don't specify an accountId, this operation updates the delegated administrator's configuration and propagates it to member accounts that have not been individually configured. If you specify an accountId, this operation updates that member account's configuration. Only the delegated administrator can specify an accountId; member accounts cannot call this operation.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves setting configurations for Amazon Inspector scans. If you specify an accountId, this operation returns the scan configuration for that member account. You must be the delegated administrator for the specified member account. If you do not specify an accountId, this operation returns your own scan configuration.

SELECT
ec_2_configuration,
ecr_configuration
FROM aws.inspector2.configurations
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Updates the scan configuration for your Amazon Inspector account. If you don't specify an accountId, this operation updates the delegated administrator's configuration and propagates it to member accounts that have not been individually configured. If you specify an accountId, this operation updates that member account's configuration. Only the delegated administrator can specify an accountId; member accounts cannot call this operation.

UPDATE aws.inspector2.configurations
SET
accountId = '{{ accountId }}',
ecrConfiguration = '{{ ecrConfiguration }}',
ec2Configuration = '{{ ec2Configuration }}',
updateConfigurationInheritance = '{{ updateConfigurationInheritance }}'
WHERE
region = '{{ region }}' --required;