
com.pulumi.googlenative.remotebuildexecution.v1alpha.kotlin.Instance.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.remotebuildexecution.v1alpha.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.remotebuildexecution.v1alpha.kotlin.outputs.GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyResponse
import com.pulumi.googlenative.remotebuildexecution.v1alpha.kotlin.outputs.GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyResponse.Companion.toKotlin
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 [Instance].
*/
@PulumiTagMarker
public class InstanceResourceBuilder internal constructor() {
public var name: String? = null
public var args: InstanceArgs = InstanceArgs()
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 InstanceArgsBuilder.() -> Unit) {
val builder = InstanceArgsBuilder()
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(): Instance {
val builtJavaResource =
com.pulumi.googlenative.remotebuildexecution.v1alpha.Instance(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Instance(builtJavaResource)
}
}
/**
* Creates a new instance in the specified region. Returns a long running operation which contains an instance on completion. While the long running operation is in progress, any call to `GetInstance` returns an instance in state `CREATING`.
* Auto-naming is currently not supported for this resource.
*/
public class Instance internal constructor(
override val javaResource: com.pulumi.googlenative.remotebuildexecution.v1alpha.Instance,
) : KotlinCustomResource(javaResource, InstanceMapper) {
/**
* The policy to define whether or not RBE features can be used or how they can be used.
*/
public val featurePolicy:
Output
get() = javaResource.featurePolicy().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
/**
* The location is a GCP region. Currently only `us-central1` is supported.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Whether stack driver logging is enabled for the instance.
*/
public val loggingEnabled: Output
get() = javaResource.loggingEnabled().applyValue({ args0 -> args0 })
/**
* Instance resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be populated when creating an instance since it is provided in the `instance_id` field.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* State of the instance.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
}
public object InstanceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.remotebuildexecution.v1alpha.Instance::class == javaResource::class
override fun map(javaResource: Resource): Instance = Instance(
javaResource as
com.pulumi.googlenative.remotebuildexecution.v1alpha.Instance,
)
}
/**
* @see [Instance].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Instance].
*/
public suspend fun instance(name: String, block: suspend InstanceResourceBuilder.() -> Unit): Instance {
val builder = InstanceResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Instance].
* @param name The _unique_ name of the resulting resource.
*/
public fun instance(name: String): Instance {
val builder = InstanceResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy