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.googlenative.networkservices.v1.kotlin.HttpRouteArgs.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.googlenative.networkservices.v1.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.networkservices.v1.HttpRouteArgs.builder
import com.pulumi.googlenative.networkservices.v1.kotlin.inputs.HttpRouteRouteRuleArgs
import com.pulumi.googlenative.networkservices.v1.kotlin.inputs.HttpRouteRouteRuleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Creates a new HttpRoute in a given project and location.
* @property description Optional. A free-text description of the resource. Max length 1024 characters.
* @property gateways Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
* @property hostnames Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be "precise" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.
* @property httpRouteId Required. Short name of the HttpRoute resource to be created.
* @property labels Optional. Set of label tags associated with the HttpRoute resource.
* @property location
* @property meshes Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
* @property name Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.
* @property project
* @property rules Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
* */*/*/
*/
public data class HttpRouteArgs(
public val description: Output? = null,
public val gateways: Output>? = null,
public val hostnames: Output>? = null,
public val httpRouteId: Output? = null,
public val labels: Output>? = null,
public val location: Output? = null,
public val meshes: Output>? = null,
public val name: Output? = null,
public val project: Output? = null,
public val rules: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.googlenative.networkservices.v1.HttpRouteArgs =
com.pulumi.googlenative.networkservices.v1.HttpRouteArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.gateways(gateways?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.hostnames(hostnames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.httpRouteId(httpRouteId?.applyValue({ args0 -> args0 }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.location(location?.applyValue({ args0 -> args0 }))
.meshes(meshes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.rules(
rules?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [HttpRouteArgs].
*/
@PulumiTagMarker
public class HttpRouteArgsBuilder internal constructor() {
private var description: Output? = null
private var gateways: Output>? = null
private var hostnames: Output>? = null
private var httpRouteId: Output? = null
private var labels: Output>? = null
private var location: Output? = null
private var meshes: Output>? = null
private var name: Output? = null
private var project: Output? = null
private var rules: Output>? = null
/**
* @param value Optional. A free-text description of the resource. Max length 1024 characters.
*/
@JvmName("dyamjuemolxaefbh")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
* */
*/
@JvmName("pkvtqtibvevsejxf")
public suspend fun gateways(`value`: Output>) {
this.gateways = value
}
@JvmName("feltcvfvlnsodujo")
public suspend fun gateways(vararg values: Output) {
this.gateways = Output.all(values.asList())
}
/**
* @param values Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
* */
*/
@JvmName("uafrxnmnmtulsnfe")
public suspend fun gateways(values: List>) {
this.gateways = Output.all(values)
}
/**
* @param value Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be "precise" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.
*/
@JvmName("sqfulcwitjbbbrpv")
public suspend fun hostnames(`value`: Output>) {
this.hostnames = value
}
@JvmName("qndfcbynvpxmkscx")
public suspend fun hostnames(vararg values: Output) {
this.hostnames = Output.all(values.asList())
}
/**
* @param values Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be "precise" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.
*/
@JvmName("qqprndfisrpwxjma")
public suspend fun hostnames(values: List>) {
this.hostnames = Output.all(values)
}
/**
* @param value Required. Short name of the HttpRoute resource to be created.
*/
@JvmName("vgfgahpudeofbbgu")
public suspend fun httpRouteId(`value`: Output) {
this.httpRouteId = value
}
/**
* @param value Optional. Set of label tags associated with the HttpRoute resource.
*/
@JvmName("rnwqhxxsaxpiuenv")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value
*/
@JvmName("aqoivcxqvoeurgrq")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
* */
*/
@JvmName("tmedyoyaeinoukmb")
public suspend fun meshes(`value`: Output>) {
this.meshes = value
}
@JvmName("wrrehkwyhhcvnyxq")
public suspend fun meshes(vararg values: Output) {
this.meshes = Output.all(values.asList())
}
/**
* @param values Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
* */
*/
@JvmName("qjaqniraduaxqbpp")
public suspend fun meshes(values: List>) {
this.meshes = Output.all(values)
}
/**
* @param value Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.
* */
*/
@JvmName("ymybnipklrgjyviw")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value
*/
@JvmName("tdinerruaidffops")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("taqrxehxvmxpsqsn")
public suspend fun rules(`value`: Output>) {
this.rules = value
}
@JvmName("locphhntyokqoyqc")
public suspend fun rules(vararg values: Output) {
this.rules = Output.all(values.asList())
}
/**
* @param values Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("gwylytsifpuyjitl")
public suspend fun rules(values: List>) {
this.rules = Output.all(values)
}
/**
* @param value Optional. A free-text description of the resource. Max length 1024 characters.
*/
@JvmName("coslxaqwhphrdicv")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
* */
*/
@JvmName("dqxmqjwqlunajego")
public suspend fun gateways(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gateways = mapped
}
/**
* @param values Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`
* */
*/
@JvmName("xdhvmbsklrorldxl")
public suspend fun gateways(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.gateways = mapped
}
/**
* @param value Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be "precise" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.
*/
@JvmName("pemtnyeabchuvdvo")
public suspend fun hostnames(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostnames = mapped
}
/**
* @param values Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be "precise" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.
*/
@JvmName("ttatmnclsjbwtehc")
public suspend fun hostnames(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hostnames = mapped
}
/**
* @param value Required. Short name of the HttpRoute resource to be created.
*/
@JvmName("omcehgtvgphysroa")
public suspend fun httpRouteId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.httpRouteId = mapped
}
/**
* @param value Optional. Set of label tags associated with the HttpRoute resource.
*/
@JvmName("cpkjhcvdvqtropdn")
public suspend fun labels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param values Optional. Set of label tags associated with the HttpRoute resource.
*/
@JvmName("peisgshfjolicrmu")
public fun labels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param value
*/
@JvmName("ylwsmhqyjejvjcyc")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
* */
*/
@JvmName("bqlakkfwrekkrnhr")
public suspend fun meshes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.meshes = mapped
}
/**
* @param values Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR
* */
*/
@JvmName("gdclmlwhejhjvcmr")
public suspend fun meshes(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.meshes = mapped
}
/**
* @param value Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.
* */
*/
@JvmName("hixfvxgunqurvamp")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value
*/
@JvmName("urrndsvtmtcqqsni")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("paiesswbmytxybrq")
public suspend fun rules(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rules = mapped
}
/**
* @param argument Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("eueeaqkwfnftmjiu")
public suspend fun rules(argument: List Unit>) {
val toBeMapped = argument.toList().map {
HttpRouteRouteRuleArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.rules = mapped
}
/**
* @param argument Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("ahchxdeyfimuwogg")
public suspend fun rules(vararg argument: suspend HttpRouteRouteRuleArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
HttpRouteRouteRuleArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.rules = mapped
}
/**
* @param argument Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("qvrhtimxdnobftft")
public suspend fun rules(argument: suspend HttpRouteRouteRuleArgsBuilder.() -> Unit) {
val toBeMapped = listOf(HttpRouteRouteRuleArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.rules = mapped
}
/**
* @param values Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.
*/
@JvmName("tlotphptgqoyvsxy")
public suspend fun rules(vararg values: HttpRouteRouteRuleArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.rules = mapped
}
internal fun build(): HttpRouteArgs = HttpRouteArgs(
description = description,
gateways = gateways,
hostnames = hostnames,
httpRouteId = httpRouteId,
labels = labels,
location = location,
meshes = meshes,
name = name,
project = project,
rules = rules,
)
}