All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheServiceRoutingHostRuleArgs.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.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingHostRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property description A human-readable description of the hostRule.
 * @property hosts The list of host patterns to match.
 * Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string.
 * When multiple hosts are specified, hosts are matched in the following priority:
 * 1. Exact domain names: ``www.foo.com``.
 * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
 * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
 * 4. Special wildcard ``*`` matching any domain.
 * Notes:
 * The wildcard will not match the empty string. e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. The longest wildcards match first. Only a single host in the entire service can match on ``*``. A domain must be unique across all configured hosts within a service.
 * Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request.
 * You may specify up to 10 hosts.
 * @property pathMatcher The name of the pathMatcher associated with this hostRule.
 */
public data class EdgeCacheServiceRoutingHostRuleArgs(
    public val description: Output? = null,
    public val hosts: Output>,
    public val pathMatcher: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingHostRuleArgs =
        com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingHostRuleArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .hosts(hosts.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .pathMatcher(pathMatcher.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EdgeCacheServiceRoutingHostRuleArgs].
 */
@PulumiTagMarker
public class EdgeCacheServiceRoutingHostRuleArgsBuilder internal constructor() {
    private var description: Output? = null

    private var hosts: Output>? = null

    private var pathMatcher: Output? = null

    /**
     * @param value A human-readable description of the hostRule.
     */
    @JvmName("fgvtuewfaalyodlr")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The list of host patterns to match.
     * Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string.
     * When multiple hosts are specified, hosts are matched in the following priority:
     * 1. Exact domain names: ``www.foo.com``.
     * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
     * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
     * 4. Special wildcard ``*`` matching any domain.
     * Notes:
     * The wildcard will not match the empty string. e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. The longest wildcards match first. Only a single host in the entire service can match on ``*``. A domain must be unique across all configured hosts within a service.
     * Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request.
     * You may specify up to 10 hosts.
     */
    @JvmName("mphufkccjrfprlqj")
    public suspend fun hosts(`value`: Output>) {
        this.hosts = value
    }

    @JvmName("ibrgxumbdinoirdr")
    public suspend fun hosts(vararg values: Output) {
        this.hosts = Output.all(values.asList())
    }

    /**
     * @param values The list of host patterns to match.
     * Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string.
     * When multiple hosts are specified, hosts are matched in the following priority:
     * 1. Exact domain names: ``www.foo.com``.
     * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
     * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
     * 4. Special wildcard ``*`` matching any domain.
     * Notes:
     * The wildcard will not match the empty string. e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. The longest wildcards match first. Only a single host in the entire service can match on ``*``. A domain must be unique across all configured hosts within a service.
     * Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request.
     * You may specify up to 10 hosts.
     */
    @JvmName("sulhwjdxwdndpfcy")
    public suspend fun hosts(values: List>) {
        this.hosts = Output.all(values)
    }

    /**
     * @param value The name of the pathMatcher associated with this hostRule.
     */
    @JvmName("brjdrtqibqtgkxtf")
    public suspend fun pathMatcher(`value`: Output) {
        this.pathMatcher = value
    }

    /**
     * @param value A human-readable description of the hostRule.
     */
    @JvmName("kjakqwbcvghlocwg")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The list of host patterns to match.
     * Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string.
     * When multiple hosts are specified, hosts are matched in the following priority:
     * 1. Exact domain names: ``www.foo.com``.
     * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
     * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
     * 4. Special wildcard ``*`` matching any domain.
     * Notes:
     * The wildcard will not match the empty string. e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. The longest wildcards match first. Only a single host in the entire service can match on ``*``. A domain must be unique across all configured hosts within a service.
     * Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request.
     * You may specify up to 10 hosts.
     */
    @JvmName("ahbuodrhhbgflohk")
    public suspend fun hosts(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

    /**
     * @param values The list of host patterns to match.
     * Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string.
     * When multiple hosts are specified, hosts are matched in the following priority:
     * 1. Exact domain names: ``www.foo.com``.
     * 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``.
     * 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``.
     * 4. Special wildcard ``*`` matching any domain.
     * Notes:
     * The wildcard will not match the empty string. e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. The longest wildcards match first. Only a single host in the entire service can match on ``*``. A domain must be unique across all configured hosts within a service.
     * Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request.
     * You may specify up to 10 hosts.
     */
    @JvmName("lokejawwcptqbgdx")
    public suspend fun hosts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

    /**
     * @param value The name of the pathMatcher associated with this hostRule.
     */
    @JvmName("fojvpdsnwhkcerwp")
    public suspend fun pathMatcher(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pathMatcher = mapped
    }

    internal fun build(): EdgeCacheServiceRoutingHostRuleArgs = EdgeCacheServiceRoutingHostRuleArgs(
        description = description,
        hosts = hosts ?: throw PulumiNullFieldException("hosts"),
        pathMatcher = pathMatcher ?: throw PulumiNullFieldException("pathMatcher"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy