assessment_targets
Creates, updates, deletes or gets an assessment_target
resource or lists assessment_targets
in a region
Overview
Name | assessment_targets |
Type | Resource |
Description | Resource Type definition for AWS::Inspector::AssessmentTarget |
Id | aws.inspector.assessment_targets |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
assessment_target_name | string | |
resource_group_arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all assessment_targets
in a region.
SELECT
region,
arn,
assessment_target_name,
resource_group_arn
FROM aws.inspector.assessment_targets
WHERE region = 'us-east-1';
Gets all properties from an individual assessment_target
.
SELECT
region,
arn,
assessment_target_name,
resource_group_arn
FROM aws.inspector.assessment_targets
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new assessment_target
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.inspector.assessment_targets (
AssessmentTargetName,
ResourceGroupArn,
region
)
SELECT
'{{ AssessmentTargetName }}',
'{{ ResourceGroupArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.inspector.assessment_targets (
AssessmentTargetName,
ResourceGroupArn,
region
)
SELECT
'{{ AssessmentTargetName }}',
'{{ ResourceGroupArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: assessment_target
props:
- name: AssessmentTargetName
value: '{{ AssessmentTargetName }}'
- name: ResourceGroupArn
value: '{{ ResourceGroupArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.inspector.assessment_targets
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the assessment_targets
resource, the following permissions are required:
Create
inspector:CreateAssessmentTarget,
inspector:ListAssessmentTargets,
inspector:DescribeAssessmentTargets
Update
inspector:DescribeAssessmentTargets,
inspector:UpdateAssessmentTarget
Read
inspector:DescribeAssessmentTargets
Delete
inspector:DeleteAssessmentTarget
List
inspector:ListAssessmentTargets