All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cloudshiftdev.awscdk.services.guardduty.CfnThreatIntelSetProps.kt Maven / Gradle / Ivy

There is a newer version: 0.10.0
Show newest version
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")

package io.cloudshiftdev.awscdk.services.guardduty

import io.cloudshiftdev.awscdk.CfnTag
import io.cloudshiftdev.awscdk.IResolvable
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Unit
import kotlin.collections.List

/**
 * Properties for defining a `CfnThreatIntelSet`.
 *
 * Example:
 *
 * ```
 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import io.cloudshiftdev.awscdk.services.guardduty.*;
 * CfnThreatIntelSetProps cfnThreatIntelSetProps = CfnThreatIntelSetProps.builder()
 * .format("format")
 * .location("location")
 * // the properties below are optional
 * .activate(false)
 * .detectorId("detectorId")
 * .name("name")
 * .tags(List.of(CfnTag.builder()
 * .key("key")
 * .value("value")
 * .build()))
 * .build();
 * ```
 *
 * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html)
 */
public interface CfnThreatIntelSetProps {
  /**
   * A Boolean value that indicates whether GuardDuty is to start using the uploaded ThreatIntelSet.
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-activate)
   */
  public fun activate(): Any? = unwrap(this).getActivate()

  /**
   * The unique ID of the detector of the GuardDuty account for which you want to create a
   * `ThreatIntelSet` .
   *
   * To find the `detectorId` in the current Region, see the
   * Settings page in the GuardDuty console, or run the
   * [ListDetectors](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html)
   * API.
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-detectorid)
   */
  public fun detectorId(): String? = unwrap(this).getDetectorId()

  /**
   * The format of the file that contains the ThreatIntelSet.
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-format)
   */
  public fun format(): String

  /**
   * The URI of the file that contains the ThreatIntelSet.
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-location)
   */
  public fun location(): String

  /**
   * A user-friendly ThreatIntelSet name displayed in all findings that are generated by activity
   * that involves IP addresses included in this ThreatIntelSet.
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-name)
   */
  public fun name(): String? = unwrap(this).getName()

  /**
   * The tags to be added to a new threat list resource.
   *
   * Each tag consists of a key and an optional value, both of which you define.
   *
   * For more information, see
   * [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)
   * .
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-tags)
   */
  public fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()

  /**
   * A builder for [CfnThreatIntelSetProps]
   */
  @CdkDslMarker
  public interface Builder {
    /**
     * @param activate A Boolean value that indicates whether GuardDuty is to start using the
     * uploaded ThreatIntelSet.
     */
    public fun activate(activate: Boolean)

    /**
     * @param activate A Boolean value that indicates whether GuardDuty is to start using the
     * uploaded ThreatIntelSet.
     */
    public fun activate(activate: IResolvable)

    /**
     * @param detectorId The unique ID of the detector of the GuardDuty account for which you want
     * to create a `ThreatIntelSet` .
     * To find the `detectorId` in the current Region, see the
     * Settings page in the GuardDuty console, or run the
     * [ListDetectors](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html)
     * API.
     */
    public fun detectorId(detectorId: String)

    /**
     * @param format The format of the file that contains the ThreatIntelSet. 
     */
    public fun format(format: String)

    /**
     * @param location The URI of the file that contains the ThreatIntelSet. 
     */
    public fun location(location: String)

    /**
     * @param name A user-friendly ThreatIntelSet name displayed in all findings that are generated
     * by activity that involves IP addresses included in this ThreatIntelSet.
     */
    public fun name(name: String)

    /**
     * @param tags The tags to be added to a new threat list resource.
     * Each tag consists of a key and an optional value, both of which you define.
     *
     * For more information, see
     * [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)
     * .
     */
    public fun tags(tags: List)

    /**
     * @param tags The tags to be added to a new threat list resource.
     * Each tag consists of a key and an optional value, both of which you define.
     *
     * For more information, see
     * [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)
     * .
     */
    public fun tags(vararg tags: CfnTag)
  }

  private class BuilderImpl : Builder {
    private val cdkBuilder: software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps.Builder
        = software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps.builder()

    /**
     * @param activate A Boolean value that indicates whether GuardDuty is to start using the
     * uploaded ThreatIntelSet.
     */
    override fun activate(activate: Boolean) {
      cdkBuilder.activate(activate)
    }

    /**
     * @param activate A Boolean value that indicates whether GuardDuty is to start using the
     * uploaded ThreatIntelSet.
     */
    override fun activate(activate: IResolvable) {
      cdkBuilder.activate(activate.let(IResolvable.Companion::unwrap))
    }

    /**
     * @param detectorId The unique ID of the detector of the GuardDuty account for which you want
     * to create a `ThreatIntelSet` .
     * To find the `detectorId` in the current Region, see the
     * Settings page in the GuardDuty console, or run the
     * [ListDetectors](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html)
     * API.
     */
    override fun detectorId(detectorId: String) {
      cdkBuilder.detectorId(detectorId)
    }

    /**
     * @param format The format of the file that contains the ThreatIntelSet. 
     */
    override fun format(format: String) {
      cdkBuilder.format(format)
    }

    /**
     * @param location The URI of the file that contains the ThreatIntelSet. 
     */
    override fun location(location: String) {
      cdkBuilder.location(location)
    }

    /**
     * @param name A user-friendly ThreatIntelSet name displayed in all findings that are generated
     * by activity that involves IP addresses included in this ThreatIntelSet.
     */
    override fun name(name: String) {
      cdkBuilder.name(name)
    }

    /**
     * @param tags The tags to be added to a new threat list resource.
     * Each tag consists of a key and an optional value, both of which you define.
     *
     * For more information, see
     * [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)
     * .
     */
    override fun tags(tags: List) {
      cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
    }

    /**
     * @param tags The tags to be added to a new threat list resource.
     * Each tag consists of a key and an optional value, both of which you define.
     *
     * For more information, see
     * [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)
     * .
     */
    override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())

    public fun build(): software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps =
        cdkBuilder.build()
  }

  private class Wrapper(
    cdkObject: software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps,
  ) : CdkObject(cdkObject),
      CfnThreatIntelSetProps {
    /**
     * A Boolean value that indicates whether GuardDuty is to start using the uploaded
     * ThreatIntelSet.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-activate)
     */
    override fun activate(): Any? = unwrap(this).getActivate()

    /**
     * The unique ID of the detector of the GuardDuty account for which you want to create a
     * `ThreatIntelSet` .
     *
     * To find the `detectorId` in the current Region, see the
     * Settings page in the GuardDuty console, or run the
     * [ListDetectors](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html)
     * API.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-detectorid)
     */
    override fun detectorId(): String? = unwrap(this).getDetectorId()

    /**
     * The format of the file that contains the ThreatIntelSet.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-format)
     */
    override fun format(): String = unwrap(this).getFormat()

    /**
     * The URI of the file that contains the ThreatIntelSet.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-location)
     */
    override fun location(): String = unwrap(this).getLocation()

    /**
     * A user-friendly ThreatIntelSet name displayed in all findings that are generated by activity
     * that involves IP addresses included in this ThreatIntelSet.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-name)
     */
    override fun name(): String? = unwrap(this).getName()

    /**
     * The tags to be added to a new threat list resource.
     *
     * Each tag consists of a key and an optional value, both of which you define.
     *
     * For more information, see
     * [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)
     * .
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-threatintelset.html#cfn-guardduty-threatintelset-tags)
     */
    override fun tags(): List = unwrap(this).getTags()?.map(CfnTag::wrap) ?: emptyList()
  }

  public companion object {
    public operator fun invoke(block: Builder.() -> Unit = {}): CfnThreatIntelSetProps {
      val builderImpl = BuilderImpl()
      return Wrapper(builderImpl.apply(block).build())
    }

    internal fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps):
        CfnThreatIntelSetProps = CdkObjectWrappers.wrap(cdkObject) as? CfnThreatIntelSetProps ?:
        Wrapper(cdkObject)

    internal fun unwrap(wrapped: CfnThreatIntelSetProps):
        software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps = (wrapped as
        CdkObject).cdkObject as software.amazon.awscdk.services.guardduty.CfnThreatIntelSetProps
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy