com.pulumi.aws.guardduty.kotlin.DetectorFeatureArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.guardduty.kotlin
import com.pulumi.aws.guardduty.DetectorFeatureArgs.builder
import com.pulumi.aws.guardduty.kotlin.inputs.DetectorFeatureAdditionalConfigurationArgs
import com.pulumi.aws.guardduty.kotlin.inputs.DetectorFeatureAdditionalConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource to manage a single Amazon GuardDuty [detector feature](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty-features-activation-model.html#guardduty-features).
* > **NOTE:** Deleting this resource does not disable the detector feature, the resource in simply removed from state instead.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.guardduty.Detector("example", {enable: true});
* const eksRuntimeMonitoring = new aws.guardduty.DetectorFeature("eks_runtime_monitoring", {
* detectorId: example.id,
* name: "EKS_RUNTIME_MONITORING",
* status: "ENABLED",
* additionalConfigurations: [{
* name: "EKS_ADDON_MANAGEMENT",
* status: "ENABLED",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.guardduty.Detector("example", enable=True)
* eks_runtime_monitoring = aws.guardduty.DetectorFeature("eks_runtime_monitoring",
* detector_id=example.id,
* name="EKS_RUNTIME_MONITORING",
* status="ENABLED",
* additional_configurations=[{
* "name": "EKS_ADDON_MANAGEMENT",
* "status": "ENABLED",
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.GuardDuty.Detector("example", new()
* {
* Enable = true,
* });
* var eksRuntimeMonitoring = new Aws.GuardDuty.DetectorFeature("eks_runtime_monitoring", new()
* {
* DetectorId = example.Id,
* Name = "EKS_RUNTIME_MONITORING",
* Status = "ENABLED",
* AdditionalConfigurations = new[]
* {
* new Aws.GuardDuty.Inputs.DetectorFeatureAdditionalConfigurationArgs
* {
* Name = "EKS_ADDON_MANAGEMENT",
* Status = "ENABLED",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/guardduty"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := guardduty.NewDetector(ctx, "example", &guardduty.DetectorArgs{
* Enable: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = guardduty.NewDetectorFeature(ctx, "eks_runtime_monitoring", &guardduty.DetectorFeatureArgs{
* DetectorId: example.ID(),
* Name: pulumi.String("EKS_RUNTIME_MONITORING"),
* Status: pulumi.String("ENABLED"),
* AdditionalConfigurations: guardduty.DetectorFeatureAdditionalConfigurationArray{
* &guardduty.DetectorFeatureAdditionalConfigurationArgs{
* Name: pulumi.String("EKS_ADDON_MANAGEMENT"),
* Status: pulumi.String("ENABLED"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.guardduty.DetectorFeature;
* import com.pulumi.aws.guardduty.DetectorFeatureArgs;
* import com.pulumi.aws.guardduty.inputs.DetectorFeatureAdditionalConfigurationArgs;
* 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 Detector("example", DetectorArgs.builder()
* .enable(true)
* .build());
* var eksRuntimeMonitoring = new DetectorFeature("eksRuntimeMonitoring", DetectorFeatureArgs.builder()
* .detectorId(example.id())
* .name("EKS_RUNTIME_MONITORING")
* .status("ENABLED")
* .additionalConfigurations(DetectorFeatureAdditionalConfigurationArgs.builder()
* .name("EKS_ADDON_MANAGEMENT")
* .status("ENABLED")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:guardduty:Detector
* properties:
* enable: true
* eksRuntimeMonitoring:
* type: aws:guardduty:DetectorFeature
* name: eks_runtime_monitoring
* properties:
* detectorId: ${example.id}
* name: EKS_RUNTIME_MONITORING
* status: ENABLED
* additionalConfigurations:
* - name: EKS_ADDON_MANAGEMENT
* status: ENABLED
* ```
*
* @property additionalConfigurations Additional feature configuration block for features`EKS_RUNTIME_MONITORING` or `RUNTIME_MONITORING`. See below.
* @property detectorId Amazon GuardDuty detector ID.
* @property name The name of the detector feature. Valid values: `S3_DATA_EVENTS`, `EKS_AUDIT_LOGS`, `EBS_MALWARE_PROTECTION`, `RDS_LOGIN_EVENTS`, `EKS_RUNTIME_MONITORING`, `LAMBDA_NETWORK_LOGS`, `RUNTIME_MONITORING`. Only one of two features `EKS_RUNTIME_MONITORING` or `RUNTIME_MONITORING` can be added, adding both features will cause an error. Refer to the [AWS Documentation](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DetectorFeatureConfiguration.html) for the current list of supported values.
* @property status The status of the detector feature. Valid values: `ENABLED`, `DISABLED`.
*/
public data class DetectorFeatureArgs(
public val additionalConfigurations: Output>? =
null,
public val detectorId: Output? = null,
public val name: Output? = null,
public val status: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.guardduty.DetectorFeatureArgs =
com.pulumi.aws.guardduty.DetectorFeatureArgs.builder()
.additionalConfigurations(
additionalConfigurations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.detectorId(detectorId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.status(status?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DetectorFeatureArgs].
*/
@PulumiTagMarker
public class DetectorFeatureArgsBuilder internal constructor() {
private var additionalConfigurations: Output>? =
null
private var detectorId: Output? = null
private var name: Output? = null
private var status: Output? = null
/**
* @param value Additional feature configuration block for features`EKS_RUNTIME_MONITORING` or `RUNTIME_MONITORING`. See below.
*/
@JvmName("diuknvnldgsrvxhp")
public suspend fun additionalConfigurations(`value`: Output>) {
this.additionalConfigurations = value
}
@JvmName("biunhonbimdmdyyl")
public suspend fun additionalConfigurations(vararg values: Output) {
this.additionalConfigurations = Output.all(values.asList())
}
/**
* @param values Additional feature configuration block for features`EKS_RUNTIME_MONITORING` or `RUNTIME_MONITORING`. See below.
*/
@JvmName("hcjhwtgllygvkuim")
public suspend fun additionalConfigurations(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy