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

com.pulumi.gcp.accesscontextmanager.kotlin.inputs.ServicePerimeterEgressPolicyEgressToArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.accesscontextmanager.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.accesscontextmanager.inputs.ServicePerimeterEgressPolicyEgressToArgs.builder
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.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property externalResources A list of external resources that are allowed to be accessed. A request
 * matches if it contains an external resource in this list (Example:
 * s3://bucket/path). Currently '*' is not allowed.
 * @property operations A list of `ApiOperations` that this egress rule applies to. A request matches
 * if it contains an operation/service in this list.
 * Structure is documented below.
 * @property resources A list of resources, currently only projects in the form
 * `projects/`, that match this to stanza. A request matches
 * if it contains a resource in this list. If * is specified for resources,
 * then this `EgressTo` rule will authorize access to all resources outside
 * the perimeter.
 */
public data class ServicePerimeterEgressPolicyEgressToArgs(
    public val externalResources: Output>? = null,
    public val operations: Output>? = null,
    public val resources: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.accesscontextmanager.inputs.ServicePerimeterEgressPolicyEgressToArgs =
        com.pulumi.gcp.accesscontextmanager.inputs.ServicePerimeterEgressPolicyEgressToArgs.builder()
            .externalResources(externalResources?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .operations(
                operations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resources(resources?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ServicePerimeterEgressPolicyEgressToArgs].
 */
@PulumiTagMarker
public class ServicePerimeterEgressPolicyEgressToArgsBuilder internal constructor() {
    private var externalResources: Output>? = null

    private var operations: Output>? = null

    private var resources: Output>? = null

    /**
     * @param value A list of external resources that are allowed to be accessed. A request
     * matches if it contains an external resource in this list (Example:
     * s3://bucket/path). Currently '*' is not allowed.
     */
    @JvmName("sgiteieqqddniqrb")
    public suspend fun externalResources(`value`: Output>) {
        this.externalResources = value
    }

    @JvmName("jnjsbnaexiravdpb")
    public suspend fun externalResources(vararg values: Output) {
        this.externalResources = Output.all(values.asList())
    }

    /**
     * @param values A list of external resources that are allowed to be accessed. A request
     * matches if it contains an external resource in this list (Example:
     * s3://bucket/path). Currently '*' is not allowed.
     */
    @JvmName("ynlavblwuewfxxrf")
    public suspend fun externalResources(values: List>) {
        this.externalResources = Output.all(values)
    }

    /**
     * @param value A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("hwvmqwsexjpflyxo")
    public suspend fun operations(`value`: Output>) {
        this.operations = value
    }

    @JvmName("jxsvmflwsmucnjow")
    public suspend fun operations(vararg values: Output) {
        this.operations = Output.all(values.asList())
    }

    /**
     * @param values A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("caivestnmjkddmid")
    public suspend fun operations(values: List>) {
        this.operations = Output.all(values)
    }

    /**
     * @param value A list of resources, currently only projects in the form
     * `projects/`, that match this to stanza. A request matches
     * if it contains a resource in this list. If * is specified for resources,
     * then this `EgressTo` rule will authorize access to all resources outside
     * the perimeter.
     */
    @JvmName("ergcjtjjvtusbkjh")
    public suspend fun resources(`value`: Output>) {
        this.resources = value
    }

    @JvmName("fcufkogsygqsnjwx")
    public suspend fun resources(vararg values: Output) {
        this.resources = Output.all(values.asList())
    }

    /**
     * @param values A list of resources, currently only projects in the form
     * `projects/`, that match this to stanza. A request matches
     * if it contains a resource in this list. If * is specified for resources,
     * then this `EgressTo` rule will authorize access to all resources outside
     * the perimeter.
     */
    @JvmName("gfftghvxjwllwwbc")
    public suspend fun resources(values: List>) {
        this.resources = Output.all(values)
    }

    /**
     * @param value A list of external resources that are allowed to be accessed. A request
     * matches if it contains an external resource in this list (Example:
     * s3://bucket/path). Currently '*' is not allowed.
     */
    @JvmName("cqpwbmlgyjqusyxk")
    public suspend fun externalResources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalResources = mapped
    }

    /**
     * @param values A list of external resources that are allowed to be accessed. A request
     * matches if it contains an external resource in this list (Example:
     * s3://bucket/path). Currently '*' is not allowed.
     */
    @JvmName("ncflsxvxothyxwle")
    public suspend fun externalResources(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.externalResources = mapped
    }

    /**
     * @param value A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("yahrgalnjekbqkch")
    public suspend fun operations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.operations = mapped
    }

    /**
     * @param argument A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("dydytgaikoygwdiw")
    public suspend fun operations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServicePerimeterEgressPolicyEgressToOperationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.operations = mapped
    }

    /**
     * @param argument A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("tetyohqomplauqxn")
    public suspend fun operations(vararg argument: suspend ServicePerimeterEgressPolicyEgressToOperationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServicePerimeterEgressPolicyEgressToOperationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.operations = mapped
    }

    /**
     * @param argument A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("jgrhwvtrixlxgmtx")
    public suspend fun operations(argument: suspend ServicePerimeterEgressPolicyEgressToOperationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServicePerimeterEgressPolicyEgressToOperationArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.operations = mapped
    }

    /**
     * @param values A list of `ApiOperations` that this egress rule applies to. A request matches
     * if it contains an operation/service in this list.
     * Structure is documented below.
     */
    @JvmName("dnqwkirlhfbycbqp")
    public suspend fun operations(vararg values: ServicePerimeterEgressPolicyEgressToOperationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.operations = mapped
    }

    /**
     * @param value A list of resources, currently only projects in the form
     * `projects/`, that match this to stanza. A request matches
     * if it contains a resource in this list. If * is specified for resources,
     * then this `EgressTo` rule will authorize access to all resources outside
     * the perimeter.
     */
    @JvmName("iexsqpotrjboggfy")
    public suspend fun resources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param values A list of resources, currently only projects in the form
     * `projects/`, that match this to stanza. A request matches
     * if it contains a resource in this list. If * is specified for resources,
     * then this `EgressTo` rule will authorize access to all resources outside
     * the perimeter.
     */
    @JvmName("lfnejbyybsubbrgl")
    public suspend fun resources(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    internal fun build(): ServicePerimeterEgressPolicyEgressToArgs =
        ServicePerimeterEgressPolicyEgressToArgs(
            externalResources = externalResources,
            operations = operations,
            resources = resources,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy