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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.guardduty.malware_protection_plans (
Role,
ProtectedResource,
Actions,
Tags,
region
)
SELECT
'{{ role }}',
'{{ protected_resource }}',
'{{ actions }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.guardduty.malware_protection_plans
WHERE
Identifier = '{{ malware_protection_plan_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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