EnablerArgs

data class EnablerArgs(val accountIds: Output<List<String>>? = null, val resourceTypes: Output<List<String>>? = null) : ConvertibleToJava<EnablerArgs>

Resource for enabling AWS Inspector V2 resource scans.

NOTE: Due to testing limitations, we provide this resource as best effort. If you use it or have the ability to test it, and notice problems, please consider reaching out to us on GitHub.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.inspector2.Enabler;
import com.pulumi.aws.inspector2.EnablerArgs;
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 Enabler("example", EnablerArgs.builder()
.accountIds("012345678901")
.resourceTypes("EC2")
.build());
}
}

For the Calling Account

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inspector2.Enabler;
import com.pulumi.aws.inspector2.EnablerArgs;
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) {
final var current = AwsFunctions.getCallerIdentity();
var test = new Enabler("test", EnablerArgs.builder()
.accountIds(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.resourceTypes(
"ECR",
"EC2")
.build());
}
}

Constructors

Link copied to clipboard
fun EnablerArgs(accountIds: Output<List<String>>? = null, resourceTypes: Output<List<String>>? = null)

Functions

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

Properties

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

Set of account IDs.

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

Type of resources to scan. Valid values are EC2, ECR, and LAMBDA. If you only use one type, the provider will ignore the status of the other type.