CreateMalwareProtectionPlan - Amazon GuardDuty

CreateMalwareProtectionPlan

Creates a new Malware Protection plan for the protected resource.

When you create a Malware Protection plan, the AWS service terms for GuardDuty Malware Protection apply. For more information, see AWS service terms for GuardDuty Malware Protection.

Request Syntax

POST /malware-protection-plan HTTP/1.1 Content-type: application/json { "actions": { "tagging": { "status": "string" } }, "clientToken": "string", "protectedResource": { "s3Bucket": { "bucketName": "string", "objectPrefixes": [ "string" ] } }, "role": "string", "tags": { "string" : "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

actions

Information about whether the tags will be added to the S3 object after scanning.

Type: MalwareProtectionPlanActions object

Required: No

clientToken

The idempotency token for the create request.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 64.

Required: No

protectedResource

Information about the protected resource that is associated with the created Malware Protection plan. Presently, S3Bucket is the only supported protected resource.

Type: CreateProtectedResource object

Required: Yes

role

Amazon Resource Name (ARN) of the IAM role that has the permissions to scan and add tags to the associated protected resource.

Type: String

Required: Yes

tags

Tags added to the Malware Protection plan resource.

Type: String to string map

Map Entries: Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "malwareProtectionPlanId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

malwareProtectionPlanId

A unique identifier associated with the Malware Protection plan resource.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

An access denied exception object.

HTTP Status Code: 403

BadRequestException

A bad request exception object.

HTTP Status Code: 400

ConflictException

A request conflict exception object.

HTTP Status Code: 409

InternalServerErrorException

An internal server error exception object.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: