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.InstanceFromMachineImageArgs.kt Maven / Gradle / Ivy
@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.InstanceFromMachineImageArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageAdvancedMachineFeaturesArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageAdvancedMachineFeaturesArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageConfidentialInstanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageConfidentialInstanceConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageGuestAcceleratorArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageGuestAcceleratorArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageNetworkInterfaceArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageNetworkInterfaceArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageNetworkPerformanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageNetworkPerformanceConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageParamsArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageParamsArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageReservationAffinityArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageReservationAffinityArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageSchedulingArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageSchedulingArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageServiceAccountArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageServiceAccountArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageShieldedInstanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromMachineImageShieldedInstanceConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
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
/**
* Manages a VM instance resource within GCE. For more information see
* [the official documentation](https://cloud.google.com/compute/docs/instances)
* and
* [API](https://cloud.google.com/compute/docs/reference/latest/instances).
* This resource is specifically to create a compute instance from a given
* `source_machine_image`. To create an instance without a machine image, use the
* `gcp.compute.Instance` resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const tpl = new gcp.compute.InstanceFromMachineImage("tpl", {
* name: "instance-from-machine-image",
* zone: "us-central1-a",
* sourceMachineImage: "projects/PROJECT-ID/global/machineImages/NAME",
* canIpForward: false,
* labels: {
* my_key: "my_value",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* tpl = gcp.compute.InstanceFromMachineImage("tpl",
* name="instance-from-machine-image",
* zone="us-central1-a",
* source_machine_image="projects/PROJECT-ID/global/machineImages/NAME",
* can_ip_forward=False,
* labels={
* "my_key": "my_value",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var tpl = new Gcp.Compute.InstanceFromMachineImage("tpl", new()
* {
* Name = "instance-from-machine-image",
* Zone = "us-central1-a",
* SourceMachineImage = "projects/PROJECT-ID/global/machineImages/NAME",
* CanIpForward = false,
* Labels =
* {
* { "my_key", "my_value" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewInstanceFromMachineImage(ctx, "tpl", &compute.InstanceFromMachineImageArgs{
* Name: pulumi.String("instance-from-machine-image"),
* Zone: pulumi.String("us-central1-a"),
* SourceMachineImage: pulumi.String("projects/PROJECT-ID/global/machineImages/NAME"),
* CanIpForward: pulumi.Bool(false),
* Labels: pulumi.StringMap{
* "my_key": pulumi.String("my_value"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.InstanceFromMachineImage;
* import com.pulumi.gcp.compute.InstanceFromMachineImageArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var tpl = new InstanceFromMachineImage("tpl", InstanceFromMachineImageArgs.builder()
* .name("instance-from-machine-image")
* .zone("us-central1-a")
* .sourceMachineImage("projects/PROJECT-ID/global/machineImages/NAME")
* .canIpForward(false)
* .labels(Map.of("my_key", "my_value"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* tpl:
* type: gcp:compute:InstanceFromMachineImage
* properties:
* name: instance-from-machine-image
* zone: us-central1-a
* sourceMachineImage: projects/PROJECT-ID/global/machineImages/NAME
* canIpForward: false
* labels:
* my_key: my_value
* ```
*
* @property advancedMachineFeatures Controls for advanced machine-related behavior features.
* @property allowStoppingForUpdate
* @property canIpForward Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
* @property confidentialInstanceConfig The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
* to create.
* @property deletionProtection Whether deletion protection is enabled on this instance.
* @property description A brief description of the resource.
* @property desiredStatus Desired status of the instance. Either "RUNNING" or "TERMINATED".
* @property enableDisplay Whether the instance has virtual displays enabled.
* @property guestAccelerators List of the type and count of accelerator cards attached to the instance.
* @property hostname A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of
* labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not
* exceed 253 characters. Changing this forces a new resource to be created.
* @property labels A set of key/value label pairs assigned to the instance. **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.
* @property metadata Metadata key/value pairs made available within the instance.
* @property metadataStartupScript Metadata startup scripts made available within the instance.
* @property minCpuPlatform The minimum CPU platform specified for the VM instance.
* @property name A unique name for the resource, required by GCE.
* Changing this forces a new resource to be created.
* @property networkInterfaces The networks attached to the instance.
* @property networkPerformanceConfig Configures network performance settings for the instance. If not specified, the instance will be created with its
* default network performance configuration.
* @property params Stores additional params passed with the request, but not persisted as part of resource payload.
* @property partnerMetadata Partner Metadata Map made available within the instance.
* @property project The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither
* self_link nor project are provided, the provider project is used.
* @property reservationAffinity Specifies the reservations that this instance can consume from.
* @property resourcePolicies A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.
* @property scheduling The scheduling strategy being used by the instance.
* @property serviceAccount The service account to attach to the instance.
* @property shieldedInstanceConfig The shielded vm config being used by the instance.
* @property sourceMachineImage Name or self link of a machine
* image to create the instance based on.
* - - -
* @property tags The list of tags attached to the instance.
* @property zone The zone that the machine should be created in. If not
* set, the provider zone is used.
* In addition to these, most* arguments from `gcp.compute.Instance` are supported
* as a way to override the properties in the machine image. All exported attributes
* from `gcp.compute.Instance` are likewise exported here.
* > **Warning:** *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.
*/
public data class InstanceFromMachineImageArgs(
public val advancedMachineFeatures: Output? =
null,
public val allowStoppingForUpdate: Output? = null,
public val canIpForward: Output? = null,
public val confidentialInstanceConfig: Output? = null,
public val deletionProtection: Output? = null,
public val description: Output? = null,
public val desiredStatus: Output? = null,
public val enableDisplay: Output? = null,
public val guestAccelerators: Output>? = null,
public val hostname: 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 networkInterfaces: Output>? = null,
public val networkPerformanceConfig: Output? =
null,
public val params: Output? = null,
public val partnerMetadata: Output>? = null,
public val project: Output? = null,
public val reservationAffinity: Output? = null,
public val resourcePolicies: Output? = null,
public val scheduling: Output? = null,
public val serviceAccount: Output? = null,
public val shieldedInstanceConfig: Output? =
null,
public val sourceMachineImage: Output? = null,
public val tags: Output>? = null,
public val zone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.InstanceFromMachineImageArgs =
com.pulumi.gcp.compute.InstanceFromMachineImageArgs.builder()
.advancedMachineFeatures(
advancedMachineFeatures?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.allowStoppingForUpdate(allowStoppingForUpdate?.applyValue({ args0 -> args0 }))
.canIpForward(canIpForward?.applyValue({ args0 -> args0 }))
.confidentialInstanceConfig(
confidentialInstanceConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.deletionProtection(deletionProtection?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.desiredStatus(desiredStatus?.applyValue({ args0 -> args0 }))
.enableDisplay(enableDisplay?.applyValue({ args0 -> args0 }))
.guestAccelerators(
guestAccelerators?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.hostname(hostname?.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 }))
.networkInterfaces(
networkInterfaces?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.networkPerformanceConfig(
networkPerformanceConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.params(params?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.partnerMetadata(
partnerMetadata?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.project(project?.applyValue({ args0 -> args0 }))
.reservationAffinity(
reservationAffinity?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.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()
})
}),
)
.sourceMachineImage(sourceMachineImage?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.zone(zone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [InstanceFromMachineImageArgs].
*/
@PulumiTagMarker
public class InstanceFromMachineImageArgsBuilder internal constructor() {
private var advancedMachineFeatures: Output? =
null
private var allowStoppingForUpdate: Output? = null
private var canIpForward: Output? = null
private var confidentialInstanceConfig:
Output? = null
private var deletionProtection: Output? = null
private var description: Output? = null
private var desiredStatus: Output? = null
private var enableDisplay: Output? = null
private var guestAccelerators: Output>? = null
private var hostname: 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 networkInterfaces: Output>? = null
private var networkPerformanceConfig:
Output? = null
private var params: Output? = null
private var partnerMetadata: Output>? = null
private var project: Output? = null
private var reservationAffinity: Output? = null
private var resourcePolicies: Output? = null
private var scheduling: Output? = null
private var serviceAccount: Output? = null
private var shieldedInstanceConfig: Output? =
null
private var sourceMachineImage: Output? = null
private var tags: Output>? = null
private var zone: Output? = null
/**
* @param value Controls for advanced machine-related behavior features.
*/
@JvmName("nfcxbmjnlurkmvgk")
public suspend fun advancedMachineFeatures(`value`: Output) {
this.advancedMachineFeatures = value
}
/**
* @param value
*/
@JvmName("aajxlufgqaegeoad")
public suspend fun allowStoppingForUpdate(`value`: Output) {
this.allowStoppingForUpdate = value
}
/**
* @param value Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
*/
@JvmName("gfikgpqqgygbqdar")
public suspend fun canIpForward(`value`: Output) {
this.canIpForward = value
}
/**
* @param value The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
* to create.
*/
@JvmName("ujomlspynewijqal")
public suspend fun confidentialInstanceConfig(`value`: Output) {
this.confidentialInstanceConfig = value
}
/**
* @param value Whether deletion protection is enabled on this instance.
*/
@JvmName("xotniopsdhsykdfs")
public suspend fun deletionProtection(`value`: Output) {
this.deletionProtection = value
}
/**
* @param value A brief description of the resource.
*/
@JvmName("ntmayfutmlusjnxs")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Desired status of the instance. Either "RUNNING" or "TERMINATED".
*/
@JvmName("qmpjgaypgexyaxny")
public suspend fun desiredStatus(`value`: Output) {
this.desiredStatus = value
}
/**
* @param value Whether the instance has virtual displays enabled.
*/
@JvmName("wefgonqixiagvdql")
public suspend fun enableDisplay(`value`: Output) {
this.enableDisplay = value
}
/**
* @param value List of the type and count of accelerator cards attached to the instance.
*/
@JvmName("simxrnwrcefoyvdf")
public suspend fun guestAccelerators(`value`: Output>) {
this.guestAccelerators = value
}
@JvmName("eeuknoujcethqutg")
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.
*/
@JvmName("pkdfigddafobieqo")
public suspend fun guestAccelerators(values: List>) {
this.guestAccelerators = Output.all(values)
}
/**
* @param value A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of
* labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not
* exceed 253 characters. Changing this forces a new resource to be created.
*/
@JvmName("wxourayxehjbhsic")
public suspend fun hostname(`value`: Output) {
this.hostname = value
}
/**
* @param value A set of key/value label pairs assigned to the instance. **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("ffsdpvuhbuostukc")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value The machine type to create.
*/
@JvmName("ekjntqasnvbkorbs")
public suspend fun machineType(`value`: Output) {
this.machineType = value
}
/**
* @param value Metadata key/value pairs made available within the instance.
*/
@JvmName("ovcbqcpdgtsvwyxe")
public suspend fun metadata(`value`: Output>) {
this.metadata = value
}
/**
* @param value Metadata startup scripts made available within the instance.
*/
@JvmName("mpgmdrohgpftvqex")
public suspend fun metadataStartupScript(`value`: Output) {
this.metadataStartupScript = value
}
/**
* @param value The minimum CPU platform specified for the VM instance.
*/
@JvmName("juqhegnwtbnlqvfc")
public suspend fun minCpuPlatform(`value`: Output) {
this.minCpuPlatform = value
}
/**
* @param value A unique name for the resource, required by GCE.
* Changing this forces a new resource to be created.
*/
@JvmName("rahrjnbqitsclcva")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The networks attached to the instance.
*/
@JvmName("wvkhwxlgpovmeomt")
public suspend fun networkInterfaces(`value`: Output>) {
this.networkInterfaces = value
}
@JvmName("mqocqrrgyoibppgw")
public suspend fun networkInterfaces(vararg values: Output) {
this.networkInterfaces = Output.all(values.asList())
}
/**
* @param values The networks attached to the instance.
*/
@JvmName("npxvdfsyxqpcidbk")
public suspend fun networkInterfaces(values: List>) {
this.networkInterfaces = Output.all(values)
}
/**
* @param value Configures network performance settings for the instance. If not specified, the instance will be created with its
* default network performance configuration.
*/
@JvmName("dcegxfcbmvdgswak")
public suspend fun networkPerformanceConfig(`value`: Output) {
this.networkPerformanceConfig = value
}
/**
* @param value Stores additional params passed with the request, but not persisted as part of resource payload.
*/
@JvmName("nukhuvnsctqfbeoj")
public suspend fun params(`value`: Output) {
this.params = value
}
/**
* @param value Partner Metadata Map made available within the instance.
*/
@JvmName("ovvfmerudgxupsgt")
public suspend fun partnerMetadata(`value`: Output>) {
this.partnerMetadata = value
}
/**
* @param value The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither
* self_link nor project are provided, the provider project is used.
*/
@JvmName("abprunpvkgsmomfw")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Specifies the reservations that this instance can consume from.
*/
@JvmName("vfubtkvrgcqsajgn")
public suspend fun reservationAffinity(`value`: Output) {
this.reservationAffinity = value
}
/**
* @param value A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.
*/
@JvmName("hvepigpcsjxnrfbl")
public suspend fun resourcePolicies(`value`: Output) {
this.resourcePolicies = value
}
/**
* @param value The scheduling strategy being used by the instance.
*/
@JvmName("bratxsnockrcriko")
public suspend fun scheduling(`value`: Output) {
this.scheduling = value
}
/**
* @param value The service account to attach to the instance.
*/
@JvmName("vvwketwnciqnacqh")
public suspend fun serviceAccount(`value`: Output) {
this.serviceAccount = value
}
/**
* @param value The shielded vm config being used by the instance.
*/
@JvmName("mlqfjfvnoimfxeum")
public suspend fun shieldedInstanceConfig(`value`: Output) {
this.shieldedInstanceConfig = value
}
/**
* @param value Name or self link of a machine
* image to create the instance based on.
* - - -
*/
@JvmName("ylpuwlirgarlnihk")
public suspend fun sourceMachineImage(`value`: Output) {
this.sourceMachineImage = value
}
/**
* @param value The list of tags attached to the instance.
*/
@JvmName("nkjrxysqntiifxew")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
@JvmName("kydaqtvqdvmvfewc")
public suspend fun tags(vararg values: Output) {
this.tags = Output.all(values.asList())
}
/**
* @param values The list of tags attached to the instance.
*/
@JvmName("uexqehupbufdguob")
public suspend fun tags(values: List>) {
this.tags = Output.all(values)
}
/**
* @param value The zone that the machine should be created in. If not
* set, the provider zone is used.
* In addition to these, most* arguments from `gcp.compute.Instance` are supported
* as a way to override the properties in the machine image. All exported attributes
* from `gcp.compute.Instance` are likewise exported here.
* > **Warning:** *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.
*/
@JvmName("cfeuftdsluxxrxhe")
public suspend fun zone(`value`: Output) {
this.zone = value
}
/**
* @param value Controls for advanced machine-related behavior features.
*/
@JvmName("olcfwrstgmrdqmbq")
public suspend fun advancedMachineFeatures(`value`: InstanceFromMachineImageAdvancedMachineFeaturesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.advancedMachineFeatures = mapped
}
/**
* @param argument Controls for advanced machine-related behavior features.
*/
@JvmName("tnjbobtjppfkvnta")
public suspend fun advancedMachineFeatures(argument: suspend InstanceFromMachineImageAdvancedMachineFeaturesArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageAdvancedMachineFeaturesArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.advancedMachineFeatures = mapped
}
/**
* @param value
*/
@JvmName("jmvyypnwuodditer")
public suspend fun allowStoppingForUpdate(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowStoppingForUpdate = mapped
}
/**
* @param value Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
*/
@JvmName("cgotwihaxuguurqs")
public suspend fun canIpForward(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.canIpForward = mapped
}
/**
* @param value The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
* to create.
*/
@JvmName("pqvwsjrnheprxttj")
public suspend fun confidentialInstanceConfig(`value`: InstanceFromMachineImageConfidentialInstanceConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.confidentialInstanceConfig = mapped
}
/**
* @param argument The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
* to create.
*/
@JvmName("theapqujkuhohndj")
public suspend fun confidentialInstanceConfig(argument: suspend InstanceFromMachineImageConfidentialInstanceConfigArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageConfidentialInstanceConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.confidentialInstanceConfig = mapped
}
/**
* @param value Whether deletion protection is enabled on this instance.
*/
@JvmName("jdppovdcljdkqnqw")
public suspend fun deletionProtection(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deletionProtection = mapped
}
/**
* @param value A brief description of the resource.
*/
@JvmName("hfahmluyrqsgdndr")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Desired status of the instance. Either "RUNNING" or "TERMINATED".
*/
@JvmName("urwocrbgisiynayg")
public suspend fun desiredStatus(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.desiredStatus = mapped
}
/**
* @param value Whether the instance has virtual displays enabled.
*/
@JvmName("jcgnoidhwcgvuqcd")
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.
*/
@JvmName("aslpmxjeyiyuuwhi")
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.
*/
@JvmName("cexeoauqlcxsmneu")
public suspend fun guestAccelerators(argument: List Unit>) {
val toBeMapped = argument.toList().map {
InstanceFromMachineImageGuestAcceleratorArgsBuilder().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.
*/
@JvmName("mycesivcmjkeuhbo")
public suspend fun guestAccelerators(vararg argument: suspend InstanceFromMachineImageGuestAcceleratorArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
InstanceFromMachineImageGuestAcceleratorArgsBuilder().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.
*/
@JvmName("vmqjaaqlynnyhqcy")
public suspend fun guestAccelerators(argument: suspend InstanceFromMachineImageGuestAcceleratorArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
InstanceFromMachineImageGuestAcceleratorArgsBuilder().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.
*/
@JvmName("wilkotpwraklfahr")
public suspend fun guestAccelerators(vararg values: InstanceFromMachineImageGuestAcceleratorArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.guestAccelerators = mapped
}
/**
* @param value A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of
* labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not
* exceed 253 characters. Changing this forces a new resource to be created.
*/
@JvmName("mpudnbgdmstdkdey")
public suspend fun hostname(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostname = mapped
}
/**
* @param value A set of key/value label pairs assigned to the instance. **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("solndwrehxtmlqrc")
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 assigned to the instance. **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("bvylghjoillqhgpf")
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.
*/
@JvmName("cblerqcwpjcuuymq")
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 made available within the instance.
*/
@JvmName("hlbynjcqsxhcmkgb")
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 made available within the instance.
*/
@JvmName("uvlaywfswcskvmmd")
public fun metadata(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param value Metadata startup scripts made available within the instance.
*/
@JvmName("uqvvxltrpdjymhss")
public suspend fun metadataStartupScript(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metadataStartupScript = mapped
}
/**
* @param value The minimum CPU platform specified for the VM instance.
*/
@JvmName("kiarkoearfjfbdyq")
public suspend fun minCpuPlatform(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minCpuPlatform = mapped
}
/**
* @param value A unique name for the resource, required by GCE.
* Changing this forces a new resource to be created.
*/
@JvmName("kcshdricegwoyxwb")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The networks attached to the instance.
*/
@JvmName("yqisabodaroygiqn")
public suspend fun networkInterfaces(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkInterfaces = mapped
}
/**
* @param argument The networks attached to the instance.
*/
@JvmName("cllimrhcblxqfngv")
public suspend fun networkInterfaces(argument: List Unit>) {
val toBeMapped = argument.toList().map {
InstanceFromMachineImageNetworkInterfaceArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.networkInterfaces = mapped
}
/**
* @param argument The networks attached to the instance.
*/
@JvmName("bsxepgqvpfjdvyps")
public suspend fun networkInterfaces(vararg argument: suspend InstanceFromMachineImageNetworkInterfaceArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
InstanceFromMachineImageNetworkInterfaceArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.networkInterfaces = mapped
}
/**
* @param argument The networks attached to the instance.
*/
@JvmName("boeipsmqliakjeph")
public suspend fun networkInterfaces(argument: suspend InstanceFromMachineImageNetworkInterfaceArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
InstanceFromMachineImageNetworkInterfaceArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.networkInterfaces = mapped
}
/**
* @param values The networks attached to the instance.
*/
@JvmName("tlrshecrnmpaviwx")
public suspend fun networkInterfaces(vararg values: InstanceFromMachineImageNetworkInterfaceArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.networkInterfaces = mapped
}
/**
* @param value Configures network performance settings for the instance. If not specified, the instance will be created with its
* default network performance configuration.
*/
@JvmName("ebunqlfbcufkgnju")
public suspend fun networkPerformanceConfig(`value`: InstanceFromMachineImageNetworkPerformanceConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkPerformanceConfig = mapped
}
/**
* @param argument Configures network performance settings for the instance. If not specified, the instance will be created with its
* default network performance configuration.
*/
@JvmName("teywtijuiekftjfp")
public suspend fun networkPerformanceConfig(argument: suspend InstanceFromMachineImageNetworkPerformanceConfigArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageNetworkPerformanceConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.networkPerformanceConfig = mapped
}
/**
* @param value Stores additional params passed with the request, but not persisted as part of resource payload.
*/
@JvmName("sunmpshxvwexpixg")
public suspend fun params(`value`: InstanceFromMachineImageParamsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.params = mapped
}
/**
* @param argument Stores additional params passed with the request, but not persisted as part of resource payload.
*/
@JvmName("gmpqpcxqybpfmwee")
public suspend fun params(argument: suspend InstanceFromMachineImageParamsArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageParamsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.params = mapped
}
/**
* @param value Partner Metadata Map made available within the instance.
*/
@JvmName("gjjfayddilpkcjvs")
public suspend fun partnerMetadata(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.partnerMetadata = mapped
}
/**
* @param values Partner Metadata Map made available within the instance.
*/
@JvmName("kacyapmqjbqsrhbl")
public fun partnerMetadata(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.partnerMetadata = mapped
}
/**
* @param value The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither
* self_link nor project are provided, the provider project is used.
*/
@JvmName("ywqodgrvqaxebpjq")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value Specifies the reservations that this instance can consume from.
*/
@JvmName("kmjyrfbsaksapxir")
public suspend fun reservationAffinity(`value`: InstanceFromMachineImageReservationAffinityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.reservationAffinity = mapped
}
/**
* @param argument Specifies the reservations that this instance can consume from.
*/
@JvmName("nwgcqlmwmvtbgfom")
public suspend fun reservationAffinity(argument: suspend InstanceFromMachineImageReservationAffinityArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageReservationAffinityArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.reservationAffinity = mapped
}
/**
* @param value A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.
*/
@JvmName("ietqbdomvtnhpasq")
public suspend fun resourcePolicies(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourcePolicies = mapped
}
/**
* @param value The scheduling strategy being used by the instance.
*/
@JvmName("jvwkgbmbewucjpbo")
public suspend fun scheduling(`value`: InstanceFromMachineImageSchedulingArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scheduling = mapped
}
/**
* @param argument The scheduling strategy being used by the instance.
*/
@JvmName("axqhysakrwgsgfut")
public suspend fun scheduling(argument: suspend InstanceFromMachineImageSchedulingArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageSchedulingArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.scheduling = mapped
}
/**
* @param value The service account to attach to the instance.
*/
@JvmName("wwxmvxnyrnvpuads")
public suspend fun serviceAccount(`value`: InstanceFromMachineImageServiceAccountArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceAccount = mapped
}
/**
* @param argument The service account to attach to the instance.
*/
@JvmName("vhtqlkodhnykopul")
public suspend fun serviceAccount(argument: suspend InstanceFromMachineImageServiceAccountArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageServiceAccountArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.serviceAccount = mapped
}
/**
* @param value The shielded vm config being used by the instance.
*/
@JvmName("bxxdvexwinqlrexs")
public suspend fun shieldedInstanceConfig(`value`: InstanceFromMachineImageShieldedInstanceConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.shieldedInstanceConfig = mapped
}
/**
* @param argument The shielded vm config being used by the instance.
*/
@JvmName("smvwvhfijbntfsgf")
public suspend fun shieldedInstanceConfig(argument: suspend InstanceFromMachineImageShieldedInstanceConfigArgsBuilder.() -> Unit) {
val toBeMapped = InstanceFromMachineImageShieldedInstanceConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.shieldedInstanceConfig = mapped
}
/**
* @param value Name or self link of a machine
* image to create the instance based on.
* - - -
*/
@JvmName("ypkpufvymrxefgpe")
public suspend fun sourceMachineImage(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourceMachineImage = mapped
}
/**
* @param value The list of tags attached to the instance.
*/
@JvmName("ilxcukwcoamscvqq")
public suspend fun tags(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values The list of tags attached to the instance.
*/
@JvmName("eqhsfkpjrtndxbru")
public suspend fun tags(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The zone that the machine should be created in. If not
* set, the provider zone is used.
* In addition to these, most* arguments from `gcp.compute.Instance` are supported
* as a way to override the properties in the machine image. All exported attributes
* from `gcp.compute.Instance` are likewise exported here.
* > **Warning:** *Due to API limitations, disk overrides are currently disabled. This includes the "boot_disk", "attached_disk", and "scratch_disk" fields.
*/
@JvmName("wyipyvdagapawmfa")
public suspend fun zone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zone = mapped
}
internal fun build(): InstanceFromMachineImageArgs = InstanceFromMachineImageArgs(
advancedMachineFeatures = advancedMachineFeatures,
allowStoppingForUpdate = allowStoppingForUpdate,
canIpForward = canIpForward,
confidentialInstanceConfig = confidentialInstanceConfig,
deletionProtection = deletionProtection,
description = description,
desiredStatus = desiredStatus,
enableDisplay = enableDisplay,
guestAccelerators = guestAccelerators,
hostname = hostname,
labels = labels,
machineType = machineType,
metadata = metadata,
metadataStartupScript = metadataStartupScript,
minCpuPlatform = minCpuPlatform,
name = name,
networkInterfaces = networkInterfaces,
networkPerformanceConfig = networkPerformanceConfig,
params = params,
partnerMetadata = partnerMetadata,
project = project,
reservationAffinity = reservationAffinity,
resourcePolicies = resourcePolicies,
scheduling = scheduling,
serviceAccount = serviceAccount,
shieldedInstanceConfig = shieldedInstanceConfig,
sourceMachineImage = sourceMachineImage,
tags = tags,
zone = zone,
)
}