com.pulumi.awsnative.securityhub.kotlin.DelegatedAdmin.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.securityhub.kotlin
import com.pulumi.awsnative.securityhub.kotlin.enums.DelegatedAdminStatus
import com.pulumi.awsnative.securityhub.kotlin.enums.DelegatedAdminStatus.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
/**
* Builder for [DelegatedAdmin].
*/
@PulumiTagMarker
public class DelegatedAdminResourceBuilder internal constructor() {
public var name: String? = null
public var args: DelegatedAdminArgs = DelegatedAdminArgs()
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 DelegatedAdminArgsBuilder.() -> Unit) {
val builder = DelegatedAdminArgsBuilder()
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(): DelegatedAdmin {
val builtJavaResource = com.pulumi.awsnative.securityhub.DelegatedAdmin(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DelegatedAdmin(builtJavaResource)
}
}
/**
* The AWS::SecurityHub::DelegatedAdmin resource represents the AWS Security Hub delegated admin account in your organization. One delegated admin resource is allowed to create for the organization in each region in which you configure the AdminAccountId.
*/
public class DelegatedAdmin internal constructor(
override val javaResource: com.pulumi.awsnative.securityhub.DelegatedAdmin,
) : KotlinCustomResource(javaResource, DelegatedAdminMapper) {
/**
* The Amazon Web Services account identifier of the account to designate as the Security Hub administrator account
*/
public val adminAccountId: Output
get() = javaResource.adminAccountId().applyValue({ args0 -> args0 })
/**
* The identifier of the DelegatedAdmin being created and assigned as the unique identifier
*/
public val delegatedAdminIdentifier: Output
get() = javaResource.delegatedAdminIdentifier().applyValue({ args0 -> args0 })
/**
* The current status of the Security Hub administrator account. Indicates whether the account is currently enabled as a Security Hub administrator
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
}
public object DelegatedAdminMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.securityhub.DelegatedAdmin::class == javaResource::class
override fun map(javaResource: Resource): DelegatedAdmin = DelegatedAdmin(
javaResource as
com.pulumi.awsnative.securityhub.DelegatedAdmin,
)
}
/**
* @see [DelegatedAdmin].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DelegatedAdmin].
*/
public suspend fun delegatedAdmin(
name: String,
block: suspend DelegatedAdminResourceBuilder.() -> Unit,
): DelegatedAdmin {
val builder = DelegatedAdminResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DelegatedAdmin].
* @param name The _unique_ name of the resulting resource.
*/
public fun delegatedAdmin(name: String): DelegatedAdmin {
val builder = DelegatedAdminResourceBuilder()
builder.name(name)
return builder.build()
}