![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.gcp.accesscontextmanager.kotlin.ServicePerimeterDryRunEgressPolicyArgs.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.core.Output.of
import com.pulumi.gcp.accesscontextmanager.ServicePerimeterDryRunEgressPolicyArgs.builder
import com.pulumi.gcp.accesscontextmanager.kotlin.inputs.ServicePerimeterDryRunEgressPolicyEgressFromArgs
import com.pulumi.gcp.accesscontextmanager.kotlin.inputs.ServicePerimeterDryRunEgressPolicyEgressFromArgsBuilder
import com.pulumi.gcp.accesscontextmanager.kotlin.inputs.ServicePerimeterDryRunEgressPolicyEgressToArgs
import com.pulumi.gcp.accesscontextmanager.kotlin.inputs.ServicePerimeterDryRunEgressPolicyEgressToArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Manage a single EgressPolicy in the spec (dry-run) configuration for a service perimeter.
* EgressPolicies match requests based on egressFrom and egressTo stanzas.
* For an EgressPolicy to match, both egressFrom and egressTo stanzas must be matched.
* If an EgressPolicy matches a request, the request is allowed to span the ServicePerimeter
* boundary. For example, an EgressPolicy can be used to allow VMs on networks
* within the ServicePerimeter to access a defined set of projects outside the
* perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
* or query against a BigQuery dataset).
* > **Note:** By default, updates to this resource will remove the EgressPolicy from the
* from the perimeter and add it back in a non-atomic manner. To ensure that the new EgressPolicy
* is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
* To get more information about ServicePerimeterDryRunEgressPolicy, see:
* * [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#egresspolicy)
* ## Example Usage
* @property egressFrom Defines conditions on the source of a request causing this `EgressPolicy` to apply.
* Structure is documented below.
* @property egressTo Defines the conditions on the `ApiOperation` and destination resources that
* cause this `EgressPolicy` to apply.
* Structure is documented below.
* @property perimeter The name of the Service Perimeter to add this resource to.
* - - -
*/
public data class ServicePerimeterDryRunEgressPolicyArgs(
public val egressFrom: Output? = null,
public val egressTo: Output? = null,
public val perimeter: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.accesscontextmanager.ServicePerimeterDryRunEgressPolicyArgs = com.pulumi.gcp.accesscontextmanager.ServicePerimeterDryRunEgressPolicyArgs.builder()
.egressFrom(egressFrom?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.egressTo(egressTo?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.perimeter(perimeter?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ServicePerimeterDryRunEgressPolicyArgs].
*/
@PulumiTagMarker
public class ServicePerimeterDryRunEgressPolicyArgsBuilder internal constructor() {
private var egressFrom: Output? = null
private var egressTo: Output? = null
private var perimeter: Output? = null
/**
* @param value Defines conditions on the source of a request causing this `EgressPolicy` to apply.
* Structure is documented below.
*/
@JvmName("nmvercphxouwwseq")
public suspend fun egressFrom(`value`: Output) {
this.egressFrom = value
}
/**
* @param value Defines the conditions on the `ApiOperation` and destination resources that
* cause this `EgressPolicy` to apply.
* Structure is documented below.
*/
@JvmName("peblbwtpeorfmkga")
public suspend fun egressTo(`value`: Output) {
this.egressTo = value
}
/**
* @param value The name of the Service Perimeter to add this resource to.
* - - -
*/
@JvmName("lrpqfwtuhyaljxlf")
public suspend fun perimeter(`value`: Output) {
this.perimeter = value
}
/**
* @param value Defines conditions on the source of a request causing this `EgressPolicy` to apply.
* Structure is documented below.
*/
@JvmName("krdrogweerlndbtr")
public suspend fun egressFrom(`value`: ServicePerimeterDryRunEgressPolicyEgressFromArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.egressFrom = mapped
}
/**
* @param argument Defines conditions on the source of a request causing this `EgressPolicy` to apply.
* Structure is documented below.
*/
@JvmName("ebyeuhorsgpqxudr")
public suspend fun egressFrom(argument: suspend ServicePerimeterDryRunEgressPolicyEgressFromArgsBuilder.() -> Unit) {
val toBeMapped = ServicePerimeterDryRunEgressPolicyEgressFromArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.egressFrom = mapped
}
/**
* @param value Defines the conditions on the `ApiOperation` and destination resources that
* cause this `EgressPolicy` to apply.
* Structure is documented below.
*/
@JvmName("cgeqygpkbvoegnro")
public suspend fun egressTo(`value`: ServicePerimeterDryRunEgressPolicyEgressToArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.egressTo = mapped
}
/**
* @param argument Defines the conditions on the `ApiOperation` and destination resources that
* cause this `EgressPolicy` to apply.
* Structure is documented below.
*/
@JvmName("ngfashsrbvxwjibo")
public suspend fun egressTo(argument: suspend ServicePerimeterDryRunEgressPolicyEgressToArgsBuilder.() -> Unit) {
val toBeMapped = ServicePerimeterDryRunEgressPolicyEgressToArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.egressTo = mapped
}
/**
* @param value The name of the Service Perimeter to add this resource to.
* - - -
*/
@JvmName("pownnndijultpoei")
public suspend fun perimeter(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.perimeter = mapped
}
internal fun build(): ServicePerimeterDryRunEgressPolicyArgs =
ServicePerimeterDryRunEgressPolicyArgs(
egressFrom = egressFrom,
egressTo = egressTo,
perimeter = perimeter,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy