Detector

Provides a resource to manage a GuardDuty detector.

NOTE: Deleting this resource is equivalent to “disabling” GuardDuty for an AWS region, which removes all existing findings. You can set the enable attribute to false to instead “suspend” monitoring and feedback reporting while keeping existing data. See the Suspending or Disabling Amazon GuardDuty documentation for more information.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var myDetector = new Aws.GuardDuty.Detector("myDetector", new Aws.GuardDuty.DetectorArgs
        {
            Enable = true,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/guardduty"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := guardduty.NewDetector(ctx, "myDetector", &guardduty.DetectorArgs{
            Enable: pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

my_detector = aws.guardduty.Detector("myDetector", enable=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const myDetector = new aws.guardduty.Detector("MyDetector", {
    enable: true,
});

Create a Detector Resource

def Detector(resource_name, opts=None, enable=None, finding_publishing_frequency=None, tags=None, __props__=None);
func NewDetector(ctx *Context, name string, args *DetectorArgs, opts ...ResourceOption) (*Detector, error)
public Detector(string name, DetectorArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DetectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DetectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DetectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Detector Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Detector resource accepts the following input properties:

Enable bool

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

FindingPublishingFrequency string

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

Tags Dictionary<string, string>

Key-value map of resource tags.

Enable bool

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

FindingPublishingFrequency string

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

Tags map[string]string

Key-value map of resource tags.

enable boolean

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

findingPublishingFrequency string

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

tags {[key: string]: string}

Key-value map of resource tags.

enable bool

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

finding_publishing_frequency str

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

tags Dict[str, str]

Key-value map of resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the Detector resource produces the following output properties:

AccountId string

The AWS account ID of the GuardDuty detector

Arn string

Amazon Resource Name (ARN) of the GuardDuty detector

Id string
The provider-assigned unique ID for this managed resource.
AccountId string

The AWS account ID of the GuardDuty detector

Arn string

Amazon Resource Name (ARN) of the GuardDuty detector

Id string
The provider-assigned unique ID for this managed resource.
accountId string

The AWS account ID of the GuardDuty detector

arn string

Amazon Resource Name (ARN) of the GuardDuty detector

id string
The provider-assigned unique ID for this managed resource.
account_id str

The AWS account ID of the GuardDuty detector

arn str

Amazon Resource Name (ARN) of the GuardDuty detector

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Detector Resource

Get an existing Detector 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?: DetectorState, opts?: CustomResourceOptions): Detector
static get(resource_name, id, opts=None, account_id=None, arn=None, enable=None, finding_publishing_frequency=None, tags=None, __props__=None);
func GetDetector(ctx *Context, name string, id IDInput, state *DetectorState, opts ...ResourceOption) (*Detector, error)
public static Detector Get(string name, Input<string> id, DetectorState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AccountId string

The AWS account ID of the GuardDuty detector

Arn string

Amazon Resource Name (ARN) of the GuardDuty detector

Enable bool

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

FindingPublishingFrequency string

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

Tags Dictionary<string, string>

Key-value map of resource tags.

AccountId string

The AWS account ID of the GuardDuty detector

Arn string

Amazon Resource Name (ARN) of the GuardDuty detector

Enable bool

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

FindingPublishingFrequency string

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

Tags map[string]string

Key-value map of resource tags.

accountId string

The AWS account ID of the GuardDuty detector

arn string

Amazon Resource Name (ARN) of the GuardDuty detector

enable boolean

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

findingPublishingFrequency string

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

tags {[key: string]: string}

Key-value map of resource tags.

account_id str

The AWS account ID of the GuardDuty detector

arn str

Amazon Resource Name (ARN) of the GuardDuty detector

enable bool

Enable monitoring and feedback reporting. Setting to false is equivalent to “suspending” GuardDuty. Defaults to true.

finding_publishing_frequency str

Specifies the frequency of notifications sent for subsequent finding occurrences. If the detector is a GuardDuty member account, the value is determined by the GuardDuty master account and cannot be modified, otherwise defaults to SIX_HOURS. For standalone and GuardDuty master accounts, it must be configured in this provider to enable drift detection. Valid values for standalone and master accounts: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS. See AWS Documentation for more information.

tags Dict[str, str]

Key-value map of resource tags.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.