![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.fms.kotlin.ResourceSet.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.fms.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 [ResourceSet].
*/
@PulumiTagMarker
public class ResourceSetResourceBuilder internal constructor() {
public var name: String? = null
public var args: ResourceSetArgs = ResourceSetArgs()
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 ResourceSetArgsBuilder.() -> Unit) {
val builder = ResourceSetArgsBuilder()
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(): ResourceSet {
val builtJavaResource = com.pulumi.awsnative.fms.ResourceSet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ResourceSet(builtJavaResource)
}
}
/**
* Creates an AWS Firewall Manager resource set.
*/
public class ResourceSet internal constructor(
override val javaResource: com.pulumi.awsnative.fms.ResourceSet,
) : KotlinCustomResource(javaResource, ResourceSetMapper) {
/**
* A unique identifier for the resource set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* A description of the resource set.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The descriptive name of the resource set. You can't change the name of a resource set after you create it.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Determines the resources that can be associated to the resource set. Depending on your setting for max results and the number of resource sets, a single call might not return the full list.
*/
public val resourceTypeList: Output>
get() = javaResource.resourceTypeList().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
public val resources: Output>?
get() = javaResource.resources().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object ResourceSetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.fms.ResourceSet::class == javaResource::class
override fun map(javaResource: Resource): ResourceSet = ResourceSet(
javaResource as
com.pulumi.awsnative.fms.ResourceSet,
)
}
/**
* @see [ResourceSet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ResourceSet].
*/
public suspend fun resourceSet(name: String, block: suspend ResourceSetResourceBuilder.() -> Unit): ResourceSet {
val builder = ResourceSetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ResourceSet].
* @param name The _unique_ name of the resulting resource.
*/
public fun resourceSet(name: String): ResourceSet {
val builder = ResourceSetResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy