com.pulumi.awsnative.backup.kotlin.RestoreTestingPlan.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.backup.kotlin
import com.pulumi.awsnative.backup.kotlin.outputs.RestoreTestingPlanRestoreTestingRecoveryPointSelection
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.backup.kotlin.outputs.RestoreTestingPlanRestoreTestingRecoveryPointSelection.Companion.toKotlin as restoreTestingPlanRestoreTestingRecoveryPointSelectionToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [RestoreTestingPlan].
*/
@PulumiTagMarker
public class RestoreTestingPlanResourceBuilder internal constructor() {
public var name: String? = null
public var args: RestoreTestingPlanArgs = RestoreTestingPlanArgs()
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 RestoreTestingPlanArgsBuilder.() -> Unit) {
val builder = RestoreTestingPlanArgsBuilder()
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(): RestoreTestingPlan {
val builtJavaResource = com.pulumi.awsnative.backup.RestoreTestingPlan(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RestoreTestingPlan(builtJavaResource)
}
}
/**
* Definition of AWS::Backup::RestoreTestingPlan Resource Type
*/
public class RestoreTestingPlan internal constructor(
override val javaResource: com.pulumi.awsnative.backup.RestoreTestingPlan,
) : KotlinCustomResource(javaResource, RestoreTestingPlanMapper) {
/**
* The specified criteria to assign a set of resources, such as recovery point types or backup vaults.
*/
public val recoveryPointSelection: Output
get() = javaResource.recoveryPointSelection().applyValue({ args0 ->
args0.let({ args0 ->
restoreTestingPlanRestoreTestingRecoveryPointSelectionToKotlin(args0)
})
})
/**
* An Amazon Resource Name (ARN) that uniquely identifies a restore testing plan.
*/
public val restoreTestingPlanArn: Output
get() = javaResource.restoreTestingPlanArn().applyValue({ args0 -> args0 })
/**
* The RestoreTestingPlanName is a unique string that is the name of the restore testing plan. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.
*/
public val restoreTestingPlanName: Output
get() = javaResource.restoreTestingPlanName().applyValue({ args0 -> args0 })
/**
* A CRON expression in specified timezone when a restore testing plan is executed.
*/
public val scheduleExpression: Output
get() = javaResource.scheduleExpression().applyValue({ args0 -> args0 })
/**
* Optional. This is the timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.
*/
public val scheduleExpressionTimezone: Output?
get() = javaResource.scheduleExpressionTimezone().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Defaults to 24 hours.
* A value in hours after a restore test is scheduled before a job will be canceled if it doesn't start successfully. This value is optional. If this value is included, this parameter has a maximum value of 168 hours (one week).
*/
public val startWindowHours: Output?
get() = javaResource.startWindowHours().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters,numbers, spaces, and the following characters: `+ - = . _ : /.`
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object RestoreTestingPlanMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.backup.RestoreTestingPlan::class == javaResource::class
override fun map(javaResource: Resource): RestoreTestingPlan = RestoreTestingPlan(
javaResource as
com.pulumi.awsnative.backup.RestoreTestingPlan,
)
}
/**
* @see [RestoreTestingPlan].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [RestoreTestingPlan].
*/
public suspend fun restoreTestingPlan(
name: String,
block: suspend RestoreTestingPlanResourceBuilder.() -> Unit,
): RestoreTestingPlan {
val builder = RestoreTestingPlanResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [RestoreTestingPlan].
* @param name The _unique_ name of the resulting resource.
*/
public fun restoreTestingPlan(name: String): RestoreTestingPlan {
val builder = RestoreTestingPlanResourceBuilder()
builder.name(name)
return builder.build()
}