Skip to main content

malware_protection_plans

Creates, updates, deletes or gets a malware_protection_plan resource or lists malware_protection_plans in a region

Overview

Namemalware_protection_plans
TypeResource
DescriptionResource Type definition for AWS::GuardDuty::MalwareProtectionPlan
Idawscc.guardduty.malware_protection_plans

Fields

NameDatatypeDescription
malware_protection_plan_idstringA unique identifier associated with Malware Protection plan resource.
arnstringAmazon Resource Name (ARN) of the protected resource.
rolestringIAM role that includes the permissions required to scan and (optionally) add tags to the associated protected resource.
protected_resourceobjectInformation about the protected resource. Presently, S3Bucket is the only supported protected resource.
actionsobjectSpecifies the action that is to be applied to the Malware Protection plan resource.
created_atstringThe timestamp when the Malware Protection plan resource was created.
statusstringStatus of the Malware Protection plan resource.
status_reasonsarrayStatus details associated with the Malware Protection plan resource status.
tagsarrayThe 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.
regionstringAWS region.

For more information, see AWS::GuardDuty::MalwareProtectionPlan.

Methods

NameResourceAccessible byRequired Params
create_resourcemalware_protection_plansINSERTRole, ProtectedResource, region
delete_resourcemalware_protection_plansDELETEIdentifier, region
update_resourcemalware_protection_plansUPDATEIdentifier, PatchDocument, region
list_resourcesmalware_protection_plans_list_onlySELECTregion
get_resourcemalware_protection_plansSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new malware_protection_plan resource, using stack-deploy.

/*+ 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
;

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:

ParameterDescription
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:

guardduty:CreateMalwareProtectionPlan,
guardduty:GetMalwareProtectionPlan,
guardduty:TagResource,
iam:PassRole