Skip to main content

assessment_targets

Creates, updates, deletes or gets an assessment_target resource or lists assessment_targets in a region

Overview

Nameassessment_targets
TypeResource
DescriptionResource Type definition for AWS::Inspector::AssessmentTarget
Idaws.inspector.assessment_targets

Fields

NameDatatypeDescription
arnstring
assessment_target_namestring
resource_group_arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.inspector.assessment_targets (
AssessmentTargetName,
ResourceGroupArn,
region
)
SELECT
'{{ AssessmentTargetName }}',
'{{ ResourceGroupArn }}',
'{{ region }}';

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