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

com.pulumi.awsnative.apigatewayv2.kotlin.IntegrationResponseArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.apigatewayv2.kotlin

import com.pulumi.awsnative.apigatewayv2.IntegrationResponseArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The ``AWS::ApiGatewayV2::IntegrationResponse`` resource updates an integration response for an WebSocket API. For more information, see [Set up WebSocket API Integration Responses in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-responses.html) in the *API Gateway Developer Guide*.
 * @property apiId The API identifier.
 * @property contentHandlingStrategy Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are ``CONVERT_TO_BINARY`` and ``CONVERT_TO_TEXT``, with the following behaviors:
 *   ``CONVERT_TO_BINARY``: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
 *   ``CONVERT_TO_TEXT``: Converts a response payload from a binary blob to a Base64-encoded string.
 *  If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
 * @property integrationId The integration ID.
 * @property integrationResponseKey The integration response key.
 * @property responseParameters A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of ``method.response.header.{name}``, where name is a valid and unique header name. The mapped non-static value must match the pattern of ``integration.response.header.{name}`` or ``integration.response.body.{JSON-expression}``, where ``{name}`` is a valid and unique response header name and ``{JSON-expression}`` is a valid JSON expression without the ``$`` prefix.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ApiGatewayV2::IntegrationResponse` for more information about the expected schema for this property.
 * @property responseTemplates The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ApiGatewayV2::IntegrationResponse` for more information about the expected schema for this property.
 * @property templateSelectionExpression The template selection expression for the integration response. Supported only for WebSocket APIs.
 */
public data class IntegrationResponseArgs(
    public val apiId: Output? = null,
    public val contentHandlingStrategy: Output? = null,
    public val integrationId: Output? = null,
    public val integrationResponseKey: Output? = null,
    public val responseParameters: Output? = null,
    public val responseTemplates: Output? = null,
    public val templateSelectionExpression: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.apigatewayv2.IntegrationResponseArgs =
        com.pulumi.awsnative.apigatewayv2.IntegrationResponseArgs.builder()
            .apiId(apiId?.applyValue({ args0 -> args0 }))
            .contentHandlingStrategy(contentHandlingStrategy?.applyValue({ args0 -> args0 }))
            .integrationId(integrationId?.applyValue({ args0 -> args0 }))
            .integrationResponseKey(integrationResponseKey?.applyValue({ args0 -> args0 }))
            .responseParameters(responseParameters?.applyValue({ args0 -> args0 }))
            .responseTemplates(responseTemplates?.applyValue({ args0 -> args0 }))
            .templateSelectionExpression(templateSelectionExpression?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IntegrationResponseArgs].
 */
@PulumiTagMarker
public class IntegrationResponseArgsBuilder internal constructor() {
    private var apiId: Output? = null

    private var contentHandlingStrategy: Output? = null

    private var integrationId: Output? = null

    private var integrationResponseKey: Output? = null

    private var responseParameters: Output? = null

    private var responseTemplates: Output? = null

    private var templateSelectionExpression: Output? = null

    /**
     * @param value The API identifier.
     */
    @JvmName("wsxpneolsguohgry")
    public suspend fun apiId(`value`: Output) {
        this.apiId = value
    }

    /**
     * @param value Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are ``CONVERT_TO_BINARY`` and ``CONVERT_TO_TEXT``, with the following behaviors:
     *   ``CONVERT_TO_BINARY``: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
     *   ``CONVERT_TO_TEXT``: Converts a response payload from a binary blob to a Base64-encoded string.
     *  If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
     */
    @JvmName("sxnfiosocxfyafga")
    public suspend fun contentHandlingStrategy(`value`: Output) {
        this.contentHandlingStrategy = value
    }

    /**
     * @param value The integration ID.
     */
    @JvmName("oaxfwroantrkbxgc")
    public suspend fun integrationId(`value`: Output) {
        this.integrationId = value
    }

    /**
     * @param value The integration response key.
     */
    @JvmName("cuamvkexsxigeiks")
    public suspend fun integrationResponseKey(`value`: Output) {
        this.integrationResponseKey = value
    }

    /**
     * @param value A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of ``method.response.header.{name}``, where name is a valid and unique header name. The mapped non-static value must match the pattern of ``integration.response.header.{name}`` or ``integration.response.body.{JSON-expression}``, where ``{name}`` is a valid and unique response header name and ``{JSON-expression}`` is a valid JSON expression without the ``$`` prefix.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ApiGatewayV2::IntegrationResponse` for more information about the expected schema for this property.
     */
    @JvmName("amadqwfncprxypkm")
    public suspend fun responseParameters(`value`: Output) {
        this.responseParameters = value
    }

    /**
     * @param value The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ApiGatewayV2::IntegrationResponse` for more information about the expected schema for this property.
     */
    @JvmName("rufwmfulvdbxyuso")
    public suspend fun responseTemplates(`value`: Output) {
        this.responseTemplates = value
    }

    /**
     * @param value The template selection expression for the integration response. Supported only for WebSocket APIs.
     */
    @JvmName("fwthmjiifuklvees")
    public suspend fun templateSelectionExpression(`value`: Output) {
        this.templateSelectionExpression = value
    }

    /**
     * @param value The API identifier.
     */
    @JvmName("tidjhkoqdcghikdg")
    public suspend fun apiId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiId = mapped
    }

    /**
     * @param value Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are ``CONVERT_TO_BINARY`` and ``CONVERT_TO_TEXT``, with the following behaviors:
     *   ``CONVERT_TO_BINARY``: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
     *   ``CONVERT_TO_TEXT``: Converts a response payload from a binary blob to a Base64-encoded string.
     *  If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
     */
    @JvmName("npxnpdlynackoxsv")
    public suspend fun contentHandlingStrategy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentHandlingStrategy = mapped
    }

    /**
     * @param value The integration ID.
     */
    @JvmName("venwbeluvqmyetqy")
    public suspend fun integrationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.integrationId = mapped
    }

    /**
     * @param value The integration response key.
     */
    @JvmName("twlftavucfcqujrn")
    public suspend fun integrationResponseKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.integrationResponseKey = mapped
    }

    /**
     * @param value A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of ``method.response.header.{name}``, where name is a valid and unique header name. The mapped non-static value must match the pattern of ``integration.response.header.{name}`` or ``integration.response.body.{JSON-expression}``, where ``{name}`` is a valid and unique response header name and ``{JSON-expression}`` is a valid JSON expression without the ``$`` prefix.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ApiGatewayV2::IntegrationResponse` for more information about the expected schema for this property.
     */
    @JvmName("ncnyeocpdtqdipra")
    public suspend fun responseParameters(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseParameters = mapped
    }

    /**
     * @param value The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ApiGatewayV2::IntegrationResponse` for more information about the expected schema for this property.
     */
    @JvmName("ylwhxsvtwmlcupnk")
    public suspend fun responseTemplates(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseTemplates = mapped
    }

    /**
     * @param value The template selection expression for the integration response. Supported only for WebSocket APIs.
     */
    @JvmName("xmwvrbrhquirqimv")
    public suspend fun templateSelectionExpression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateSelectionExpression = mapped
    }

    internal fun build(): IntegrationResponseArgs = IntegrationResponseArgs(
        apiId = apiId,
        contentHandlingStrategy = contentHandlingStrategy,
        integrationId = integrationId,
        integrationResponseKey = integrationResponseKey,
        responseParameters = responseParameters,
        responseTemplates = responseTemplates,
        templateSelectionExpression = templateSelectionExpression,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy