assessment_templates
Creates, updates, deletes or gets an assessment_template
resource or lists assessment_templates
in a region
Overview
Name | assessment_templates |
Type | Resource |
Description | Resource Type definition for AWS::Inspector::AssessmentTemplate |
Id | aws.inspector.assessment_templates |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
assessment_target_arn | string | |
duration_in_seconds | integer | |
assessment_template_name | string | |
rules_package_arns | array | |
user_attributes_for_findings | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | AssessmentTargetArn, DurationInSeconds, RulesPackageArns, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.inspector.assessment_templates (
AssessmentTargetArn,
DurationInSeconds,
RulesPackageArns,
region
)
SELECT
'{{ AssessmentTargetArn }}',
'{{ DurationInSeconds }}',
'{{ RulesPackageArns }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.inspector.assessment_templates (
AssessmentTargetArn,
DurationInSeconds,
AssessmentTemplateName,
RulesPackageArns,
UserAttributesForFindings,
region
)
SELECT
'{{ AssessmentTargetArn }}',
'{{ DurationInSeconds }}',
'{{ AssessmentTemplateName }}',
'{{ RulesPackageArns }}',
'{{ UserAttributesForFindings }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: assessment_template
props:
- name: AssessmentTargetArn
value: '{{ AssessmentTargetArn }}'
- name: DurationInSeconds
value: '{{ DurationInSeconds }}'
- name: AssessmentTemplateName
value: '{{ AssessmentTemplateName }}'
- name: RulesPackageArns
value:
- '{{ RulesPackageArns[0] }}'
- name: UserAttributesForFindings
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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