com.pulumi.awsnative.synthetics.kotlin.CanaryArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.synthetics.kotlin
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.synthetics.CanaryArgs.builder
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryArtifactConfigArgs
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryArtifactConfigArgsBuilder
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryCodeArgs
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryCodeArgsBuilder
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryRunConfigArgs
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryRunConfigArgsBuilder
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryScheduleArgs
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryScheduleArgsBuilder
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryVisualReferenceArgs
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryVisualReferenceArgsBuilder
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryVpcConfigArgs
import com.pulumi.awsnative.synthetics.kotlin.inputs.CanaryVpcConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Resource Type definition for AWS::Synthetics::Canary
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* @property artifactConfig Provide artifact configuration
* @property artifactS3Location Provide the s3 bucket output location for test results
* @property code Provide the canary script source
* @property deleteLambdaResourcesOnCanaryDeletion Deletes associated lambda resources created by Synthetics if set to True. Default is False
* @property executionRoleArn Lambda Execution role used to run your canaries
* @property failureRetentionPeriod Retention period of failed canary runs represented in number of days
* @property name Name of the canary.
* @property runConfig Provide canary run configuration
* @property runtimeVersion Runtime version of Synthetics Library
* @property schedule Frequency to run your canaries
* @property startCanaryAfterCreation Runs canary if set to True. Default is False
* @property successRetentionPeriod Retention period of successful canary runs represented in number of days
* @property tags The list of key-value pairs that are associated with the canary.
* @property visualReference Visual reference configuration for visual testing
* @property vpcConfig Provide VPC Configuration if enabled.
*/
public data class CanaryArgs(
public val artifactConfig: Output? = null,
public val artifactS3Location: Output? = null,
public val code: Output? = null,
public val deleteLambdaResourcesOnCanaryDeletion: Output? = null,
public val executionRoleArn: Output? = null,
public val failureRetentionPeriod: Output? = null,
public val name: Output? = null,
public val runConfig: Output? = null,
public val runtimeVersion: Output? = null,
public val schedule: Output? = null,
public val startCanaryAfterCreation: Output? = null,
public val successRetentionPeriod: Output? = null,
public val tags: Output>? = null,
public val visualReference: Output? = null,
public val vpcConfig: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.synthetics.CanaryArgs =
com.pulumi.awsnative.synthetics.CanaryArgs.builder()
.artifactConfig(artifactConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.artifactS3Location(artifactS3Location?.applyValue({ args0 -> args0 }))
.code(code?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.deleteLambdaResourcesOnCanaryDeletion(
deleteLambdaResourcesOnCanaryDeletion?.applyValue({ args0 ->
args0
}),
)
.executionRoleArn(executionRoleArn?.applyValue({ args0 -> args0 }))
.failureRetentionPeriod(failureRetentionPeriod?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.runConfig(runConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.runtimeVersion(runtimeVersion?.applyValue({ args0 -> args0 }))
.schedule(schedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.startCanaryAfterCreation(startCanaryAfterCreation?.applyValue({ args0 -> args0 }))
.successRetentionPeriod(successRetentionPeriod?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.visualReference(visualReference?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.vpcConfig(vpcConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [CanaryArgs].
*/
@PulumiTagMarker
public class CanaryArgsBuilder internal constructor() {
private var artifactConfig: Output? = null
private var artifactS3Location: Output? = null
private var code: Output? = null
private var deleteLambdaResourcesOnCanaryDeletion: Output? = null
private var executionRoleArn: Output? = null
private var failureRetentionPeriod: Output? = null
private var name: Output? = null
private var runConfig: Output? = null
private var runtimeVersion: Output? = null
private var schedule: Output? = null
private var startCanaryAfterCreation: Output? = null
private var successRetentionPeriod: Output? = null
private var tags: Output>? = null
private var visualReference: Output? = null
private var vpcConfig: Output? = null
/**
* @param value Provide artifact configuration
*/
@JvmName("obuwxnxdtqfmomoi")
public suspend fun artifactConfig(`value`: Output) {
this.artifactConfig = value
}
/**
* @param value Provide the s3 bucket output location for test results
*/
@JvmName("lrumagbajnwnapgs")
public suspend fun artifactS3Location(`value`: Output) {
this.artifactS3Location = value
}
/**
* @param value Provide the canary script source
*/
@JvmName("ofeudcbdqjvnljig")
public suspend fun code(`value`: Output) {
this.code = value
}
/**
* @param value Deletes associated lambda resources created by Synthetics if set to True. Default is False
*/
@JvmName("bhqjdhirulrucxpe")
public suspend fun deleteLambdaResourcesOnCanaryDeletion(`value`: Output) {
this.deleteLambdaResourcesOnCanaryDeletion = value
}
/**
* @param value Lambda Execution role used to run your canaries
*/
@JvmName("njexktsxtytmvorv")
public suspend fun executionRoleArn(`value`: Output) {
this.executionRoleArn = value
}
/**
* @param value Retention period of failed canary runs represented in number of days
*/
@JvmName("ttehumksxbcncrhq")
public suspend fun failureRetentionPeriod(`value`: Output) {
this.failureRetentionPeriod = value
}
/**
* @param value Name of the canary.
*/
@JvmName("rlnjuemkkwgjtugm")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Provide canary run configuration
*/
@JvmName("brqkcsqbtrivyisx")
public suspend fun runConfig(`value`: Output) {
this.runConfig = value
}
/**
* @param value Runtime version of Synthetics Library
*/
@JvmName("fpmosgutvpsphwjg")
public suspend fun runtimeVersion(`value`: Output) {
this.runtimeVersion = value
}
/**
* @param value Frequency to run your canaries
*/
@JvmName("ffhfpcbebhsdjatn")
public suspend fun schedule(`value`: Output) {
this.schedule = value
}
/**
* @param value Runs canary if set to True. Default is False
*/
@JvmName("wpmyogwjbepqrfni")
public suspend fun startCanaryAfterCreation(`value`: Output) {
this.startCanaryAfterCreation = value
}
/**
* @param value Retention period of successful canary runs represented in number of days
*/
@JvmName("gnmqddsacepbmskg")
public suspend fun successRetentionPeriod(`value`: Output) {
this.successRetentionPeriod = value
}
/**
* @param value The list of key-value pairs that are associated with the canary.
*/
@JvmName("ndlikilbausbwsad")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
@JvmName("lltmpssbstusfate")
public suspend fun tags(vararg values: Output) {
this.tags = Output.all(values.asList())
}
/**
* @param values The list of key-value pairs that are associated with the canary.
*/
@JvmName("nifdgqjxqphntvtx")
public suspend fun tags(values: List