Skip to main content

assessment_templates

Creates, updates, deletes, gets or lists an assessment_templates resource.

Overview

Nameassessment_templates
TypeResource
Idaws.inspector.assessment_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assessment_templatesarrayInformation about the assessment templates.
failed_itemsobjectAssessment template details that cannot be described. An error code is provided for each failed item.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_assessment_templatesselectregionDescribes the assessment templates that are specified by the ARNs of the assessment templates.
list_assessment_templatesselectregionLists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.
create_assessment_templateinsertregion, assessmentTargetArn, assessmentTemplateName, durationInSeconds, rulesPackageArnsCreates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the service-linked role isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.
delete_assessment_templatedeleteregionDeletes the assessment template that is specified by the ARN of the assessment template.

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

Describes the assessment templates that are specified by the ARNs of the assessment templates.

SELECT
assessment_templates,
failed_items
FROM aws.inspector.assessment_templates
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the service-linked role isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.

INSERT INTO aws.inspector.assessment_templates (
assessmentTargetArn,
assessmentTemplateName,
durationInSeconds,
rulesPackageArns,
userAttributesForFindings,
region
)
SELECT
'{{ assessmentTargetArn }}' /* required */,
'{{ assessmentTemplateName }}' /* required */,
{{ durationInSeconds }} /* required */,
'{{ rulesPackageArns }}' /* required */,
'{{ userAttributesForFindings }}',
'{{ region }}'
RETURNING
assessment_template_arn
;

DELETE examples

Deletes the assessment template that is specified by the ARN of the assessment template.

DELETE FROM aws.inspector.assessment_templates
WHERE region = '{{ region }}' --required
;