malware_protection_plans
Creates, updates, deletes or gets a malware_protection_plan resource or lists malware_protection_plans in a region
Overview
| Name | malware_protection_plans |
| Type | Resource |
| Description | Resource Type definition for AWS::GuardDuty::MalwareProtectionPlan |
| Id | awscc.guardduty.malware_protection_plans |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
malware_protection_plan_id | string | A unique identifier associated with Malware Protection plan resource. |
arn | string | Amazon Resource Name (ARN) of the protected resource. |
role | string | IAM role that includes the permissions required to scan and (optionally) add tags to the associated protected resource. |
protected_resource | object | Information about the protected resource. Presently, S3Bucket is the only supported protected resource. |
actions | object | Specifies the action that is to be applied to the Malware Protection plan resource. |
created_at | string | The timestamp when the Malware Protection plan resource was created. |
status | string | Status of the Malware Protection plan resource. |
status_reasons | array | Status details associated with the Malware Protection plan resource status. |
tags | array | 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. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
malware_protection_plan_id | string | A unique identifier associated with Malware Protection plan resource. |
region | string | AWS region. |
For more information, see AWS::GuardDuty::MalwareProtectionPlan.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | malware_protection_plans | INSERT | Role, ProtectedResource, region |
delete_resource | malware_protection_plans | DELETE | Identifier, region |
update_resource | malware_protection_plans | UPDATE | Identifier, PatchDocument, region |
list_resources | malware_protection_plans_list_only | SELECT | region |
get_resource | malware_protection_plans | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual malware_protection_plan.
SELECT
region,
malware_protection_plan_id,
arn,
role,
protected_resource,
actions,
created_at,
status,
status_reasons,
tags
FROM awscc.guardduty.malware_protection_plans
WHERE
region = 'us-east-1' AND
Identifier = '{{ malware_protection_plan_id }}';
Lists all malware_protection_plans in a region.
SELECT
region,
malware_protection_plan_id
FROM awscc.guardduty.malware_protection_plans_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new malware_protection_plan resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.guardduty.malware_protection_plans (
Role,
ProtectedResource,
region
)
SELECT
'{{ role }}',
'{{ protected_resource }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.guardduty.malware_protection_plans (
Role,
ProtectedResource,
Actions,
Tags,
region
)
SELECT
'{{ role }}',
'{{ protected_resource }}',
'{{ actions }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: malware_protection_plan
props:
- name: role
value: '{{ role }}'
- name: protected_resource
value:
s3_bucket:
bucket_name: '{{ bucket_name }}'
object_prefixes:
- '{{ object_prefixes[0] }}'
- name: actions
value:
tagging:
status: '{{ status }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a malware_protection_plan resource, using stack-deploy.
/*+ update */
UPDATE awscc.guardduty.malware_protection_plans
SET PatchDocument = string('{{ {
"Role": role,
"ProtectedResource": protected_resource,
"Actions": actions,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ malware_protection_plan_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.guardduty.malware_protection_plans
WHERE
Identifier = '{{ malware_protection_plan_id }}' AND
region = 'us-east-1';
Permissions
To operate on the malware_protection_plans resource, the following permissions are required:
- Create
- Read
- Delete
- Update
- List
guardduty:CreateMalwareProtectionPlan,
guardduty:GetMalwareProtectionPlan,
guardduty:TagResource,
iam:PassRole
guardduty:GetMalwareProtectionPlan
guardduty:DeleteMalwareProtectionPlan,
guardduty:GetMalwareProtectionPlan
guardduty:UpdateMalwareProtectionPlan,
guardduty:GetMalwareProtectionPlan,
guardduty:TagResource,
guardduty:UntagResource,
iam:PassRole
guardduty:ListMalwareProtectionPlans