com.pulumi.gcp.networkservices.kotlin.LbTrafficExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
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.gcp.networkservices.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.networkservices.kotlin.outputs.LbTrafficExtensionExtensionChain
import com.pulumi.gcp.networkservices.kotlin.outputs.LbTrafficExtensionExtensionChain.Companion.toKotlin
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [LbTrafficExtension].
*/
@PulumiTagMarker
public class LbTrafficExtensionResourceBuilder internal constructor() {
public var name: String? = null
public var args: LbTrafficExtensionArgs = LbTrafficExtensionArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend LbTrafficExtensionArgsBuilder.() -> Unit) {
val builder = LbTrafficExtensionArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): LbTrafficExtension {
val builtJavaResource =
com.pulumi.gcp.networkservices.LbTrafficExtension(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LbTrafficExtension(builtJavaResource)
}
}
/**
* LbTrafficExtension is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.
* To get more information about LbTrafficExtension, see:
* * [API documentation](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.lbTrafficExtensions)
* * How-to Guides
* * [Configure a traffic extension](https://cloud.google.com/service-extensions/docs/configure-callout#configure_a_traffic_extension)
* ## Example Usage
* ## Import
* LbTrafficExtension can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/lbTrafficExtensions/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, LbTrafficExtension can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:networkservices/lbTrafficExtension:LbTrafficExtension default projects/{{project}}/locations/{{location}}/lbTrafficExtensions/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/lbTrafficExtension:LbTrafficExtension default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/lbTrafficExtension:LbTrafficExtension default {{location}}/{{name}}
* ```
*/
public class LbTrafficExtension internal constructor(
override val javaResource: com.pulumi.gcp.networkservices.LbTrafficExtension,
) : KotlinCustomResource(javaResource, LbTrafficExtensionMapper) {
/**
* A human-readable description of the resource.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy