
com.pulumi.awsnative.lightsail.kotlin.Container.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.lightsail.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.lightsail.kotlin.outputs.ContainerPrivateRegistryAccess
import com.pulumi.awsnative.lightsail.kotlin.outputs.ContainerPublicDomainName
import com.pulumi.awsnative.lightsail.kotlin.outputs.ContainerServiceDeployment
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.lightsail.kotlin.outputs.ContainerPrivateRegistryAccess.Companion.toKotlin as containerPrivateRegistryAccessToKotlin
import com.pulumi.awsnative.lightsail.kotlin.outputs.ContainerPublicDomainName.Companion.toKotlin as containerPublicDomainNameToKotlin
import com.pulumi.awsnative.lightsail.kotlin.outputs.ContainerServiceDeployment.Companion.toKotlin as containerServiceDeploymentToKotlin
/**
* Builder for [Container].
*/
@PulumiTagMarker
public class ContainerResourceBuilder internal constructor() {
public var name: String? = null
public var args: ContainerArgs = ContainerArgs()
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 ContainerArgsBuilder.() -> Unit) {
val builder = ContainerArgsBuilder()
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(): Container {
val builtJavaResource = com.pulumi.awsnative.lightsail.Container(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Container(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Lightsail::Container
*/
public class Container internal constructor(
override val javaResource: com.pulumi.awsnative.lightsail.Container,
) : KotlinCustomResource(javaResource, ContainerMapper) {
/**
* The Amazon Resource Name (ARN) of the container.
*/
public val containerArn: Output
get() = javaResource.containerArn().applyValue({ args0 -> args0 })
/**
* Describes a container deployment configuration of an Amazon Lightsail container service.
*/
public val containerServiceDeployment: Output?
get() = javaResource.containerServiceDeployment().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> containerServiceDeploymentToKotlin(args0) })
}).orElse(null)
})
/**
* A Boolean value to indicate whether the container service is disabled.
*/
public val isDisabled: Output?
get() = javaResource.isDisabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The power specification for the container service.
*/
public val power: Output
get() = javaResource.power().applyValue({ args0 -> args0 })
/**
* The principal ARN of the container service.
*/
public val principalArn: Output
get() = javaResource.principalArn().applyValue({ args0 -> args0 })
/**
* A Boolean value to indicate whether the container service has access to private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.
*/
public val privateRegistryAccess: Output?
get() = javaResource.privateRegistryAccess().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> containerPrivateRegistryAccessToKotlin(args0) })
}).orElse(null)
})
/**
* The public domain names to use with the container service, such as example.com and www.example.com.
*/
public val publicDomainNames: Output>?
get() = javaResource.publicDomainNames().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
containerPublicDomainNameToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The scale specification for the container service.
*/
public val scale: Output
get() = javaResource.scale().applyValue({ args0 -> args0 })
/**
* The name for the container service.
*/
public val serviceName: Output
get() = javaResource.serviceName().applyValue({ args0 -> args0 })
/**
* 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)
})
/**
* The publicly accessible URL of the container service.
*/
public val url: Output
get() = javaResource.url().applyValue({ args0 -> args0 })
}
public object ContainerMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.lightsail.Container::class == javaResource::class
override fun map(javaResource: Resource): Container = Container(
javaResource as
com.pulumi.awsnative.lightsail.Container,
)
}
/**
* @see [Container].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Container].
*/
public suspend fun container(name: String, block: suspend ContainerResourceBuilder.() -> Unit): Container {
val builder = ContainerResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Container].
* @param name The _unique_ name of the resulting resource.
*/
public fun container(name: String): Container {
val builder = ContainerResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy