aws.guardduty.MalwareProtectionPlan
Explore with Pulumi AI
Provides a resource to manage a GuardDuty malware protection plan.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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
Create MalwareProtectionPlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MalwareProtectionPlan(name: string, args: MalwareProtectionPlanArgs, opts?: CustomResourceOptions);
@overload
def MalwareProtectionPlan(resource_name: str,
args: MalwareProtectionPlanArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MalwareProtectionPlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
role: Optional[str] = None,
actions: Optional[Sequence[MalwareProtectionPlanActionArgs]] = None,
protected_resource: Optional[MalwareProtectionPlanProtectedResourceArgs] = None,
tags: Optional[Mapping[str, str]] = None)
func NewMalwareProtectionPlan(ctx *Context, name string, args MalwareProtectionPlanArgs, opts ...ResourceOption) (*MalwareProtectionPlan, error)
public MalwareProtectionPlan(string name, MalwareProtectionPlanArgs args, CustomResourceOptions? opts = null)
public MalwareProtectionPlan(String name, MalwareProtectionPlanArgs args)
public MalwareProtectionPlan(String name, MalwareProtectionPlanArgs args, CustomResourceOptions options)
type: aws:guardduty:MalwareProtectionPlan
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MalwareProtectionPlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MalwareProtectionPlanArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MalwareProtectionPlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MalwareProtectionPlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MalwareProtectionPlanArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var malwareProtectionPlanResource = new Aws.GuardDuty.MalwareProtectionPlan("malwareProtectionPlanResource", new()
{
Role = "string",
Actions = new[]
{
new Aws.GuardDuty.Inputs.MalwareProtectionPlanActionArgs
{
Taggings = new[]
{
new Aws.GuardDuty.Inputs.MalwareProtectionPlanActionTaggingArgs
{
Status = "string",
},
},
},
},
ProtectedResource = new Aws.GuardDuty.Inputs.MalwareProtectionPlanProtectedResourceArgs
{
S3Bucket = new Aws.GuardDuty.Inputs.MalwareProtectionPlanProtectedResourceS3BucketArgs
{
BucketName = "string",
ObjectPrefixes = new[]
{
"string",
},
},
},
Tags =
{
{ "string", "string" },
},
});
example, err := guardduty.NewMalwareProtectionPlan(ctx, "malwareProtectionPlanResource", &guardduty.MalwareProtectionPlanArgs{
Role: pulumi.String("string"),
Actions: guardduty.MalwareProtectionPlanActionArray{
&guardduty.MalwareProtectionPlanActionArgs{
Taggings: guardduty.MalwareProtectionPlanActionTaggingArray{
&guardduty.MalwareProtectionPlanActionTaggingArgs{
Status: pulumi.String("string"),
},
},
},
},
ProtectedResource: &guardduty.MalwareProtectionPlanProtectedResourceArgs{
S3Bucket: &guardduty.MalwareProtectionPlanProtectedResourceS3BucketArgs{
BucketName: pulumi.String("string"),
ObjectPrefixes: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var malwareProtectionPlanResource = new MalwareProtectionPlan("malwareProtectionPlanResource", MalwareProtectionPlanArgs.builder()
.role("string")
.actions(MalwareProtectionPlanActionArgs.builder()
.taggings(MalwareProtectionPlanActionTaggingArgs.builder()
.status("string")
.build())
.build())
.protectedResource(MalwareProtectionPlanProtectedResourceArgs.builder()
.s3Bucket(MalwareProtectionPlanProtectedResourceS3BucketArgs.builder()
.bucketName("string")
.objectPrefixes("string")
.build())
.build())
.tags(Map.of("string", "string"))
.build());
malware_protection_plan_resource = aws.guardduty.MalwareProtectionPlan("malwareProtectionPlanResource",
role="string",
actions=[{
"taggings": [{
"status": "string",
}],
}],
protected_resource={
"s3Bucket": {
"bucketName": "string",
"objectPrefixes": ["string"],
},
},
tags={
"string": "string",
})
const malwareProtectionPlanResource = new aws.guardduty.MalwareProtectionPlan("malwareProtectionPlanResource", {
role: "string",
actions: [{
taggings: [{
status: "string",
}],
}],
protectedResource: {
s3Bucket: {
bucketName: "string",
objectPrefixes: ["string"],
},
},
tags: {
string: "string",
},
});
type: aws:guardduty:MalwareProtectionPlan
properties:
actions:
- taggings:
- status: string
protectedResource:
s3Bucket:
bucketName: string
objectPrefixes:
- string
role: string
tags:
string: string
MalwareProtectionPlan Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The MalwareProtectionPlan resource accepts the following input properties:
- Role string
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- Actions
List<Malware
Protection Plan Action> - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - Protected
Resource MalwareProtection Plan Protected Resource - 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. - Dictionary<string, string>
- 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.
- Role string
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- Actions
[]Malware
Protection Plan Action Args - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - Protected
Resource MalwareProtection Plan Protected Resource Args - 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. - map[string]string
- 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.
- role String
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- actions
List<Malware
Protection Plan Action> - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - protected
Resource MalwareProtection Plan Protected Resource - 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. - Map<String,String>
- 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.
- role string
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- actions
Malware
Protection Plan Action[] - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - protected
Resource MalwareProtection Plan Protected Resource - 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. - {[key: string]: string}
- 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.
- role str
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- actions
Sequence[Malware
Protection Plan Action Args] - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - protected_
resource MalwareProtection Plan Protected Resource Args - 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. - Mapping[str, str]
- 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.
- role String
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- actions List<Property Map>
- Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - protected
Resource Property Map - 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. - Map<String>
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the MalwareProtectionPlan resource produces the following output properties:
- Arn string
- The ARN of the GuardDuty malware protection plan
- Created
At string - The timestamp when the Malware Protection plan resource was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Dictionary<string, string>
- Arn string
- The ARN of the GuardDuty malware protection plan
- Created
At string - The timestamp when the Malware Protection plan resource was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - map[string]string
- arn String
- The ARN of the GuardDuty malware protection plan
- created
At String - The timestamp when the Malware Protection plan resource was created.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Map<String,String>
- arn string
- The ARN of the GuardDuty malware protection plan
- created
At string - The timestamp when the Malware Protection plan resource was created.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - {[key: string]: string}
- arn str
- The ARN of the GuardDuty malware protection plan
- created_
at str - The timestamp when the Malware Protection plan resource was created.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Mapping[str, str]
- arn String
- The ARN of the GuardDuty malware protection plan
- created
At String - The timestamp when the Malware Protection plan resource was created.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Map<String>
Look up Existing MalwareProtectionPlan Resource
Get an existing MalwareProtectionPlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MalwareProtectionPlanState, opts?: CustomResourceOptions): MalwareProtectionPlan
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[MalwareProtectionPlanActionArgs]] = None,
arn: Optional[str] = None,
created_at: Optional[str] = None,
protected_resource: Optional[MalwareProtectionPlanProtectedResourceArgs] = None,
role: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> MalwareProtectionPlan
func GetMalwareProtectionPlan(ctx *Context, name string, id IDInput, state *MalwareProtectionPlanState, opts ...ResourceOption) (*MalwareProtectionPlan, error)
public static MalwareProtectionPlan Get(string name, Input<string> id, MalwareProtectionPlanState? state, CustomResourceOptions? opts = null)
public static MalwareProtectionPlan get(String name, Output<String> id, MalwareProtectionPlanState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Actions
List<Malware
Protection Plan Action> - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - Arn string
- The ARN of the GuardDuty malware protection plan
- Created
At string - The timestamp when the Malware Protection plan resource was created.
- Protected
Resource MalwareProtection Plan Protected Resource - 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. - Role string
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- Status string
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Dictionary<string, string>
- 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. - Dictionary<string, string>
- Actions
[]Malware
Protection Plan Action Args - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - Arn string
- The ARN of the GuardDuty malware protection plan
- Created
At string - The timestamp when the Malware Protection plan resource was created.
- Protected
Resource MalwareProtection Plan Protected Resource Args - 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. - Role string
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- Status string
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - map[string]string
- 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. - map[string]string
- actions
List<Malware
Protection Plan Action> - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - arn String
- The ARN of the GuardDuty malware protection plan
- created
At String - The timestamp when the Malware Protection plan resource was created.
- protected
Resource MalwareProtection Plan Protected Resource - 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. - role String
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- status String
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Map<String,String>
- 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. - Map<String,String>
- actions
Malware
Protection Plan Action[] - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - arn string
- The ARN of the GuardDuty malware protection plan
- created
At string - The timestamp when the Malware Protection plan resource was created.
- protected
Resource MalwareProtection Plan Protected Resource - 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. - role string
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- status string
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - {[key: string]: string}
- 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. - {[key: string]: string}
- actions
Sequence[Malware
Protection Plan Action Args] - Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - arn str
- The ARN of the GuardDuty malware protection plan
- created_
at str - The timestamp when the Malware Protection plan resource was created.
- protected_
resource MalwareProtection Plan Protected Resource Args - 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. - role str
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- status str
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Mapping[str, str]
- 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. - Mapping[str, str]
- actions List<Property Map>
- Information about whether the tags will be added to the S3 object after scanning. See
actions
below. - arn String
- The ARN of the GuardDuty malware protection plan
- created
At String - The timestamp when the Malware Protection plan resource was created.
- protected
Resource Property Map - 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. - role String
- ARN of IAM role that includes the permissions required to scan and add tags to the associated protected resource.
- status String
- The GuardDuty malware protection plan status. Valid values are
ACTIVE
,WARNING
, andERROR
. - Map<String>
- 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. - Map<String>
Supporting Types
MalwareProtectionPlanAction, MalwareProtectionPlanActionArgs
- Taggings
List<Malware
Protection Plan Action Tagging> - Indicates whether the scanned S3 object will have tags about the scan result. See
tagging
below.
- Taggings
[]Malware
Protection Plan Action Tagging - Indicates whether the scanned S3 object will have tags about the scan result. See
tagging
below.
- taggings
List<Malware
Protection Plan Action Tagging> - Indicates whether the scanned S3 object will have tags about the scan result. See
tagging
below.
- taggings
Malware
Protection Plan Action Tagging[] - Indicates whether the scanned S3 object will have tags about the scan result. See
tagging
below.
- taggings
Sequence[Malware
Protection Plan Action Tagging] - Indicates whether the scanned S3 object will have tags about the scan result. See
tagging
below.
- taggings List<Property Map>
- Indicates whether the scanned S3 object will have tags about the scan result. See
tagging
below.
MalwareProtectionPlanActionTagging, MalwareProtectionPlanActionTaggingArgs
- Status string
- Indicates whether or not the tags will added. Valid values are
DISABLED
andENABLED
. Defaults toDISABLED
- Status string
- Indicates whether or not the tags will added. Valid values are
DISABLED
andENABLED
. Defaults toDISABLED
- status String
- Indicates whether or not the tags will added. Valid values are
DISABLED
andENABLED
. Defaults toDISABLED
- status string
- Indicates whether or not the tags will added. Valid values are
DISABLED
andENABLED
. Defaults toDISABLED
- status str
- Indicates whether or not the tags will added. Valid values are
DISABLED
andENABLED
. Defaults toDISABLED
- status String
- Indicates whether or not the tags will added. Valid values are
DISABLED
andENABLED
. Defaults toDISABLED
MalwareProtectionPlanProtectedResource, MalwareProtectionPlanProtectedResourceArgs
- S3Bucket
Malware
Protection Plan Protected Resource S3Bucket - Information about the protected S3 bucket resource. See
s3_bucket
below.
- S3Bucket
Malware
Protection Plan Protected Resource S3Bucket - Information about the protected S3 bucket resource. See
s3_bucket
below.
- s3Bucket
Malware
Protection Plan Protected Resource S3Bucket - Information about the protected S3 bucket resource. See
s3_bucket
below.
- s3Bucket
Malware
Protection Plan Protected Resource S3Bucket - Information about the protected S3 bucket resource. See
s3_bucket
below.
- s3_
bucket MalwareProtection Plan Protected Resource S3Bucket - Information about the protected S3 bucket resource. See
s3_bucket
below.
- s3Bucket Property Map
- Information about the protected S3 bucket resource. See
s3_bucket
below.
MalwareProtectionPlanProtectedResourceS3Bucket, MalwareProtectionPlanProtectedResourceS3BucketArgs
- Bucket
Name string - Name of the S3 bucket.
- Object
Prefixes List<string> - The list of object prefixes that specify the S3 objects that will be scanned.
- Bucket
Name string - Name of the S3 bucket.
- Object
Prefixes []string - The list of object prefixes that specify the S3 objects that will be scanned.
- bucket
Name String - Name of the S3 bucket.
- object
Prefixes List<String> - The list of object prefixes that specify the S3 objects that will be scanned.
- bucket
Name string - Name of the S3 bucket.
- object
Prefixes string[] - The list of object prefixes that specify the S3 objects that will be scanned.
- bucket_
name str - Name of the S3 bucket.
- object_
prefixes Sequence[str] - The list of object prefixes that specify the S3 objects that will be scanned.
- bucket
Name String - Name of the S3 bucket.
- object
Prefixes List<String> - The list of object prefixes that specify the S3 objects that will be scanned.
Import
Using pulumi import
, import GuardDuty malware protection plans using their IDs. For example:
$ pulumi import aws:guardduty/malwareProtectionPlan:MalwareProtectionPlan example 1234567890abcdef0123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.