com.pulumi.googlenative.compute.v1.kotlin.TargetInstanceArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.compute.v1.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.v1.TargetInstanceArgs.builder
import com.pulumi.googlenative.compute.v1.kotlin.enums.TargetInstanceNatPolicy
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Creates a TargetInstance resource in the specified project and zone using the data included in the request.
* @property description An optional description of this resource. Provide this property when you create the resource.
* @property instance A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
* @property name Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
* @property natPolicy Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
* @property network The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
* @property project
* @property requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
* @property zone
*/
public data class TargetInstanceArgs(
public val description: Output? = null,
public val instance: Output? = null,
public val name: Output? = null,
public val natPolicy: Output? = null,
public val network: Output? = null,
public val project: Output? = null,
public val requestId: Output? = null,
public val zone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.googlenative.compute.v1.TargetInstanceArgs =
com.pulumi.googlenative.compute.v1.TargetInstanceArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.instance(instance?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.natPolicy(natPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.network(network?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.requestId(requestId?.applyValue({ args0 -> args0 }))
.zone(zone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TargetInstanceArgs].
*/
@PulumiTagMarker
public class TargetInstanceArgsBuilder internal constructor() {
private var description: Output? = null
private var instance: Output? = null
private var name: Output? = null
private var natPolicy: Output? = null
private var network: Output? = null
private var project: Output? = null
private var requestId: Output? = null
private var zone: Output? = null
/**
* @param value An optional description of this resource. Provide this property when you create the resource.
*/
@JvmName("krdjtjnpstruynpu")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
*/
@JvmName("xitgqvbddsfxpneg")
public suspend fun instance(`value`: Output) {
this.instance = value
}
/**
* @param value Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*/
@JvmName("shovacbuthvyvgra")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
*/
@JvmName("cghrfcpkvlpsjjes")
public suspend fun natPolicy(`value`: Output) {
this.natPolicy = value
}
/**
* @param value The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
*/
@JvmName("qjqrpqcdbawfylho")
public suspend fun network(`value`: Output) {
this.network = value
}
/**
* @param value
*/
@JvmName("fjpwrurwikmlwdmr")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
*/
@JvmName("esnfciwhfbjodrsf")
public suspend fun requestId(`value`: Output) {
this.requestId = value
}
/**
* @param value
*/
@JvmName("aevsylecvghhlxon")
public suspend fun zone(`value`: Output) {
this.zone = value
}
/**
* @param value An optional description of this resource. Provide this property when you create the resource.
*/
@JvmName("woyafneilomtravb")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
*/
@JvmName("mbjxjcqtdkvgmxqg")
public suspend fun instance(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instance = mapped
}
/**
* @param value Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*/
@JvmName("siqtfcukrmmdooqc")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
*/
@JvmName("mangfbkyybbiqivg")
public suspend fun natPolicy(`value`: TargetInstanceNatPolicy?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.natPolicy = mapped
}
/**
* @param value The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
*/
@JvmName("gvphmrlrdwjjnpko")
public suspend fun network(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.network = mapped
}
/**
* @param value
*/
@JvmName("tmqbghoimviltmld")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
*/
@JvmName("oscmpxrccfkewuil")
public suspend fun requestId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.requestId = mapped
}
/**
* @param value
*/
@JvmName("uodvympouitgkphq")
public suspend fun zone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zone = mapped
}
internal fun build(): TargetInstanceArgs = TargetInstanceArgs(
description = description,
instance = instance,
name = name,
natPolicy = natPolicy,
network = network,
project = project,
requestId = requestId,
zone = zone,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy