This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
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 AWS 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 AWS 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 AWS 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 Ref function, Ref returns the ResourceGroupArn of the new assessment target.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic 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::GetAtt intrinsic function, see Fn::GetAtt.
Arn-
The Amazon Resource Name (ARN) that specifies the assessment target that is created.
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