All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.backup.kotlin.RestoreTestingSelection.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.backup.kotlin

import com.pulumi.awsnative.backup.kotlin.outputs.RestoreTestingSelectionProtectedResourceConditions
import com.pulumi.awsnative.backup.kotlin.outputs.RestoreTestingSelectionProtectedResourceConditions.Companion.toKotlin
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 kotlin.collections.Map

/**
 * Builder for [RestoreTestingSelection].
 */
@PulumiTagMarker
public class RestoreTestingSelectionResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: RestoreTestingSelectionArgs = RestoreTestingSelectionArgs()

    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 RestoreTestingSelectionArgsBuilder.() -> Unit) {
        val builder = RestoreTestingSelectionArgsBuilder()
        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(): RestoreTestingSelection {
        val builtJavaResource =
            com.pulumi.awsnative.backup.RestoreTestingSelection(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return RestoreTestingSelection(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::Backup::RestoreTestingSelection
 */
public class RestoreTestingSelection internal constructor(
    override val javaResource: com.pulumi.awsnative.backup.RestoreTestingSelection,
) : KotlinCustomResource(javaResource, RestoreTestingSelectionMapper) {
    /**
     * The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create the target resource; for example: `arn:aws:iam::123456789012:role/S3Access` .
     */
    public val iamRoleArn: Output
        get() = javaResource.iamRoleArn().applyValue({ args0 -> args0 })

    /**
     * You can include specific ARNs, such as `ProtectedResourceArns: ["arn:aws:...", "arn:aws:..."]` or you can include a wildcard: `ProtectedResourceArns: ["*"]` , but not both.
     */
    public val protectedResourceArns: Output>?
        get() = javaResource.protectedResourceArns().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * In a resource testing selection, this parameter filters by specific conditions such as `StringEquals` or `StringNotEquals` .
     */
    public val protectedResourceConditions:
        Output?
        get() = javaResource.protectedResourceConditions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The type of AWS resource included in a resource testing selection; for example, an Amazon EBS volume or an Amazon RDS database.
     */
    public val protectedResourceType: Output
        get() = javaResource.protectedResourceType().applyValue({ args0 -> args0 })

    /**
     * You can override certain restore metadata keys by including the parameter `RestoreMetadataOverrides` in the body of `RestoreTestingSelection` . Key values are not case sensitive.
     * See the complete list of [restore testing inferred metadata](https://docs.aws.amazon.com/aws-backup/latest/devguide/restore-testing-inferred-metadata.html) .
     */
    public val restoreMetadataOverrides: Output>?
        get() = javaResource.restoreMetadataOverrides().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.key.to(args0.value) }).toMap()
            }).orElse(null)
        })

    /**
     * Unique string that is the name of the restore testing plan.
     * The name cannot be changed after creation. The name must consist of only alphanumeric characters and underscores. Maximum length is 50.
     */
    public val restoreTestingPlanName: Output
        get() = javaResource.restoreTestingPlanName().applyValue({ args0 -> args0 })

    /**
     * The unique name of the restore testing selection that belongs to the related restore testing plan.
     */
    public val restoreTestingSelectionName: Output
        get() = javaResource.restoreTestingSelectionName().applyValue({ args0 -> args0 })

    /**
     * This is amount of hours (1 to 168) available to run a validation script on the data. The data will be deleted upon the completion of the validation script or the end of the specified retention period, whichever comes first.
     */
    public val validationWindowHours: Output?
        get() = javaResource.validationWindowHours().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object RestoreTestingSelectionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.backup.RestoreTestingSelection::class == javaResource::class

    override fun map(javaResource: Resource): RestoreTestingSelection =
        RestoreTestingSelection(javaResource as com.pulumi.awsnative.backup.RestoreTestingSelection)
}

/**
 * @see [RestoreTestingSelection].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [RestoreTestingSelection].
 */
public suspend fun restoreTestingSelection(
    name: String,
    block: suspend RestoreTestingSelectionResourceBuilder.() -> Unit,
): RestoreTestingSelection {
    val builder = RestoreTestingSelectionResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [RestoreTestingSelection].
 * @param name The _unique_ name of the resulting resource.
 */
public fun restoreTestingSelection(name: String): RestoreTestingSelection {
    val builder = RestoreTestingSelectionResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy