Skip to main content

cis_scan_configurations

Creates, updates, deletes or gets a cis_scan_configuration resource or lists cis_scan_configurations in a region

Overview

Namecis_scan_configurations
TypeResource
DescriptionCIS Scan Configuration resource schema
Idawscc.inspectorv2.cis_scan_configurations

Fields

NameDatatypeDescription
scan_namestringName of the scan
security_levelstring
scheduleobjectChoose a Schedule cadence
targetsobject
arnstringCIS Scan configuration unique identifier
tagsobject
regionstringAWS region.

For more information, see AWS::InspectorV2::CisScanConfiguration.

Methods

NameResourceAccessible byRequired Params
create_resourcecis_scan_configurationsINSERTScanName, SecurityLevel, Schedule, Targets, region
delete_resourcecis_scan_configurationsDELETEIdentifier, region
update_resourcecis_scan_configurationsUPDATEIdentifier, PatchDocument, region
list_resourcescis_scan_configurations_list_onlySELECTregion
get_resourcecis_scan_configurationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual cis_scan_configuration.

SELECT
region,
scan_name,
security_level,
schedule,
targets,
arn,
tags
FROM awscc.inspectorv2.cis_scan_configurations
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new cis_scan_configuration resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.inspectorv2.cis_scan_configurations (
ScanName,
SecurityLevel,
Schedule,
Targets,
region
)
SELECT
'{{ scan_name }}',
'{{ security_level }}',
'{{ schedule }}',
'{{ targets }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a cis_scan_configuration resource, using stack-deploy.

/*+ update */
UPDATE awscc.inspectorv2.cis_scan_configurations
SET PatchDocument = string('{{ {
"ScanName": scan_name,
"SecurityLevel": security_level,
"Schedule": schedule,
"Targets": targets,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.inspectorv2.cis_scan_configurations
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the cis_scan_configurations resource, the following permissions are required:

inspector2:CreateCisScanConfiguration,
inspector2:ListCisScanConfigurations,
inspector2:TagResource