MalwareProtectionPlanArgs

data class MalwareProtectionPlanArgs(val actions: Output<List<MalwareProtectionPlanActionArgs>>? = null, val protectedResource: Output<MalwareProtectionPlanProtectedResourceArgs>? = null, val role: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<MalwareProtectionPlanArgs>

Provides a resource to manage a GuardDuty malware protection plan.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.guardduty.MalwareProtectionPlan;
import com.pulumi.aws.guardduty.MalwareProtectionPlanArgs;
import com.pulumi.aws.guardduty.inputs.MalwareProtectionPlanProtectedResourceArgs;
import com.pulumi.aws.guardduty.inputs.MalwareProtectionPlanProtectedResourceS3BucketArgs;
import com.pulumi.aws.guardduty.inputs.MalwareProtectionPlanActionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new MalwareProtectionPlan("example", MalwareProtectionPlanArgs.builder()
.role(exampleAwsIamRole.arn())
.protectedResource(MalwareProtectionPlanProtectedResourceArgs.builder()
.s3Bucket(MalwareProtectionPlanProtectedResourceS3BucketArgs.builder()
.bucketName(exampleAwsS3Bucket.id())
.objectPrefixes(
"example1",
"example2")
.build())
.build())
.actions(MalwareProtectionPlanActionArgs.builder()
.tagging(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.tags(Map.of("Name", "example"))
.build());
}
}
resources:
example:
type: aws:guardduty:MalwareProtectionPlan
properties:
role: ${exampleAwsIamRole.arn}
protectedResource:
s3Bucket:
bucketName: ${exampleAwsS3Bucket.id}
objectPrefixes:
- example1
- example2
actions:
- tagging:
- status: ENABLED
tags:
Name: example

Import

Using pulumi import, import GuardDuty malware protection plans using their IDs. For example:

$ pulumi import aws:guardduty/malwareProtectionPlan:MalwareProtectionPlan example 1234567890abcdef0123

Constructors

Link copied to clipboard
constructor(actions: Output<List<MalwareProtectionPlanActionArgs>>? = null, protectedResource: Output<MalwareProtectionPlanProtectedResourceArgs>? = null, role: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard

Information about whether the tags will be added to the S3 object after scanning. See actions below.

Link copied to clipboard

Information about the protected resource that is associated with the created Malware Protection plan. Presently, S3Bucket is the only supported protected resource. See protected_resource below.

Link copied to clipboard
val role: Output<String>? = null

ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): MalwareProtectionPlanArgs