com.pulumi.gcp.accesscontextmanager.kotlin.IngressPolicy.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.accesscontextmanager.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
/**
* Builder for [IngressPolicy].
*/
@PulumiTagMarker
public class IngressPolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: IngressPolicyArgs = IngressPolicyArgs()
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 IngressPolicyArgsBuilder.() -> Unit) {
val builder = IngressPolicyArgsBuilder()
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(): IngressPolicy {
val builtJavaResource =
com.pulumi.gcp.accesscontextmanager.IngressPolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IngressPolicy(builtJavaResource)
}
}
/**
* This resource has been deprecated, please refer to ServicePerimeterIngressPolicy.
* To get more information about IngressPolicy, see:
* * [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ingresspolicy)
* ## Import
* IngressPolicy can be imported using any of these accepted formats:
* * `{{ingress_policy_name}}/{{resource}}`
* When using the `pulumi import` command, IngressPolicy can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:accesscontextmanager/ingressPolicy:IngressPolicy default {{ingress_policy_name}}/{{resource}}
* ```
*/
public class IngressPolicy internal constructor(
override val javaResource: com.pulumi.gcp.accesscontextmanager.IngressPolicy,
) : KotlinCustomResource(javaResource, IngressPolicyMapper) {
/**
* The name of the Service Perimeter to add this resource to.
* - - -
*/
public val ingressPolicyName: Output
get() = javaResource.ingressPolicyName().applyValue({ args0 -> args0 })
/**
* A GCP resource that is inside of the service perimeter.
*/
public val resource: Output
get() = javaResource.resource().applyValue({ args0 -> args0 })
}
public object IngressPolicyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.accesscontextmanager.IngressPolicy::class == javaResource::class
override fun map(javaResource: Resource): IngressPolicy = IngressPolicy(
javaResource as
com.pulumi.gcp.accesscontextmanager.IngressPolicy,
)
}
/**
* @see [IngressPolicy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IngressPolicy].
*/
public suspend fun ingressPolicy(
name: String,
block: suspend IngressPolicyResourceBuilder.() -> Unit,
): IngressPolicy {
val builder = IngressPolicyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IngressPolicy].
* @param name The _unique_ name of the resulting resource.
*/
public fun ingressPolicy(name: String): IngressPolicy {
val builder = IngressPolicyResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy