

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Inspector::AssessmentTemplate
<a name="aws-resource-inspector-assessmenttemplate"></a>

The `AWS::Inspector::AssessmentTemplate` resource creates an Amazon Inspector assessment template, which specifies the Inspector assessment targets that will be evaluated by an assessment run and its related configurations.

## Syntax
<a name="aws-resource-inspector-assessmenttemplate-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-inspector-assessmenttemplate-syntax.json"></a>

```
{
  "Type" : "AWS::Inspector::AssessmentTemplate",
  "Properties" : {
      "[AssessmentTargetArn](#cfn-inspector-assessmenttemplate-assessmenttargetarn)" : String,
      "[AssessmentTemplateName](#cfn-inspector-assessmenttemplate-assessmenttemplatename)" : String,
      "[DurationInSeconds](#cfn-inspector-assessmenttemplate-durationinseconds)" : Integer,
      "[RulesPackageArns](#cfn-inspector-assessmenttemplate-rulespackagearns)" : [ String, ... ],
      "[UserAttributesForFindings](#cfn-inspector-assessmenttemplate-userattributesforfindings)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-inspector-assessmenttemplate-syntax.yaml"></a>

```
Type: AWS::Inspector::AssessmentTemplate
Properties:
  [AssessmentTargetArn](#cfn-inspector-assessmenttemplate-assessmenttargetarn): String
  [AssessmentTemplateName](#cfn-inspector-assessmenttemplate-assessmenttemplatename): String
  [DurationInSeconds](#cfn-inspector-assessmenttemplate-durationinseconds): Integer
  [RulesPackageArns](#cfn-inspector-assessmenttemplate-rulespackagearns): 
    - String
  [UserAttributesForFindings](#cfn-inspector-assessmenttemplate-userattributesforfindings): 
    - Tag
```

## Properties
<a name="aws-resource-inspector-assessmenttemplate-properties"></a>

`AssessmentTargetArn`  <a name="cfn-inspector-assessmenttemplate-assessmenttargetarn"></a>
The ARN of the assessment target to be included in the assessment template.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `300`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`AssessmentTemplateName`  <a name="cfn-inspector-assessmenttemplate-assessmenttemplatename"></a>
The user-defined name that identifies the assessment template that you want to create. You can create several assessment templates for the same assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DurationInSeconds`  <a name="cfn-inspector-assessmenttemplate-durationinseconds"></a>
The duration of the assessment run in seconds.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `180`  
*Maximum*: `86400`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RulesPackageArns`  <a name="cfn-inspector-assessmenttemplate-rulespackagearns"></a>
The ARNs of the rules packages that you want to use in the assessment template.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UserAttributesForFindings`  <a name="cfn-inspector-assessmenttemplate-userattributesforfindings"></a>
The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template. Within an assessment template, each key must be unique.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-inspector-assessmenttemplate-tag.md)  
*Minimum*: `0`  
*Maximum*: `10`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-inspector-assessmenttemplate-return-values"></a>

### Ref
<a name="aws-resource-inspector-assessmenttemplate-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the `AssessmentTargetArn` of the new assessment template.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-inspector-assessmenttemplate-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-inspector-assessmenttemplate-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) that specifies the assessment template that is created.

## Examples
<a name="aws-resource-inspector-assessmenttemplate--examples"></a>



### Declaring an Amazon Inspector Assessment Template Resource
<a name="aws-resource-inspector-assessmenttemplate--examples--Declaring_an_Amazon_Inspector_Assessment_Template_Resource"></a>

The following example shows how to declare an `AWS::Inspector::AssessmentTemplate` resource to create an Amazon Inspector assessment template.

#### JSON
<a name="aws-resource-inspector-assessmenttemplate--examples--Declaring_an_Amazon_Inspector_Assessment_Template_Resource--json"></a>

```
{
    "Type": "AWS::Inspector::AssessmentTemplate",
    "Properties": {
        "AssessmentTargetArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX",
        "DurationInSeconds": 180,
        "AssessmentTemplateName": "MyAssessmentTemplate",
        "RulesPackageArns": [
            "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-11B9DBXp"
        ],
        "UserAttributesForFindings": [{
            "Key": "Example",
            "Value": "example"
        }]
    }
}
```

#### YAML
<a name="aws-resource-inspector-assessmenttemplate--examples--Declaring_an_Amazon_Inspector_Assessment_Template_Resource--yaml"></a>

```
Type: AWS::Inspector::AssessmentTemplate
Properties:
  AssessmentTargetArn: arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX
  DurationInSeconds: 180
  AssessmentTemplateName: MyAssessmentTemplate
  RulesPackageArns:
    - arn:aws:inspector:us-west-2:758058086616:rulespackage/0-11B9DBXp
  UserAttributesForFindings:
    - Key: Example
      Value: example
```

# AWS::Inspector::AssessmentTemplate Tag
<a name="aws-properties-inspector-assessmenttemplate-tag"></a>

A key and value pair. This data type is used as a request parameter in the [SetTagsForResource](https://docs.aws.amazon.com/inspector/v1/APIReference/API_SetTagsForResource.html) action and a response element in the [ListTagsForResource](https://docs.aws.amazon.com/inspector/v1/APIReference/API_ListTagsForResource.html) action.

## Syntax
<a name="aws-properties-inspector-assessmenttemplate-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-inspector-assessmenttemplate-tag-syntax.json"></a>

```
{
  "[Key](#cfn-inspector-assessmenttemplate-tag-key)" : String,
  "[Value](#cfn-inspector-assessmenttemplate-tag-value)" : String
}
```

### YAML
<a name="aws-properties-inspector-assessmenttemplate-tag-syntax.yaml"></a>

```
  [Key](#cfn-inspector-assessmenttemplate-tag-key): String
  [Value](#cfn-inspector-assessmenttemplate-tag-value): String
```

## Properties
<a name="aws-properties-inspector-assessmenttemplate-tag-properties"></a>

`Key`  <a name="cfn-inspector-assessmenttemplate-tag-key"></a>
A tag key.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-inspector-assessmenttemplate-tag-value"></a>
A value assigned to a tag key.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)