IPSet
Learn how to create, update, and manage AWS GuardDuty IPSets using Alchemy Cloud Control.
The IPSet resource lets you manage AWS GuardDuty IPSets for threat detection in your AWS environment.
Minimal Example
Section titled “Minimal Example”Create a basic IPSet with required properties and one common optional property.
import AWS from "alchemy/aws/control";
const ipSet = await AWS.GuardDuty.IPSet("myIpSet", { Format: "TXT", Location: "https://my-bucket.s3.amazonaws.com/my-ipset.txt", Activate: true, DetectorId: "12abcdef34abcdef56789abcdef01234"});
Advanced Configuration
Section titled “Advanced Configuration”Configure an IPSet with tags for resource management.
const taggedIpSet = await AWS.GuardDuty.IPSet("taggedIpSet", { Format: "TXT", Location: "https://my-bucket.s3.amazonaws.com/my-tagged-ipset.txt", Activate: true, DetectorId: "12abcdef34abcdef56789abcdef01234", Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "Security" } ]});
Example with Existing Resource Adoption
Section titled “Example with Existing Resource Adoption”Create an IPSet that adopts an existing resource instead of failing if it already exists.
const adoptedIpSet = await AWS.GuardDuty.IPSet("adoptedIpSet", { Format: "TXT", Location: "https://my-bucket.s3.amazonaws.com/my-adopted-ipset.txt", Activate: true, DetectorId: "12abcdef34abcdef56789abcdef01234", adopt: true});
Example with Different Formats
Section titled “Example with Different Formats”Create an IPSet with a different format and custom location.
const jsonIpSet = await AWS.GuardDuty.IPSet("jsonIpSet", { Format: "JSON", Location: "https://my-bucket.s3.amazonaws.com/my-json-ipset.json", Activate: false, DetectorId: "12abcdef34abcdef56789abcdef01234"});