Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.fis.kotlin.inputs.ExperimentTemplateTargetArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.fis.kotlin.inputs
import com.pulumi.aws.fis.inputs.ExperimentTemplateTargetArgs.builder
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 kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* @property filters Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
* @property name Friendly name given to the target.
* @property parameters The resource type parameters.
* > **NOTE:** The `target` configuration block requires either `resource_arns` or `resource_tag`.
* @property resourceArns Set of ARNs of the resources to target with an action. Conflicts with `resource_tag`.
* @property resourceTags Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
* @property resourceType AWS resource type. The resource type must be supported for the specified action. To find out what resource types are supported, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#resource-types).
* @property selectionMode Scopes the identified resources. Valid values are `ALL` (all identified resources), `COUNT(n)` (randomly select `n` of the identified resources), `PERCENT(n)` (randomly select `n` percent of the identified resources).
*/
public data class ExperimentTemplateTargetArgs(
public val filters: Output>? = null,
public val name: Output,
public val parameters: Output>? = null,
public val resourceArns: Output>? = null,
public val resourceTags: Output>? = null,
public val resourceType: Output,
public val selectionMode: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.fis.inputs.ExperimentTemplateTargetArgs =
com.pulumi.aws.fis.inputs.ExperimentTemplateTargetArgs.builder()
.filters(
filters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name.applyValue({ args0 -> args0 }))
.parameters(
parameters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.resourceArns(resourceArns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.resourceTags(
resourceTags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.resourceType(resourceType.applyValue({ args0 -> args0 }))
.selectionMode(selectionMode.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ExperimentTemplateTargetArgs].
*/
@PulumiTagMarker
public class ExperimentTemplateTargetArgsBuilder internal constructor() {
private var filters: Output>? = null
private var name: Output? = null
private var parameters: Output>? = null
private var resourceArns: Output>? = null
private var resourceTags: Output>? = null
private var resourceType: Output? = null
private var selectionMode: Output? = null
/**
* @param value Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("frpuxcmtrfnslote")
public suspend fun filters(`value`: Output>) {
this.filters = value
}
@JvmName("hmpbgwvexswgpdyw")
public suspend fun filters(vararg values: Output) {
this.filters = Output.all(values.asList())
}
/**
* @param values Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("kvvkyrwtnabbrshp")
public suspend fun filters(values: List>) {
this.filters = Output.all(values)
}
/**
* @param value Friendly name given to the target.
*/
@JvmName("hlcxmtcstnyhhxpf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The resource type parameters.
* > **NOTE:** The `target` configuration block requires either `resource_arns` or `resource_tag`.
*/
@JvmName("wplojialwixufpce")
public suspend fun parameters(`value`: Output>) {
this.parameters = value
}
/**
* @param value Set of ARNs of the resources to target with an action. Conflicts with `resource_tag`.
*/
@JvmName("eqkthuyoykimgydi")
public suspend fun resourceArns(`value`: Output>) {
this.resourceArns = value
}
@JvmName("ngmtmveduwpicqyw")
public suspend fun resourceArns(vararg values: Output) {
this.resourceArns = Output.all(values.asList())
}
/**
* @param values Set of ARNs of the resources to target with an action. Conflicts with `resource_tag`.
*/
@JvmName("mjcuwlbcvqrkoeas")
public suspend fun resourceArns(values: List>) {
this.resourceArns = Output.all(values)
}
/**
* @param value Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("pukeatoplmbymybm")
public suspend fun resourceTags(`value`: Output>) {
this.resourceTags = value
}
@JvmName("lkddxwplftdelvce")
public suspend fun resourceTags(vararg values: Output) {
this.resourceTags = Output.all(values.asList())
}
/**
* @param values Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("hmycnnmgbgxgskpl")
public suspend fun resourceTags(values: List>) {
this.resourceTags = Output.all(values)
}
/**
* @param value AWS resource type. The resource type must be supported for the specified action. To find out what resource types are supported, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#resource-types).
*/
@JvmName("hvtccsmqgqphaejp")
public suspend fun resourceType(`value`: Output) {
this.resourceType = value
}
/**
* @param value Scopes the identified resources. Valid values are `ALL` (all identified resources), `COUNT(n)` (randomly select `n` of the identified resources), `PERCENT(n)` (randomly select `n` percent of the identified resources).
*/
@JvmName("tcefrbiswtejpktr")
public suspend fun selectionMode(`value`: Output) {
this.selectionMode = value
}
/**
* @param value Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("dvsxejhvppmfdnop")
public suspend fun filters(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.filters = mapped
}
/**
* @param argument Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("pxocwibcaetpmmqt")
public suspend fun filters(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ExperimentTemplateTargetFilterArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.filters = mapped
}
/**
* @param argument Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("qciarqxewjxvrnqd")
public suspend fun filters(vararg argument: suspend ExperimentTemplateTargetFilterArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ExperimentTemplateTargetFilterArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.filters = mapped
}
/**
* @param argument Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("rlrjgilfedobgelm")
public suspend fun filters(argument: suspend ExperimentTemplateTargetFilterArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
ExperimentTemplateTargetFilterArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.filters = mapped
}
/**
* @param values Filter(s) for the target. Filters can be used to select resources based on specific attributes returned by the respective describe action of the resource type. For more information, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#target-filters). See below.
*/
@JvmName("vdgrjsphpuwksahk")
public suspend fun filters(vararg values: ExperimentTemplateTargetFilterArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.filters = mapped
}
/**
* @param value Friendly name given to the target.
*/
@JvmName("omrtbswmcxysoluw")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The resource type parameters.
* > **NOTE:** The `target` configuration block requires either `resource_arns` or `resource_tag`.
*/
@JvmName("acmuulmjvrreqqkq")
public suspend fun parameters(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param values The resource type parameters.
* > **NOTE:** The `target` configuration block requires either `resource_arns` or `resource_tag`.
*/
@JvmName("cmredwbwpnstwvil")
public fun parameters(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param value Set of ARNs of the resources to target with an action. Conflicts with `resource_tag`.
*/
@JvmName("yncnucxardyxxyvp")
public suspend fun resourceArns(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceArns = mapped
}
/**
* @param values Set of ARNs of the resources to target with an action. Conflicts with `resource_tag`.
*/
@JvmName("xvwqxfdikxcorpqj")
public suspend fun resourceArns(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceArns = mapped
}
/**
* @param value Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("wimktnthhluceqsi")
public suspend fun resourceTags(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceTags = mapped
}
/**
* @param argument Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("ftqhryfstsgaehwx")
public suspend fun resourceTags(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ExperimentTemplateTargetResourceTagArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.resourceTags = mapped
}
/**
* @param argument Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("nfmfbldbjlettmjl")
public suspend fun resourceTags(vararg argument: suspend ExperimentTemplateTargetResourceTagArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ExperimentTemplateTargetResourceTagArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.resourceTags = mapped
}
/**
* @param argument Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("vjivvxapnqeuyfon")
public suspend fun resourceTags(argument: suspend ExperimentTemplateTargetResourceTagArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
ExperimentTemplateTargetResourceTagArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.resourceTags = mapped
}
/**
* @param values Tag(s) the resources need to have to be considered a valid target for an action. Conflicts with `resource_arns`. See below.
*/
@JvmName("xscwbskvjdoswsrp")
public suspend fun resourceTags(vararg values: ExperimentTemplateTargetResourceTagArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceTags = mapped
}
/**
* @param value AWS resource type. The resource type must be supported for the specified action. To find out what resource types are supported, see [Targets for AWS FIS](https://docs.aws.amazon.com/fis/latest/userguide/targets.html#resource-types).
*/
@JvmName("ywixphvxwlncadps")
public suspend fun resourceType(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceType = mapped
}
/**
* @param value Scopes the identified resources. Valid values are `ALL` (all identified resources), `COUNT(n)` (randomly select `n` of the identified resources), `PERCENT(n)` (randomly select `n` percent of the identified resources).
*/
@JvmName("sxqwrxcrmtfpwnxp")
public suspend fun selectionMode(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.selectionMode = mapped
}
internal fun build(): ExperimentTemplateTargetArgs = ExperimentTemplateTargetArgs(
filters = filters,
name = name ?: throw PulumiNullFieldException("name"),
parameters = parameters,
resourceArns = resourceArns,
resourceTags = resourceTags,
resourceType = resourceType ?: throw PulumiNullFieldException("resourceType"),
selectionMode = selectionMode ?: throw PulumiNullFieldException("selectionMode"),
)
}