Skip to main content

assessment_templates

Creates, updates, deletes or gets an assessment_template resource or lists assessment_templates in a region

Overview

Nameassessment_templates
TypeResource
DescriptionResource Type definition for AWS::Inspector::AssessmentTemplate
Idaws.inspector.assessment_templates

Fields

NameDatatypeDescription
arnstring
assessment_target_arnstring
duration_in_secondsinteger
assessment_template_namestring
rules_package_arnsarray
user_attributes_for_findingsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAssessmentTargetArn, DurationInSeconds, RulesPackageArns, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all assessment_templates in a region.

SELECT
region,
arn,
assessment_target_arn,
duration_in_seconds,
assessment_template_name,
rules_package_arns,
user_attributes_for_findings
FROM aws.inspector.assessment_templates
WHERE region = 'us-east-1';

Gets all properties from an individual assessment_template.

SELECT
region,
arn,
assessment_target_arn,
duration_in_seconds,
assessment_template_name,
rules_package_arns,
user_attributes_for_findings
FROM aws.inspector.assessment_templates
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.inspector.assessment_templates (
AssessmentTargetArn,
DurationInSeconds,
RulesPackageArns,
region
)
SELECT
'{{ AssessmentTargetArn }}',
'{{ DurationInSeconds }}',
'{{ RulesPackageArns }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.inspector.assessment_templates
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

inspector:CreateAssessmentTemplate,
inspector:ListAssessmentTemplates,
inspector:DescribeAssessmentTemplates

Read

inspector:DescribeAssessmentTemplates

Delete

inspector:DeleteAssessmentTemplate

List

inspector:ListAssessmentTemplates