Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.compute.kotlin.RegionInstanceTemplateArgs.kt Maven / Gradle / Ivy
Go to download
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.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RegionInstanceTemplateArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateAdvancedMachineFeaturesArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateAdvancedMachineFeaturesArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateConfidentialInstanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateConfidentialInstanceConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateGuestAcceleratorArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateGuestAcceleratorArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateNetworkInterfaceArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateNetworkInterfaceArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateNetworkPerformanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateNetworkPerformanceConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateReservationAffinityArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateReservationAffinityArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateSchedulingArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateSchedulingArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateServiceAccountArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateServiceAccountArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateShieldedInstanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceTemplateShieldedInstanceConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* ## Import
* Instance templates can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/instanceTemplates/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, instance templates can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default projects/{{project}}/regions/{{region}}/instanceTemplates/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default {{name}}
* ```
* @property advancedMachineFeatures Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below
* @property canIpForward Whether to allow sending and receiving of
* packets with non-matching source or destination IPs. This defaults to false.
* @property confidentialInstanceConfig Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below
* @property description A brief description of this resource.
* @property disks Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
* @property enableDisplay Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance.
* **Note**: `allow_stopping_for_update` must be set to true in order to update this field.
* @property guestAccelerators List of the type and count of accelerator cards attached to the instance. Structure documented below.
* @property instanceDescription A brief description to use for instances
* created from this template.
* @property labels A set of key/value label pairs to assign to instances
* created from this template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
* @property machineType The machine type to create.
* To create a machine with a [custom type](https://cloud.google.com/dataproc/docs/concepts/compute/custom-machine-types) (such as extended memory), format the value like `custom-VCPUS-MEM_IN_MB` like `custom-6-20480` for 6 vCPU and 20GB of RAM.
* - - -
* @property metadata Metadata key/value pairs to make available from
* within instances created from this template.
* @property metadataStartupScript An alternative to using the
* startup-script metadata key, mostly to match the compute_instance resource.
* This replaces the startup-script metadata key on the created instance and
* thus the two mechanisms are not allowed to be used simultaneously.
* @property minCpuPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
* `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
* @property name
* @property namePrefix Creates a unique name beginning with the specified
* prefix. Conflicts with `name`.
* @property networkInterfaces Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
* @property networkPerformanceConfig Configures network performance settings for the instance created from the
* template. Structure is documented below. **Note**: `machine_type`
* must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration),
* the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image)
* in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC`
* in order for this setting to take effect.
* @property project The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
* @property region The Region in which the resource belongs.
* If region is not provided, the provider region is used.
* @property reservationAffinity Specifies the reservations that this instance can consume from.
* Structure is documented below.
* @property resourceManagerTags A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
* @property resourcePolicies - A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
* @property scheduling The scheduling strategy to use. More details about
* this configuration option are detailed below.
* @property serviceAccount Service account to attach to the instance. Structure is documented below.
* @property shieldedInstanceConfig Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below.
* **Note**: `shielded_instance_config` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images).
* @property tags Tags to attach to the instance.
*/
public data class RegionInstanceTemplateArgs(
public val advancedMachineFeatures: Output? =
null,
public val canIpForward: Output? = null,
public val confidentialInstanceConfig: Output? = null,
public val description: Output? = null,
public val disks: Output>? = null,
public val enableDisplay: Output? = null,
public val guestAccelerators: Output>? = null,
public val instanceDescription: Output? = null,
public val labels: Output>? = null,
public val machineType: Output? = null,
public val metadata: Output>? = null,
public val metadataStartupScript: Output? = null,
public val minCpuPlatform: Output? = null,
public val name: Output? = null,
public val namePrefix: Output? = null,
public val networkInterfaces: Output>? = null,
public val networkPerformanceConfig: Output? =
null,
public val project: Output? = null,
public val region: Output? = null,
public val reservationAffinity: Output? = null,
public val resourceManagerTags: Output>? = null,
public val resourcePolicies: Output? = null,
public val scheduling: Output? = null,
public val serviceAccount: Output? = null,
public val shieldedInstanceConfig: Output? =
null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.RegionInstanceTemplateArgs =
com.pulumi.gcp.compute.RegionInstanceTemplateArgs.builder()
.advancedMachineFeatures(
advancedMachineFeatures?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.canIpForward(canIpForward?.applyValue({ args0 -> args0 }))
.confidentialInstanceConfig(
confidentialInstanceConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.description(description?.applyValue({ args0 -> args0 }))
.disks(disks?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.enableDisplay(enableDisplay?.applyValue({ args0 -> args0 }))
.guestAccelerators(
guestAccelerators?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.instanceDescription(instanceDescription?.applyValue({ args0 -> args0 }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.machineType(machineType?.applyValue({ args0 -> args0 }))
.metadata(
metadata?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.metadataStartupScript(metadataStartupScript?.applyValue({ args0 -> args0 }))
.minCpuPlatform(minCpuPlatform?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namePrefix(namePrefix?.applyValue({ args0 -> args0 }))
.networkInterfaces(
networkInterfaces?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.networkPerformanceConfig(
networkPerformanceConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.project(project?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.reservationAffinity(
reservationAffinity?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.resourceManagerTags(
resourceManagerTags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.resourcePolicies(resourcePolicies?.applyValue({ args0 -> args0 }))
.scheduling(scheduling?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.serviceAccount(serviceAccount?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.shieldedInstanceConfig(
shieldedInstanceConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [RegionInstanceTemplateArgs].
*/
@PulumiTagMarker
public class RegionInstanceTemplateArgsBuilder internal constructor() {
private var advancedMachineFeatures: Output? =
null
private var canIpForward: Output? = null
private var confidentialInstanceConfig:
Output? = null
private var description: Output? = null
private var disks: Output>? = null
private var enableDisplay: Output? = null
private var guestAccelerators: Output>? = null
private var instanceDescription: Output? = null
private var labels: Output>? = null
private var machineType: Output? = null
private var metadata: Output>? = null
private var metadataStartupScript: Output? = null
private var minCpuPlatform: Output? = null
private var name: Output? = null
private var namePrefix: Output? = null
private var networkInterfaces: Output>? = null
private var networkPerformanceConfig: Output? =
null
private var project: Output? = null
private var region: Output? = null
private var reservationAffinity: Output? = null
private var resourceManagerTags: Output>? = null
private var resourcePolicies: Output? = null
private var scheduling: Output? = null
private var serviceAccount: Output? = null
private var shieldedInstanceConfig: Output? =
null
private var tags: Output>? = null
/**
* @param value Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below
*/
@JvmName("ttappsadvldbnbjj")
public suspend fun advancedMachineFeatures(`value`: Output) {
this.advancedMachineFeatures = value
}
/**
* @param value Whether to allow sending and receiving of
* packets with non-matching source or destination IPs. This defaults to false.
*/
@JvmName("dvegaddsmpqdrexd")
public suspend fun canIpForward(`value`: Output) {
this.canIpForward = value
}
/**
* @param value Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below
*/
@JvmName("ppdfiulmqwbbjdpt")
public suspend fun confidentialInstanceConfig(`value`: Output) {
this.confidentialInstanceConfig = value
}
/**
* @param value A brief description of this resource.
*/
@JvmName("iiwxwvqijhdtrkvh")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("vhcmphdgmthlbjbr")
public suspend fun disks(`value`: Output>) {
this.disks = value
}
@JvmName("ckvmebjccagiqisb")
public suspend fun disks(vararg values: Output) {
this.disks = Output.all(values.asList())
}
/**
* @param values Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("qvkvjtdeclswjnla")
public suspend fun disks(values: List>) {
this.disks = Output.all(values)
}
/**
* @param value Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance.
* **Note**: `allow_stopping_for_update` must be set to true in order to update this field.
*/
@JvmName("xkdqcypmsvpjklqn")
public suspend fun enableDisplay(`value`: Output) {
this.enableDisplay = value
}
/**
* @param value List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("utbdwxqhgdcpgldw")
public suspend fun guestAccelerators(`value`: Output>) {
this.guestAccelerators = value
}
@JvmName("ckvmewskqtgmkhwr")
public suspend fun guestAccelerators(vararg values: Output) {
this.guestAccelerators = Output.all(values.asList())
}
/**
* @param values List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("jiiwwdlygtfjqujp")
public suspend fun guestAccelerators(values: List>) {
this.guestAccelerators = Output.all(values)
}
/**
* @param value A brief description to use for instances
* created from this template.
*/
@JvmName("vwgfjxddjbwsdsul")
public suspend fun instanceDescription(`value`: Output) {
this.instanceDescription = value
}
/**
* @param value A set of key/value label pairs to assign to instances
* created from this template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*/
@JvmName("onyaipelkvmamjrv")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value The machine type to create.
* To create a machine with a [custom type](https://cloud.google.com/dataproc/docs/concepts/compute/custom-machine-types) (such as extended memory), format the value like `custom-VCPUS-MEM_IN_MB` like `custom-6-20480` for 6 vCPU and 20GB of RAM.
* - - -
*/
@JvmName("wwgcayxsnetjpbqd")
public suspend fun machineType(`value`: Output) {
this.machineType = value
}
/**
* @param value Metadata key/value pairs to make available from
* within instances created from this template.
*/
@JvmName("aljrddmxdrbhnqft")
public suspend fun metadata(`value`: Output>) {
this.metadata = value
}
/**
* @param value An alternative to using the
* startup-script metadata key, mostly to match the compute_instance resource.
* This replaces the startup-script metadata key on the created instance and
* thus the two mechanisms are not allowed to be used simultaneously.
*/
@JvmName("xsktnyqavnjiodhy")
public suspend fun metadataStartupScript(`value`: Output) {
this.metadataStartupScript = value
}
/**
* @param value Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
* `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
*/
@JvmName("xtxqjioxqfrkdcwf")
public suspend fun minCpuPlatform(`value`: Output) {
this.minCpuPlatform = value
}
/**
* @param value
*/
@JvmName("xbnelnvvshynlwtk")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Creates a unique name beginning with the specified
* prefix. Conflicts with `name`.
*/
@JvmName("brhbiajxgyftyjhq")
public suspend fun namePrefix(`value`: Output) {
this.namePrefix = value
}
/**
* @param value Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("oqyenymxdrqgijmb")
public suspend fun networkInterfaces(`value`: Output>) {
this.networkInterfaces = value
}
@JvmName("kdtygygvmxftyblf")
public suspend fun networkInterfaces(vararg values: Output) {
this.networkInterfaces = Output.all(values.asList())
}
/**
* @param values Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("dcebjguvyrovpviu")
public suspend fun networkInterfaces(values: List>) {
this.networkInterfaces = Output.all(values)
}
/**
* @param value Configures network performance settings for the instance created from the
* template. Structure is documented below. **Note**: `machine_type`
* must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration),
* the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image)
* in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC`
* in order for this setting to take effect.
*/
@JvmName("ytkpacyfguhrfmex")
public suspend fun networkPerformanceConfig(`value`: Output) {
this.networkPerformanceConfig = value
}
/**
* @param value The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
@JvmName("pvpktkdakwgoxxen")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The Region in which the resource belongs.
* If region is not provided, the provider region is used.
*/
@JvmName("mhsxhvuhmbeyqhvh")
public suspend fun region(`value`: Output) {
this.region = value
}
/**
* @param value Specifies the reservations that this instance can consume from.
* Structure is documented below.
*/
@JvmName("oknyptstdqkjxvth")
public suspend fun reservationAffinity(`value`: Output) {
this.reservationAffinity = value
}
/**
* @param value A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
*/
@JvmName("lucrkcfiuxnxampl")
public suspend fun resourceManagerTags(`value`: Output>) {
this.resourceManagerTags = value
}
/**
* @param value - A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
*/
@JvmName("tsnpurpnkwlhowix")
public suspend fun resourcePolicies(`value`: Output) {
this.resourcePolicies = value
}
/**
* @param value The scheduling strategy to use. More details about
* this configuration option are detailed below.
*/
@JvmName("tglaovueshouoqyv")
public suspend fun scheduling(`value`: Output) {
this.scheduling = value
}
/**
* @param value Service account to attach to the instance. Structure is documented below.
*/
@JvmName("nmpmifqlgppcgigy")
public suspend fun serviceAccount(`value`: Output) {
this.serviceAccount = value
}
/**
* @param value Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below.
* **Note**: `shielded_instance_config` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images).
*/
@JvmName("sbiaouanwhnquouc")
public suspend fun shieldedInstanceConfig(`value`: Output) {
this.shieldedInstanceConfig = value
}
/**
* @param value Tags to attach to the instance.
*/
@JvmName("sqllcablatnvmdou")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
@JvmName("lnfrwmnxvrhyyrmr")
public suspend fun tags(vararg values: Output) {
this.tags = Output.all(values.asList())
}
/**
* @param values Tags to attach to the instance.
*/
@JvmName("ceohufxyexlskmkj")
public suspend fun tags(values: List>) {
this.tags = Output.all(values)
}
/**
* @param value Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below
*/
@JvmName("rctvgdvmebsadhbn")
public suspend fun advancedMachineFeatures(`value`: RegionInstanceTemplateAdvancedMachineFeaturesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.advancedMachineFeatures = mapped
}
/**
* @param argument Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below
*/
@JvmName("rbosnjlhyeiohljf")
public suspend fun advancedMachineFeatures(argument: suspend RegionInstanceTemplateAdvancedMachineFeaturesArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateAdvancedMachineFeaturesArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.advancedMachineFeatures = mapped
}
/**
* @param value Whether to allow sending and receiving of
* packets with non-matching source or destination IPs. This defaults to false.
*/
@JvmName("qmyxylgrivabvegu")
public suspend fun canIpForward(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.canIpForward = mapped
}
/**
* @param value Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below
*/
@JvmName("gxcjprrrutdqphuu")
public suspend fun confidentialInstanceConfig(`value`: RegionInstanceTemplateConfidentialInstanceConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.confidentialInstanceConfig = mapped
}
/**
* @param argument Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below
*/
@JvmName("bxptglpucaeppafx")
public suspend fun confidentialInstanceConfig(argument: suspend RegionInstanceTemplateConfidentialInstanceConfigArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateConfidentialInstanceConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.confidentialInstanceConfig = mapped
}
/**
* @param value A brief description of this resource.
*/
@JvmName("pomwxxrnslnsifla")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("aatakyqhlqseryia")
public suspend fun disks(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.disks = mapped
}
/**
* @param argument Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("jxptatjlrhybvapc")
public suspend fun disks(argument: List Unit>) {
val toBeMapped = argument.toList().map {
RegionInstanceTemplateDiskArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.disks = mapped
}
/**
* @param argument Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("faedixxwauxqhnpr")
public suspend fun disks(vararg argument: suspend RegionInstanceTemplateDiskArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
RegionInstanceTemplateDiskArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.disks = mapped
}
/**
* @param argument Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("ovjxpnhsusimgveh")
public suspend fun disks(argument: suspend RegionInstanceTemplateDiskArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
RegionInstanceTemplateDiskArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.disks = mapped
}
/**
* @param values Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
@JvmName("jytuajxfwnlyavyt")
public suspend fun disks(vararg values: RegionInstanceTemplateDiskArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.disks = mapped
}
/**
* @param value Enable [Virtual Displays](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display#verify_display_driver) on this instance.
* **Note**: `allow_stopping_for_update` must be set to true in order to update this field.
*/
@JvmName("qkoopfuhvtdfakar")
public suspend fun enableDisplay(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableDisplay = mapped
}
/**
* @param value List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("rjnpflutxwwmtdjv")
public suspend fun guestAccelerators(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.guestAccelerators = mapped
}
/**
* @param argument List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("vvleihuwgyhtyixd")
public suspend fun guestAccelerators(argument: List Unit>) {
val toBeMapped = argument.toList().map {
RegionInstanceTemplateGuestAcceleratorArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.guestAccelerators = mapped
}
/**
* @param argument List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("tktxketmrxkagyom")
public suspend fun guestAccelerators(vararg argument: suspend RegionInstanceTemplateGuestAcceleratorArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
RegionInstanceTemplateGuestAcceleratorArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.guestAccelerators = mapped
}
/**
* @param argument List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("lwgddgifvqgmodjm")
public suspend fun guestAccelerators(argument: suspend RegionInstanceTemplateGuestAcceleratorArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
RegionInstanceTemplateGuestAcceleratorArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.guestAccelerators = mapped
}
/**
* @param values List of the type and count of accelerator cards attached to the instance. Structure documented below.
*/
@JvmName("scdgfrjsfodlewba")
public suspend fun guestAccelerators(vararg values: RegionInstanceTemplateGuestAcceleratorArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.guestAccelerators = mapped
}
/**
* @param value A brief description to use for instances
* created from this template.
*/
@JvmName("tafcpfqnunwargjp")
public suspend fun instanceDescription(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instanceDescription = mapped
}
/**
* @param value A set of key/value label pairs to assign to instances
* created from this template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*/
@JvmName("mhhcgfkohjbnjdjk")
public suspend fun labels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param values A set of key/value label pairs to assign to instances
* created from this template.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*/
@JvmName("hwovycnginipccxl")
public fun labels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param value The machine type to create.
* To create a machine with a [custom type](https://cloud.google.com/dataproc/docs/concepts/compute/custom-machine-types) (such as extended memory), format the value like `custom-VCPUS-MEM_IN_MB` like `custom-6-20480` for 6 vCPU and 20GB of RAM.
* - - -
*/
@JvmName("rtsninsmcgvtkwji")
public suspend fun machineType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.machineType = mapped
}
/**
* @param value Metadata key/value pairs to make available from
* within instances created from this template.
*/
@JvmName("beeewsvyoheyjbrp")
public suspend fun metadata(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param values Metadata key/value pairs to make available from
* within instances created from this template.
*/
@JvmName("pcfuhkudmudgyavr")
public fun metadata(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param value An alternative to using the
* startup-script metadata key, mostly to match the compute_instance resource.
* This replaces the startup-script metadata key on the created instance and
* thus the two mechanisms are not allowed to be used simultaneously.
*/
@JvmName("tlemxbxxqrwfjrao")
public suspend fun metadataStartupScript(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metadataStartupScript = mapped
}
/**
* @param value Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
* `Intel Haswell` or `Intel Skylake`. See the complete list [here](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
*/
@JvmName("rrikoauxduyhxfpi")
public suspend fun minCpuPlatform(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minCpuPlatform = mapped
}
/**
* @param value
*/
@JvmName("eswoxpfnhlutdbow")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Creates a unique name beginning with the specified
* prefix. Conflicts with `name`.
*/
@JvmName("dhivxgrtwvbrbabw")
public suspend fun namePrefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namePrefix = mapped
}
/**
* @param value Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("rdqopmfggdrxbmlb")
public suspend fun networkInterfaces(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkInterfaces = mapped
}
/**
* @param argument Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("xakrravgsxqreqws")
public suspend fun networkInterfaces(argument: List Unit>) {
val toBeMapped = argument.toList().map {
RegionInstanceTemplateNetworkInterfaceArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.networkInterfaces = mapped
}
/**
* @param argument Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("udyakqolgtixoifn")
public suspend fun networkInterfaces(vararg argument: suspend RegionInstanceTemplateNetworkInterfaceArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
RegionInstanceTemplateNetworkInterfaceArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.networkInterfaces = mapped
}
/**
* @param argument Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("xktoedkdgktoflwf")
public suspend fun networkInterfaces(argument: suspend RegionInstanceTemplateNetworkInterfaceArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
RegionInstanceTemplateNetworkInterfaceArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.networkInterfaces = mapped
}
/**
* @param values Networks to attach to instances created from
* this template. This can be specified multiple times for multiple networks.
* Structure is documented below.
*/
@JvmName("rjwltrgdhtnqhluj")
public suspend fun networkInterfaces(vararg values: RegionInstanceTemplateNetworkInterfaceArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.networkInterfaces = mapped
}
/**
* @param value Configures network performance settings for the instance created from the
* template. Structure is documented below. **Note**: `machine_type`
* must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration),
* the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image)
* in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC`
* in order for this setting to take effect.
*/
@JvmName("mdgtfxywshxjnwwv")
public suspend fun networkPerformanceConfig(`value`: RegionInstanceTemplateNetworkPerformanceConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkPerformanceConfig = mapped
}
/**
* @param argument Configures network performance settings for the instance created from the
* template. Structure is documented below. **Note**: `machine_type`
* must be a [supported type](https://cloud.google.com/compute/docs/networking/configure-vm-with-high-bandwidth-configuration),
* the `image` used must include the [`GVNIC`](https://cloud.google.com/compute/docs/networking/using-gvnic#create-instance-gvnic-image)
* in `guest-os-features`, and `network_interface.0.nic-type` must be `GVNIC`
* in order for this setting to take effect.
*/
@JvmName("yhamsfwihqhhljcf")
public suspend fun networkPerformanceConfig(argument: suspend RegionInstanceTemplateNetworkPerformanceConfigArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateNetworkPerformanceConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.networkPerformanceConfig = mapped
}
/**
* @param value The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
@JvmName("pybvxyntdlapabae")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value The Region in which the resource belongs.
* If region is not provided, the provider region is used.
*/
@JvmName("rbdigicncxmxsnwc")
public suspend fun region(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.region = mapped
}
/**
* @param value Specifies the reservations that this instance can consume from.
* Structure is documented below.
*/
@JvmName("vqsbicywwcqcyfnb")
public suspend fun reservationAffinity(`value`: RegionInstanceTemplateReservationAffinityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.reservationAffinity = mapped
}
/**
* @param argument Specifies the reservations that this instance can consume from.
* Structure is documented below.
*/
@JvmName("gispvgmxbhqbxkra")
public suspend fun reservationAffinity(argument: suspend RegionInstanceTemplateReservationAffinityArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateReservationAffinityArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.reservationAffinity = mapped
}
/**
* @param value A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
*/
@JvmName("ahwgwmynqsajkmeq")
public suspend fun resourceManagerTags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceManagerTags = mapped
}
/**
* @param values A set of key/value resource manager tag pairs to bind to the instance. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
*/
@JvmName("phrwwymogsisxfgp")
public fun resourceManagerTags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceManagerTags = mapped
}
/**
* @param value - A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
*/
@JvmName("ggmepqmogbfsjias")
public suspend fun resourcePolicies(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourcePolicies = mapped
}
/**
* @param value The scheduling strategy to use. More details about
* this configuration option are detailed below.
*/
@JvmName("fvmnaqeurahegvrn")
public suspend fun scheduling(`value`: RegionInstanceTemplateSchedulingArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scheduling = mapped
}
/**
* @param argument The scheduling strategy to use. More details about
* this configuration option are detailed below.
*/
@JvmName("iiftonelheanqvep")
public suspend fun scheduling(argument: suspend RegionInstanceTemplateSchedulingArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateSchedulingArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.scheduling = mapped
}
/**
* @param value Service account to attach to the instance. Structure is documented below.
*/
@JvmName("lxjrbgjfpiivgcwg")
public suspend fun serviceAccount(`value`: RegionInstanceTemplateServiceAccountArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceAccount = mapped
}
/**
* @param argument Service account to attach to the instance. Structure is documented below.
*/
@JvmName("hjajvutbsfskkaav")
public suspend fun serviceAccount(argument: suspend RegionInstanceTemplateServiceAccountArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateServiceAccountArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.serviceAccount = mapped
}
/**
* @param value Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below.
* **Note**: `shielded_instance_config` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images).
*/
@JvmName("jbdknuwicmjppyxr")
public suspend fun shieldedInstanceConfig(`value`: RegionInstanceTemplateShieldedInstanceConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.shieldedInstanceConfig = mapped
}
/**
* @param argument Enable [Shielded VM](https://cloud.google.com/security/shielded-cloud/shielded-vm) on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below.
* **Note**: `shielded_instance_config` can only be used with boot images with shielded vm support. See the complete list [here](https://cloud.google.com/compute/docs/images#shielded-images).
*/
@JvmName("isuwefsgqnvrfqsg")
public suspend fun shieldedInstanceConfig(argument: suspend RegionInstanceTemplateShieldedInstanceConfigArgsBuilder.() -> Unit) {
val toBeMapped = RegionInstanceTemplateShieldedInstanceConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.shieldedInstanceConfig = mapped
}
/**
* @param value Tags to attach to the instance.
*/
@JvmName("akxwvgyjqhbgfomv")
public suspend fun tags(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Tags to attach to the instance.
*/
@JvmName("punjwhjbmlijtvac")
public suspend fun tags(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): RegionInstanceTemplateArgs = RegionInstanceTemplateArgs(
advancedMachineFeatures = advancedMachineFeatures,
canIpForward = canIpForward,
confidentialInstanceConfig = confidentialInstanceConfig,
description = description,
disks = disks,
enableDisplay = enableDisplay,
guestAccelerators = guestAccelerators,
instanceDescription = instanceDescription,
labels = labels,
machineType = machineType,
metadata = metadata,
metadataStartupScript = metadataStartupScript,
minCpuPlatform = minCpuPlatform,
name = name,
namePrefix = namePrefix,
networkInterfaces = networkInterfaces,
networkPerformanceConfig = networkPerformanceConfig,
project = project,
region = region,
reservationAffinity = reservationAffinity,
resourceManagerTags = resourceManagerTags,
resourcePolicies = resourcePolicies,
scheduling = scheduling,
serviceAccount = serviceAccount,
shieldedInstanceConfig = shieldedInstanceConfig,
tags = tags,
)
}