com.pulumi.gcp.spanner.kotlin.InstanceConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.spanner.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.spanner.kotlin.outputs.InstanceConfigReplica
import com.pulumi.gcp.spanner.kotlin.outputs.InstanceConfigReplica.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
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [InstanceConfig].
*/
@PulumiTagMarker
public class InstanceConfigResourceBuilder internal constructor() {
public var name: String? = null
public var args: InstanceConfigArgs = InstanceConfigArgs()
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 InstanceConfigArgsBuilder.() -> Unit) {
val builder = InstanceConfigArgsBuilder()
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(): InstanceConfig {
val builtJavaResource = com.pulumi.gcp.spanner.InstanceConfig(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return InstanceConfig(builtJavaResource)
}
}
/**
* A possible configuration for a Cloud Spanner instance. Configurations
* define the geographic placement of nodes and their replication.
* To get more information about InstanceConfig, see:
* * [API documentation](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instanceConfigs)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/spanner/)
* ## Example Usage
* ## Import
* InstanceConfig can be imported using any of these accepted formats:
* * `projects/{{project}}/instanceConfigs/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, InstanceConfig can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:spanner/instanceConfig:InstanceConfig default projects/{{project}}/instanceConfigs/{{name}}
* ```
* ```sh
* $ pulumi import gcp:spanner/instanceConfig:InstanceConfig default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:spanner/instanceConfig:InstanceConfig default {{name}}
* ```
*/
public class InstanceConfig internal constructor(
override val javaResource: com.pulumi.gcp.spanner.InstanceConfig,
) : KotlinCustomResource(javaResource, InstanceConfigMapper) {
/**
* Base configuration name, e.g. nam3, based on which this configuration is created. Only set for user managed
* configurations. baseConfig must refer to a configuration of type GOOGLE_MANAGED in the same project as this
* configuration.
*/
public val baseConfig: Output
get() = javaResource.baseConfig().applyValue({ args0 -> args0 })
/**
* Output only. Whether this instance config is a Google or User Managed Configuration.
*/
public val configType: Output
get() = javaResource.configType().applyValue({ args0 -> args0 })
/**
* The name of this instance configuration as it appears in UIs.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy