IPSetArgs

data class IPSetArgs(val activate: Output<Boolean>? = null, val detectorId: Output<String>? = null, val format: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<IPSetArgs>

Provides a resource to manage a GuardDuty IPSet.

Note: Currently in GuardDuty, users from member accounts cannot upload and further manage IPSets. IPSets that are uploaded by the primary account are imposed on GuardDuty functionality in its member accounts. See the GuardDuty API Documentation

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.guardduty.Detector;
import com.pulumi.aws.guardduty.DetectorArgs;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.aws.guardduty.IPSet;
import com.pulumi.aws.guardduty.IPSetArgs;
import com.pulumi.aws.s3.BucketAclV2;
import com.pulumi.aws.s3.BucketAclV2Args;
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 primary = new Detector("primary", DetectorArgs.builder()
.enable(true)
.build());
var bucket = new BucketV2("bucket");
var myIPSet = new BucketObjectv2("myIPSet", BucketObjectv2Args.builder()
.content("""
10.0.0.0/8
""")
.bucket(bucket.id())
.key("MyIPSet")
.build());
var example = new IPSet("example", IPSetArgs.builder()
.activate(true)
.detectorId(primary.id())
.format("TXT")
.location(Output.tuple(myIPSet.bucket(), myIPSet.key()).applyValue(values -> {
var bucket = values.t1;
var key = values.t2;
return String.format("https://s3.amazonaws.com/%s/%s", bucket,key);
}))
.build());
var bucketAcl = new BucketAclV2("bucketAcl", BucketAclV2Args.builder()
.bucket(bucket.id())
.acl("private")
.build());
}
}

Import

GuardDuty IPSet can be imported using the primary GuardDuty detector ID and IPSet ID, e.g.,

$ pulumi import aws:guardduty/iPSet:IPSet MyIPSet 00b00fd5aecc0ab60a708659477e9617:123456789012

Constructors

Link copied to clipboard
constructor(activate: Output<Boolean>? = null, detectorId: Output<String>? = null, format: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val activate: Output<Boolean>? = null

Specifies whether GuardDuty is to start using the uploaded IPSet.

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

The detector ID of the GuardDuty.

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

The format of the file that contains the IPSet. Valid values: TXT | STIX | OTX_CSV | ALIEN_VAULT | PROOF_POINT | FIRE_EYE

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

The URI of the file that contains the IPSet.

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

The friendly name to identify the IPSet.

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

Key-value map 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(): IPSetArgs