assessment_templates
Creates, updates, deletes, gets or lists an assessment_templates resource.
Overview
| Name | assessment_templates |
| Type | Resource |
| Id | aws.inspector.assessment_templates |
Fields
The following fields are returned by SELECT queries:
- describe_assessment_templates
- list_assessment_templates
| Name | Datatype | Description |
|---|---|---|
assessment_templates | array | Information about the assessment templates. |
failed_items | object | Assessment template details that cannot be described. An error code is provided for each failed item. |
| Name | Datatype | Description |
|---|---|---|
assessment_template_arn | string | A list of ARNs that specifies the assessment templates returned by the action. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_assessment_templates | select | region | Describes the assessment templates that are specified by the ARNs of the assessment templates. | |
list_assessment_templates | select | region | Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets. | |
create_assessment_template | insert | region, assessmentTargetArn, assessmentTemplateName, durationInSeconds, rulesPackageArns | 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. | |
delete_assessment_template | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_assessment_templates
- list_assessment_templates
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
;
Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.
SELECT
assessment_template_arn
FROM aws.inspector.assessment_templates
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_assessment_template
- Manifest
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
;
# Description fields are for documentation purposes
- name: assessment_templates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the assessment_templates resource.
- name: assessmentTargetArn
value: "{{ assessmentTargetArn }}"
description: |
The ARN that specifies the assessment target for which you want to create the assessment template.
- name: assessmentTemplateName
value: "{{ assessmentTemplateName }}"
description: |
The user-defined name that identifies the assessment template that you want to create. You can create several assessment templates for an assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.
- name: durationInSeconds
value: {{ durationInSeconds }}
description: |
The duration of the assessment run in seconds.
- name: rulesPackageArns
value:
- "{{ rulesPackageArns }}"
description: |
The ARNs that specify the rules packages that you want to attach to the assessment template.
- name: userAttributesForFindings
description: |
The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template. An attribute is a key and value pair (an Attribute object). Within an assessment template, each key must be unique.
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_assessment_template
Deletes the assessment template that is specified by the ARN of the assessment template.
DELETE FROM aws.inspector.assessment_templates
WHERE region = '{{ region }}' --required
;