com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.inputs.PolicyRulesWithSubjectsArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-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.kubernetes.flowcontrol.v1beta1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.PolicyRulesWithSubjectsArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.
* @property nonResourceRules `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
* @property resourceRules `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.
* @property subjects subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.
*/
public data class PolicyRulesWithSubjectsArgs(
public val nonResourceRules: Output>? = null,
public val resourceRules: Output>? = null,
public val subjects: Output>,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.PolicyRulesWithSubjectsArgs =
com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.PolicyRulesWithSubjectsArgs.builder()
.nonResourceRules(
nonResourceRules?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.resourceRules(
resourceRules?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.subjects(
subjects.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [PolicyRulesWithSubjectsArgs].
*/
@PulumiTagMarker
public class PolicyRulesWithSubjectsArgsBuilder internal constructor() {
private var nonResourceRules: Output>? = null
private var resourceRules: Output>? = null
private var subjects: Output>? = null
/**
* @param value `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
*/
@JvmName("iowtftldjwjkdksh")
public suspend fun nonResourceRules(`value`: Output>) {
this.nonResourceRules = value
}
@JvmName("tobtuxrbpusrgnck")
public suspend fun nonResourceRules(vararg values: Output) {
this.nonResourceRules = Output.all(values.asList())
}
/**
* @param values `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
*/
@JvmName("baqucubyywpbcldh")
public suspend fun nonResourceRules(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy