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

com.pulumi.aws.apigateway.kotlin.BasePathMappingArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.apigateway.kotlin

import com.pulumi.aws.apigateway.BasePathMappingArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Connects a custom domain name registered via `aws.apigateway.DomainName`
 * with a deployed API so that its methods can be called via the
 * custom domain name.
 * ## Import
 * For a non-root `base_path`:
 * Using `pulumi import`, import `aws_api_gateway_base_path_mapping` using the domain name and base path. For example:
 * For an empty `base_path` or, in other words, a root path (`/`):
 * ```sh
 * $ pulumi import aws:apigateway/basePathMapping:BasePathMapping example example.com/
 * ```
 * For a non-root `base_path`:
 * ```sh
 * $ pulumi import aws:apigateway/basePathMapping:BasePathMapping example example.com/base-path
 * ```
 * @property basePath Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.
 * @property domainName Already-registered domain name to connect the API to.
 * @property restApi ID of the API to connect.
 * @property stageName Name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.
 */
public data class BasePathMappingArgs(
    public val basePath: Output? = null,
    public val domainName: Output? = null,
    public val restApi: Output? = null,
    public val stageName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.apigateway.BasePathMappingArgs =
        com.pulumi.aws.apigateway.BasePathMappingArgs.builder()
            .basePath(basePath?.applyValue({ args0 -> args0 }))
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .restApi(restApi?.applyValue({ args0 -> args0 }))
            .stageName(stageName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BasePathMappingArgs].
 */
@PulumiTagMarker
public class BasePathMappingArgsBuilder internal constructor() {
    private var basePath: Output? = null

    private var domainName: Output? = null

    private var restApi: Output? = null

    private var stageName: Output? = null

    /**
     * @param value Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.
     */
    @JvmName("utqmisrinthxbpmb")
    public suspend fun basePath(`value`: Output) {
        this.basePath = value
    }

    /**
     * @param value Already-registered domain name to connect the API to.
     */
    @JvmName("piyvqwcyxljmjmcr")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value ID of the API to connect.
     */
    @JvmName("sgpoftfmgbalqnuo")
    public suspend fun restApi(`value`: Output) {
        this.restApi = value
    }

    /**
     * @param value Name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.
     */
    @JvmName("pmkcwhlyrecwsgdh")
    public suspend fun stageName(`value`: Output) {
        this.stageName = value
    }

    /**
     * @param value Path segment that must be prepended to the path when accessing the API via this mapping. If omitted, the API is exposed at the root of the given domain.
     */
    @JvmName("qufbburnpdknudgc")
    public suspend fun basePath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.basePath = mapped
    }

    /**
     * @param value Already-registered domain name to connect the API to.
     */
    @JvmName("bqtnvmkkwudmcwxe")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value ID of the API to connect.
     */
    @JvmName("ukkkacksjsjpsyuk")
    public suspend fun restApi(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restApi = mapped
    }

    /**
     * @param value Name of a specific deployment stage to expose at the given path. If omitted, callers may select any stage by including its name as a path element after the base path.
     */
    @JvmName("dfdpusfexcwihuqf")
    public suspend fun stageName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stageName = mapped
    }

    internal fun build(): BasePathMappingArgs = BasePathMappingArgs(
        basePath = basePath,
        domainName = domainName,
        restApi = restApi,
        stageName = stageName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy