malware_protection_plans
Creates, updates, deletes, gets or lists a malware_protection_plans resource.
Overview
| Name | malware_protection_plans |
| Type | Resource |
| Id | aws.guardduty.malware_protection_plans |
Fields
The following fields are returned by SELECT queries:
- get_malware_protection_plan
- list_malware_protection_plans
| Name | Datatype | Description |
|---|---|---|
actions | object | Information about whether the tags will be added to the S3 object after scanning. |
arn | string | Amazon Resource Name (ARN) of the protected resource. |
created_at | string (date-time) | The timestamp when the Malware Protection plan resource was created. |
protected_resource | object | Information about the protected resource that is associated with the created Malware Protection plan. Presently, S3Bucket is the only supported protected resource. |
role | string | Amazon Resource Name (ARN) of the IAM role that includes the permissions to scan and add tags to the associated protected resource. |
status | string | Malware Protection plan status. (ACTIVE, WARNING, ERROR) |
status_reasons | array | Information about the issue code and message associated to the status of your Malware Protection plan. |
tags | object | Tags added to the Malware Protection plan resource. |
| Name | Datatype | Description |
|---|---|---|
malware_protection_plans | array | A list of unique identifiers associated with each Malware Protection plan. |
next_token | string | You 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_malware_protection_plan | select | malware_protection_plan_id, region | Retrieves the Malware Protection plan details associated with a Malware Protection plan ID. | |
list_malware_protection_plans | select | region | nextToken | Lists the Malware Protection plan IDs associated with the protected resources in your Amazon Web Services account. |
create_malware_protection_plan | insert | region, ProtectedResource | 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. | |
update_malware_protection_plan | update | malware_protection_plan_id, region | Updates an existing Malware Protection plan resource. | |
delete_malware_protection_plan | delete | malware_protection_plan_id, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
malware_protection_plan_id | string | A unique identifier associated with Malware Protection plan resource. |
region | string | AWS region (default: us-east-1) |
nextToken | string | You 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
- get_malware_protection_plan
- list_malware_protection_plans
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
;
Lists the Malware Protection plan IDs associated with the protected resources in your Amazon Web Services account.
SELECT
malware_protection_plans,
next_token
FROM aws.guardduty.malware_protection_plans
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_malware_protection_plan
- Manifest
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
;
# Description fields are for documentation purposes
- name: malware_protection_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the malware_protection_plans resource.
- name: ClientToken
value: "{{ ClientToken }}"
- name: Role
value: "{{ Role }}"
- name: ProtectedResource
description: |
Information about the protected resource that is associated with the created Malware Protection plan. Presently, S3Bucket is the only supported protected resource.
value:
S3Bucket:
BucketName: "{{ BucketName }}"
ObjectPrefixes:
- "{{ ObjectPrefixes }}"
- name: Actions
description: |
Information about whether the tags will be added to the S3 object after scanning.
value:
Tagging:
Status: "{{ Status }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_malware_protection_plan
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
- delete_malware_protection_plan
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
;