com.pulumi.gcp.apigateway.kotlin.Gateway.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.apigateway.kotlin
import com.pulumi.core.Output
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.Map
/**
* Builder for [Gateway].
*/
@PulumiTagMarker
public class GatewayResourceBuilder internal constructor() {
public var name: String? = null
public var args: GatewayArgs = GatewayArgs()
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 GatewayArgsBuilder.() -> Unit) {
val builder = GatewayArgsBuilder()
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(): Gateway {
val builtJavaResource = com.pulumi.gcp.apigateway.Gateway(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Gateway(builtJavaResource)
}
}
/**
* A consumable API that can be used by multiple Gateways.
* To get more information about Gateway, see:
* * [API documentation](https://cloud.google.com/api-gateway/docs/reference/rest/v1beta/projects.locations.apis)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/api-gateway/docs/quickstart)
* ## Example Usage
* ## Import
* Gateway can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}}`
* * `{{project}}/{{region}}/{{gateway_id}}`
* * `{{region}}/{{gateway_id}}`
* * `{{gateway_id}}`
* When using the `pulumi import` command, Gateway can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apigateway/gateway:Gateway default projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}}
* ```
* ```sh
* $ pulumi import gcp:apigateway/gateway:Gateway default {{project}}/{{region}}/{{gateway_id}}
* ```
* ```sh
* $ pulumi import gcp:apigateway/gateway:Gateway default {{region}}/{{gateway_id}}
* ```
* ```sh
* $ pulumi import gcp:apigateway/gateway:Gateway default {{gateway_id}}
* ```
*/
public class Gateway internal constructor(
override val javaResource: com.pulumi.gcp.apigateway.Gateway,
) : KotlinCustomResource(javaResource, GatewayMapper) {
/**
* Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
* When changing api configs please ensure the new config is a new resource and the
* lifecycle rule `create_before_destroy` is set.
*/
public val apiConfig: Output
get() = javaResource.apiConfig().applyValue({ args0 -> args0 })
/**
* The default API Gateway host name of the form {gatewayId}-{hash}.{region_code}.gateway.dev.
*/
public val defaultHostname: Output
get() = javaResource.defaultHostname().applyValue({ args0 -> args0 })
/**
* A user-visible name for the API.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* 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