cis_scan_configurations
Creates, updates, deletes or gets a cis_scan_configuration
resource or lists cis_scan_configurations
in a region
Overview
Name | cis_scan_configurations |
Type | Resource |
Description | CIS Scan Configuration resource schema |
Id | aws.inspectorv2.cis_scan_configurations |
Fields
Name | Datatype | Description |
---|---|---|
scan_name | string | Name of the scan |
security_level | string | |
schedule | undefined | Choose a Schedule cadence |
targets | undefined | |
arn | string | CIS Scan configuration unique identifier |
tags | object | |
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 cis_scan_configurations
in a region.
SELECT
region,
scan_name,
security_level,
schedule,
targets,
arn,
tags
FROM aws.inspectorv2.cis_scan_configurations
WHERE region = 'us-east-1';
Gets all properties from an individual cis_scan_configuration
.
SELECT
region,
scan_name,
security_level,
schedule,
targets,
arn,
tags
FROM aws.inspectorv2.cis_scan_configurations
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new cis_scan_configuration
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.inspectorv2.cis_scan_configurations (
ScanName,
SecurityLevel,
Schedule,
Targets,
Tags,
region
)
SELECT
'{{ ScanName }}',
'{{ SecurityLevel }}',
'{{ Schedule }}',
'{{ Targets }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.inspectorv2.cis_scan_configurations (
ScanName,
SecurityLevel,
Schedule,
Targets,
Tags,
region
)
SELECT
'{{ ScanName }}',
'{{ SecurityLevel }}',
'{{ Schedule }}',
'{{ Targets }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cis_scan_configuration
props:
- name: ScanName
value: '{{ ScanName }}'
- name: SecurityLevel
value: '{{ SecurityLevel }}'
- name: Schedule
value: null
- name: Targets
value: null
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.inspectorv2.cis_scan_configurations
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the cis_scan_configurations
resource, the following permissions are required:
Create
inspector2:CreateCisScanConfiguration,
inspector2:ListCisScanConfigurations,
inspector2:TagResource
Read
inspector2:ListCisScanConfigurations,
inspector2:ListTagsForResource
Update
inspector2:ListCisScanConfigurations,
inspector2:UpdateCisScanConfiguration,
inspector2:TagResource,
inspector2:UntagResource,
inspector2:ListTagsForResource
Delete
inspector2:ListCisScanConfigurations,
inspector2:DeleteCisScanConfiguration,
inspector2:UntagResource
List
inspector2:ListCisScanConfigurations,
inspector2:ListTagsForResource