com.pulumi.awsnative.eks.kotlin.Addon.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.eks.kotlin
import com.pulumi.awsnative.eks.kotlin.enums.AddonResolveConflicts
import com.pulumi.awsnative.eks.kotlin.outputs.AddonPodIdentityAssociation
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import com.pulumi.awsnative.eks.kotlin.enums.AddonResolveConflicts.Companion.toKotlin as addonResolveConflictsToKotlin
import com.pulumi.awsnative.eks.kotlin.outputs.AddonPodIdentityAssociation.Companion.toKotlin as addonPodIdentityAssociationToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Addon].
*/
@PulumiTagMarker
public class AddonResourceBuilder internal constructor() {
public var name: String? = null
public var args: AddonArgs = AddonArgs()
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 AddonArgsBuilder.() -> Unit) {
val builder = AddonArgsBuilder()
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(): Addon {
val builtJavaResource = com.pulumi.awsnative.eks.Addon(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Addon(builtJavaResource)
}
}
/**
* Resource Schema for AWS::EKS::Addon
*/
public class Addon internal constructor(
override val javaResource: com.pulumi.awsnative.eks.Addon,
) : KotlinCustomResource(javaResource, AddonMapper) {
/**
* Name of Addon
*/
public val addonName: Output
get() = javaResource.addonName().applyValue({ args0 -> args0 })
/**
* Version of Addon
*/
public val addonVersion: Output?
get() = javaResource.addonVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Amazon Resource Name (ARN) of the add-on
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Name of Cluster
*/
public val clusterName: Output
get() = javaResource.clusterName().applyValue({ args0 -> args0 })
/**
* The configuration values to use with the add-on
*/
public val configurationValues: Output?
get() = javaResource.configurationValues().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An array of pod identities to apply to this add-on.
*/
public val podIdentityAssociations: Output>?
get() = javaResource.podIdentityAssociations().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
addonPodIdentityAssociationToKotlin(args0)
})
})
}).orElse(null)
})
/**
* PreserveOnDelete parameter value
*/
public val preserveOnDelete: Output?
get() = javaResource.preserveOnDelete().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Resolve parameter value conflicts
*/
public val resolveConflicts: Output?
get() = javaResource.resolveConflicts().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> addonResolveConflictsToKotlin(args0) })
}).orElse(null)
})
/**
* IAM role to bind to the add-on's service account
*/
public val serviceAccountRoleArn: Output?
get() = javaResource.serviceAccountRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An array of key-value pairs to apply to this resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object AddonMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.eks.Addon::class == javaResource::class
override fun map(javaResource: Resource): Addon = Addon(
javaResource as
com.pulumi.awsnative.eks.Addon,
)
}
/**
* @see [Addon].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Addon].
*/
public suspend fun addon(name: String, block: suspend AddonResourceBuilder.() -> Unit): Addon {
val builder = AddonResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Addon].
* @param name The _unique_ name of the resulting resource.
*/
public fun addon(name: String): Addon {
val builder = AddonResourceBuilder()
builder.name(name)
return builder.build()
}