Skip to main content

malware_protection_plans

Creates, updates, deletes, gets or lists a malware_protection_plans resource.

Overview

Namemalware_protection_plans
TypeResource
Idaws.guardduty.malware_protection_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actionsobjectInformation about whether the tags will be added to the S3 object after scanning.
arnstringAmazon Resource Name (ARN) of the protected resource.
created_atstring (date-time)The timestamp when the Malware Protection plan resource was created.
protected_resourceobjectInformation about the protected resource that is associated with the created Malware Protection plan. Presently, S3Bucket is the only supported protected resource.
rolestringAmazon Resource Name (ARN) of the IAM role that includes the permissions to scan and add tags to the associated protected resource.
statusstringMalware Protection plan status. (ACTIVE, WARNING, ERROR)
status_reasonsarrayInformation about the issue code and message associated to the status of your Malware Protection plan.
tagsobjectTags added to the Malware Protection plan resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_malware_protection_planselectmalware_protection_plan_id, regionRetrieves the Malware Protection plan details associated with a Malware Protection plan ID.
list_malware_protection_plansselectregionnextTokenLists the Malware Protection plan IDs associated with the protected resources in your Amazon Web Services account.
create_malware_protection_planinsertregion, ProtectedResourceCreates a new Malware Protection plan for the protected resource. When you create a Malware Protection plan, the Amazon Web Services service terms for GuardDuty Malware Protection apply. For more information, see Amazon Web Services service terms for GuardDuty Malware Protection.
update_malware_protection_planupdatemalware_protection_plan_id, regionUpdates an existing Malware Protection plan resource.
delete_malware_protection_plandeletemalware_protection_plan_id, regionDeletes the Malware Protection plan ID associated with the Malware Protection plan resource. Use this API only when you no longer want to protect the resource associated with this Malware Protection plan ID.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
malware_protection_plan_idstringA unique identifier associated with Malware Protection plan resource.
regionstringAWS region (default: us-east-1)
nextTokenstringYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data. The default page size is 100 plans.

SELECT examples

Retrieves the Malware Protection plan details associated with a Malware Protection plan ID.

SELECT
actions,
arn,
created_at,
protected_resource,
role,
status,
status_reasons,
tags
FROM aws.guardduty.malware_protection_plans
WHERE malware_protection_plan_id = '{{ malware_protection_plan_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new Malware Protection plan for the protected resource. When you create a Malware Protection plan, the Amazon Web Services service terms for GuardDuty Malware Protection apply. For more information, see Amazon Web Services service terms for GuardDuty Malware Protection.

INSERT INTO aws.guardduty.malware_protection_plans (
ClientToken,
Role,
ProtectedResource,
Actions,
Tags,
region
)
SELECT
'{{ ClientToken }}',
'{{ Role }}',
'{{ ProtectedResource }}' /* required */,
'{{ Actions }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
malware_protection_plan_id
;

UPDATE examples

Updates an existing Malware Protection plan resource.

UPDATE aws.guardduty.malware_protection_plans
SET
Role = '{{ Role }}',
Actions = '{{ Actions }}',
ProtectedResource = '{{ ProtectedResource }}'
WHERE
malware_protection_plan_id = '{{ malware_protection_plan_id }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes the Malware Protection plan ID associated with the Malware Protection plan resource. Use this API only when you no longer want to protect the resource associated with this Malware Protection plan ID.

DELETE FROM aws.guardduty.malware_protection_plans
WHERE malware_protection_plan_id = '{{ malware_protection_plan_id }}' --required
AND region = '{{ region }}' --required
;