AWS::Inspector::AssessmentTarget
The AWS::Inspector::AssessmentTarget resource is used to create Amazon
Inspector assessment targets, which specify the Amazon EC2 instances that will be analyzed
during an assessment run.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Inspector::AssessmentTarget", "Properties" : { "AssessmentTargetName" :String, "ResourceGroupArn" :String} }
YAML
Type: AWS::Inspector::AssessmentTarget Properties: AssessmentTargetName:StringResourceGroupArn:String
Properties
AssessmentTargetName-
The name of the Amazon Inspector assessment target. The name must be unique within the Amazon Web Services account.
Required: No
Type: String
Minimum:
1Maximum:
140Update requires: Replacement
ResourceGroupArn-
The ARN that specifies the resource group that is used to create the assessment target. If
resourceGroupArnis not specified, all EC2 instances in the current Amazon Web Services account and Region are included in the assessment target.Required: No
Type: String
Minimum:
1Maximum:
300Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the ResourceGroupArn of the new assessment target.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Examples
Declaring an Amazon Inspector Assessment Target Resource
The following examples show how to declare an
AWS::Inspector::AssessmentTarget resource to create an Amazon
Inspector assessment target.
JSON
{ "Type": "AWS::Inspector::AssessmentTarget", "Properties": { "AssessmentTargetName": "MyAssessmentTarget", "ResourceGroupArn": "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-AB6DMKnv" } }
YAML
Type: AWS::Inspector::AssessmentTarget Properties: AssessmentTargetName: MyAssessmentTarget ResourceGroupArn: arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-AB6DMKnv