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

com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleAction.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.outputs

import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property corsPolicy The specification for allowing client side cross-origin requests.
 * Structure is documented below.
 * @property destinations The destination to which traffic should be forwarded.
 * Structure is documented below.
 * @property faultInjectionPolicy The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
 * Structure is documented below.
 * @property redirect If set, the request is directed as configured by this field.
 * Structure is documented below.
 * @property requestHeaderModifier The specification for modifying the headers of a matching request prior to delivery of the request to the destination.
 * Structure is documented below.
 * @property requestMirrorPolicy Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination.
 * Structure is documented below.
 * @property responseHeaderModifier The specification for modifying the headers of a response prior to sending the response back to the client.
 * Structure is documented below.
 * @property retryPolicy Specifies the retry policy associated with this route.
 * Structure is documented below.
 * @property timeout Specifies the timeout for selected route.
 * @property urlRewrite The specification for rewrite URL before forwarding requests to the destination.
 * Structure is documented below.
 */
public data class HttpRouteRuleAction(
    public val corsPolicy: HttpRouteRuleActionCorsPolicy? = null,
    public val destinations: List? = null,
    public val faultInjectionPolicy: HttpRouteRuleActionFaultInjectionPolicy? = null,
    public val redirect: HttpRouteRuleActionRedirect? = null,
    public val requestHeaderModifier: HttpRouteRuleActionRequestHeaderModifier? = null,
    public val requestMirrorPolicy: HttpRouteRuleActionRequestMirrorPolicy? = null,
    public val responseHeaderModifier: HttpRouteRuleActionResponseHeaderModifier? = null,
    public val retryPolicy: HttpRouteRuleActionRetryPolicy? = null,
    public val timeout: String? = null,
    public val urlRewrite: HttpRouteRuleActionUrlRewrite? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.networkservices.outputs.HttpRouteRuleAction): HttpRouteRuleAction = HttpRouteRuleAction(
            corsPolicy = javaType.corsPolicy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionCorsPolicy.Companion.toKotlin(args0)
                })
            }).orElse(null),
            destinations = javaType.destinations().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionDestination.Companion.toKotlin(args0)
                })
            }),
            faultInjectionPolicy = javaType.faultInjectionPolicy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionFaultInjectionPolicy.Companion.toKotlin(args0)
                })
            }).orElse(null),
            redirect = javaType.redirect().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionRedirect.Companion.toKotlin(args0)
                })
            }).orElse(null),
            requestHeaderModifier = javaType.requestHeaderModifier().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionRequestHeaderModifier.Companion.toKotlin(args0)
                })
            }).orElse(null),
            requestMirrorPolicy = javaType.requestMirrorPolicy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionRequestMirrorPolicy.Companion.toKotlin(args0)
                })
            }).orElse(null),
            responseHeaderModifier = javaType.responseHeaderModifier().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionResponseHeaderModifier.Companion.toKotlin(args0)
                })
            }).orElse(null),
            retryPolicy = javaType.retryPolicy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionRetryPolicy.Companion.toKotlin(args0)
                })
            }).orElse(null),
            timeout = javaType.timeout().map({ args0 -> args0 }).orElse(null),
            urlRewrite = javaType.urlRewrite().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionUrlRewrite.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy