![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.evidently.kotlin.Launch.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.evidently.kotlin
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchExecutionStatusObject
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchGroupObject
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchMetricDefinitionObject
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchStepConfig
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import kotlin.collections.List
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchExecutionStatusObject.Companion.toKotlin as launchExecutionStatusObjectToKotlin
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchGroupObject.Companion.toKotlin as launchGroupObjectToKotlin
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchMetricDefinitionObject.Companion.toKotlin as launchMetricDefinitionObjectToKotlin
import com.pulumi.awsnative.evidently.kotlin.outputs.LaunchStepConfig.Companion.toKotlin as launchStepConfigToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Launch].
*/
@PulumiTagMarker
public class LaunchResourceBuilder internal constructor() {
public var name: String? = null
public var args: LaunchArgs = LaunchArgs()
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 LaunchArgsBuilder.() -> Unit) {
val builder = LaunchArgsBuilder()
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(): Launch {
val builtJavaResource = com.pulumi.awsnative.evidently.Launch(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Launch(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Evidently::Launch.
*/
public class Launch internal constructor(
override val javaResource: com.pulumi.awsnative.evidently.Launch,
) : KotlinCustomResource(javaResource, LaunchMapper) {
/**
* The ARN of the launch. For example, `arn:aws:evidently:us-west-2:0123455678912:project/myProject/launch/myLaunch`
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* An optional description for the launch.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Start or Stop Launch Launch. Default is not started.
*/
public val executionStatus: Output?
get() = javaResource.executionStatus().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> launchExecutionStatusObjectToKotlin(args0) })
}).orElse(null)
})
/**
* An array of structures that contains the feature and variations that are to be used for the launch. You can up to five launch groups in a launch.
*/
public val groups: Output>
get() = javaResource.groups().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
launchGroupObjectToKotlin(args0)
})
})
})
/**
* An array of structures that define the metrics that will be used to monitor the launch performance. You can have up to three metric monitors in the array.
*/
public val metricMonitors: Output>?
get() = javaResource.metricMonitors().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
launchMetricDefinitionObjectToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The name for the launch. It can include up to 127 characters.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The name or ARN of the project that you want to create the launch in.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* When Evidently assigns a particular user session to a launch, it must use a randomization ID to determine which variation the user session is served. This randomization ID is a combination of the entity ID and `randomizationSalt` . If you omit `randomizationSalt` , Evidently uses the launch name as the `randomizationsSalt` .
*/
public val randomizationSalt: Output?
get() = javaResource.randomizationSalt().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch.
*/
public val scheduledSplitsConfig: Output>
get() = javaResource.scheduledSplitsConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> launchStepConfigToKotlin(args0) })
})
})
/**
* An array of key-value pairs to apply to this resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object LaunchMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.evidently.Launch::class == javaResource::class
override fun map(javaResource: Resource): Launch = Launch(
javaResource as
com.pulumi.awsnative.evidently.Launch,
)
}
/**
* @see [Launch].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Launch].
*/
public suspend fun launch(name: String, block: suspend LaunchResourceBuilder.() -> Unit): Launch {
val builder = LaunchResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Launch].
* @param name The _unique_ name of the resulting resource.
*/
public fun launch(name: String): Launch {
val builder = LaunchResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy