com.pulumi.awsnative.guardduty.kotlin.IpSet.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.guardduty.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [IpSet].
*/
@PulumiTagMarker
public class IpSetResourceBuilder internal constructor() {
public var name: String? = null
public var args: IpSetArgs = IpSetArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend IpSetArgsBuilder.() -> Unit) {
val builder = IpSetArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): IpSet {
val builtJavaResource = com.pulumi.awsnative.guardduty.IpSet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IpSet(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::GuardDuty::IPSet
*/
public class IpSet internal constructor(
override val javaResource: com.pulumi.awsnative.guardduty.IpSet,
) : KotlinCustomResource(javaResource, IpSetMapper) {
/**
* Indicates whether or not GuardDuty uses the `IPSet` .
*/
public val activate: Output?
get() = javaResource.activate().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The unique ID of the detector of the GuardDuty account that you want to create an IPSet for.
*/
public val detectorId: Output?
get() = javaResource.detectorId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The format of the file that contains the IPSet.
*/
public val format: Output
get() = javaResource.format().applyValue({ args0 -> args0 })
/**
* The URI of the file that contains the IPSet.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The user-friendly name to identify the IPSet.
* Allowed characters are alphanumeric, whitespace, dash (-), and underscores (_).
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The tags to be added to a new IP set 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 val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object IpSetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.guardduty.IpSet::class == javaResource::class
override fun map(javaResource: Resource): IpSet = IpSet(
javaResource as
com.pulumi.awsnative.guardduty.IpSet,
)
}
/**
* @see [IpSet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IpSet].
*/
public suspend fun ipSet(name: String, block: suspend IpSetResourceBuilder.() -> Unit): IpSet {
val builder = IpSetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IpSet].
* @param name The _unique_ name of the resulting resource.
*/
public fun ipSet(name: String): IpSet {
val builder = IpSetResourceBuilder()
builder.name(name)
return builder.build()
}