

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

# AWS::GuardDuty::MalwareProtectionPlan
<a name="aws-resource-guardduty-malwareprotectionplan"></a>

Creates a new Malware Protection plan for the protected resource.

When you create a Malware Protection plan, the [Amazon service terms for GuardDuty Malware Protection](https://www.amazonaws.cn/service-terms/#87._Amazon_GuardDuty) will apply.

## Syntax
<a name="aws-resource-guardduty-malwareprotectionplan-syntax"></a>

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

### JSON
<a name="aws-resource-guardduty-malwareprotectionplan-syntax.json"></a>

```
{
  "Type" : "AWS::GuardDuty::MalwareProtectionPlan",
  "Properties" : {
      "[Actions](#cfn-guardduty-malwareprotectionplan-actions)" : {{CFNActions}},
      "[ProtectedResource](#cfn-guardduty-malwareprotectionplan-protectedresource)" : {{CFNProtectedResource}},
      "[Role](#cfn-guardduty-malwareprotectionplan-role)" : {{String}},
      "[Tags](#cfn-guardduty-malwareprotectionplan-tags)" : {{[ TagItem, ... ]}}
    }
}
```

### YAML
<a name="aws-resource-guardduty-malwareprotectionplan-syntax.yaml"></a>

```
Type: AWS::GuardDuty::MalwareProtectionPlan
Properties:
  [Actions](#cfn-guardduty-malwareprotectionplan-actions): {{
    CFNActions}}
  [ProtectedResource](#cfn-guardduty-malwareprotectionplan-protectedresource): {{
    CFNProtectedResource}}
  [Role](#cfn-guardduty-malwareprotectionplan-role): {{String}}
  [Tags](#cfn-guardduty-malwareprotectionplan-tags): {{
    - TagItem}}
```

## Properties
<a name="aws-resource-guardduty-malwareprotectionplan-properties"></a>

`Actions`  <a name="cfn-guardduty-malwareprotectionplan-actions"></a>
Specifies the action that is to be applied to the Malware Protection plan resource.  
*Required*: No  
*Type*: [CFNActions](aws-properties-guardduty-malwareprotectionplan-cfnactions.md)  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProtectedResource`  <a name="cfn-guardduty-malwareprotectionplan-protectedresource"></a>
Information about the protected resource. Presently, `S3Bucket` is the only supported protected resource.  
*Required*: Yes  
*Type*: [CFNProtectedResource](aws-properties-guardduty-malwareprotectionplan-cfnprotectedresource.md)  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Role`  <a name="cfn-guardduty-malwareprotectionplan-role"></a>
 Amazon Resource Name (ARN) of the IAM role that includes the permissions required to scan and (optionally) add tags to the associated protected resource.  
To find the ARN of your IAM role, go to the IAM console, and select the role name for details.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-guardduty-malwareprotectionplan-tags"></a>
The tags to be added to the created Malware Protection plan resource. Each tag consists of a key and an optional value, both of which you need to specify.  
*Required*: No  
*Type*: Array of [TagItem](aws-properties-guardduty-malwareprotectionplan-tagitem.md)  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-guardduty-malwareprotectionplan-return-values"></a>

### Ref
<a name="aws-resource-guardduty-malwareprotectionplan-return-values-ref"></a>

 When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns 

### Fn::GetAtt
<a name="aws-resource-guardduty-malwareprotectionplan-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.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-guardduty-malwareprotectionplan-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
Amazon Resource Name (ARN) associated with this Malware Protection plan.

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The timestamp when the Malware Protection plan resource was created.

`MalwareProtectionPlanId`  <a name="MalwareProtectionPlanId-fn::getatt"></a>
A unique identifier associated with Malware Protection plan.

`Status`  <a name="Status-fn::getatt"></a>
Status of the Malware Protection plan resource.

`StatusReasons`  <a name="StatusReasons-fn::getatt"></a>
Status details associated with the Malware Protection plan resource status.